{-# 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.YouTube.Types.Product where
import Network.Google.Prelude
import Network.Google.YouTube.Types.Sum
data LiveChatMessageAuthorDetails =
LiveChatMessageAuthorDetails'
{ _lcmadIsVerified :: !(Maybe Bool)
, _lcmadIsChatOwner :: !(Maybe Bool)
, _lcmadChannelId :: !(Maybe Text)
, _lcmadProFileImageURL :: !(Maybe Text)
, _lcmadIsChatModerator :: !(Maybe Bool)
, _lcmadDisplayName :: !(Maybe Text)
, _lcmadIsChatSponsor :: !(Maybe Bool)
, _lcmadChannelURL :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatMessageAuthorDetails
:: LiveChatMessageAuthorDetails
liveChatMessageAuthorDetails =
LiveChatMessageAuthorDetails'
{ _lcmadIsVerified = Nothing
, _lcmadIsChatOwner = Nothing
, _lcmadChannelId = Nothing
, _lcmadProFileImageURL = Nothing
, _lcmadIsChatModerator = Nothing
, _lcmadDisplayName = Nothing
, _lcmadIsChatSponsor = Nothing
, _lcmadChannelURL = Nothing
}
lcmadIsVerified :: Lens' LiveChatMessageAuthorDetails (Maybe Bool)
lcmadIsVerified
= lens _lcmadIsVerified
(\ s a -> s{_lcmadIsVerified = a})
lcmadIsChatOwner :: Lens' LiveChatMessageAuthorDetails (Maybe Bool)
lcmadIsChatOwner
= lens _lcmadIsChatOwner
(\ s a -> s{_lcmadIsChatOwner = a})
lcmadChannelId :: Lens' LiveChatMessageAuthorDetails (Maybe Text)
lcmadChannelId
= lens _lcmadChannelId
(\ s a -> s{_lcmadChannelId = a})
lcmadProFileImageURL :: Lens' LiveChatMessageAuthorDetails (Maybe Text)
lcmadProFileImageURL
= lens _lcmadProFileImageURL
(\ s a -> s{_lcmadProFileImageURL = a})
lcmadIsChatModerator :: Lens' LiveChatMessageAuthorDetails (Maybe Bool)
lcmadIsChatModerator
= lens _lcmadIsChatModerator
(\ s a -> s{_lcmadIsChatModerator = a})
lcmadDisplayName :: Lens' LiveChatMessageAuthorDetails (Maybe Text)
lcmadDisplayName
= lens _lcmadDisplayName
(\ s a -> s{_lcmadDisplayName = a})
lcmadIsChatSponsor :: Lens' LiveChatMessageAuthorDetails (Maybe Bool)
lcmadIsChatSponsor
= lens _lcmadIsChatSponsor
(\ s a -> s{_lcmadIsChatSponsor = a})
lcmadChannelURL :: Lens' LiveChatMessageAuthorDetails (Maybe Text)
lcmadChannelURL
= lens _lcmadChannelURL
(\ s a -> s{_lcmadChannelURL = a})
instance FromJSON LiveChatMessageAuthorDetails where
parseJSON
= withObject "LiveChatMessageAuthorDetails"
(\ o ->
LiveChatMessageAuthorDetails' <$>
(o .:? "isVerified") <*> (o .:? "isChatOwner") <*>
(o .:? "channelId")
<*> (o .:? "profileImageUrl")
<*> (o .:? "isChatModerator")
<*> (o .:? "displayName")
<*> (o .:? "isChatSponsor")
<*> (o .:? "channelUrl"))
instance ToJSON LiveChatMessageAuthorDetails where
toJSON LiveChatMessageAuthorDetails'{..}
= object
(catMaybes
[("isVerified" .=) <$> _lcmadIsVerified,
("isChatOwner" .=) <$> _lcmadIsChatOwner,
("channelId" .=) <$> _lcmadChannelId,
("profileImageUrl" .=) <$> _lcmadProFileImageURL,
("isChatModerator" .=) <$> _lcmadIsChatModerator,
("displayName" .=) <$> _lcmadDisplayName,
("isChatSponsor" .=) <$> _lcmadIsChatSponsor,
("channelUrl" .=) <$> _lcmadChannelURL])
data SubscriptionSubscriberSnippet =
SubscriptionSubscriberSnippet'
{ _sssChannelId :: !(Maybe Text)
, _sssThumbnails :: !(Maybe ThumbnailDetails)
, _sssTitle :: !(Maybe Text)
, _sssDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionSubscriberSnippet
:: SubscriptionSubscriberSnippet
subscriptionSubscriberSnippet =
SubscriptionSubscriberSnippet'
{ _sssChannelId = Nothing
, _sssThumbnails = Nothing
, _sssTitle = Nothing
, _sssDescription = Nothing
}
sssChannelId :: Lens' SubscriptionSubscriberSnippet (Maybe Text)
sssChannelId
= lens _sssChannelId (\ s a -> s{_sssChannelId = a})
sssThumbnails :: Lens' SubscriptionSubscriberSnippet (Maybe ThumbnailDetails)
sssThumbnails
= lens _sssThumbnails
(\ s a -> s{_sssThumbnails = a})
sssTitle :: Lens' SubscriptionSubscriberSnippet (Maybe Text)
sssTitle = lens _sssTitle (\ s a -> s{_sssTitle = a})
sssDescription :: Lens' SubscriptionSubscriberSnippet (Maybe Text)
sssDescription
= lens _sssDescription
(\ s a -> s{_sssDescription = a})
instance FromJSON SubscriptionSubscriberSnippet where
parseJSON
= withObject "SubscriptionSubscriberSnippet"
(\ o ->
SubscriptionSubscriberSnippet' <$>
(o .:? "channelId") <*> (o .:? "thumbnails") <*>
(o .:? "title")
<*> (o .:? "description"))
instance ToJSON SubscriptionSubscriberSnippet where
toJSON SubscriptionSubscriberSnippet'{..}
= object
(catMaybes
[("channelId" .=) <$> _sssChannelId,
("thumbnails" .=) <$> _sssThumbnails,
("title" .=) <$> _sssTitle,
("description" .=) <$> _sssDescription])
data IngestionInfo =
IngestionInfo'
{ _iiBackupIngestionAddress :: !(Maybe Text)
, _iiIngestionAddress :: !(Maybe Text)
, _iiStreamName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
ingestionInfo
:: IngestionInfo
ingestionInfo =
IngestionInfo'
{ _iiBackupIngestionAddress = Nothing
, _iiIngestionAddress = Nothing
, _iiStreamName = Nothing
}
iiBackupIngestionAddress :: Lens' IngestionInfo (Maybe Text)
iiBackupIngestionAddress
= lens _iiBackupIngestionAddress
(\ s a -> s{_iiBackupIngestionAddress = a})
iiIngestionAddress :: Lens' IngestionInfo (Maybe Text)
iiIngestionAddress
= lens _iiIngestionAddress
(\ s a -> s{_iiIngestionAddress = a})
iiStreamName :: Lens' IngestionInfo (Maybe Text)
iiStreamName
= lens _iiStreamName (\ s a -> s{_iiStreamName = a})
instance FromJSON IngestionInfo where
parseJSON
= withObject "IngestionInfo"
(\ o ->
IngestionInfo' <$>
(o .:? "backupIngestionAddress") <*>
(o .:? "ingestionAddress")
<*> (o .:? "streamName"))
instance ToJSON IngestionInfo where
toJSON IngestionInfo'{..}
= object
(catMaybes
[("backupIngestionAddress" .=) <$>
_iiBackupIngestionAddress,
("ingestionAddress" .=) <$> _iiIngestionAddress,
("streamName" .=) <$> _iiStreamName])
data ChannelAuditDetails =
ChannelAuditDetails'
{ _cadContentIdClaimsGoodStanding :: !(Maybe Bool)
, _cadCopyrightStrikesGoodStanding :: !(Maybe Bool)
, _cadCommUnityGuidelinesGoodStanding :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelAuditDetails
:: ChannelAuditDetails
channelAuditDetails =
ChannelAuditDetails'
{ _cadContentIdClaimsGoodStanding = Nothing
, _cadCopyrightStrikesGoodStanding = Nothing
, _cadCommUnityGuidelinesGoodStanding = Nothing
}
cadContentIdClaimsGoodStanding :: Lens' ChannelAuditDetails (Maybe Bool)
cadContentIdClaimsGoodStanding
= lens _cadContentIdClaimsGoodStanding
(\ s a -> s{_cadContentIdClaimsGoodStanding = a})
cadCopyrightStrikesGoodStanding :: Lens' ChannelAuditDetails (Maybe Bool)
cadCopyrightStrikesGoodStanding
= lens _cadCopyrightStrikesGoodStanding
(\ s a -> s{_cadCopyrightStrikesGoodStanding = a})
cadCommUnityGuidelinesGoodStanding :: Lens' ChannelAuditDetails (Maybe Bool)
cadCommUnityGuidelinesGoodStanding
= lens _cadCommUnityGuidelinesGoodStanding
(\ s a -> s{_cadCommUnityGuidelinesGoodStanding = a})
instance FromJSON ChannelAuditDetails where
parseJSON
= withObject "ChannelAuditDetails"
(\ o ->
ChannelAuditDetails' <$>
(o .:? "contentIdClaimsGoodStanding") <*>
(o .:? "copyrightStrikesGoodStanding")
<*> (o .:? "communityGuidelinesGoodStanding"))
instance ToJSON ChannelAuditDetails where
toJSON ChannelAuditDetails'{..}
= object
(catMaybes
[("contentIdClaimsGoodStanding" .=) <$>
_cadContentIdClaimsGoodStanding,
("copyrightStrikesGoodStanding" .=) <$>
_cadCopyrightStrikesGoodStanding,
("communityGuidelinesGoodStanding" .=) <$>
_cadCommUnityGuidelinesGoodStanding])
data Thumbnail =
Thumbnail'
{ _tHeight :: !(Maybe (Textual Word32))
, _tURL :: !(Maybe Text)
, _tWidth :: !(Maybe (Textual Word32))
}
deriving (Eq, Show, Data, Typeable, Generic)
thumbnail
:: Thumbnail
thumbnail = Thumbnail' {_tHeight = Nothing, _tURL = Nothing, _tWidth = Nothing}
tHeight :: Lens' Thumbnail (Maybe Word32)
tHeight
= lens _tHeight (\ s a -> s{_tHeight = a}) .
mapping _Coerce
tURL :: Lens' Thumbnail (Maybe Text)
tURL = lens _tURL (\ s a -> s{_tURL = a})
tWidth :: Lens' Thumbnail (Maybe Word32)
tWidth
= lens _tWidth (\ s a -> s{_tWidth = a}) .
mapping _Coerce
instance FromJSON Thumbnail where
parseJSON
= withObject "Thumbnail"
(\ o ->
Thumbnail' <$>
(o .:? "height") <*> (o .:? "url") <*>
(o .:? "width"))
instance ToJSON Thumbnail where
toJSON Thumbnail'{..}
= object
(catMaybes
[("height" .=) <$> _tHeight, ("url" .=) <$> _tURL,
("width" .=) <$> _tWidth])
newtype LiveChatTextMessageDetails =
LiveChatTextMessageDetails'
{ _lctmdMessageText :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatTextMessageDetails
:: LiveChatTextMessageDetails
liveChatTextMessageDetails =
LiveChatTextMessageDetails' {_lctmdMessageText = Nothing}
lctmdMessageText :: Lens' LiveChatTextMessageDetails (Maybe Text)
lctmdMessageText
= lens _lctmdMessageText
(\ s a -> s{_lctmdMessageText = a})
instance FromJSON LiveChatTextMessageDetails where
parseJSON
= withObject "LiveChatTextMessageDetails"
(\ o ->
LiveChatTextMessageDetails' <$>
(o .:? "messageText"))
instance ToJSON LiveChatTextMessageDetails where
toJSON LiveChatTextMessageDetails'{..}
= object
(catMaybes
[("messageText" .=) <$> _lctmdMessageText])
data ActivityContentDetailsRecommendation =
ActivityContentDetailsRecommendation'
{ _acdrResourceId :: !(Maybe ResourceId)
, _acdrSeedResourceId :: !(Maybe ResourceId)
, _acdrReason :: !(Maybe ActivityContentDetailsRecommendationReason)
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsRecommendation
:: ActivityContentDetailsRecommendation
activityContentDetailsRecommendation =
ActivityContentDetailsRecommendation'
{ _acdrResourceId = Nothing
, _acdrSeedResourceId = Nothing
, _acdrReason = Nothing
}
acdrResourceId :: Lens' ActivityContentDetailsRecommendation (Maybe ResourceId)
acdrResourceId
= lens _acdrResourceId
(\ s a -> s{_acdrResourceId = a})
acdrSeedResourceId :: Lens' ActivityContentDetailsRecommendation (Maybe ResourceId)
acdrSeedResourceId
= lens _acdrSeedResourceId
(\ s a -> s{_acdrSeedResourceId = a})
acdrReason :: Lens' ActivityContentDetailsRecommendation (Maybe ActivityContentDetailsRecommendationReason)
acdrReason
= lens _acdrReason (\ s a -> s{_acdrReason = a})
instance FromJSON
ActivityContentDetailsRecommendation
where
parseJSON
= withObject "ActivityContentDetailsRecommendation"
(\ o ->
ActivityContentDetailsRecommendation' <$>
(o .:? "resourceId") <*> (o .:? "seedResourceId") <*>
(o .:? "reason"))
instance ToJSON ActivityContentDetailsRecommendation
where
toJSON ActivityContentDetailsRecommendation'{..}
= object
(catMaybes
[("resourceId" .=) <$> _acdrResourceId,
("seedResourceId" .=) <$> _acdrSeedResourceId,
("reason" .=) <$> _acdrReason])
newtype LiveChatMessageRetractedDetails =
LiveChatMessageRetractedDetails'
{ _lcmrdRetractedMessageId :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatMessageRetractedDetails
:: LiveChatMessageRetractedDetails
liveChatMessageRetractedDetails =
LiveChatMessageRetractedDetails' {_lcmrdRetractedMessageId = Nothing}
lcmrdRetractedMessageId :: Lens' LiveChatMessageRetractedDetails (Maybe Text)
lcmrdRetractedMessageId
= lens _lcmrdRetractedMessageId
(\ s a -> s{_lcmrdRetractedMessageId = a})
instance FromJSON LiveChatMessageRetractedDetails
where
parseJSON
= withObject "LiveChatMessageRetractedDetails"
(\ o ->
LiveChatMessageRetractedDetails' <$>
(o .:? "retractedMessageId"))
instance ToJSON LiveChatMessageRetractedDetails where
toJSON LiveChatMessageRetractedDetails'{..}
= object
(catMaybes
[("retractedMessageId" .=) <$>
_lcmrdRetractedMessageId])
data PlayListListResponse =
PlayListListResponse'
{ _pllrEtag :: !(Maybe Text)
, _pllrTokenPagination :: !(Maybe TokenPagination)
, _pllrNextPageToken :: !(Maybe Text)
, _pllrPageInfo :: !(Maybe PageInfo)
, _pllrKind :: !Text
, _pllrItems :: !(Maybe [PlayList])
, _pllrVisitorId :: !(Maybe Text)
, _pllrEventId :: !(Maybe Text)
, _pllrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
playListListResponse
:: PlayListListResponse
playListListResponse =
PlayListListResponse'
{ _pllrEtag = Nothing
, _pllrTokenPagination = Nothing
, _pllrNextPageToken = Nothing
, _pllrPageInfo = Nothing
, _pllrKind = "youtube#playlistListResponse"
, _pllrItems = Nothing
, _pllrVisitorId = Nothing
, _pllrEventId = Nothing
, _pllrPrevPageToken = Nothing
}
pllrEtag :: Lens' PlayListListResponse (Maybe Text)
pllrEtag = lens _pllrEtag (\ s a -> s{_pllrEtag = a})
pllrTokenPagination :: Lens' PlayListListResponse (Maybe TokenPagination)
pllrTokenPagination
= lens _pllrTokenPagination
(\ s a -> s{_pllrTokenPagination = a})
pllrNextPageToken :: Lens' PlayListListResponse (Maybe Text)
pllrNextPageToken
= lens _pllrNextPageToken
(\ s a -> s{_pllrNextPageToken = a})
pllrPageInfo :: Lens' PlayListListResponse (Maybe PageInfo)
pllrPageInfo
= lens _pllrPageInfo (\ s a -> s{_pllrPageInfo = a})
pllrKind :: Lens' PlayListListResponse Text
pllrKind = lens _pllrKind (\ s a -> s{_pllrKind = a})
pllrItems :: Lens' PlayListListResponse [PlayList]
pllrItems
= lens _pllrItems (\ s a -> s{_pllrItems = a}) .
_Default
. _Coerce
pllrVisitorId :: Lens' PlayListListResponse (Maybe Text)
pllrVisitorId
= lens _pllrVisitorId
(\ s a -> s{_pllrVisitorId = a})
pllrEventId :: Lens' PlayListListResponse (Maybe Text)
pllrEventId
= lens _pllrEventId (\ s a -> s{_pllrEventId = a})
pllrPrevPageToken :: Lens' PlayListListResponse (Maybe Text)
pllrPrevPageToken
= lens _pllrPrevPageToken
(\ s a -> s{_pllrPrevPageToken = a})
instance FromJSON PlayListListResponse where
parseJSON
= withObject "PlayListListResponse"
(\ o ->
PlayListListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*> (o .:? "kind" .!= "youtube#playlistListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON PlayListListResponse where
toJSON PlayListListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _pllrEtag,
("tokenPagination" .=) <$> _pllrTokenPagination,
("nextPageToken" .=) <$> _pllrNextPageToken,
("pageInfo" .=) <$> _pllrPageInfo,
Just ("kind" .= _pllrKind),
("items" .=) <$> _pllrItems,
("visitorId" .=) <$> _pllrVisitorId,
("eventId" .=) <$> _pllrEventId,
("prevPageToken" .=) <$> _pllrPrevPageToken])
data ChannelSectionSnippet =
ChannelSectionSnippet'
{ _cssStyle :: !(Maybe ChannelSectionSnippetStyle)
, _cssChannelId :: !(Maybe Text)
, _cssLocalized :: !(Maybe ChannelSectionLocalization)
, _cssTitle :: !(Maybe Text)
, _cssType :: !(Maybe ChannelSectionSnippetType)
, _cssPosition :: !(Maybe (Textual Word32))
, _cssDefaultLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelSectionSnippet
:: ChannelSectionSnippet
channelSectionSnippet =
ChannelSectionSnippet'
{ _cssStyle = Nothing
, _cssChannelId = Nothing
, _cssLocalized = Nothing
, _cssTitle = Nothing
, _cssType = Nothing
, _cssPosition = Nothing
, _cssDefaultLanguage = Nothing
}
cssStyle :: Lens' ChannelSectionSnippet (Maybe ChannelSectionSnippetStyle)
cssStyle = lens _cssStyle (\ s a -> s{_cssStyle = a})
cssChannelId :: Lens' ChannelSectionSnippet (Maybe Text)
cssChannelId
= lens _cssChannelId (\ s a -> s{_cssChannelId = a})
cssLocalized :: Lens' ChannelSectionSnippet (Maybe ChannelSectionLocalization)
cssLocalized
= lens _cssLocalized (\ s a -> s{_cssLocalized = a})
cssTitle :: Lens' ChannelSectionSnippet (Maybe Text)
cssTitle = lens _cssTitle (\ s a -> s{_cssTitle = a})
cssType :: Lens' ChannelSectionSnippet (Maybe ChannelSectionSnippetType)
cssType = lens _cssType (\ s a -> s{_cssType = a})
cssPosition :: Lens' ChannelSectionSnippet (Maybe Word32)
cssPosition
= lens _cssPosition (\ s a -> s{_cssPosition = a}) .
mapping _Coerce
cssDefaultLanguage :: Lens' ChannelSectionSnippet (Maybe Text)
cssDefaultLanguage
= lens _cssDefaultLanguage
(\ s a -> s{_cssDefaultLanguage = a})
instance FromJSON ChannelSectionSnippet where
parseJSON
= withObject "ChannelSectionSnippet"
(\ o ->
ChannelSectionSnippet' <$>
(o .:? "style") <*> (o .:? "channelId") <*>
(o .:? "localized")
<*> (o .:? "title")
<*> (o .:? "type")
<*> (o .:? "position")
<*> (o .:? "defaultLanguage"))
instance ToJSON ChannelSectionSnippet where
toJSON ChannelSectionSnippet'{..}
= object
(catMaybes
[("style" .=) <$> _cssStyle,
("channelId" .=) <$> _cssChannelId,
("localized" .=) <$> _cssLocalized,
("title" .=) <$> _cssTitle, ("type" .=) <$> _cssType,
("position" .=) <$> _cssPosition,
("defaultLanguage" .=) <$> _cssDefaultLanguage])
data ChannelStatus =
ChannelStatus'
{ _csIsLinked :: !(Maybe Bool)
, _csLongUploadsStatus :: !(Maybe ChannelStatusLongUploadsStatus)
, _csPrivacyStatus :: !(Maybe ChannelStatusPrivacyStatus)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelStatus
:: ChannelStatus
channelStatus =
ChannelStatus'
{ _csIsLinked = Nothing
, _csLongUploadsStatus = Nothing
, _csPrivacyStatus = Nothing
}
csIsLinked :: Lens' ChannelStatus (Maybe Bool)
csIsLinked
= lens _csIsLinked (\ s a -> s{_csIsLinked = a})
csLongUploadsStatus :: Lens' ChannelStatus (Maybe ChannelStatusLongUploadsStatus)
csLongUploadsStatus
= lens _csLongUploadsStatus
(\ s a -> s{_csLongUploadsStatus = a})
csPrivacyStatus :: Lens' ChannelStatus (Maybe ChannelStatusPrivacyStatus)
csPrivacyStatus
= lens _csPrivacyStatus
(\ s a -> s{_csPrivacyStatus = a})
instance FromJSON ChannelStatus where
parseJSON
= withObject "ChannelStatus"
(\ o ->
ChannelStatus' <$>
(o .:? "isLinked") <*> (o .:? "longUploadsStatus")
<*> (o .:? "privacyStatus"))
instance ToJSON ChannelStatus where
toJSON ChannelStatus'{..}
= object
(catMaybes
[("isLinked" .=) <$> _csIsLinked,
("longUploadsStatus" .=) <$> _csLongUploadsStatus,
("privacyStatus" .=) <$> _csPrivacyStatus])
newtype LiveChatPollClosedDetails =
LiveChatPollClosedDetails'
{ _lcpcdPollId :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatPollClosedDetails
:: LiveChatPollClosedDetails
liveChatPollClosedDetails = LiveChatPollClosedDetails' {_lcpcdPollId = Nothing}
lcpcdPollId :: Lens' LiveChatPollClosedDetails (Maybe Text)
lcpcdPollId
= lens _lcpcdPollId (\ s a -> s{_lcpcdPollId = a})
instance FromJSON LiveChatPollClosedDetails where
parseJSON
= withObject "LiveChatPollClosedDetails"
(\ o ->
LiveChatPollClosedDetails' <$> (o .:? "pollId"))
instance ToJSON LiveChatPollClosedDetails where
toJSON LiveChatPollClosedDetails'{..}
= object (catMaybes [("pollId" .=) <$> _lcpcdPollId])
data PromotedItem =
PromotedItem'
{ _piCustomMessage :: !(Maybe Text)
, _piPromotedByContentOwner :: !(Maybe Bool)
, _piId :: !(Maybe PromotedItemId)
, _piTiming :: !(Maybe InvideoTiming)
}
deriving (Eq, Show, Data, Typeable, Generic)
promotedItem
:: PromotedItem
promotedItem =
PromotedItem'
{ _piCustomMessage = Nothing
, _piPromotedByContentOwner = Nothing
, _piId = Nothing
, _piTiming = Nothing
}
piCustomMessage :: Lens' PromotedItem (Maybe Text)
piCustomMessage
= lens _piCustomMessage
(\ s a -> s{_piCustomMessage = a})
piPromotedByContentOwner :: Lens' PromotedItem (Maybe Bool)
piPromotedByContentOwner
= lens _piPromotedByContentOwner
(\ s a -> s{_piPromotedByContentOwner = a})
piId :: Lens' PromotedItem (Maybe PromotedItemId)
piId = lens _piId (\ s a -> s{_piId = a})
piTiming :: Lens' PromotedItem (Maybe InvideoTiming)
piTiming = lens _piTiming (\ s a -> s{_piTiming = a})
instance FromJSON PromotedItem where
parseJSON
= withObject "PromotedItem"
(\ o ->
PromotedItem' <$>
(o .:? "customMessage") <*>
(o .:? "promotedByContentOwner")
<*> (o .:? "id")
<*> (o .:? "timing"))
instance ToJSON PromotedItem where
toJSON PromotedItem'{..}
= object
(catMaybes
[("customMessage" .=) <$> _piCustomMessage,
("promotedByContentOwner" .=) <$>
_piPromotedByContentOwner,
("id" .=) <$> _piId, ("timing" .=) <$> _piTiming])
data LiveStreamSnippet =
LiveStreamSnippet'
{ _lssPublishedAt :: !(Maybe DateTime')
, _lssChannelId :: !(Maybe Text)
, _lssIsDefaultStream :: !(Maybe Bool)
, _lssTitle :: !(Maybe Text)
, _lssDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveStreamSnippet
:: LiveStreamSnippet
liveStreamSnippet =
LiveStreamSnippet'
{ _lssPublishedAt = Nothing
, _lssChannelId = Nothing
, _lssIsDefaultStream = Nothing
, _lssTitle = Nothing
, _lssDescription = Nothing
}
lssPublishedAt :: Lens' LiveStreamSnippet (Maybe UTCTime)
lssPublishedAt
= lens _lssPublishedAt
(\ s a -> s{_lssPublishedAt = a})
. mapping _DateTime
lssChannelId :: Lens' LiveStreamSnippet (Maybe Text)
lssChannelId
= lens _lssChannelId (\ s a -> s{_lssChannelId = a})
lssIsDefaultStream :: Lens' LiveStreamSnippet (Maybe Bool)
lssIsDefaultStream
= lens _lssIsDefaultStream
(\ s a -> s{_lssIsDefaultStream = a})
lssTitle :: Lens' LiveStreamSnippet (Maybe Text)
lssTitle = lens _lssTitle (\ s a -> s{_lssTitle = a})
lssDescription :: Lens' LiveStreamSnippet (Maybe Text)
lssDescription
= lens _lssDescription
(\ s a -> s{_lssDescription = a})
instance FromJSON LiveStreamSnippet where
parseJSON
= withObject "LiveStreamSnippet"
(\ o ->
LiveStreamSnippet' <$>
(o .:? "publishedAt") <*> (o .:? "channelId") <*>
(o .:? "isDefaultStream")
<*> (o .:? "title")
<*> (o .:? "description"))
instance ToJSON LiveStreamSnippet where
toJSON LiveStreamSnippet'{..}
= object
(catMaybes
[("publishedAt" .=) <$> _lssPublishedAt,
("channelId" .=) <$> _lssChannelId,
("isDefaultStream" .=) <$> _lssIsDefaultStream,
("title" .=) <$> _lssTitle,
("description" .=) <$> _lssDescription])
data SearchResult =
SearchResult'
{ _srEtag :: !(Maybe Text)
, _srSnippet :: !(Maybe SearchResultSnippet)
, _srKind :: !Text
, _srId :: !(Maybe ResourceId)
}
deriving (Eq, Show, Data, Typeable, Generic)
searchResult
:: SearchResult
searchResult =
SearchResult'
{ _srEtag = Nothing
, _srSnippet = Nothing
, _srKind = "youtube#searchResult"
, _srId = Nothing
}
srEtag :: Lens' SearchResult (Maybe Text)
srEtag = lens _srEtag (\ s a -> s{_srEtag = a})
srSnippet :: Lens' SearchResult (Maybe SearchResultSnippet)
srSnippet
= lens _srSnippet (\ s a -> s{_srSnippet = a})
srKind :: Lens' SearchResult Text
srKind = lens _srKind (\ s a -> s{_srKind = a})
srId :: Lens' SearchResult (Maybe ResourceId)
srId = lens _srId (\ s a -> s{_srId = a})
instance FromJSON SearchResult where
parseJSON
= withObject "SearchResult"
(\ o ->
SearchResult' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#searchResult")
<*> (o .:? "id"))
instance ToJSON SearchResult where
toJSON SearchResult'{..}
= object
(catMaybes
[("etag" .=) <$> _srEtag,
("snippet" .=) <$> _srSnippet,
Just ("kind" .= _srKind), ("id" .=) <$> _srId])
data TokenPagination =
TokenPagination'
deriving (Eq, Show, Data, Typeable, Generic)
tokenPagination
:: TokenPagination
tokenPagination = TokenPagination'
instance FromJSON TokenPagination where
parseJSON
= withObject "TokenPagination"
(\ o -> pure TokenPagination')
instance ToJSON TokenPagination where
toJSON = const emptyObject
data ResourceId =
ResourceId'
{ _riKind :: !(Maybe Text)
, _riChannelId :: !(Maybe Text)
, _riVideoId :: !(Maybe Text)
, _riPlayListId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
resourceId
:: ResourceId
resourceId =
ResourceId'
{ _riKind = Nothing
, _riChannelId = Nothing
, _riVideoId = Nothing
, _riPlayListId = Nothing
}
riKind :: Lens' ResourceId (Maybe Text)
riKind = lens _riKind (\ s a -> s{_riKind = a})
riChannelId :: Lens' ResourceId (Maybe Text)
riChannelId
= lens _riChannelId (\ s a -> s{_riChannelId = a})
riVideoId :: Lens' ResourceId (Maybe Text)
riVideoId
= lens _riVideoId (\ s a -> s{_riVideoId = a})
riPlayListId :: Lens' ResourceId (Maybe Text)
riPlayListId
= lens _riPlayListId (\ s a -> s{_riPlayListId = a})
instance FromJSON ResourceId where
parseJSON
= withObject "ResourceId"
(\ o ->
ResourceId' <$>
(o .:? "kind") <*> (o .:? "channelId") <*>
(o .:? "videoId")
<*> (o .:? "playlistId"))
instance ToJSON ResourceId where
toJSON ResourceId'{..}
= object
(catMaybes
[("kind" .=) <$> _riKind,
("channelId" .=) <$> _riChannelId,
("videoId" .=) <$> _riVideoId,
("playlistId" .=) <$> _riPlayListId])
data SearchListResponse =
SearchListResponse'
{ _slrEtag :: !(Maybe Text)
, _slrTokenPagination :: !(Maybe TokenPagination)
, _slrNextPageToken :: !(Maybe Text)
, _slrRegionCode :: !(Maybe Text)
, _slrPageInfo :: !(Maybe PageInfo)
, _slrKind :: !Text
, _slrItems :: !(Maybe [SearchResult])
, _slrVisitorId :: !(Maybe Text)
, _slrEventId :: !(Maybe Text)
, _slrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
searchListResponse
:: SearchListResponse
searchListResponse =
SearchListResponse'
{ _slrEtag = Nothing
, _slrTokenPagination = Nothing
, _slrNextPageToken = Nothing
, _slrRegionCode = Nothing
, _slrPageInfo = Nothing
, _slrKind = "youtube#searchListResponse"
, _slrItems = Nothing
, _slrVisitorId = Nothing
, _slrEventId = Nothing
, _slrPrevPageToken = Nothing
}
slrEtag :: Lens' SearchListResponse (Maybe Text)
slrEtag = lens _slrEtag (\ s a -> s{_slrEtag = a})
slrTokenPagination :: Lens' SearchListResponse (Maybe TokenPagination)
slrTokenPagination
= lens _slrTokenPagination
(\ s a -> s{_slrTokenPagination = a})
slrNextPageToken :: Lens' SearchListResponse (Maybe Text)
slrNextPageToken
= lens _slrNextPageToken
(\ s a -> s{_slrNextPageToken = a})
slrRegionCode :: Lens' SearchListResponse (Maybe Text)
slrRegionCode
= lens _slrRegionCode
(\ s a -> s{_slrRegionCode = a})
slrPageInfo :: Lens' SearchListResponse (Maybe PageInfo)
slrPageInfo
= lens _slrPageInfo (\ s a -> s{_slrPageInfo = a})
slrKind :: Lens' SearchListResponse Text
slrKind = lens _slrKind (\ s a -> s{_slrKind = a})
slrItems :: Lens' SearchListResponse [SearchResult]
slrItems
= lens _slrItems (\ s a -> s{_slrItems = a}) .
_Default
. _Coerce
slrVisitorId :: Lens' SearchListResponse (Maybe Text)
slrVisitorId
= lens _slrVisitorId (\ s a -> s{_slrVisitorId = a})
slrEventId :: Lens' SearchListResponse (Maybe Text)
slrEventId
= lens _slrEventId (\ s a -> s{_slrEventId = a})
slrPrevPageToken :: Lens' SearchListResponse (Maybe Text)
slrPrevPageToken
= lens _slrPrevPageToken
(\ s a -> s{_slrPrevPageToken = a})
instance FromJSON SearchListResponse where
parseJSON
= withObject "SearchListResponse"
(\ o ->
SearchListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "regionCode")
<*> (o .:? "pageInfo")
<*> (o .:? "kind" .!= "youtube#searchListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON SearchListResponse where
toJSON SearchListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _slrEtag,
("tokenPagination" .=) <$> _slrTokenPagination,
("nextPageToken" .=) <$> _slrNextPageToken,
("regionCode" .=) <$> _slrRegionCode,
("pageInfo" .=) <$> _slrPageInfo,
Just ("kind" .= _slrKind),
("items" .=) <$> _slrItems,
("visitorId" .=) <$> _slrVisitorId,
("eventId" .=) <$> _slrEventId,
("prevPageToken" .=) <$> _slrPrevPageToken])
newtype PlayListStatus =
PlayListStatus'
{ _plsPrivacyStatus :: Maybe PlayListStatusPrivacyStatus
}
deriving (Eq, Show, Data, Typeable, Generic)
playListStatus
:: PlayListStatus
playListStatus = PlayListStatus' {_plsPrivacyStatus = Nothing}
plsPrivacyStatus :: Lens' PlayListStatus (Maybe PlayListStatusPrivacyStatus)
plsPrivacyStatus
= lens _plsPrivacyStatus
(\ s a -> s{_plsPrivacyStatus = a})
instance FromJSON PlayListStatus where
parseJSON
= withObject "PlayListStatus"
(\ o -> PlayListStatus' <$> (o .:? "privacyStatus"))
instance ToJSON PlayListStatus where
toJSON PlayListStatus'{..}
= object
(catMaybes
[("privacyStatus" .=) <$> _plsPrivacyStatus])
data LiveChatMessageListResponse =
LiveChatMessageListResponse'
{ _lcmlrOfflineAt :: !(Maybe DateTime')
, _lcmlrEtag :: !(Maybe Text)
, _lcmlrTokenPagination :: !(Maybe TokenPagination)
, _lcmlrNextPageToken :: !(Maybe Text)
, _lcmlrPageInfo :: !(Maybe PageInfo)
, _lcmlrKind :: !Text
, _lcmlrItems :: !(Maybe [LiveChatMessage])
, _lcmlrVisitorId :: !(Maybe Text)
, _lcmlrPollingIntervalMillis :: !(Maybe (Textual Word32))
, _lcmlrEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatMessageListResponse
:: LiveChatMessageListResponse
liveChatMessageListResponse =
LiveChatMessageListResponse'
{ _lcmlrOfflineAt = Nothing
, _lcmlrEtag = Nothing
, _lcmlrTokenPagination = Nothing
, _lcmlrNextPageToken = Nothing
, _lcmlrPageInfo = Nothing
, _lcmlrKind = "youtube#liveChatMessageListResponse"
, _lcmlrItems = Nothing
, _lcmlrVisitorId = Nothing
, _lcmlrPollingIntervalMillis = Nothing
, _lcmlrEventId = Nothing
}
lcmlrOfflineAt :: Lens' LiveChatMessageListResponse (Maybe UTCTime)
lcmlrOfflineAt
= lens _lcmlrOfflineAt
(\ s a -> s{_lcmlrOfflineAt = a})
. mapping _DateTime
lcmlrEtag :: Lens' LiveChatMessageListResponse (Maybe Text)
lcmlrEtag
= lens _lcmlrEtag (\ s a -> s{_lcmlrEtag = a})
lcmlrTokenPagination :: Lens' LiveChatMessageListResponse (Maybe TokenPagination)
lcmlrTokenPagination
= lens _lcmlrTokenPagination
(\ s a -> s{_lcmlrTokenPagination = a})
lcmlrNextPageToken :: Lens' LiveChatMessageListResponse (Maybe Text)
lcmlrNextPageToken
= lens _lcmlrNextPageToken
(\ s a -> s{_lcmlrNextPageToken = a})
lcmlrPageInfo :: Lens' LiveChatMessageListResponse (Maybe PageInfo)
lcmlrPageInfo
= lens _lcmlrPageInfo
(\ s a -> s{_lcmlrPageInfo = a})
lcmlrKind :: Lens' LiveChatMessageListResponse Text
lcmlrKind
= lens _lcmlrKind (\ s a -> s{_lcmlrKind = a})
lcmlrItems :: Lens' LiveChatMessageListResponse [LiveChatMessage]
lcmlrItems
= lens _lcmlrItems (\ s a -> s{_lcmlrItems = a}) .
_Default
. _Coerce
lcmlrVisitorId :: Lens' LiveChatMessageListResponse (Maybe Text)
lcmlrVisitorId
= lens _lcmlrVisitorId
(\ s a -> s{_lcmlrVisitorId = a})
lcmlrPollingIntervalMillis :: Lens' LiveChatMessageListResponse (Maybe Word32)
lcmlrPollingIntervalMillis
= lens _lcmlrPollingIntervalMillis
(\ s a -> s{_lcmlrPollingIntervalMillis = a})
. mapping _Coerce
lcmlrEventId :: Lens' LiveChatMessageListResponse (Maybe Text)
lcmlrEventId
= lens _lcmlrEventId (\ s a -> s{_lcmlrEventId = a})
instance FromJSON LiveChatMessageListResponse where
parseJSON
= withObject "LiveChatMessageListResponse"
(\ o ->
LiveChatMessageListResponse' <$>
(o .:? "offlineAt") <*> (o .:? "etag") <*>
(o .:? "tokenPagination")
<*> (o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!=
"youtube#liveChatMessageListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "pollingIntervalMillis")
<*> (o .:? "eventId"))
instance ToJSON LiveChatMessageListResponse where
toJSON LiveChatMessageListResponse'{..}
= object
(catMaybes
[("offlineAt" .=) <$> _lcmlrOfflineAt,
("etag" .=) <$> _lcmlrEtag,
("tokenPagination" .=) <$> _lcmlrTokenPagination,
("nextPageToken" .=) <$> _lcmlrNextPageToken,
("pageInfo" .=) <$> _lcmlrPageInfo,
Just ("kind" .= _lcmlrKind),
("items" .=) <$> _lcmlrItems,
("visitorId" .=) <$> _lcmlrVisitorId,
("pollingIntervalMillis" .=) <$>
_lcmlrPollingIntervalMillis,
("eventId" .=) <$> _lcmlrEventId])
data ChannelListResponse =
ChannelListResponse'
{ _clrEtag :: !(Maybe Text)
, _clrTokenPagination :: !(Maybe TokenPagination)
, _clrNextPageToken :: !(Maybe Text)
, _clrPageInfo :: !(Maybe PageInfo)
, _clrKind :: !Text
, _clrItems :: !(Maybe [Channel])
, _clrVisitorId :: !(Maybe Text)
, _clrEventId :: !(Maybe Text)
, _clrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelListResponse
:: ChannelListResponse
channelListResponse =
ChannelListResponse'
{ _clrEtag = Nothing
, _clrTokenPagination = Nothing
, _clrNextPageToken = Nothing
, _clrPageInfo = Nothing
, _clrKind = "youtube#channelListResponse"
, _clrItems = Nothing
, _clrVisitorId = Nothing
, _clrEventId = Nothing
, _clrPrevPageToken = Nothing
}
clrEtag :: Lens' ChannelListResponse (Maybe Text)
clrEtag = lens _clrEtag (\ s a -> s{_clrEtag = a})
clrTokenPagination :: Lens' ChannelListResponse (Maybe TokenPagination)
clrTokenPagination
= lens _clrTokenPagination
(\ s a -> s{_clrTokenPagination = a})
clrNextPageToken :: Lens' ChannelListResponse (Maybe Text)
clrNextPageToken
= lens _clrNextPageToken
(\ s a -> s{_clrNextPageToken = a})
clrPageInfo :: Lens' ChannelListResponse (Maybe PageInfo)
clrPageInfo
= lens _clrPageInfo (\ s a -> s{_clrPageInfo = a})
clrKind :: Lens' ChannelListResponse Text
clrKind = lens _clrKind (\ s a -> s{_clrKind = a})
clrItems :: Lens' ChannelListResponse [Channel]
clrItems
= lens _clrItems (\ s a -> s{_clrItems = a}) .
_Default
. _Coerce
clrVisitorId :: Lens' ChannelListResponse (Maybe Text)
clrVisitorId
= lens _clrVisitorId (\ s a -> s{_clrVisitorId = a})
clrEventId :: Lens' ChannelListResponse (Maybe Text)
clrEventId
= lens _clrEventId (\ s a -> s{_clrEventId = a})
clrPrevPageToken :: Lens' ChannelListResponse (Maybe Text)
clrPrevPageToken
= lens _clrPrevPageToken
(\ s a -> s{_clrPrevPageToken = a})
instance FromJSON ChannelListResponse where
parseJSON
= withObject "ChannelListResponse"
(\ o ->
ChannelListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*> (o .:? "kind" .!= "youtube#channelListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON ChannelListResponse where
toJSON ChannelListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _clrEtag,
("tokenPagination" .=) <$> _clrTokenPagination,
("nextPageToken" .=) <$> _clrNextPageToken,
("pageInfo" .=) <$> _clrPageInfo,
Just ("kind" .= _clrKind),
("items" .=) <$> _clrItems,
("visitorId" .=) <$> _clrVisitorId,
("eventId" .=) <$> _clrEventId,
("prevPageToken" .=) <$> _clrPrevPageToken])
data ChannelProFileDetails =
ChannelProFileDetails'
{ _cpfdChannelId :: !(Maybe Text)
, _cpfdProFileImageURL :: !(Maybe Text)
, _cpfdDisplayName :: !(Maybe Text)
, _cpfdChannelURL :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelProFileDetails
:: ChannelProFileDetails
channelProFileDetails =
ChannelProFileDetails'
{ _cpfdChannelId = Nothing
, _cpfdProFileImageURL = Nothing
, _cpfdDisplayName = Nothing
, _cpfdChannelURL = Nothing
}
cpfdChannelId :: Lens' ChannelProFileDetails (Maybe Text)
cpfdChannelId
= lens _cpfdChannelId
(\ s a -> s{_cpfdChannelId = a})
cpfdProFileImageURL :: Lens' ChannelProFileDetails (Maybe Text)
cpfdProFileImageURL
= lens _cpfdProFileImageURL
(\ s a -> s{_cpfdProFileImageURL = a})
cpfdDisplayName :: Lens' ChannelProFileDetails (Maybe Text)
cpfdDisplayName
= lens _cpfdDisplayName
(\ s a -> s{_cpfdDisplayName = a})
cpfdChannelURL :: Lens' ChannelProFileDetails (Maybe Text)
cpfdChannelURL
= lens _cpfdChannelURL
(\ s a -> s{_cpfdChannelURL = a})
instance FromJSON ChannelProFileDetails where
parseJSON
= withObject "ChannelProFileDetails"
(\ o ->
ChannelProFileDetails' <$>
(o .:? "channelId") <*> (o .:? "profileImageUrl") <*>
(o .:? "displayName")
<*> (o .:? "channelUrl"))
instance ToJSON ChannelProFileDetails where
toJSON ChannelProFileDetails'{..}
= object
(catMaybes
[("channelId" .=) <$> _cpfdChannelId,
("profileImageUrl" .=) <$> _cpfdProFileImageURL,
("displayName" .=) <$> _cpfdDisplayName,
("channelUrl" .=) <$> _cpfdChannelURL])
data SuperChatEventListResponse =
SuperChatEventListResponse'
{ _scelrEtag :: !(Maybe Text)
, _scelrTokenPagination :: !(Maybe TokenPagination)
, _scelrNextPageToken :: !(Maybe Text)
, _scelrPageInfo :: !(Maybe PageInfo)
, _scelrKind :: !Text
, _scelrItems :: !(Maybe [SuperChatEvent])
, _scelrVisitorId :: !(Maybe Text)
, _scelrEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
superChatEventListResponse
:: SuperChatEventListResponse
superChatEventListResponse =
SuperChatEventListResponse'
{ _scelrEtag = Nothing
, _scelrTokenPagination = Nothing
, _scelrNextPageToken = Nothing
, _scelrPageInfo = Nothing
, _scelrKind = "youtube#superChatEventListResponse"
, _scelrItems = Nothing
, _scelrVisitorId = Nothing
, _scelrEventId = Nothing
}
scelrEtag :: Lens' SuperChatEventListResponse (Maybe Text)
scelrEtag
= lens _scelrEtag (\ s a -> s{_scelrEtag = a})
scelrTokenPagination :: Lens' SuperChatEventListResponse (Maybe TokenPagination)
scelrTokenPagination
= lens _scelrTokenPagination
(\ s a -> s{_scelrTokenPagination = a})
scelrNextPageToken :: Lens' SuperChatEventListResponse (Maybe Text)
scelrNextPageToken
= lens _scelrNextPageToken
(\ s a -> s{_scelrNextPageToken = a})
scelrPageInfo :: Lens' SuperChatEventListResponse (Maybe PageInfo)
scelrPageInfo
= lens _scelrPageInfo
(\ s a -> s{_scelrPageInfo = a})
scelrKind :: Lens' SuperChatEventListResponse Text
scelrKind
= lens _scelrKind (\ s a -> s{_scelrKind = a})
scelrItems :: Lens' SuperChatEventListResponse [SuperChatEvent]
scelrItems
= lens _scelrItems (\ s a -> s{_scelrItems = a}) .
_Default
. _Coerce
scelrVisitorId :: Lens' SuperChatEventListResponse (Maybe Text)
scelrVisitorId
= lens _scelrVisitorId
(\ s a -> s{_scelrVisitorId = a})
scelrEventId :: Lens' SuperChatEventListResponse (Maybe Text)
scelrEventId
= lens _scelrEventId (\ s a -> s{_scelrEventId = a})
instance FromJSON SuperChatEventListResponse where
parseJSON
= withObject "SuperChatEventListResponse"
(\ o ->
SuperChatEventListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!=
"youtube#superChatEventListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON SuperChatEventListResponse where
toJSON SuperChatEventListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _scelrEtag,
("tokenPagination" .=) <$> _scelrTokenPagination,
("nextPageToken" .=) <$> _scelrNextPageToken,
("pageInfo" .=) <$> _scelrPageInfo,
Just ("kind" .= _scelrKind),
("items" .=) <$> _scelrItems,
("visitorId" .=) <$> _scelrVisitorId,
("eventId" .=) <$> _scelrEventId])
data VideoAbuseReportReasonListResponse =
VideoAbuseReportReasonListResponse'
{ _varrlrEtag :: !(Maybe Text)
, _varrlrKind :: !Text
, _varrlrItems :: !(Maybe [VideoAbuseReportReason])
, _varrlrVisitorId :: !(Maybe Text)
, _varrlrEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoAbuseReportReasonListResponse
:: VideoAbuseReportReasonListResponse
videoAbuseReportReasonListResponse =
VideoAbuseReportReasonListResponse'
{ _varrlrEtag = Nothing
, _varrlrKind = "youtube#videoAbuseReportReasonListResponse"
, _varrlrItems = Nothing
, _varrlrVisitorId = Nothing
, _varrlrEventId = Nothing
}
varrlrEtag :: Lens' VideoAbuseReportReasonListResponse (Maybe Text)
varrlrEtag
= lens _varrlrEtag (\ s a -> s{_varrlrEtag = a})
varrlrKind :: Lens' VideoAbuseReportReasonListResponse Text
varrlrKind
= lens _varrlrKind (\ s a -> s{_varrlrKind = a})
varrlrItems :: Lens' VideoAbuseReportReasonListResponse [VideoAbuseReportReason]
varrlrItems
= lens _varrlrItems (\ s a -> s{_varrlrItems = a}) .
_Default
. _Coerce
varrlrVisitorId :: Lens' VideoAbuseReportReasonListResponse (Maybe Text)
varrlrVisitorId
= lens _varrlrVisitorId
(\ s a -> s{_varrlrVisitorId = a})
varrlrEventId :: Lens' VideoAbuseReportReasonListResponse (Maybe Text)
varrlrEventId
= lens _varrlrEventId
(\ s a -> s{_varrlrEventId = a})
instance FromJSON VideoAbuseReportReasonListResponse
where
parseJSON
= withObject "VideoAbuseReportReasonListResponse"
(\ o ->
VideoAbuseReportReasonListResponse' <$>
(o .:? "etag") <*>
(o .:? "kind" .!=
"youtube#videoAbuseReportReasonListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON VideoAbuseReportReasonListResponse
where
toJSON VideoAbuseReportReasonListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _varrlrEtag,
Just ("kind" .= _varrlrKind),
("items" .=) <$> _varrlrItems,
("visitorId" .=) <$> _varrlrVisitorId,
("eventId" .=) <$> _varrlrEventId])
data LiveChatUserBannedMessageDetails =
LiveChatUserBannedMessageDetails'
{ _lcubmdBanType :: !(Maybe LiveChatUserBannedMessageDetailsBanType)
, _lcubmdBannedUserDetails :: !(Maybe ChannelProFileDetails)
, _lcubmdBanDurationSeconds :: !(Maybe (Textual Word64))
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatUserBannedMessageDetails
:: LiveChatUserBannedMessageDetails
liveChatUserBannedMessageDetails =
LiveChatUserBannedMessageDetails'
{ _lcubmdBanType = Nothing
, _lcubmdBannedUserDetails = Nothing
, _lcubmdBanDurationSeconds = Nothing
}
lcubmdBanType :: Lens' LiveChatUserBannedMessageDetails (Maybe LiveChatUserBannedMessageDetailsBanType)
lcubmdBanType
= lens _lcubmdBanType
(\ s a -> s{_lcubmdBanType = a})
lcubmdBannedUserDetails :: Lens' LiveChatUserBannedMessageDetails (Maybe ChannelProFileDetails)
lcubmdBannedUserDetails
= lens _lcubmdBannedUserDetails
(\ s a -> s{_lcubmdBannedUserDetails = a})
lcubmdBanDurationSeconds :: Lens' LiveChatUserBannedMessageDetails (Maybe Word64)
lcubmdBanDurationSeconds
= lens _lcubmdBanDurationSeconds
(\ s a -> s{_lcubmdBanDurationSeconds = a})
. mapping _Coerce
instance FromJSON LiveChatUserBannedMessageDetails
where
parseJSON
= withObject "LiveChatUserBannedMessageDetails"
(\ o ->
LiveChatUserBannedMessageDetails' <$>
(o .:? "banType") <*> (o .:? "bannedUserDetails") <*>
(o .:? "banDurationSeconds"))
instance ToJSON LiveChatUserBannedMessageDetails
where
toJSON LiveChatUserBannedMessageDetails'{..}
= object
(catMaybes
[("banType" .=) <$> _lcubmdBanType,
("bannedUserDetails" .=) <$>
_lcubmdBannedUserDetails,
("banDurationSeconds" .=) <$>
_lcubmdBanDurationSeconds])
data LiveBroadcastContentDetails =
LiveBroadcastContentDetails'
{ _lbcdEnableContentEncryption :: !(Maybe Bool)
, _lbcdEnableLowLatency :: !(Maybe Bool)
, _lbcdLatencyPreference :: !(Maybe LiveBroadcastContentDetailsLatencyPreference)
, _lbcdClosedCaptionsType :: !(Maybe LiveBroadcastContentDetailsClosedCaptionsType)
, _lbcdEnableEmbed :: !(Maybe Bool)
, _lbcdStartWithSlate :: !(Maybe Bool)
, _lbcdProjection :: !(Maybe LiveBroadcastContentDetailsProjection)
, _lbcdMonitorStream :: !(Maybe MonitorStreamInfo)
, _lbcdStereoLayout :: !(Maybe LiveBroadcastContentDetailsStereoLayout)
, _lbcdBoundStreamId :: !(Maybe Text)
, _lbcdRecordFromStart :: !(Maybe Bool)
, _lbcdMesh :: !(Maybe Bytes)
, _lbcdEnableClosedCaptions :: !(Maybe Bool)
, _lbcdEnableAutoStart :: !(Maybe Bool)
, _lbcdBoundStreamLastUpdateTimeMs :: !(Maybe DateTime')
, _lbcdEnableDvr :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveBroadcastContentDetails
:: LiveBroadcastContentDetails
liveBroadcastContentDetails =
LiveBroadcastContentDetails'
{ _lbcdEnableContentEncryption = Nothing
, _lbcdEnableLowLatency = Nothing
, _lbcdLatencyPreference = Nothing
, _lbcdClosedCaptionsType = Nothing
, _lbcdEnableEmbed = Nothing
, _lbcdStartWithSlate = Nothing
, _lbcdProjection = Nothing
, _lbcdMonitorStream = Nothing
, _lbcdStereoLayout = Nothing
, _lbcdBoundStreamId = Nothing
, _lbcdRecordFromStart = Nothing
, _lbcdMesh = Nothing
, _lbcdEnableClosedCaptions = Nothing
, _lbcdEnableAutoStart = Nothing
, _lbcdBoundStreamLastUpdateTimeMs = Nothing
, _lbcdEnableDvr = Nothing
}
lbcdEnableContentEncryption :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableContentEncryption
= lens _lbcdEnableContentEncryption
(\ s a -> s{_lbcdEnableContentEncryption = a})
lbcdEnableLowLatency :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableLowLatency
= lens _lbcdEnableLowLatency
(\ s a -> s{_lbcdEnableLowLatency = a})
lbcdLatencyPreference :: Lens' LiveBroadcastContentDetails (Maybe LiveBroadcastContentDetailsLatencyPreference)
lbcdLatencyPreference
= lens _lbcdLatencyPreference
(\ s a -> s{_lbcdLatencyPreference = a})
lbcdClosedCaptionsType :: Lens' LiveBroadcastContentDetails (Maybe LiveBroadcastContentDetailsClosedCaptionsType)
lbcdClosedCaptionsType
= lens _lbcdClosedCaptionsType
(\ s a -> s{_lbcdClosedCaptionsType = a})
lbcdEnableEmbed :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableEmbed
= lens _lbcdEnableEmbed
(\ s a -> s{_lbcdEnableEmbed = a})
lbcdStartWithSlate :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdStartWithSlate
= lens _lbcdStartWithSlate
(\ s a -> s{_lbcdStartWithSlate = a})
lbcdProjection :: Lens' LiveBroadcastContentDetails (Maybe LiveBroadcastContentDetailsProjection)
lbcdProjection
= lens _lbcdProjection
(\ s a -> s{_lbcdProjection = a})
lbcdMonitorStream :: Lens' LiveBroadcastContentDetails (Maybe MonitorStreamInfo)
lbcdMonitorStream
= lens _lbcdMonitorStream
(\ s a -> s{_lbcdMonitorStream = a})
lbcdStereoLayout :: Lens' LiveBroadcastContentDetails (Maybe LiveBroadcastContentDetailsStereoLayout)
lbcdStereoLayout
= lens _lbcdStereoLayout
(\ s a -> s{_lbcdStereoLayout = a})
lbcdBoundStreamId :: Lens' LiveBroadcastContentDetails (Maybe Text)
lbcdBoundStreamId
= lens _lbcdBoundStreamId
(\ s a -> s{_lbcdBoundStreamId = a})
lbcdRecordFromStart :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdRecordFromStart
= lens _lbcdRecordFromStart
(\ s a -> s{_lbcdRecordFromStart = a})
lbcdMesh :: Lens' LiveBroadcastContentDetails (Maybe ByteString)
lbcdMesh
= lens _lbcdMesh (\ s a -> s{_lbcdMesh = a}) .
mapping _Bytes
lbcdEnableClosedCaptions :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableClosedCaptions
= lens _lbcdEnableClosedCaptions
(\ s a -> s{_lbcdEnableClosedCaptions = a})
lbcdEnableAutoStart :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableAutoStart
= lens _lbcdEnableAutoStart
(\ s a -> s{_lbcdEnableAutoStart = a})
lbcdBoundStreamLastUpdateTimeMs :: Lens' LiveBroadcastContentDetails (Maybe UTCTime)
lbcdBoundStreamLastUpdateTimeMs
= lens _lbcdBoundStreamLastUpdateTimeMs
(\ s a -> s{_lbcdBoundStreamLastUpdateTimeMs = a})
. mapping _DateTime
lbcdEnableDvr :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableDvr
= lens _lbcdEnableDvr
(\ s a -> s{_lbcdEnableDvr = a})
instance FromJSON LiveBroadcastContentDetails where
parseJSON
= withObject "LiveBroadcastContentDetails"
(\ o ->
LiveBroadcastContentDetails' <$>
(o .:? "enableContentEncryption") <*>
(o .:? "enableLowLatency")
<*> (o .:? "latencyPreference")
<*> (o .:? "closedCaptionsType")
<*> (o .:? "enableEmbed")
<*> (o .:? "startWithSlate")
<*> (o .:? "projection")
<*> (o .:? "monitorStream")
<*> (o .:? "stereoLayout")
<*> (o .:? "boundStreamId")
<*> (o .:? "recordFromStart")
<*> (o .:? "mesh")
<*> (o .:? "enableClosedCaptions")
<*> (o .:? "enableAutoStart")
<*> (o .:? "boundStreamLastUpdateTimeMs")
<*> (o .:? "enableDvr"))
instance ToJSON LiveBroadcastContentDetails where
toJSON LiveBroadcastContentDetails'{..}
= object
(catMaybes
[("enableContentEncryption" .=) <$>
_lbcdEnableContentEncryption,
("enableLowLatency" .=) <$> _lbcdEnableLowLatency,
("latencyPreference" .=) <$> _lbcdLatencyPreference,
("closedCaptionsType" .=) <$>
_lbcdClosedCaptionsType,
("enableEmbed" .=) <$> _lbcdEnableEmbed,
("startWithSlate" .=) <$> _lbcdStartWithSlate,
("projection" .=) <$> _lbcdProjection,
("monitorStream" .=) <$> _lbcdMonitorStream,
("stereoLayout" .=) <$> _lbcdStereoLayout,
("boundStreamId" .=) <$> _lbcdBoundStreamId,
("recordFromStart" .=) <$> _lbcdRecordFromStart,
("mesh" .=) <$> _lbcdMesh,
("enableClosedCaptions" .=) <$>
_lbcdEnableClosedCaptions,
("enableAutoStart" .=) <$> _lbcdEnableAutoStart,
("boundStreamLastUpdateTimeMs" .=) <$>
_lbcdBoundStreamLastUpdateTimeMs,
("enableDvr" .=) <$> _lbcdEnableDvr])
data ChannelSection =
ChannelSection'
{ _csEtag :: !(Maybe Text)
, _csSnippet :: !(Maybe ChannelSectionSnippet)
, _csKind :: !Text
, _csContentDetails :: !(Maybe ChannelSectionContentDetails)
, _csTargeting :: !(Maybe ChannelSectionTargeting)
, _csId :: !(Maybe Text)
, _csLocalizations :: !(Maybe ChannelSectionLocalizations)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelSection
:: ChannelSection
channelSection =
ChannelSection'
{ _csEtag = Nothing
, _csSnippet = Nothing
, _csKind = "youtube#channelSection"
, _csContentDetails = Nothing
, _csTargeting = Nothing
, _csId = Nothing
, _csLocalizations = Nothing
}
csEtag :: Lens' ChannelSection (Maybe Text)
csEtag = lens _csEtag (\ s a -> s{_csEtag = a})
csSnippet :: Lens' ChannelSection (Maybe ChannelSectionSnippet)
csSnippet
= lens _csSnippet (\ s a -> s{_csSnippet = a})
csKind :: Lens' ChannelSection Text
csKind = lens _csKind (\ s a -> s{_csKind = a})
csContentDetails :: Lens' ChannelSection (Maybe ChannelSectionContentDetails)
csContentDetails
= lens _csContentDetails
(\ s a -> s{_csContentDetails = a})
csTargeting :: Lens' ChannelSection (Maybe ChannelSectionTargeting)
csTargeting
= lens _csTargeting (\ s a -> s{_csTargeting = a})
csId :: Lens' ChannelSection (Maybe Text)
csId = lens _csId (\ s a -> s{_csId = a})
csLocalizations :: Lens' ChannelSection (Maybe ChannelSectionLocalizations)
csLocalizations
= lens _csLocalizations
(\ s a -> s{_csLocalizations = a})
instance FromJSON ChannelSection where
parseJSON
= withObject "ChannelSection"
(\ o ->
ChannelSection' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#channelSection")
<*> (o .:? "contentDetails")
<*> (o .:? "targeting")
<*> (o .:? "id")
<*> (o .:? "localizations"))
instance ToJSON ChannelSection where
toJSON ChannelSection'{..}
= object
(catMaybes
[("etag" .=) <$> _csEtag,
("snippet" .=) <$> _csSnippet,
Just ("kind" .= _csKind),
("contentDetails" .=) <$> _csContentDetails,
("targeting" .=) <$> _csTargeting,
("id" .=) <$> _csId,
("localizations" .=) <$> _csLocalizations])
data ChannelContentDetailsRelatedPlayLists =
ChannelContentDetailsRelatedPlayLists'
{ _ccdrplFavorites :: !(Maybe Text)
, _ccdrplWatchHistory :: !(Maybe Text)
, _ccdrplWatchLater :: !(Maybe Text)
, _ccdrplUploads :: !(Maybe Text)
, _ccdrplLikes :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelContentDetailsRelatedPlayLists
:: ChannelContentDetailsRelatedPlayLists
channelContentDetailsRelatedPlayLists =
ChannelContentDetailsRelatedPlayLists'
{ _ccdrplFavorites = Nothing
, _ccdrplWatchHistory = Nothing
, _ccdrplWatchLater = Nothing
, _ccdrplUploads = Nothing
, _ccdrplLikes = Nothing
}
ccdrplFavorites :: Lens' ChannelContentDetailsRelatedPlayLists (Maybe Text)
ccdrplFavorites
= lens _ccdrplFavorites
(\ s a -> s{_ccdrplFavorites = a})
ccdrplWatchHistory :: Lens' ChannelContentDetailsRelatedPlayLists (Maybe Text)
ccdrplWatchHistory
= lens _ccdrplWatchHistory
(\ s a -> s{_ccdrplWatchHistory = a})
ccdrplWatchLater :: Lens' ChannelContentDetailsRelatedPlayLists (Maybe Text)
ccdrplWatchLater
= lens _ccdrplWatchLater
(\ s a -> s{_ccdrplWatchLater = a})
ccdrplUploads :: Lens' ChannelContentDetailsRelatedPlayLists (Maybe Text)
ccdrplUploads
= lens _ccdrplUploads
(\ s a -> s{_ccdrplUploads = a})
ccdrplLikes :: Lens' ChannelContentDetailsRelatedPlayLists (Maybe Text)
ccdrplLikes
= lens _ccdrplLikes (\ s a -> s{_ccdrplLikes = a})
instance FromJSON
ChannelContentDetailsRelatedPlayLists
where
parseJSON
= withObject "ChannelContentDetailsRelatedPlayLists"
(\ o ->
ChannelContentDetailsRelatedPlayLists' <$>
(o .:? "favorites") <*> (o .:? "watchHistory") <*>
(o .:? "watchLater")
<*> (o .:? "uploads")
<*> (o .:? "likes"))
instance ToJSON ChannelContentDetailsRelatedPlayLists
where
toJSON ChannelContentDetailsRelatedPlayLists'{..}
= object
(catMaybes
[("favorites" .=) <$> _ccdrplFavorites,
("watchHistory" .=) <$> _ccdrplWatchHistory,
("watchLater" .=) <$> _ccdrplWatchLater,
("uploads" .=) <$> _ccdrplUploads,
("likes" .=) <$> _ccdrplLikes])
data LiveStream =
LiveStream'
{ _lsStatus :: !(Maybe LiveStreamStatus)
, _lsEtag :: !(Maybe Text)
, _lsSnippet :: !(Maybe LiveStreamSnippet)
, _lsKind :: !Text
, _lsContentDetails :: !(Maybe LiveStreamContentDetails)
, _lsId :: !(Maybe Text)
, _lsCdn :: !(Maybe CdnSettings)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveStream
:: LiveStream
liveStream =
LiveStream'
{ _lsStatus = Nothing
, _lsEtag = Nothing
, _lsSnippet = Nothing
, _lsKind = "youtube#liveStream"
, _lsContentDetails = Nothing
, _lsId = Nothing
, _lsCdn = Nothing
}
lsStatus :: Lens' LiveStream (Maybe LiveStreamStatus)
lsStatus = lens _lsStatus (\ s a -> s{_lsStatus = a})
lsEtag :: Lens' LiveStream (Maybe Text)
lsEtag = lens _lsEtag (\ s a -> s{_lsEtag = a})
lsSnippet :: Lens' LiveStream (Maybe LiveStreamSnippet)
lsSnippet
= lens _lsSnippet (\ s a -> s{_lsSnippet = a})
lsKind :: Lens' LiveStream Text
lsKind = lens _lsKind (\ s a -> s{_lsKind = a})
lsContentDetails :: Lens' LiveStream (Maybe LiveStreamContentDetails)
lsContentDetails
= lens _lsContentDetails
(\ s a -> s{_lsContentDetails = a})
lsId :: Lens' LiveStream (Maybe Text)
lsId = lens _lsId (\ s a -> s{_lsId = a})
lsCdn :: Lens' LiveStream (Maybe CdnSettings)
lsCdn = lens _lsCdn (\ s a -> s{_lsCdn = a})
instance FromJSON LiveStream where
parseJSON
= withObject "LiveStream"
(\ o ->
LiveStream' <$>
(o .:? "status") <*> (o .:? "etag") <*>
(o .:? "snippet")
<*> (o .:? "kind" .!= "youtube#liveStream")
<*> (o .:? "contentDetails")
<*> (o .:? "id")
<*> (o .:? "cdn"))
instance ToJSON LiveStream where
toJSON LiveStream'{..}
= object
(catMaybes
[("status" .=) <$> _lsStatus,
("etag" .=) <$> _lsEtag,
("snippet" .=) <$> _lsSnippet,
Just ("kind" .= _lsKind),
("contentDetails" .=) <$> _lsContentDetails,
("id" .=) <$> _lsId, ("cdn" .=) <$> _lsCdn])
newtype ActivityContentDetailsFavorite =
ActivityContentDetailsFavorite'
{ _acdfResourceId :: Maybe ResourceId
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsFavorite
:: ActivityContentDetailsFavorite
activityContentDetailsFavorite =
ActivityContentDetailsFavorite' {_acdfResourceId = Nothing}
acdfResourceId :: Lens' ActivityContentDetailsFavorite (Maybe ResourceId)
acdfResourceId
= lens _acdfResourceId
(\ s a -> s{_acdfResourceId = a})
instance FromJSON ActivityContentDetailsFavorite
where
parseJSON
= withObject "ActivityContentDetailsFavorite"
(\ o ->
ActivityContentDetailsFavorite' <$>
(o .:? "resourceId"))
instance ToJSON ActivityContentDetailsFavorite where
toJSON ActivityContentDetailsFavorite'{..}
= object
(catMaybes [("resourceId" .=) <$> _acdfResourceId])
data VideoContentDetails =
VideoContentDetails'
{ _vcdCountryRestriction :: !(Maybe AccessPolicy)
, _vcdHasCustomThumbnail :: !(Maybe Bool)
, _vcdDefinition :: !(Maybe VideoContentDetailsDefinition)
, _vcdDimension :: !(Maybe Text)
, _vcdCaption :: !(Maybe VideoContentDetailsCaption)
, _vcdRegionRestriction :: !(Maybe VideoContentDetailsRegionRestriction)
, _vcdProjection :: !(Maybe VideoContentDetailsProjection)
, _vcdDuration :: !(Maybe Text)
, _vcdContentRating :: !(Maybe ContentRating)
, _vcdLicensedContent :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoContentDetails
:: VideoContentDetails
videoContentDetails =
VideoContentDetails'
{ _vcdCountryRestriction = Nothing
, _vcdHasCustomThumbnail = Nothing
, _vcdDefinition = Nothing
, _vcdDimension = Nothing
, _vcdCaption = Nothing
, _vcdRegionRestriction = Nothing
, _vcdProjection = Nothing
, _vcdDuration = Nothing
, _vcdContentRating = Nothing
, _vcdLicensedContent = Nothing
}
vcdCountryRestriction :: Lens' VideoContentDetails (Maybe AccessPolicy)
vcdCountryRestriction
= lens _vcdCountryRestriction
(\ s a -> s{_vcdCountryRestriction = a})
vcdHasCustomThumbnail :: Lens' VideoContentDetails (Maybe Bool)
vcdHasCustomThumbnail
= lens _vcdHasCustomThumbnail
(\ s a -> s{_vcdHasCustomThumbnail = a})
vcdDefinition :: Lens' VideoContentDetails (Maybe VideoContentDetailsDefinition)
vcdDefinition
= lens _vcdDefinition
(\ s a -> s{_vcdDefinition = a})
vcdDimension :: Lens' VideoContentDetails (Maybe Text)
vcdDimension
= lens _vcdDimension (\ s a -> s{_vcdDimension = a})
vcdCaption :: Lens' VideoContentDetails (Maybe VideoContentDetailsCaption)
vcdCaption
= lens _vcdCaption (\ s a -> s{_vcdCaption = a})
vcdRegionRestriction :: Lens' VideoContentDetails (Maybe VideoContentDetailsRegionRestriction)
vcdRegionRestriction
= lens _vcdRegionRestriction
(\ s a -> s{_vcdRegionRestriction = a})
vcdProjection :: Lens' VideoContentDetails (Maybe VideoContentDetailsProjection)
vcdProjection
= lens _vcdProjection
(\ s a -> s{_vcdProjection = a})
vcdDuration :: Lens' VideoContentDetails (Maybe Text)
vcdDuration
= lens _vcdDuration (\ s a -> s{_vcdDuration = a})
vcdContentRating :: Lens' VideoContentDetails (Maybe ContentRating)
vcdContentRating
= lens _vcdContentRating
(\ s a -> s{_vcdContentRating = a})
vcdLicensedContent :: Lens' VideoContentDetails (Maybe Bool)
vcdLicensedContent
= lens _vcdLicensedContent
(\ s a -> s{_vcdLicensedContent = a})
instance FromJSON VideoContentDetails where
parseJSON
= withObject "VideoContentDetails"
(\ o ->
VideoContentDetails' <$>
(o .:? "countryRestriction") <*>
(o .:? "hasCustomThumbnail")
<*> (o .:? "definition")
<*> (o .:? "dimension")
<*> (o .:? "caption")
<*> (o .:? "regionRestriction")
<*> (o .:? "projection")
<*> (o .:? "duration")
<*> (o .:? "contentRating")
<*> (o .:? "licensedContent"))
instance ToJSON VideoContentDetails where
toJSON VideoContentDetails'{..}
= object
(catMaybes
[("countryRestriction" .=) <$>
_vcdCountryRestriction,
("hasCustomThumbnail" .=) <$> _vcdHasCustomThumbnail,
("definition" .=) <$> _vcdDefinition,
("dimension" .=) <$> _vcdDimension,
("caption" .=) <$> _vcdCaption,
("regionRestriction" .=) <$> _vcdRegionRestriction,
("projection" .=) <$> _vcdProjection,
("duration" .=) <$> _vcdDuration,
("contentRating" .=) <$> _vcdContentRating,
("licensedContent" .=) <$> _vcdLicensedContent])
data ImageSettings =
ImageSettings'
{ _isBannerMobileLowImageURL :: !(Maybe Text)
, _isBannerTabletExtraHdImageURL :: !(Maybe Text)
, _isSmallBrandedBannerImageImapScript :: !(Maybe LocalizedProperty)
, _isBannerTvHighImageURL :: !(Maybe Text)
, _isBannerMobileHdImageURL :: !(Maybe Text)
, _isBannerTvMediumImageURL :: !(Maybe Text)
, _isBannerTvImageURL :: !(Maybe Text)
, _isBannerTabletImageURL :: !(Maybe Text)
, _isBannerMobileImageURL :: !(Maybe Text)
, _isTrackingImageURL :: !(Maybe Text)
, _isBannerMobileMediumHdImageURL :: !(Maybe Text)
, _isLargeBrandedBannerImageURL :: !(Maybe LocalizedProperty)
, _isBannerExternalURL :: !(Maybe Text)
, _isBackgRoundImageURL :: !(Maybe LocalizedProperty)
, _isSmallBrandedBannerImageURL :: !(Maybe LocalizedProperty)
, _isBannerImageURL :: !(Maybe Text)
, _isWatchIconImageURL :: !(Maybe Text)
, _isBannerTvLowImageURL :: !(Maybe Text)
, _isBannerMobileExtraHdImageURL :: !(Maybe Text)
, _isLargeBrandedBannerImageImapScript :: !(Maybe LocalizedProperty)
, _isBannerTabletLowImageURL :: !(Maybe Text)
, _isBannerTabletHdImageURL :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
imageSettings
:: ImageSettings
imageSettings =
ImageSettings'
{ _isBannerMobileLowImageURL = Nothing
, _isBannerTabletExtraHdImageURL = Nothing
, _isSmallBrandedBannerImageImapScript = Nothing
, _isBannerTvHighImageURL = Nothing
, _isBannerMobileHdImageURL = Nothing
, _isBannerTvMediumImageURL = Nothing
, _isBannerTvImageURL = Nothing
, _isBannerTabletImageURL = Nothing
, _isBannerMobileImageURL = Nothing
, _isTrackingImageURL = Nothing
, _isBannerMobileMediumHdImageURL = Nothing
, _isLargeBrandedBannerImageURL = Nothing
, _isBannerExternalURL = Nothing
, _isBackgRoundImageURL = Nothing
, _isSmallBrandedBannerImageURL = Nothing
, _isBannerImageURL = Nothing
, _isWatchIconImageURL = Nothing
, _isBannerTvLowImageURL = Nothing
, _isBannerMobileExtraHdImageURL = Nothing
, _isLargeBrandedBannerImageImapScript = Nothing
, _isBannerTabletLowImageURL = Nothing
, _isBannerTabletHdImageURL = Nothing
}
isBannerMobileLowImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileLowImageURL
= lens _isBannerMobileLowImageURL
(\ s a -> s{_isBannerMobileLowImageURL = a})
isBannerTabletExtraHdImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTabletExtraHdImageURL
= lens _isBannerTabletExtraHdImageURL
(\ s a -> s{_isBannerTabletExtraHdImageURL = a})
isSmallBrandedBannerImageImapScript :: Lens' ImageSettings (Maybe LocalizedProperty)
isSmallBrandedBannerImageImapScript
= lens _isSmallBrandedBannerImageImapScript
(\ s a ->
s{_isSmallBrandedBannerImageImapScript = a})
isBannerTvHighImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTvHighImageURL
= lens _isBannerTvHighImageURL
(\ s a -> s{_isBannerTvHighImageURL = a})
isBannerMobileHdImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileHdImageURL
= lens _isBannerMobileHdImageURL
(\ s a -> s{_isBannerMobileHdImageURL = a})
isBannerTvMediumImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTvMediumImageURL
= lens _isBannerTvMediumImageURL
(\ s a -> s{_isBannerTvMediumImageURL = a})
isBannerTvImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTvImageURL
= lens _isBannerTvImageURL
(\ s a -> s{_isBannerTvImageURL = a})
isBannerTabletImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTabletImageURL
= lens _isBannerTabletImageURL
(\ s a -> s{_isBannerTabletImageURL = a})
isBannerMobileImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileImageURL
= lens _isBannerMobileImageURL
(\ s a -> s{_isBannerMobileImageURL = a})
isTrackingImageURL :: Lens' ImageSettings (Maybe Text)
isTrackingImageURL
= lens _isTrackingImageURL
(\ s a -> s{_isTrackingImageURL = a})
isBannerMobileMediumHdImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileMediumHdImageURL
= lens _isBannerMobileMediumHdImageURL
(\ s a -> s{_isBannerMobileMediumHdImageURL = a})
isLargeBrandedBannerImageURL :: Lens' ImageSettings (Maybe LocalizedProperty)
isLargeBrandedBannerImageURL
= lens _isLargeBrandedBannerImageURL
(\ s a -> s{_isLargeBrandedBannerImageURL = a})
isBannerExternalURL :: Lens' ImageSettings (Maybe Text)
isBannerExternalURL
= lens _isBannerExternalURL
(\ s a -> s{_isBannerExternalURL = a})
isBackgRoundImageURL :: Lens' ImageSettings (Maybe LocalizedProperty)
isBackgRoundImageURL
= lens _isBackgRoundImageURL
(\ s a -> s{_isBackgRoundImageURL = a})
isSmallBrandedBannerImageURL :: Lens' ImageSettings (Maybe LocalizedProperty)
isSmallBrandedBannerImageURL
= lens _isSmallBrandedBannerImageURL
(\ s a -> s{_isSmallBrandedBannerImageURL = a})
isBannerImageURL :: Lens' ImageSettings (Maybe Text)
isBannerImageURL
= lens _isBannerImageURL
(\ s a -> s{_isBannerImageURL = a})
isWatchIconImageURL :: Lens' ImageSettings (Maybe Text)
isWatchIconImageURL
= lens _isWatchIconImageURL
(\ s a -> s{_isWatchIconImageURL = a})
isBannerTvLowImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTvLowImageURL
= lens _isBannerTvLowImageURL
(\ s a -> s{_isBannerTvLowImageURL = a})
isBannerMobileExtraHdImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileExtraHdImageURL
= lens _isBannerMobileExtraHdImageURL
(\ s a -> s{_isBannerMobileExtraHdImageURL = a})
isLargeBrandedBannerImageImapScript :: Lens' ImageSettings (Maybe LocalizedProperty)
isLargeBrandedBannerImageImapScript
= lens _isLargeBrandedBannerImageImapScript
(\ s a ->
s{_isLargeBrandedBannerImageImapScript = a})
isBannerTabletLowImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTabletLowImageURL
= lens _isBannerTabletLowImageURL
(\ s a -> s{_isBannerTabletLowImageURL = a})
isBannerTabletHdImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTabletHdImageURL
= lens _isBannerTabletHdImageURL
(\ s a -> s{_isBannerTabletHdImageURL = a})
instance FromJSON ImageSettings where
parseJSON
= withObject "ImageSettings"
(\ o ->
ImageSettings' <$>
(o .:? "bannerMobileLowImageUrl") <*>
(o .:? "bannerTabletExtraHdImageUrl")
<*> (o .:? "smallBrandedBannerImageImapScript")
<*> (o .:? "bannerTvHighImageUrl")
<*> (o .:? "bannerMobileHdImageUrl")
<*> (o .:? "bannerTvMediumImageUrl")
<*> (o .:? "bannerTvImageUrl")
<*> (o .:? "bannerTabletImageUrl")
<*> (o .:? "bannerMobileImageUrl")
<*> (o .:? "trackingImageUrl")
<*> (o .:? "bannerMobileMediumHdImageUrl")
<*> (o .:? "largeBrandedBannerImageUrl")
<*> (o .:? "bannerExternalUrl")
<*> (o .:? "backgroundImageUrl")
<*> (o .:? "smallBrandedBannerImageUrl")
<*> (o .:? "bannerImageUrl")
<*> (o .:? "watchIconImageUrl")
<*> (o .:? "bannerTvLowImageUrl")
<*> (o .:? "bannerMobileExtraHdImageUrl")
<*> (o .:? "largeBrandedBannerImageImapScript")
<*> (o .:? "bannerTabletLowImageUrl")
<*> (o .:? "bannerTabletHdImageUrl"))
instance ToJSON ImageSettings where
toJSON ImageSettings'{..}
= object
(catMaybes
[("bannerMobileLowImageUrl" .=) <$>
_isBannerMobileLowImageURL,
("bannerTabletExtraHdImageUrl" .=) <$>
_isBannerTabletExtraHdImageURL,
("smallBrandedBannerImageImapScript" .=) <$>
_isSmallBrandedBannerImageImapScript,
("bannerTvHighImageUrl" .=) <$>
_isBannerTvHighImageURL,
("bannerMobileHdImageUrl" .=) <$>
_isBannerMobileHdImageURL,
("bannerTvMediumImageUrl" .=) <$>
_isBannerTvMediumImageURL,
("bannerTvImageUrl" .=) <$> _isBannerTvImageURL,
("bannerTabletImageUrl" .=) <$>
_isBannerTabletImageURL,
("bannerMobileImageUrl" .=) <$>
_isBannerMobileImageURL,
("trackingImageUrl" .=) <$> _isTrackingImageURL,
("bannerMobileMediumHdImageUrl" .=) <$>
_isBannerMobileMediumHdImageURL,
("largeBrandedBannerImageUrl" .=) <$>
_isLargeBrandedBannerImageURL,
("bannerExternalUrl" .=) <$> _isBannerExternalURL,
("backgroundImageUrl" .=) <$> _isBackgRoundImageURL,
("smallBrandedBannerImageUrl" .=) <$>
_isSmallBrandedBannerImageURL,
("bannerImageUrl" .=) <$> _isBannerImageURL,
("watchIconImageUrl" .=) <$> _isWatchIconImageURL,
("bannerTvLowImageUrl" .=) <$>
_isBannerTvLowImageURL,
("bannerMobileExtraHdImageUrl" .=) <$>
_isBannerMobileExtraHdImageURL,
("largeBrandedBannerImageImapScript" .=) <$>
_isLargeBrandedBannerImageImapScript,
("bannerTabletLowImageUrl" .=) <$>
_isBannerTabletLowImageURL,
("bannerTabletHdImageUrl" .=) <$>
_isBannerTabletHdImageURL])
data VideoTopicDetails =
VideoTopicDetails'
{ _vtdTopicIds :: !(Maybe [Text])
, _vtdRelevantTopicIds :: !(Maybe [Text])
, _vtdTopicCategories :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
videoTopicDetails
:: VideoTopicDetails
videoTopicDetails =
VideoTopicDetails'
{ _vtdTopicIds = Nothing
, _vtdRelevantTopicIds = Nothing
, _vtdTopicCategories = Nothing
}
vtdTopicIds :: Lens' VideoTopicDetails [Text]
vtdTopicIds
= lens _vtdTopicIds (\ s a -> s{_vtdTopicIds = a}) .
_Default
. _Coerce
vtdRelevantTopicIds :: Lens' VideoTopicDetails [Text]
vtdRelevantTopicIds
= lens _vtdRelevantTopicIds
(\ s a -> s{_vtdRelevantTopicIds = a})
. _Default
. _Coerce
vtdTopicCategories :: Lens' VideoTopicDetails [Text]
vtdTopicCategories
= lens _vtdTopicCategories
(\ s a -> s{_vtdTopicCategories = a})
. _Default
. _Coerce
instance FromJSON VideoTopicDetails where
parseJSON
= withObject "VideoTopicDetails"
(\ o ->
VideoTopicDetails' <$>
(o .:? "topicIds" .!= mempty) <*>
(o .:? "relevantTopicIds" .!= mempty)
<*> (o .:? "topicCategories" .!= mempty))
instance ToJSON VideoTopicDetails where
toJSON VideoTopicDetails'{..}
= object
(catMaybes
[("topicIds" .=) <$> _vtdTopicIds,
("relevantTopicIds" .=) <$> _vtdRelevantTopicIds,
("topicCategories" .=) <$> _vtdTopicCategories])
newtype ActivityContentDetailsComment =
ActivityContentDetailsComment'
{ _acdcResourceId :: Maybe ResourceId
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsComment
:: ActivityContentDetailsComment
activityContentDetailsComment =
ActivityContentDetailsComment' {_acdcResourceId = Nothing}
acdcResourceId :: Lens' ActivityContentDetailsComment (Maybe ResourceId)
acdcResourceId
= lens _acdcResourceId
(\ s a -> s{_acdcResourceId = a})
instance FromJSON ActivityContentDetailsComment where
parseJSON
= withObject "ActivityContentDetailsComment"
(\ o ->
ActivityContentDetailsComment' <$>
(o .:? "resourceId"))
instance ToJSON ActivityContentDetailsComment where
toJSON ActivityContentDetailsComment'{..}
= object
(catMaybes [("resourceId" .=) <$> _acdcResourceId])
data LiveBroadcastStatus =
LiveBroadcastStatus'
{ _lbsLiveBroadcastPriority :: !(Maybe LiveBroadcastStatusLiveBroadcastPriority)
, _lbsRecordingStatus :: !(Maybe LiveBroadcastStatusRecordingStatus)
, _lbsLifeCycleStatus :: !(Maybe LiveBroadcastStatusLifeCycleStatus)
, _lbsPrivacyStatus :: !(Maybe LiveBroadcastStatusPrivacyStatus)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveBroadcastStatus
:: LiveBroadcastStatus
liveBroadcastStatus =
LiveBroadcastStatus'
{ _lbsLiveBroadcastPriority = Nothing
, _lbsRecordingStatus = Nothing
, _lbsLifeCycleStatus = Nothing
, _lbsPrivacyStatus = Nothing
}
lbsLiveBroadcastPriority :: Lens' LiveBroadcastStatus (Maybe LiveBroadcastStatusLiveBroadcastPriority)
lbsLiveBroadcastPriority
= lens _lbsLiveBroadcastPriority
(\ s a -> s{_lbsLiveBroadcastPriority = a})
lbsRecordingStatus :: Lens' LiveBroadcastStatus (Maybe LiveBroadcastStatusRecordingStatus)
lbsRecordingStatus
= lens _lbsRecordingStatus
(\ s a -> s{_lbsRecordingStatus = a})
lbsLifeCycleStatus :: Lens' LiveBroadcastStatus (Maybe LiveBroadcastStatusLifeCycleStatus)
lbsLifeCycleStatus
= lens _lbsLifeCycleStatus
(\ s a -> s{_lbsLifeCycleStatus = a})
lbsPrivacyStatus :: Lens' LiveBroadcastStatus (Maybe LiveBroadcastStatusPrivacyStatus)
lbsPrivacyStatus
= lens _lbsPrivacyStatus
(\ s a -> s{_lbsPrivacyStatus = a})
instance FromJSON LiveBroadcastStatus where
parseJSON
= withObject "LiveBroadcastStatus"
(\ o ->
LiveBroadcastStatus' <$>
(o .:? "liveBroadcastPriority") <*>
(o .:? "recordingStatus")
<*> (o .:? "lifeCycleStatus")
<*> (o .:? "privacyStatus"))
instance ToJSON LiveBroadcastStatus where
toJSON LiveBroadcastStatus'{..}
= object
(catMaybes
[("liveBroadcastPriority" .=) <$>
_lbsLiveBroadcastPriority,
("recordingStatus" .=) <$> _lbsRecordingStatus,
("lifeCycleStatus" .=) <$> _lbsLifeCycleStatus,
("privacyStatus" .=) <$> _lbsPrivacyStatus])
newtype ActivityContentDetailsUpload =
ActivityContentDetailsUpload'
{ _acduVideoId :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsUpload
:: ActivityContentDetailsUpload
activityContentDetailsUpload =
ActivityContentDetailsUpload' {_acduVideoId = Nothing}
acduVideoId :: Lens' ActivityContentDetailsUpload (Maybe Text)
acduVideoId
= lens _acduVideoId (\ s a -> s{_acduVideoId = a})
instance FromJSON ActivityContentDetailsUpload where
parseJSON
= withObject "ActivityContentDetailsUpload"
(\ o ->
ActivityContentDetailsUpload' <$> (o .:? "videoId"))
instance ToJSON ActivityContentDetailsUpload where
toJSON ActivityContentDetailsUpload'{..}
= object
(catMaybes [("videoId" .=) <$> _acduVideoId])
data ActivityContentDetailsPlayListItem =
ActivityContentDetailsPlayListItem'
{ _acdpliResourceId :: !(Maybe ResourceId)
, _acdpliPlayListId :: !(Maybe Text)
, _acdpliPlayListItemId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsPlayListItem
:: ActivityContentDetailsPlayListItem
activityContentDetailsPlayListItem =
ActivityContentDetailsPlayListItem'
{ _acdpliResourceId = Nothing
, _acdpliPlayListId = Nothing
, _acdpliPlayListItemId = Nothing
}
acdpliResourceId :: Lens' ActivityContentDetailsPlayListItem (Maybe ResourceId)
acdpliResourceId
= lens _acdpliResourceId
(\ s a -> s{_acdpliResourceId = a})
acdpliPlayListId :: Lens' ActivityContentDetailsPlayListItem (Maybe Text)
acdpliPlayListId
= lens _acdpliPlayListId
(\ s a -> s{_acdpliPlayListId = a})
acdpliPlayListItemId :: Lens' ActivityContentDetailsPlayListItem (Maybe Text)
acdpliPlayListItemId
= lens _acdpliPlayListItemId
(\ s a -> s{_acdpliPlayListItemId = a})
instance FromJSON ActivityContentDetailsPlayListItem
where
parseJSON
= withObject "ActivityContentDetailsPlayListItem"
(\ o ->
ActivityContentDetailsPlayListItem' <$>
(o .:? "resourceId") <*> (o .:? "playlistId") <*>
(o .:? "playlistItemId"))
instance ToJSON ActivityContentDetailsPlayListItem
where
toJSON ActivityContentDetailsPlayListItem'{..}
= object
(catMaybes
[("resourceId" .=) <$> _acdpliResourceId,
("playlistId" .=) <$> _acdpliPlayListId,
("playlistItemId" .=) <$> _acdpliPlayListItemId])
data SuperStickerMetadata =
SuperStickerMetadata'
{ _ssmAltText :: !(Maybe Text)
, _ssmStickerId :: !(Maybe Text)
, _ssmAltTextLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
superStickerMetadata
:: SuperStickerMetadata
superStickerMetadata =
SuperStickerMetadata'
{ _ssmAltText = Nothing
, _ssmStickerId = Nothing
, _ssmAltTextLanguage = Nothing
}
ssmAltText :: Lens' SuperStickerMetadata (Maybe Text)
ssmAltText
= lens _ssmAltText (\ s a -> s{_ssmAltText = a})
ssmStickerId :: Lens' SuperStickerMetadata (Maybe Text)
ssmStickerId
= lens _ssmStickerId (\ s a -> s{_ssmStickerId = a})
ssmAltTextLanguage :: Lens' SuperStickerMetadata (Maybe Text)
ssmAltTextLanguage
= lens _ssmAltTextLanguage
(\ s a -> s{_ssmAltTextLanguage = a})
instance FromJSON SuperStickerMetadata where
parseJSON
= withObject "SuperStickerMetadata"
(\ o ->
SuperStickerMetadata' <$>
(o .:? "altText") <*> (o .:? "stickerId") <*>
(o .:? "altTextLanguage"))
instance ToJSON SuperStickerMetadata where
toJSON SuperStickerMetadata'{..}
= object
(catMaybes
[("altText" .=) <$> _ssmAltText,
("stickerId" .=) <$> _ssmStickerId,
("altTextLanguage" .=) <$> _ssmAltTextLanguage])
data ActivityContentDetailsSocial =
ActivityContentDetailsSocial'
{ _acdsResourceId :: !(Maybe ResourceId)
, _acdsImageURL :: !(Maybe Text)
, _acdsAuthor :: !(Maybe Text)
, _acdsReferenceURL :: !(Maybe Text)
, _acdsType :: !(Maybe ActivityContentDetailsSocialType)
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsSocial
:: ActivityContentDetailsSocial
activityContentDetailsSocial =
ActivityContentDetailsSocial'
{ _acdsResourceId = Nothing
, _acdsImageURL = Nothing
, _acdsAuthor = Nothing
, _acdsReferenceURL = Nothing
, _acdsType = Nothing
}
acdsResourceId :: Lens' ActivityContentDetailsSocial (Maybe ResourceId)
acdsResourceId
= lens _acdsResourceId
(\ s a -> s{_acdsResourceId = a})
acdsImageURL :: Lens' ActivityContentDetailsSocial (Maybe Text)
acdsImageURL
= lens _acdsImageURL (\ s a -> s{_acdsImageURL = a})
acdsAuthor :: Lens' ActivityContentDetailsSocial (Maybe Text)
acdsAuthor
= lens _acdsAuthor (\ s a -> s{_acdsAuthor = a})
acdsReferenceURL :: Lens' ActivityContentDetailsSocial (Maybe Text)
acdsReferenceURL
= lens _acdsReferenceURL
(\ s a -> s{_acdsReferenceURL = a})
acdsType :: Lens' ActivityContentDetailsSocial (Maybe ActivityContentDetailsSocialType)
acdsType = lens _acdsType (\ s a -> s{_acdsType = a})
instance FromJSON ActivityContentDetailsSocial where
parseJSON
= withObject "ActivityContentDetailsSocial"
(\ o ->
ActivityContentDetailsSocial' <$>
(o .:? "resourceId") <*> (o .:? "imageUrl") <*>
(o .:? "author")
<*> (o .:? "referenceUrl")
<*> (o .:? "type"))
instance ToJSON ActivityContentDetailsSocial where
toJSON ActivityContentDetailsSocial'{..}
= object
(catMaybes
[("resourceId" .=) <$> _acdsResourceId,
("imageUrl" .=) <$> _acdsImageURL,
("author" .=) <$> _acdsAuthor,
("referenceUrl" .=) <$> _acdsReferenceURL,
("type" .=) <$> _acdsType])
data LiveChatBan =
LiveChatBan'
{ _lcbEtag :: !(Maybe Text)
, _lcbSnippet :: !(Maybe LiveChatBanSnippet)
, _lcbKind :: !Text
, _lcbId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatBan
:: LiveChatBan
liveChatBan =
LiveChatBan'
{ _lcbEtag = Nothing
, _lcbSnippet = Nothing
, _lcbKind = "youtube#liveChatBan"
, _lcbId = Nothing
}
lcbEtag :: Lens' LiveChatBan (Maybe Text)
lcbEtag = lens _lcbEtag (\ s a -> s{_lcbEtag = a})
lcbSnippet :: Lens' LiveChatBan (Maybe LiveChatBanSnippet)
lcbSnippet
= lens _lcbSnippet (\ s a -> s{_lcbSnippet = a})
lcbKind :: Lens' LiveChatBan Text
lcbKind = lens _lcbKind (\ s a -> s{_lcbKind = a})
lcbId :: Lens' LiveChatBan (Maybe Text)
lcbId = lens _lcbId (\ s a -> s{_lcbId = a})
instance FromJSON LiveChatBan where
parseJSON
= withObject "LiveChatBan"
(\ o ->
LiveChatBan' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#liveChatBan")
<*> (o .:? "id"))
instance ToJSON LiveChatBan where
toJSON LiveChatBan'{..}
= object
(catMaybes
[("etag" .=) <$> _lcbEtag,
("snippet" .=) <$> _lcbSnippet,
Just ("kind" .= _lcbKind), ("id" .=) <$> _lcbId])
newtype ActivityContentDetailsSubscription =
ActivityContentDetailsSubscription'
{ _aResourceId :: Maybe ResourceId
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsSubscription
:: ActivityContentDetailsSubscription
activityContentDetailsSubscription =
ActivityContentDetailsSubscription' {_aResourceId = Nothing}
aResourceId :: Lens' ActivityContentDetailsSubscription (Maybe ResourceId)
aResourceId
= lens _aResourceId (\ s a -> s{_aResourceId = a})
instance FromJSON ActivityContentDetailsSubscription
where
parseJSON
= withObject "ActivityContentDetailsSubscription"
(\ o ->
ActivityContentDetailsSubscription' <$>
(o .:? "resourceId"))
instance ToJSON ActivityContentDetailsSubscription
where
toJSON ActivityContentDetailsSubscription'{..}
= object
(catMaybes [("resourceId" .=) <$> _aResourceId])
newtype ActivityContentDetailsLike =
ActivityContentDetailsLike'
{ _acdlResourceId :: Maybe ResourceId
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsLike
:: ActivityContentDetailsLike
activityContentDetailsLike =
ActivityContentDetailsLike' {_acdlResourceId = Nothing}
acdlResourceId :: Lens' ActivityContentDetailsLike (Maybe ResourceId)
acdlResourceId
= lens _acdlResourceId
(\ s a -> s{_acdlResourceId = a})
instance FromJSON ActivityContentDetailsLike where
parseJSON
= withObject "ActivityContentDetailsLike"
(\ o ->
ActivityContentDetailsLike' <$> (o .:? "resourceId"))
instance ToJSON ActivityContentDetailsLike where
toJSON ActivityContentDetailsLike'{..}
= object
(catMaybes [("resourceId" .=) <$> _acdlResourceId])
newtype PlayListContentDetails =
PlayListContentDetails'
{ _plcdItemCount :: Maybe (Textual Word32)
}
deriving (Eq, Show, Data, Typeable, Generic)
playListContentDetails
:: PlayListContentDetails
playListContentDetails = PlayListContentDetails' {_plcdItemCount = Nothing}
plcdItemCount :: Lens' PlayListContentDetails (Maybe Word32)
plcdItemCount
= lens _plcdItemCount
(\ s a -> s{_plcdItemCount = a})
. mapping _Coerce
instance FromJSON PlayListContentDetails where
parseJSON
= withObject "PlayListContentDetails"
(\ o ->
PlayListContentDetails' <$> (o .:? "itemCount"))
instance ToJSON PlayListContentDetails where
toJSON PlayListContentDetails'{..}
= object
(catMaybes [("itemCount" .=) <$> _plcdItemCount])
data LiveChatSuperChatDetails =
LiveChatSuperChatDetails'
{ _lcscdUserComment :: !(Maybe Text)
, _lcscdAmountMicros :: !(Maybe (Textual Word64))
, _lcscdAmountDisplayString :: !(Maybe Text)
, _lcscdCurrency :: !(Maybe Text)
, _lcscdTier :: !(Maybe (Textual Word32))
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatSuperChatDetails
:: LiveChatSuperChatDetails
liveChatSuperChatDetails =
LiveChatSuperChatDetails'
{ _lcscdUserComment = Nothing
, _lcscdAmountMicros = Nothing
, _lcscdAmountDisplayString = Nothing
, _lcscdCurrency = Nothing
, _lcscdTier = Nothing
}
lcscdUserComment :: Lens' LiveChatSuperChatDetails (Maybe Text)
lcscdUserComment
= lens _lcscdUserComment
(\ s a -> s{_lcscdUserComment = a})
lcscdAmountMicros :: Lens' LiveChatSuperChatDetails (Maybe Word64)
lcscdAmountMicros
= lens _lcscdAmountMicros
(\ s a -> s{_lcscdAmountMicros = a})
. mapping _Coerce
lcscdAmountDisplayString :: Lens' LiveChatSuperChatDetails (Maybe Text)
lcscdAmountDisplayString
= lens _lcscdAmountDisplayString
(\ s a -> s{_lcscdAmountDisplayString = a})
lcscdCurrency :: Lens' LiveChatSuperChatDetails (Maybe Text)
lcscdCurrency
= lens _lcscdCurrency
(\ s a -> s{_lcscdCurrency = a})
lcscdTier :: Lens' LiveChatSuperChatDetails (Maybe Word32)
lcscdTier
= lens _lcscdTier (\ s a -> s{_lcscdTier = a}) .
mapping _Coerce
instance FromJSON LiveChatSuperChatDetails where
parseJSON
= withObject "LiveChatSuperChatDetails"
(\ o ->
LiveChatSuperChatDetails' <$>
(o .:? "userComment") <*> (o .:? "amountMicros") <*>
(o .:? "amountDisplayString")
<*> (o .:? "currency")
<*> (o .:? "tier"))
instance ToJSON LiveChatSuperChatDetails where
toJSON LiveChatSuperChatDetails'{..}
= object
(catMaybes
[("userComment" .=) <$> _lcscdUserComment,
("amountMicros" .=) <$> _lcscdAmountMicros,
("amountDisplayString" .=) <$>
_lcscdAmountDisplayString,
("currency" .=) <$> _lcscdCurrency,
("tier" .=) <$> _lcscdTier])
data PageInfo =
PageInfo'
{ _piResultsPerPage :: !(Maybe (Textual Int32))
, _piTotalResults :: !(Maybe (Textual Int32))
}
deriving (Eq, Show, Data, Typeable, Generic)
pageInfo
:: PageInfo
pageInfo = PageInfo' {_piResultsPerPage = Nothing, _piTotalResults = Nothing}
piResultsPerPage :: Lens' PageInfo (Maybe Int32)
piResultsPerPage
= lens _piResultsPerPage
(\ s a -> s{_piResultsPerPage = a})
. mapping _Coerce
piTotalResults :: Lens' PageInfo (Maybe Int32)
piTotalResults
= lens _piTotalResults
(\ s a -> s{_piTotalResults = a})
. mapping _Coerce
instance FromJSON PageInfo where
parseJSON
= withObject "PageInfo"
(\ o ->
PageInfo' <$>
(o .:? "resultsPerPage") <*> (o .:? "totalResults"))
instance ToJSON PageInfo where
toJSON PageInfo'{..}
= object
(catMaybes
[("resultsPerPage" .=) <$> _piResultsPerPage,
("totalResults" .=) <$> _piTotalResults])
data VideoStatus =
VideoStatus'
{ _vsFailureReason :: !(Maybe VideoStatusFailureReason)
, _vsPublicStatsViewable :: !(Maybe Bool)
, _vsRejectionReason :: !(Maybe VideoStatusRejectionReason)
, _vsPublishAt :: !(Maybe DateTime')
, _vsUploadStatus :: !(Maybe VideoStatusUploadStatus)
, _vsPrivacyStatus :: !(Maybe VideoStatusPrivacyStatus)
, _vsEmbeddable :: !(Maybe Bool)
, _vsLicense :: !(Maybe VideoStatusLicense)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoStatus
:: VideoStatus
videoStatus =
VideoStatus'
{ _vsFailureReason = Nothing
, _vsPublicStatsViewable = Nothing
, _vsRejectionReason = Nothing
, _vsPublishAt = Nothing
, _vsUploadStatus = Nothing
, _vsPrivacyStatus = Nothing
, _vsEmbeddable = Nothing
, _vsLicense = Nothing
}
vsFailureReason :: Lens' VideoStatus (Maybe VideoStatusFailureReason)
vsFailureReason
= lens _vsFailureReason
(\ s a -> s{_vsFailureReason = a})
vsPublicStatsViewable :: Lens' VideoStatus (Maybe Bool)
vsPublicStatsViewable
= lens _vsPublicStatsViewable
(\ s a -> s{_vsPublicStatsViewable = a})
vsRejectionReason :: Lens' VideoStatus (Maybe VideoStatusRejectionReason)
vsRejectionReason
= lens _vsRejectionReason
(\ s a -> s{_vsRejectionReason = a})
vsPublishAt :: Lens' VideoStatus (Maybe UTCTime)
vsPublishAt
= lens _vsPublishAt (\ s a -> s{_vsPublishAt = a}) .
mapping _DateTime
vsUploadStatus :: Lens' VideoStatus (Maybe VideoStatusUploadStatus)
vsUploadStatus
= lens _vsUploadStatus
(\ s a -> s{_vsUploadStatus = a})
vsPrivacyStatus :: Lens' VideoStatus (Maybe VideoStatusPrivacyStatus)
vsPrivacyStatus
= lens _vsPrivacyStatus
(\ s a -> s{_vsPrivacyStatus = a})
vsEmbeddable :: Lens' VideoStatus (Maybe Bool)
vsEmbeddable
= lens _vsEmbeddable (\ s a -> s{_vsEmbeddable = a})
vsLicense :: Lens' VideoStatus (Maybe VideoStatusLicense)
vsLicense
= lens _vsLicense (\ s a -> s{_vsLicense = a})
instance FromJSON VideoStatus where
parseJSON
= withObject "VideoStatus"
(\ o ->
VideoStatus' <$>
(o .:? "failureReason") <*>
(o .:? "publicStatsViewable")
<*> (o .:? "rejectionReason")
<*> (o .:? "publishAt")
<*> (o .:? "uploadStatus")
<*> (o .:? "privacyStatus")
<*> (o .:? "embeddable")
<*> (o .:? "license"))
instance ToJSON VideoStatus where
toJSON VideoStatus'{..}
= object
(catMaybes
[("failureReason" .=) <$> _vsFailureReason,
("publicStatsViewable" .=) <$>
_vsPublicStatsViewable,
("rejectionReason" .=) <$> _vsRejectionReason,
("publishAt" .=) <$> _vsPublishAt,
("uploadStatus" .=) <$> _vsUploadStatus,
("privacyStatus" .=) <$> _vsPrivacyStatus,
("embeddable" .=) <$> _vsEmbeddable,
("license" .=) <$> _vsLicense])
data VideoFileDetails =
VideoFileDetails'
{ _vfdBitrateBps :: !(Maybe (Textual Word64))
, _vfdCreationTime :: !(Maybe Text)
, _vfdDurationMs :: !(Maybe (Textual Word64))
, _vfdFileSize :: !(Maybe (Textual Word64))
, _vfdFileType :: !(Maybe VideoFileDetailsFileType)
, _vfdContainer :: !(Maybe Text)
, _vfdVideoStreams :: !(Maybe [VideoFileDetailsVideoStream])
, _vfdAudioStreams :: !(Maybe [VideoFileDetailsAudioStream])
, _vfdFileName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoFileDetails
:: VideoFileDetails
videoFileDetails =
VideoFileDetails'
{ _vfdBitrateBps = Nothing
, _vfdCreationTime = Nothing
, _vfdDurationMs = Nothing
, _vfdFileSize = Nothing
, _vfdFileType = Nothing
, _vfdContainer = Nothing
, _vfdVideoStreams = Nothing
, _vfdAudioStreams = Nothing
, _vfdFileName = Nothing
}
vfdBitrateBps :: Lens' VideoFileDetails (Maybe Word64)
vfdBitrateBps
= lens _vfdBitrateBps
(\ s a -> s{_vfdBitrateBps = a})
. mapping _Coerce
vfdCreationTime :: Lens' VideoFileDetails (Maybe Text)
vfdCreationTime
= lens _vfdCreationTime
(\ s a -> s{_vfdCreationTime = a})
vfdDurationMs :: Lens' VideoFileDetails (Maybe Word64)
vfdDurationMs
= lens _vfdDurationMs
(\ s a -> s{_vfdDurationMs = a})
. mapping _Coerce
vfdFileSize :: Lens' VideoFileDetails (Maybe Word64)
vfdFileSize
= lens _vfdFileSize (\ s a -> s{_vfdFileSize = a}) .
mapping _Coerce
vfdFileType :: Lens' VideoFileDetails (Maybe VideoFileDetailsFileType)
vfdFileType
= lens _vfdFileType (\ s a -> s{_vfdFileType = a})
vfdContainer :: Lens' VideoFileDetails (Maybe Text)
vfdContainer
= lens _vfdContainer (\ s a -> s{_vfdContainer = a})
vfdVideoStreams :: Lens' VideoFileDetails [VideoFileDetailsVideoStream]
vfdVideoStreams
= lens _vfdVideoStreams
(\ s a -> s{_vfdVideoStreams = a})
. _Default
. _Coerce
vfdAudioStreams :: Lens' VideoFileDetails [VideoFileDetailsAudioStream]
vfdAudioStreams
= lens _vfdAudioStreams
(\ s a -> s{_vfdAudioStreams = a})
. _Default
. _Coerce
vfdFileName :: Lens' VideoFileDetails (Maybe Text)
vfdFileName
= lens _vfdFileName (\ s a -> s{_vfdFileName = a})
instance FromJSON VideoFileDetails where
parseJSON
= withObject "VideoFileDetails"
(\ o ->
VideoFileDetails' <$>
(o .:? "bitrateBps") <*> (o .:? "creationTime") <*>
(o .:? "durationMs")
<*> (o .:? "fileSize")
<*> (o .:? "fileType")
<*> (o .:? "container")
<*> (o .:? "videoStreams" .!= mempty)
<*> (o .:? "audioStreams" .!= mempty)
<*> (o .:? "fileName"))
instance ToJSON VideoFileDetails where
toJSON VideoFileDetails'{..}
= object
(catMaybes
[("bitrateBps" .=) <$> _vfdBitrateBps,
("creationTime" .=) <$> _vfdCreationTime,
("durationMs" .=) <$> _vfdDurationMs,
("fileSize" .=) <$> _vfdFileSize,
("fileType" .=) <$> _vfdFileType,
("container" .=) <$> _vfdContainer,
("videoStreams" .=) <$> _vfdVideoStreams,
("audioStreams" .=) <$> _vfdAudioStreams,
("fileName" .=) <$> _vfdFileName])
data ThumbnailSetResponse =
ThumbnailSetResponse'
{ _tsrEtag :: !(Maybe Text)
, _tsrKind :: !Text
, _tsrItems :: !(Maybe [ThumbnailDetails])
, _tsrVisitorId :: !(Maybe Text)
, _tsrEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
thumbnailSetResponse
:: ThumbnailSetResponse
thumbnailSetResponse =
ThumbnailSetResponse'
{ _tsrEtag = Nothing
, _tsrKind = "youtube#thumbnailSetResponse"
, _tsrItems = Nothing
, _tsrVisitorId = Nothing
, _tsrEventId = Nothing
}
tsrEtag :: Lens' ThumbnailSetResponse (Maybe Text)
tsrEtag = lens _tsrEtag (\ s a -> s{_tsrEtag = a})
tsrKind :: Lens' ThumbnailSetResponse Text
tsrKind = lens _tsrKind (\ s a -> s{_tsrKind = a})
tsrItems :: Lens' ThumbnailSetResponse [ThumbnailDetails]
tsrItems
= lens _tsrItems (\ s a -> s{_tsrItems = a}) .
_Default
. _Coerce
tsrVisitorId :: Lens' ThumbnailSetResponse (Maybe Text)
tsrVisitorId
= lens _tsrVisitorId (\ s a -> s{_tsrVisitorId = a})
tsrEventId :: Lens' ThumbnailSetResponse (Maybe Text)
tsrEventId
= lens _tsrEventId (\ s a -> s{_tsrEventId = a})
instance FromJSON ThumbnailSetResponse where
parseJSON
= withObject "ThumbnailSetResponse"
(\ o ->
ThumbnailSetResponse' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "youtube#thumbnailSetResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON ThumbnailSetResponse where
toJSON ThumbnailSetResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _tsrEtag, Just ("kind" .= _tsrKind),
("items" .=) <$> _tsrItems,
("visitorId" .=) <$> _tsrVisitorId,
("eventId" .=) <$> _tsrEventId])
data LiveBroadcastListResponse =
LiveBroadcastListResponse'
{ _lblrEtag :: !(Maybe Text)
, _lblrTokenPagination :: !(Maybe TokenPagination)
, _lblrNextPageToken :: !(Maybe Text)
, _lblrPageInfo :: !(Maybe PageInfo)
, _lblrKind :: !Text
, _lblrItems :: !(Maybe [LiveBroadcast])
, _lblrVisitorId :: !(Maybe Text)
, _lblrEventId :: !(Maybe Text)
, _lblrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveBroadcastListResponse
:: LiveBroadcastListResponse
liveBroadcastListResponse =
LiveBroadcastListResponse'
{ _lblrEtag = Nothing
, _lblrTokenPagination = Nothing
, _lblrNextPageToken = Nothing
, _lblrPageInfo = Nothing
, _lblrKind = "youtube#liveBroadcastListResponse"
, _lblrItems = Nothing
, _lblrVisitorId = Nothing
, _lblrEventId = Nothing
, _lblrPrevPageToken = Nothing
}
lblrEtag :: Lens' LiveBroadcastListResponse (Maybe Text)
lblrEtag = lens _lblrEtag (\ s a -> s{_lblrEtag = a})
lblrTokenPagination :: Lens' LiveBroadcastListResponse (Maybe TokenPagination)
lblrTokenPagination
= lens _lblrTokenPagination
(\ s a -> s{_lblrTokenPagination = a})
lblrNextPageToken :: Lens' LiveBroadcastListResponse (Maybe Text)
lblrNextPageToken
= lens _lblrNextPageToken
(\ s a -> s{_lblrNextPageToken = a})
lblrPageInfo :: Lens' LiveBroadcastListResponse (Maybe PageInfo)
lblrPageInfo
= lens _lblrPageInfo (\ s a -> s{_lblrPageInfo = a})
lblrKind :: Lens' LiveBroadcastListResponse Text
lblrKind = lens _lblrKind (\ s a -> s{_lblrKind = a})
lblrItems :: Lens' LiveBroadcastListResponse [LiveBroadcast]
lblrItems
= lens _lblrItems (\ s a -> s{_lblrItems = a}) .
_Default
. _Coerce
lblrVisitorId :: Lens' LiveBroadcastListResponse (Maybe Text)
lblrVisitorId
= lens _lblrVisitorId
(\ s a -> s{_lblrVisitorId = a})
lblrEventId :: Lens' LiveBroadcastListResponse (Maybe Text)
lblrEventId
= lens _lblrEventId (\ s a -> s{_lblrEventId = a})
lblrPrevPageToken :: Lens' LiveBroadcastListResponse (Maybe Text)
lblrPrevPageToken
= lens _lblrPrevPageToken
(\ s a -> s{_lblrPrevPageToken = a})
instance FromJSON LiveBroadcastListResponse where
parseJSON
= withObject "LiveBroadcastListResponse"
(\ o ->
LiveBroadcastListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!=
"youtube#liveBroadcastListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON LiveBroadcastListResponse where
toJSON LiveBroadcastListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _lblrEtag,
("tokenPagination" .=) <$> _lblrTokenPagination,
("nextPageToken" .=) <$> _lblrNextPageToken,
("pageInfo" .=) <$> _lblrPageInfo,
Just ("kind" .= _lblrKind),
("items" .=) <$> _lblrItems,
("visitorId" .=) <$> _lblrVisitorId,
("eventId" .=) <$> _lblrEventId,
("prevPageToken" .=) <$> _lblrPrevPageToken])
newtype ChannelContentDetails =
ChannelContentDetails'
{ _ccdRelatedPlayLists :: Maybe ChannelContentDetailsRelatedPlayLists
}
deriving (Eq, Show, Data, Typeable, Generic)
channelContentDetails
:: ChannelContentDetails
channelContentDetails = ChannelContentDetails' {_ccdRelatedPlayLists = Nothing}
ccdRelatedPlayLists :: Lens' ChannelContentDetails (Maybe ChannelContentDetailsRelatedPlayLists)
ccdRelatedPlayLists
= lens _ccdRelatedPlayLists
(\ s a -> s{_ccdRelatedPlayLists = a})
instance FromJSON ChannelContentDetails where
parseJSON
= withObject "ChannelContentDetails"
(\ o ->
ChannelContentDetails' <$>
(o .:? "relatedPlaylists"))
instance ToJSON ChannelContentDetails where
toJSON ChannelContentDetails'{..}
= object
(catMaybes
[("relatedPlaylists" .=) <$> _ccdRelatedPlayLists])
newtype ActivityContentDetailsChannelItem =
ActivityContentDetailsChannelItem'
{ _acdciResourceId :: Maybe ResourceId
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsChannelItem
:: ActivityContentDetailsChannelItem
activityContentDetailsChannelItem =
ActivityContentDetailsChannelItem' {_acdciResourceId = Nothing}
acdciResourceId :: Lens' ActivityContentDetailsChannelItem (Maybe ResourceId)
acdciResourceId
= lens _acdciResourceId
(\ s a -> s{_acdciResourceId = a})
instance FromJSON ActivityContentDetailsChannelItem
where
parseJSON
= withObject "ActivityContentDetailsChannelItem"
(\ o ->
ActivityContentDetailsChannelItem' <$>
(o .:? "resourceId"))
instance ToJSON ActivityContentDetailsChannelItem
where
toJSON ActivityContentDetailsChannelItem'{..}
= object
(catMaybes [("resourceId" .=) <$> _acdciResourceId])
data VideoListResponse =
VideoListResponse'
{ _vlrEtag :: !(Maybe Text)
, _vlrTokenPagination :: !(Maybe TokenPagination)
, _vlrNextPageToken :: !(Maybe Text)
, _vlrPageInfo :: !(Maybe PageInfo)
, _vlrKind :: !Text
, _vlrItems :: !(Maybe [Video])
, _vlrVisitorId :: !(Maybe Text)
, _vlrEventId :: !(Maybe Text)
, _vlrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoListResponse
:: VideoListResponse
videoListResponse =
VideoListResponse'
{ _vlrEtag = Nothing
, _vlrTokenPagination = Nothing
, _vlrNextPageToken = Nothing
, _vlrPageInfo = Nothing
, _vlrKind = "youtube#videoListResponse"
, _vlrItems = Nothing
, _vlrVisitorId = Nothing
, _vlrEventId = Nothing
, _vlrPrevPageToken = Nothing
}
vlrEtag :: Lens' VideoListResponse (Maybe Text)
vlrEtag = lens _vlrEtag (\ s a -> s{_vlrEtag = a})
vlrTokenPagination :: Lens' VideoListResponse (Maybe TokenPagination)
vlrTokenPagination
= lens _vlrTokenPagination
(\ s a -> s{_vlrTokenPagination = a})
vlrNextPageToken :: Lens' VideoListResponse (Maybe Text)
vlrNextPageToken
= lens _vlrNextPageToken
(\ s a -> s{_vlrNextPageToken = a})
vlrPageInfo :: Lens' VideoListResponse (Maybe PageInfo)
vlrPageInfo
= lens _vlrPageInfo (\ s a -> s{_vlrPageInfo = a})
vlrKind :: Lens' VideoListResponse Text
vlrKind = lens _vlrKind (\ s a -> s{_vlrKind = a})
vlrItems :: Lens' VideoListResponse [Video]
vlrItems
= lens _vlrItems (\ s a -> s{_vlrItems = a}) .
_Default
. _Coerce
vlrVisitorId :: Lens' VideoListResponse (Maybe Text)
vlrVisitorId
= lens _vlrVisitorId (\ s a -> s{_vlrVisitorId = a})
vlrEventId :: Lens' VideoListResponse (Maybe Text)
vlrEventId
= lens _vlrEventId (\ s a -> s{_vlrEventId = a})
vlrPrevPageToken :: Lens' VideoListResponse (Maybe Text)
vlrPrevPageToken
= lens _vlrPrevPageToken
(\ s a -> s{_vlrPrevPageToken = a})
instance FromJSON VideoListResponse where
parseJSON
= withObject "VideoListResponse"
(\ o ->
VideoListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*> (o .:? "kind" .!= "youtube#videoListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON VideoListResponse where
toJSON VideoListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _vlrEtag,
("tokenPagination" .=) <$> _vlrTokenPagination,
("nextPageToken" .=) <$> _vlrNextPageToken,
("pageInfo" .=) <$> _vlrPageInfo,
Just ("kind" .= _vlrKind),
("items" .=) <$> _vlrItems,
("visitorId" .=) <$> _vlrVisitorId,
("eventId" .=) <$> _vlrEventId,
("prevPageToken" .=) <$> _vlrPrevPageToken])
newtype VideoMonetizationDetails =
VideoMonetizationDetails'
{ _vmdAccess :: Maybe AccessPolicy
}
deriving (Eq, Show, Data, Typeable, Generic)
videoMonetizationDetails
:: VideoMonetizationDetails
videoMonetizationDetails = VideoMonetizationDetails' {_vmdAccess = Nothing}
vmdAccess :: Lens' VideoMonetizationDetails (Maybe AccessPolicy)
vmdAccess
= lens _vmdAccess (\ s a -> s{_vmdAccess = a})
instance FromJSON VideoMonetizationDetails where
parseJSON
= withObject "VideoMonetizationDetails"
(\ o ->
VideoMonetizationDetails' <$> (o .:? "access"))
instance ToJSON VideoMonetizationDetails where
toJSON VideoMonetizationDetails'{..}
= object (catMaybes [("access" .=) <$> _vmdAccess])
data VideoSuggestionsTagSuggestion =
VideoSuggestionsTagSuggestion'
{ _vstsTag :: !(Maybe Text)
, _vstsCategoryRestricts :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
videoSuggestionsTagSuggestion
:: VideoSuggestionsTagSuggestion
videoSuggestionsTagSuggestion =
VideoSuggestionsTagSuggestion'
{_vstsTag = Nothing, _vstsCategoryRestricts = Nothing}
vstsTag :: Lens' VideoSuggestionsTagSuggestion (Maybe Text)
vstsTag = lens _vstsTag (\ s a -> s{_vstsTag = a})
vstsCategoryRestricts :: Lens' VideoSuggestionsTagSuggestion [Text]
vstsCategoryRestricts
= lens _vstsCategoryRestricts
(\ s a -> s{_vstsCategoryRestricts = a})
. _Default
. _Coerce
instance FromJSON VideoSuggestionsTagSuggestion where
parseJSON
= withObject "VideoSuggestionsTagSuggestion"
(\ o ->
VideoSuggestionsTagSuggestion' <$>
(o .:? "tag") <*>
(o .:? "categoryRestricts" .!= mempty))
instance ToJSON VideoSuggestionsTagSuggestion where
toJSON VideoSuggestionsTagSuggestion'{..}
= object
(catMaybes
[("tag" .=) <$> _vstsTag,
("categoryRestricts" .=) <$> _vstsCategoryRestricts])
data LiveChatModeratorListResponse =
LiveChatModeratorListResponse'
{ _lEtag :: !(Maybe Text)
, _lTokenPagination :: !(Maybe TokenPagination)
, _lNextPageToken :: !(Maybe Text)
, _lPageInfo :: !(Maybe PageInfo)
, _lKind :: !Text
, _lItems :: !(Maybe [LiveChatModerator])
, _lVisitorId :: !(Maybe Text)
, _lEventId :: !(Maybe Text)
, _lPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatModeratorListResponse
:: LiveChatModeratorListResponse
liveChatModeratorListResponse =
LiveChatModeratorListResponse'
{ _lEtag = Nothing
, _lTokenPagination = Nothing
, _lNextPageToken = Nothing
, _lPageInfo = Nothing
, _lKind = "youtube#liveChatModeratorListResponse"
, _lItems = Nothing
, _lVisitorId = Nothing
, _lEventId = Nothing
, _lPrevPageToken = Nothing
}
lEtag :: Lens' LiveChatModeratorListResponse (Maybe Text)
lEtag = lens _lEtag (\ s a -> s{_lEtag = a})
lTokenPagination :: Lens' LiveChatModeratorListResponse (Maybe TokenPagination)
lTokenPagination
= lens _lTokenPagination
(\ s a -> s{_lTokenPagination = a})
lNextPageToken :: Lens' LiveChatModeratorListResponse (Maybe Text)
lNextPageToken
= lens _lNextPageToken
(\ s a -> s{_lNextPageToken = a})
lPageInfo :: Lens' LiveChatModeratorListResponse (Maybe PageInfo)
lPageInfo
= lens _lPageInfo (\ s a -> s{_lPageInfo = a})
lKind :: Lens' LiveChatModeratorListResponse Text
lKind = lens _lKind (\ s a -> s{_lKind = a})
lItems :: Lens' LiveChatModeratorListResponse [LiveChatModerator]
lItems
= lens _lItems (\ s a -> s{_lItems = a}) . _Default .
_Coerce
lVisitorId :: Lens' LiveChatModeratorListResponse (Maybe Text)
lVisitorId
= lens _lVisitorId (\ s a -> s{_lVisitorId = a})
lEventId :: Lens' LiveChatModeratorListResponse (Maybe Text)
lEventId = lens _lEventId (\ s a -> s{_lEventId = a})
lPrevPageToken :: Lens' LiveChatModeratorListResponse (Maybe Text)
lPrevPageToken
= lens _lPrevPageToken
(\ s a -> s{_lPrevPageToken = a})
instance FromJSON LiveChatModeratorListResponse where
parseJSON
= withObject "LiveChatModeratorListResponse"
(\ o ->
LiveChatModeratorListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!=
"youtube#liveChatModeratorListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON LiveChatModeratorListResponse where
toJSON LiveChatModeratorListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _lEtag,
("tokenPagination" .=) <$> _lTokenPagination,
("nextPageToken" .=) <$> _lNextPageToken,
("pageInfo" .=) <$> _lPageInfo,
Just ("kind" .= _lKind), ("items" .=) <$> _lItems,
("visitorId" .=) <$> _lVisitorId,
("eventId" .=) <$> _lEventId,
("prevPageToken" .=) <$> _lPrevPageToken])
data ActivitySnippet =
ActivitySnippet'
{ _asPublishedAt :: !(Maybe DateTime')
, _asChannelTitle :: !(Maybe Text)
, _asChannelId :: !(Maybe Text)
, _asThumbnails :: !(Maybe ThumbnailDetails)
, _asGroupId :: !(Maybe Text)
, _asTitle :: !(Maybe Text)
, _asType :: !(Maybe ActivitySnippetType)
, _asDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
activitySnippet
:: ActivitySnippet
activitySnippet =
ActivitySnippet'
{ _asPublishedAt = Nothing
, _asChannelTitle = Nothing
, _asChannelId = Nothing
, _asThumbnails = Nothing
, _asGroupId = Nothing
, _asTitle = Nothing
, _asType = Nothing
, _asDescription = Nothing
}
asPublishedAt :: Lens' ActivitySnippet (Maybe UTCTime)
asPublishedAt
= lens _asPublishedAt
(\ s a -> s{_asPublishedAt = a})
. mapping _DateTime
asChannelTitle :: Lens' ActivitySnippet (Maybe Text)
asChannelTitle
= lens _asChannelTitle
(\ s a -> s{_asChannelTitle = a})
asChannelId :: Lens' ActivitySnippet (Maybe Text)
asChannelId
= lens _asChannelId (\ s a -> s{_asChannelId = a})
asThumbnails :: Lens' ActivitySnippet (Maybe ThumbnailDetails)
asThumbnails
= lens _asThumbnails (\ s a -> s{_asThumbnails = a})
asGroupId :: Lens' ActivitySnippet (Maybe Text)
asGroupId
= lens _asGroupId (\ s a -> s{_asGroupId = a})
asTitle :: Lens' ActivitySnippet (Maybe Text)
asTitle = lens _asTitle (\ s a -> s{_asTitle = a})
asType :: Lens' ActivitySnippet (Maybe ActivitySnippetType)
asType = lens _asType (\ s a -> s{_asType = a})
asDescription :: Lens' ActivitySnippet (Maybe Text)
asDescription
= lens _asDescription
(\ s a -> s{_asDescription = a})
instance FromJSON ActivitySnippet where
parseJSON
= withObject "ActivitySnippet"
(\ o ->
ActivitySnippet' <$>
(o .:? "publishedAt") <*> (o .:? "channelTitle") <*>
(o .:? "channelId")
<*> (o .:? "thumbnails")
<*> (o .:? "groupId")
<*> (o .:? "title")
<*> (o .:? "type")
<*> (o .:? "description"))
instance ToJSON ActivitySnippet where
toJSON ActivitySnippet'{..}
= object
(catMaybes
[("publishedAt" .=) <$> _asPublishedAt,
("channelTitle" .=) <$> _asChannelTitle,
("channelId" .=) <$> _asChannelId,
("thumbnails" .=) <$> _asThumbnails,
("groupId" .=) <$> _asGroupId,
("title" .=) <$> _asTitle, ("type" .=) <$> _asType,
("description" .=) <$> _asDescription])
data ChannelTopicDetails =
ChannelTopicDetails'
{ _ctdTopicIds :: !(Maybe [Text])
, _ctdTopicCategories :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
channelTopicDetails
:: ChannelTopicDetails
channelTopicDetails =
ChannelTopicDetails' {_ctdTopicIds = Nothing, _ctdTopicCategories = Nothing}
ctdTopicIds :: Lens' ChannelTopicDetails [Text]
ctdTopicIds
= lens _ctdTopicIds (\ s a -> s{_ctdTopicIds = a}) .
_Default
. _Coerce
ctdTopicCategories :: Lens' ChannelTopicDetails [Text]
ctdTopicCategories
= lens _ctdTopicCategories
(\ s a -> s{_ctdTopicCategories = a})
. _Default
. _Coerce
instance FromJSON ChannelTopicDetails where
parseJSON
= withObject "ChannelTopicDetails"
(\ o ->
ChannelTopicDetails' <$>
(o .:? "topicIds" .!= mempty) <*>
(o .:? "topicCategories" .!= mempty))
instance ToJSON ChannelTopicDetails where
toJSON ChannelTopicDetails'{..}
= object
(catMaybes
[("topicIds" .=) <$> _ctdTopicIds,
("topicCategories" .=) <$> _ctdTopicCategories])
data LiveChatPollEditedDetails =
LiveChatPollEditedDetails'
{ _lcpedPrompt :: !(Maybe Text)
, _lcpedItems :: !(Maybe [LiveChatPollItem])
, _lcpedId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatPollEditedDetails
:: LiveChatPollEditedDetails
liveChatPollEditedDetails =
LiveChatPollEditedDetails'
{_lcpedPrompt = Nothing, _lcpedItems = Nothing, _lcpedId = Nothing}
lcpedPrompt :: Lens' LiveChatPollEditedDetails (Maybe Text)
lcpedPrompt
= lens _lcpedPrompt (\ s a -> s{_lcpedPrompt = a})
lcpedItems :: Lens' LiveChatPollEditedDetails [LiveChatPollItem]
lcpedItems
= lens _lcpedItems (\ s a -> s{_lcpedItems = a}) .
_Default
. _Coerce
lcpedId :: Lens' LiveChatPollEditedDetails (Maybe Text)
lcpedId = lens _lcpedId (\ s a -> s{_lcpedId = a})
instance FromJSON LiveChatPollEditedDetails where
parseJSON
= withObject "LiveChatPollEditedDetails"
(\ o ->
LiveChatPollEditedDetails' <$>
(o .:? "prompt") <*> (o .:? "items" .!= mempty) <*>
(o .:? "id"))
instance ToJSON LiveChatPollEditedDetails where
toJSON LiveChatPollEditedDetails'{..}
= object
(catMaybes
[("prompt" .=) <$> _lcpedPrompt,
("items" .=) <$> _lcpedItems,
("id" .=) <$> _lcpedId])
data VideoCategoryListResponse =
VideoCategoryListResponse'
{ _vclrEtag :: !(Maybe Text)
, _vclrTokenPagination :: !(Maybe TokenPagination)
, _vclrNextPageToken :: !(Maybe Text)
, _vclrPageInfo :: !(Maybe PageInfo)
, _vclrKind :: !Text
, _vclrItems :: !(Maybe [VideoCategory])
, _vclrVisitorId :: !(Maybe Text)
, _vclrEventId :: !(Maybe Text)
, _vclrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoCategoryListResponse
:: VideoCategoryListResponse
videoCategoryListResponse =
VideoCategoryListResponse'
{ _vclrEtag = Nothing
, _vclrTokenPagination = Nothing
, _vclrNextPageToken = Nothing
, _vclrPageInfo = Nothing
, _vclrKind = "youtube#videoCategoryListResponse"
, _vclrItems = Nothing
, _vclrVisitorId = Nothing
, _vclrEventId = Nothing
, _vclrPrevPageToken = Nothing
}
vclrEtag :: Lens' VideoCategoryListResponse (Maybe Text)
vclrEtag = lens _vclrEtag (\ s a -> s{_vclrEtag = a})
vclrTokenPagination :: Lens' VideoCategoryListResponse (Maybe TokenPagination)
vclrTokenPagination
= lens _vclrTokenPagination
(\ s a -> s{_vclrTokenPagination = a})
vclrNextPageToken :: Lens' VideoCategoryListResponse (Maybe Text)
vclrNextPageToken
= lens _vclrNextPageToken
(\ s a -> s{_vclrNextPageToken = a})
vclrPageInfo :: Lens' VideoCategoryListResponse (Maybe PageInfo)
vclrPageInfo
= lens _vclrPageInfo (\ s a -> s{_vclrPageInfo = a})
vclrKind :: Lens' VideoCategoryListResponse Text
vclrKind = lens _vclrKind (\ s a -> s{_vclrKind = a})
vclrItems :: Lens' VideoCategoryListResponse [VideoCategory]
vclrItems
= lens _vclrItems (\ s a -> s{_vclrItems = a}) .
_Default
. _Coerce
vclrVisitorId :: Lens' VideoCategoryListResponse (Maybe Text)
vclrVisitorId
= lens _vclrVisitorId
(\ s a -> s{_vclrVisitorId = a})
vclrEventId :: Lens' VideoCategoryListResponse (Maybe Text)
vclrEventId
= lens _vclrEventId (\ s a -> s{_vclrEventId = a})
vclrPrevPageToken :: Lens' VideoCategoryListResponse (Maybe Text)
vclrPrevPageToken
= lens _vclrPrevPageToken
(\ s a -> s{_vclrPrevPageToken = a})
instance FromJSON VideoCategoryListResponse where
parseJSON
= withObject "VideoCategoryListResponse"
(\ o ->
VideoCategoryListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!=
"youtube#videoCategoryListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON VideoCategoryListResponse where
toJSON VideoCategoryListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _vclrEtag,
("tokenPagination" .=) <$> _vclrTokenPagination,
("nextPageToken" .=) <$> _vclrNextPageToken,
("pageInfo" .=) <$> _vclrPageInfo,
Just ("kind" .= _vclrKind),
("items" .=) <$> _vclrItems,
("visitorId" .=) <$> _vclrVisitorId,
("eventId" .=) <$> _vclrEventId,
("prevPageToken" .=) <$> _vclrPrevPageToken])
data VideoProcessingDetails =
VideoProcessingDetails'
{ _vpdProcessingFailureReason :: !(Maybe VideoProcessingDetailsProcessingFailureReason)
, _vpdProcessingIssuesAvailability :: !(Maybe Text)
, _vpdProcessingProgress :: !(Maybe VideoProcessingDetailsProcessingProgress)
, _vpdThumbnailsAvailability :: !(Maybe Text)
, _vpdTagSuggestionsAvailability :: !(Maybe Text)
, _vpdProcessingStatus :: !(Maybe VideoProcessingDetailsProcessingStatus)
, _vpdEditorSuggestionsAvailability :: !(Maybe Text)
, _vpdFileDetailsAvailability :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoProcessingDetails
:: VideoProcessingDetails
videoProcessingDetails =
VideoProcessingDetails'
{ _vpdProcessingFailureReason = Nothing
, _vpdProcessingIssuesAvailability = Nothing
, _vpdProcessingProgress = Nothing
, _vpdThumbnailsAvailability = Nothing
, _vpdTagSuggestionsAvailability = Nothing
, _vpdProcessingStatus = Nothing
, _vpdEditorSuggestionsAvailability = Nothing
, _vpdFileDetailsAvailability = Nothing
}
vpdProcessingFailureReason :: Lens' VideoProcessingDetails (Maybe VideoProcessingDetailsProcessingFailureReason)
vpdProcessingFailureReason
= lens _vpdProcessingFailureReason
(\ s a -> s{_vpdProcessingFailureReason = a})
vpdProcessingIssuesAvailability :: Lens' VideoProcessingDetails (Maybe Text)
vpdProcessingIssuesAvailability
= lens _vpdProcessingIssuesAvailability
(\ s a -> s{_vpdProcessingIssuesAvailability = a})
vpdProcessingProgress :: Lens' VideoProcessingDetails (Maybe VideoProcessingDetailsProcessingProgress)
vpdProcessingProgress
= lens _vpdProcessingProgress
(\ s a -> s{_vpdProcessingProgress = a})
vpdThumbnailsAvailability :: Lens' VideoProcessingDetails (Maybe Text)
vpdThumbnailsAvailability
= lens _vpdThumbnailsAvailability
(\ s a -> s{_vpdThumbnailsAvailability = a})
vpdTagSuggestionsAvailability :: Lens' VideoProcessingDetails (Maybe Text)
vpdTagSuggestionsAvailability
= lens _vpdTagSuggestionsAvailability
(\ s a -> s{_vpdTagSuggestionsAvailability = a})
vpdProcessingStatus :: Lens' VideoProcessingDetails (Maybe VideoProcessingDetailsProcessingStatus)
vpdProcessingStatus
= lens _vpdProcessingStatus
(\ s a -> s{_vpdProcessingStatus = a})
vpdEditorSuggestionsAvailability :: Lens' VideoProcessingDetails (Maybe Text)
vpdEditorSuggestionsAvailability
= lens _vpdEditorSuggestionsAvailability
(\ s a -> s{_vpdEditorSuggestionsAvailability = a})
vpdFileDetailsAvailability :: Lens' VideoProcessingDetails (Maybe Text)
vpdFileDetailsAvailability
= lens _vpdFileDetailsAvailability
(\ s a -> s{_vpdFileDetailsAvailability = a})
instance FromJSON VideoProcessingDetails where
parseJSON
= withObject "VideoProcessingDetails"
(\ o ->
VideoProcessingDetails' <$>
(o .:? "processingFailureReason") <*>
(o .:? "processingIssuesAvailability")
<*> (o .:? "processingProgress")
<*> (o .:? "thumbnailsAvailability")
<*> (o .:? "tagSuggestionsAvailability")
<*> (o .:? "processingStatus")
<*> (o .:? "editorSuggestionsAvailability")
<*> (o .:? "fileDetailsAvailability"))
instance ToJSON VideoProcessingDetails where
toJSON VideoProcessingDetails'{..}
= object
(catMaybes
[("processingFailureReason" .=) <$>
_vpdProcessingFailureReason,
("processingIssuesAvailability" .=) <$>
_vpdProcessingIssuesAvailability,
("processingProgress" .=) <$> _vpdProcessingProgress,
("thumbnailsAvailability" .=) <$>
_vpdThumbnailsAvailability,
("tagSuggestionsAvailability" .=) <$>
_vpdTagSuggestionsAvailability,
("processingStatus" .=) <$> _vpdProcessingStatus,
("editorSuggestionsAvailability" .=) <$>
_vpdEditorSuggestionsAvailability,
("fileDetailsAvailability" .=) <$>
_vpdFileDetailsAvailability])
data CommentThreadSnippet =
CommentThreadSnippet'
{ _ctsIsPublic :: !(Maybe Bool)
, _ctsChannelId :: !(Maybe Text)
, _ctsCanReply :: !(Maybe Bool)
, _ctsVideoId :: !(Maybe Text)
, _ctsTotalReplyCount :: !(Maybe (Textual Word32))
, _ctsTopLevelComment :: !(Maybe Comment)
}
deriving (Eq, Show, Data, Typeable, Generic)
commentThreadSnippet
:: CommentThreadSnippet
commentThreadSnippet =
CommentThreadSnippet'
{ _ctsIsPublic = Nothing
, _ctsChannelId = Nothing
, _ctsCanReply = Nothing
, _ctsVideoId = Nothing
, _ctsTotalReplyCount = Nothing
, _ctsTopLevelComment = Nothing
}
ctsIsPublic :: Lens' CommentThreadSnippet (Maybe Bool)
ctsIsPublic
= lens _ctsIsPublic (\ s a -> s{_ctsIsPublic = a})
ctsChannelId :: Lens' CommentThreadSnippet (Maybe Text)
ctsChannelId
= lens _ctsChannelId (\ s a -> s{_ctsChannelId = a})
ctsCanReply :: Lens' CommentThreadSnippet (Maybe Bool)
ctsCanReply
= lens _ctsCanReply (\ s a -> s{_ctsCanReply = a})
ctsVideoId :: Lens' CommentThreadSnippet (Maybe Text)
ctsVideoId
= lens _ctsVideoId (\ s a -> s{_ctsVideoId = a})
ctsTotalReplyCount :: Lens' CommentThreadSnippet (Maybe Word32)
ctsTotalReplyCount
= lens _ctsTotalReplyCount
(\ s a -> s{_ctsTotalReplyCount = a})
. mapping _Coerce
ctsTopLevelComment :: Lens' CommentThreadSnippet (Maybe Comment)
ctsTopLevelComment
= lens _ctsTopLevelComment
(\ s a -> s{_ctsTopLevelComment = a})
instance FromJSON CommentThreadSnippet where
parseJSON
= withObject "CommentThreadSnippet"
(\ o ->
CommentThreadSnippet' <$>
(o .:? "isPublic") <*> (o .:? "channelId") <*>
(o .:? "canReply")
<*> (o .:? "videoId")
<*> (o .:? "totalReplyCount")
<*> (o .:? "topLevelComment"))
instance ToJSON CommentThreadSnippet where
toJSON CommentThreadSnippet'{..}
= object
(catMaybes
[("isPublic" .=) <$> _ctsIsPublic,
("channelId" .=) <$> _ctsChannelId,
("canReply" .=) <$> _ctsCanReply,
("videoId" .=) <$> _ctsVideoId,
("totalReplyCount" .=) <$> _ctsTotalReplyCount,
("topLevelComment" .=) <$> _ctsTopLevelComment])
data ChannelSectionListResponse =
ChannelSectionListResponse'
{ _cslrEtag :: !(Maybe Text)
, _cslrKind :: !Text
, _cslrItems :: !(Maybe [ChannelSection])
, _cslrVisitorId :: !(Maybe Text)
, _cslrEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelSectionListResponse
:: ChannelSectionListResponse
channelSectionListResponse =
ChannelSectionListResponse'
{ _cslrEtag = Nothing
, _cslrKind = "youtube#channelSectionListResponse"
, _cslrItems = Nothing
, _cslrVisitorId = Nothing
, _cslrEventId = Nothing
}
cslrEtag :: Lens' ChannelSectionListResponse (Maybe Text)
cslrEtag = lens _cslrEtag (\ s a -> s{_cslrEtag = a})
cslrKind :: Lens' ChannelSectionListResponse Text
cslrKind = lens _cslrKind (\ s a -> s{_cslrKind = a})
cslrItems :: Lens' ChannelSectionListResponse [ChannelSection]
cslrItems
= lens _cslrItems (\ s a -> s{_cslrItems = a}) .
_Default
. _Coerce
cslrVisitorId :: Lens' ChannelSectionListResponse (Maybe Text)
cslrVisitorId
= lens _cslrVisitorId
(\ s a -> s{_cslrVisitorId = a})
cslrEventId :: Lens' ChannelSectionListResponse (Maybe Text)
cslrEventId
= lens _cslrEventId (\ s a -> s{_cslrEventId = a})
instance FromJSON ChannelSectionListResponse where
parseJSON
= withObject "ChannelSectionListResponse"
(\ o ->
ChannelSectionListResponse' <$>
(o .:? "etag") <*>
(o .:? "kind" .!=
"youtube#channelSectionListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON ChannelSectionListResponse where
toJSON ChannelSectionListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _cslrEtag,
Just ("kind" .= _cslrKind),
("items" .=) <$> _cslrItems,
("visitorId" .=) <$> _cslrVisitorId,
("eventId" .=) <$> _cslrEventId])
data SuperChatEvent =
SuperChatEvent'
{ _sceEtag :: !(Maybe Text)
, _sceSnippet :: !(Maybe SuperChatEventSnippet)
, _sceKind :: !Text
, _sceId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
superChatEvent
:: SuperChatEvent
superChatEvent =
SuperChatEvent'
{ _sceEtag = Nothing
, _sceSnippet = Nothing
, _sceKind = "youtube#superChatEvent"
, _sceId = Nothing
}
sceEtag :: Lens' SuperChatEvent (Maybe Text)
sceEtag = lens _sceEtag (\ s a -> s{_sceEtag = a})
sceSnippet :: Lens' SuperChatEvent (Maybe SuperChatEventSnippet)
sceSnippet
= lens _sceSnippet (\ s a -> s{_sceSnippet = a})
sceKind :: Lens' SuperChatEvent Text
sceKind = lens _sceKind (\ s a -> s{_sceKind = a})
sceId :: Lens' SuperChatEvent (Maybe Text)
sceId = lens _sceId (\ s a -> s{_sceId = a})
instance FromJSON SuperChatEvent where
parseJSON
= withObject "SuperChatEvent"
(\ o ->
SuperChatEvent' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#superChatEvent")
<*> (o .:? "id"))
instance ToJSON SuperChatEvent where
toJSON SuperChatEvent'{..}
= object
(catMaybes
[("etag" .=) <$> _sceEtag,
("snippet" .=) <$> _sceSnippet,
Just ("kind" .= _sceKind), ("id" .=) <$> _sceId])
data VideoAbuseReportReason =
VideoAbuseReportReason'
{ _varrEtag :: !(Maybe Text)
, _varrSnippet :: !(Maybe VideoAbuseReportReasonSnippet)
, _varrKind :: !Text
, _varrId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoAbuseReportReason
:: VideoAbuseReportReason
videoAbuseReportReason =
VideoAbuseReportReason'
{ _varrEtag = Nothing
, _varrSnippet = Nothing
, _varrKind = "youtube#videoAbuseReportReason"
, _varrId = Nothing
}
varrEtag :: Lens' VideoAbuseReportReason (Maybe Text)
varrEtag = lens _varrEtag (\ s a -> s{_varrEtag = a})
varrSnippet :: Lens' VideoAbuseReportReason (Maybe VideoAbuseReportReasonSnippet)
varrSnippet
= lens _varrSnippet (\ s a -> s{_varrSnippet = a})
varrKind :: Lens' VideoAbuseReportReason Text
varrKind = lens _varrKind (\ s a -> s{_varrKind = a})
varrId :: Lens' VideoAbuseReportReason (Maybe Text)
varrId = lens _varrId (\ s a -> s{_varrId = a})
instance FromJSON VideoAbuseReportReason where
parseJSON
= withObject "VideoAbuseReportReason"
(\ o ->
VideoAbuseReportReason' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#videoAbuseReportReason")
<*> (o .:? "id"))
instance ToJSON VideoAbuseReportReason where
toJSON VideoAbuseReportReason'{..}
= object
(catMaybes
[("etag" .=) <$> _varrEtag,
("snippet" .=) <$> _varrSnippet,
Just ("kind" .= _varrKind), ("id" .=) <$> _varrId])
data LiveStreamConfigurationIssue =
LiveStreamConfigurationIssue'
{ _lsciSeverity :: !(Maybe LiveStreamConfigurationIssueSeverity)
, _lsciReason :: !(Maybe Text)
, _lsciType :: !(Maybe LiveStreamConfigurationIssueType)
, _lsciDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveStreamConfigurationIssue
:: LiveStreamConfigurationIssue
liveStreamConfigurationIssue =
LiveStreamConfigurationIssue'
{ _lsciSeverity = Nothing
, _lsciReason = Nothing
, _lsciType = Nothing
, _lsciDescription = Nothing
}
lsciSeverity :: Lens' LiveStreamConfigurationIssue (Maybe LiveStreamConfigurationIssueSeverity)
lsciSeverity
= lens _lsciSeverity (\ s a -> s{_lsciSeverity = a})
lsciReason :: Lens' LiveStreamConfigurationIssue (Maybe Text)
lsciReason
= lens _lsciReason (\ s a -> s{_lsciReason = a})
lsciType :: Lens' LiveStreamConfigurationIssue (Maybe LiveStreamConfigurationIssueType)
lsciType = lens _lsciType (\ s a -> s{_lsciType = a})
lsciDescription :: Lens' LiveStreamConfigurationIssue (Maybe Text)
lsciDescription
= lens _lsciDescription
(\ s a -> s{_lsciDescription = a})
instance FromJSON LiveStreamConfigurationIssue where
parseJSON
= withObject "LiveStreamConfigurationIssue"
(\ o ->
LiveStreamConfigurationIssue' <$>
(o .:? "severity") <*> (o .:? "reason") <*>
(o .:? "type")
<*> (o .:? "description"))
instance ToJSON LiveStreamConfigurationIssue where
toJSON LiveStreamConfigurationIssue'{..}
= object
(catMaybes
[("severity" .=) <$> _lsciSeverity,
("reason" .=) <$> _lsciReason,
("type" .=) <$> _lsciType,
("description" .=) <$> _lsciDescription])
data LiveChatMessage =
LiveChatMessage'
{ _lcmEtag :: !(Maybe Text)
, _lcmSnippet :: !(Maybe LiveChatMessageSnippet)
, _lcmKind :: !Text
, _lcmAuthorDetails :: !(Maybe LiveChatMessageAuthorDetails)
, _lcmId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatMessage
:: LiveChatMessage
liveChatMessage =
LiveChatMessage'
{ _lcmEtag = Nothing
, _lcmSnippet = Nothing
, _lcmKind = "youtube#liveChatMessage"
, _lcmAuthorDetails = Nothing
, _lcmId = Nothing
}
lcmEtag :: Lens' LiveChatMessage (Maybe Text)
lcmEtag = lens _lcmEtag (\ s a -> s{_lcmEtag = a})
lcmSnippet :: Lens' LiveChatMessage (Maybe LiveChatMessageSnippet)
lcmSnippet
= lens _lcmSnippet (\ s a -> s{_lcmSnippet = a})
lcmKind :: Lens' LiveChatMessage Text
lcmKind = lens _lcmKind (\ s a -> s{_lcmKind = a})
lcmAuthorDetails :: Lens' LiveChatMessage (Maybe LiveChatMessageAuthorDetails)
lcmAuthorDetails
= lens _lcmAuthorDetails
(\ s a -> s{_lcmAuthorDetails = a})
lcmId :: Lens' LiveChatMessage (Maybe Text)
lcmId = lens _lcmId (\ s a -> s{_lcmId = a})
instance FromJSON LiveChatMessage where
parseJSON
= withObject "LiveChatMessage"
(\ o ->
LiveChatMessage' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#liveChatMessage")
<*> (o .:? "authorDetails")
<*> (o .:? "id"))
instance ToJSON LiveChatMessage where
toJSON LiveChatMessage'{..}
= object
(catMaybes
[("etag" .=) <$> _lcmEtag,
("snippet" .=) <$> _lcmSnippet,
Just ("kind" .= _lcmKind),
("authorDetails" .=) <$> _lcmAuthorDetails,
("id" .=) <$> _lcmId])
data Channel =
Channel'
{ _chaStatus :: !(Maybe ChannelStatus)
, _chaEtag :: !(Maybe Text)
, _chaAuditDetails :: !(Maybe ChannelAuditDetails)
, _chaContentOwnerDetails :: !(Maybe ChannelContentOwnerDetails)
, _chaSnippet :: !(Maybe ChannelSnippet)
, _chaKind :: !Text
, _chaTopicDetails :: !(Maybe ChannelTopicDetails)
, _chaContentDetails :: !(Maybe ChannelContentDetails)
, _chaConversionPings :: !(Maybe ChannelConversionPings)
, _chaBrandingSettings :: !(Maybe ChannelBrandingSettings)
, _chaId :: !(Maybe Text)
, _chaInvideoPromotion :: !(Maybe InvideoPromotion)
, _chaStatistics :: !(Maybe ChannelStatistics)
, _chaLocalizations :: !(Maybe ChannelLocalizations)
}
deriving (Eq, Show, Data, Typeable, Generic)
channel
:: Channel
channel =
Channel'
{ _chaStatus = Nothing
, _chaEtag = Nothing
, _chaAuditDetails = Nothing
, _chaContentOwnerDetails = Nothing
, _chaSnippet = Nothing
, _chaKind = "youtube#channel"
, _chaTopicDetails = Nothing
, _chaContentDetails = Nothing
, _chaConversionPings = Nothing
, _chaBrandingSettings = Nothing
, _chaId = Nothing
, _chaInvideoPromotion = Nothing
, _chaStatistics = Nothing
, _chaLocalizations = Nothing
}
chaStatus :: Lens' Channel (Maybe ChannelStatus)
chaStatus
= lens _chaStatus (\ s a -> s{_chaStatus = a})
chaEtag :: Lens' Channel (Maybe Text)
chaEtag = lens _chaEtag (\ s a -> s{_chaEtag = a})
chaAuditDetails :: Lens' Channel (Maybe ChannelAuditDetails)
chaAuditDetails
= lens _chaAuditDetails
(\ s a -> s{_chaAuditDetails = a})
chaContentOwnerDetails :: Lens' Channel (Maybe ChannelContentOwnerDetails)
chaContentOwnerDetails
= lens _chaContentOwnerDetails
(\ s a -> s{_chaContentOwnerDetails = a})
chaSnippet :: Lens' Channel (Maybe ChannelSnippet)
chaSnippet
= lens _chaSnippet (\ s a -> s{_chaSnippet = a})
chaKind :: Lens' Channel Text
chaKind = lens _chaKind (\ s a -> s{_chaKind = a})
chaTopicDetails :: Lens' Channel (Maybe ChannelTopicDetails)
chaTopicDetails
= lens _chaTopicDetails
(\ s a -> s{_chaTopicDetails = a})
chaContentDetails :: Lens' Channel (Maybe ChannelContentDetails)
chaContentDetails
= lens _chaContentDetails
(\ s a -> s{_chaContentDetails = a})
chaConversionPings :: Lens' Channel (Maybe ChannelConversionPings)
chaConversionPings
= lens _chaConversionPings
(\ s a -> s{_chaConversionPings = a})
chaBrandingSettings :: Lens' Channel (Maybe ChannelBrandingSettings)
chaBrandingSettings
= lens _chaBrandingSettings
(\ s a -> s{_chaBrandingSettings = a})
chaId :: Lens' Channel (Maybe Text)
chaId = lens _chaId (\ s a -> s{_chaId = a})
chaInvideoPromotion :: Lens' Channel (Maybe InvideoPromotion)
chaInvideoPromotion
= lens _chaInvideoPromotion
(\ s a -> s{_chaInvideoPromotion = a})
chaStatistics :: Lens' Channel (Maybe ChannelStatistics)
chaStatistics
= lens _chaStatistics
(\ s a -> s{_chaStatistics = a})
chaLocalizations :: Lens' Channel (Maybe ChannelLocalizations)
chaLocalizations
= lens _chaLocalizations
(\ s a -> s{_chaLocalizations = a})
instance FromJSON Channel where
parseJSON
= withObject "Channel"
(\ o ->
Channel' <$>
(o .:? "status") <*> (o .:? "etag") <*>
(o .:? "auditDetails")
<*> (o .:? "contentOwnerDetails")
<*> (o .:? "snippet")
<*> (o .:? "kind" .!= "youtube#channel")
<*> (o .:? "topicDetails")
<*> (o .:? "contentDetails")
<*> (o .:? "conversionPings")
<*> (o .:? "brandingSettings")
<*> (o .:? "id")
<*> (o .:? "invideoPromotion")
<*> (o .:? "statistics")
<*> (o .:? "localizations"))
instance ToJSON Channel where
toJSON Channel'{..}
= object
(catMaybes
[("status" .=) <$> _chaStatus,
("etag" .=) <$> _chaEtag,
("auditDetails" .=) <$> _chaAuditDetails,
("contentOwnerDetails" .=) <$>
_chaContentOwnerDetails,
("snippet" .=) <$> _chaSnippet,
Just ("kind" .= _chaKind),
("topicDetails" .=) <$> _chaTopicDetails,
("contentDetails" .=) <$> _chaContentDetails,
("conversionPings" .=) <$> _chaConversionPings,
("brandingSettings" .=) <$> _chaBrandingSettings,
("id" .=) <$> _chaId,
("invideoPromotion" .=) <$> _chaInvideoPromotion,
("statistics" .=) <$> _chaStatistics,
("localizations" .=) <$> _chaLocalizations])
data ChannelSectionTargeting =
ChannelSectionTargeting'
{ _cstRegions :: !(Maybe [Text])
, _cstCountries :: !(Maybe [Text])
, _cstLanguages :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
channelSectionTargeting
:: ChannelSectionTargeting
channelSectionTargeting =
ChannelSectionTargeting'
{_cstRegions = Nothing, _cstCountries = Nothing, _cstLanguages = Nothing}
cstRegions :: Lens' ChannelSectionTargeting [Text]
cstRegions
= lens _cstRegions (\ s a -> s{_cstRegions = a}) .
_Default
. _Coerce
cstCountries :: Lens' ChannelSectionTargeting [Text]
cstCountries
= lens _cstCountries (\ s a -> s{_cstCountries = a})
. _Default
. _Coerce
cstLanguages :: Lens' ChannelSectionTargeting [Text]
cstLanguages
= lens _cstLanguages (\ s a -> s{_cstLanguages = a})
. _Default
. _Coerce
instance FromJSON ChannelSectionTargeting where
parseJSON
= withObject "ChannelSectionTargeting"
(\ o ->
ChannelSectionTargeting' <$>
(o .:? "regions" .!= mempty) <*>
(o .:? "countries" .!= mempty)
<*> (o .:? "languages" .!= mempty))
instance ToJSON ChannelSectionTargeting where
toJSON ChannelSectionTargeting'{..}
= object
(catMaybes
[("regions" .=) <$> _cstRegions,
("countries" .=) <$> _cstCountries,
("languages" .=) <$> _cstLanguages])
data LiveStreamListResponse =
LiveStreamListResponse'
{ _lslrEtag :: !(Maybe Text)
, _lslrTokenPagination :: !(Maybe TokenPagination)
, _lslrNextPageToken :: !(Maybe Text)
, _lslrPageInfo :: !(Maybe PageInfo)
, _lslrKind :: !Text
, _lslrItems :: !(Maybe [LiveStream])
, _lslrVisitorId :: !(Maybe Text)
, _lslrEventId :: !(Maybe Text)
, _lslrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveStreamListResponse
:: LiveStreamListResponse
liveStreamListResponse =
LiveStreamListResponse'
{ _lslrEtag = Nothing
, _lslrTokenPagination = Nothing
, _lslrNextPageToken = Nothing
, _lslrPageInfo = Nothing
, _lslrKind = "youtube#liveStreamListResponse"
, _lslrItems = Nothing
, _lslrVisitorId = Nothing
, _lslrEventId = Nothing
, _lslrPrevPageToken = Nothing
}
lslrEtag :: Lens' LiveStreamListResponse (Maybe Text)
lslrEtag = lens _lslrEtag (\ s a -> s{_lslrEtag = a})
lslrTokenPagination :: Lens' LiveStreamListResponse (Maybe TokenPagination)
lslrTokenPagination
= lens _lslrTokenPagination
(\ s a -> s{_lslrTokenPagination = a})
lslrNextPageToken :: Lens' LiveStreamListResponse (Maybe Text)
lslrNextPageToken
= lens _lslrNextPageToken
(\ s a -> s{_lslrNextPageToken = a})
lslrPageInfo :: Lens' LiveStreamListResponse (Maybe PageInfo)
lslrPageInfo
= lens _lslrPageInfo (\ s a -> s{_lslrPageInfo = a})
lslrKind :: Lens' LiveStreamListResponse Text
lslrKind = lens _lslrKind (\ s a -> s{_lslrKind = a})
lslrItems :: Lens' LiveStreamListResponse [LiveStream]
lslrItems
= lens _lslrItems (\ s a -> s{_lslrItems = a}) .
_Default
. _Coerce
lslrVisitorId :: Lens' LiveStreamListResponse (Maybe Text)
lslrVisitorId
= lens _lslrVisitorId
(\ s a -> s{_lslrVisitorId = a})
lslrEventId :: Lens' LiveStreamListResponse (Maybe Text)
lslrEventId
= lens _lslrEventId (\ s a -> s{_lslrEventId = a})
lslrPrevPageToken :: Lens' LiveStreamListResponse (Maybe Text)
lslrPrevPageToken
= lens _lslrPrevPageToken
(\ s a -> s{_lslrPrevPageToken = a})
instance FromJSON LiveStreamListResponse where
parseJSON
= withObject "LiveStreamListResponse"
(\ o ->
LiveStreamListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!= "youtube#liveStreamListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON LiveStreamListResponse where
toJSON LiveStreamListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _lslrEtag,
("tokenPagination" .=) <$> _lslrTokenPagination,
("nextPageToken" .=) <$> _lslrNextPageToken,
("pageInfo" .=) <$> _lslrPageInfo,
Just ("kind" .= _lslrKind),
("items" .=) <$> _lslrItems,
("visitorId" .=) <$> _lslrVisitorId,
("eventId" .=) <$> _lslrEventId,
("prevPageToken" .=) <$> _lslrPrevPageToken])
newtype ChannelLocalizations =
ChannelLocalizations'
{ _clAddtional :: HashMap Text ChannelLocalization
}
deriving (Eq, Show, Data, Typeable, Generic)
channelLocalizations
:: HashMap Text ChannelLocalization
-> ChannelLocalizations
channelLocalizations pClAddtional_ =
ChannelLocalizations' {_clAddtional = _Coerce # pClAddtional_}
clAddtional :: Lens' ChannelLocalizations (HashMap Text ChannelLocalization)
clAddtional
= lens _clAddtional (\ s a -> s{_clAddtional = a}) .
_Coerce
instance FromJSON ChannelLocalizations where
parseJSON
= withObject "ChannelLocalizations"
(\ o ->
ChannelLocalizations' <$> (parseJSONObject o))
instance ToJSON ChannelLocalizations where
toJSON = toJSON . _clAddtional
data PlayListSnippet =
PlayListSnippet'
{ _plsPublishedAt :: !(Maybe DateTime')
, _plsChannelTitle :: !(Maybe Text)
, _plsChannelId :: !(Maybe Text)
, _plsThumbnails :: !(Maybe ThumbnailDetails)
, _plsLocalized :: !(Maybe PlayListLocalization)
, _plsTitle :: !(Maybe Text)
, _plsDescription :: !(Maybe Text)
, _plsTags :: !(Maybe [Text])
, _plsDefaultLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
playListSnippet
:: PlayListSnippet
playListSnippet =
PlayListSnippet'
{ _plsPublishedAt = Nothing
, _plsChannelTitle = Nothing
, _plsChannelId = Nothing
, _plsThumbnails = Nothing
, _plsLocalized = Nothing
, _plsTitle = Nothing
, _plsDescription = Nothing
, _plsTags = Nothing
, _plsDefaultLanguage = Nothing
}
plsPublishedAt :: Lens' PlayListSnippet (Maybe UTCTime)
plsPublishedAt
= lens _plsPublishedAt
(\ s a -> s{_plsPublishedAt = a})
. mapping _DateTime
plsChannelTitle :: Lens' PlayListSnippet (Maybe Text)
plsChannelTitle
= lens _plsChannelTitle
(\ s a -> s{_plsChannelTitle = a})
plsChannelId :: Lens' PlayListSnippet (Maybe Text)
plsChannelId
= lens _plsChannelId (\ s a -> s{_plsChannelId = a})
plsThumbnails :: Lens' PlayListSnippet (Maybe ThumbnailDetails)
plsThumbnails
= lens _plsThumbnails
(\ s a -> s{_plsThumbnails = a})
plsLocalized :: Lens' PlayListSnippet (Maybe PlayListLocalization)
plsLocalized
= lens _plsLocalized (\ s a -> s{_plsLocalized = a})
plsTitle :: Lens' PlayListSnippet (Maybe Text)
plsTitle = lens _plsTitle (\ s a -> s{_plsTitle = a})
plsDescription :: Lens' PlayListSnippet (Maybe Text)
plsDescription
= lens _plsDescription
(\ s a -> s{_plsDescription = a})
plsTags :: Lens' PlayListSnippet [Text]
plsTags
= lens _plsTags (\ s a -> s{_plsTags = a}) . _Default
. _Coerce
plsDefaultLanguage :: Lens' PlayListSnippet (Maybe Text)
plsDefaultLanguage
= lens _plsDefaultLanguage
(\ s a -> s{_plsDefaultLanguage = a})
instance FromJSON PlayListSnippet where
parseJSON
= withObject "PlayListSnippet"
(\ o ->
PlayListSnippet' <$>
(o .:? "publishedAt") <*> (o .:? "channelTitle") <*>
(o .:? "channelId")
<*> (o .:? "thumbnails")
<*> (o .:? "localized")
<*> (o .:? "title")
<*> (o .:? "description")
<*> (o .:? "tags" .!= mempty)
<*> (o .:? "defaultLanguage"))
instance ToJSON PlayListSnippet where
toJSON PlayListSnippet'{..}
= object
(catMaybes
[("publishedAt" .=) <$> _plsPublishedAt,
("channelTitle" .=) <$> _plsChannelTitle,
("channelId" .=) <$> _plsChannelId,
("thumbnails" .=) <$> _plsThumbnails,
("localized" .=) <$> _plsLocalized,
("title" .=) <$> _plsTitle,
("description" .=) <$> _plsDescription,
("tags" .=) <$> _plsTags,
("defaultLanguage" .=) <$> _plsDefaultLanguage])
data VideoGetRatingResponse =
VideoGetRatingResponse'
{ _vgrrEtag :: !(Maybe Text)
, _vgrrKind :: !Text
, _vgrrItems :: !(Maybe [VideoRating])
, _vgrrVisitorId :: !(Maybe Text)
, _vgrrEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoGetRatingResponse
:: VideoGetRatingResponse
videoGetRatingResponse =
VideoGetRatingResponse'
{ _vgrrEtag = Nothing
, _vgrrKind = "youtube#videoGetRatingResponse"
, _vgrrItems = Nothing
, _vgrrVisitorId = Nothing
, _vgrrEventId = Nothing
}
vgrrEtag :: Lens' VideoGetRatingResponse (Maybe Text)
vgrrEtag = lens _vgrrEtag (\ s a -> s{_vgrrEtag = a})
vgrrKind :: Lens' VideoGetRatingResponse Text
vgrrKind = lens _vgrrKind (\ s a -> s{_vgrrKind = a})
vgrrItems :: Lens' VideoGetRatingResponse [VideoRating]
vgrrItems
= lens _vgrrItems (\ s a -> s{_vgrrItems = a}) .
_Default
. _Coerce
vgrrVisitorId :: Lens' VideoGetRatingResponse (Maybe Text)
vgrrVisitorId
= lens _vgrrVisitorId
(\ s a -> s{_vgrrVisitorId = a})
vgrrEventId :: Lens' VideoGetRatingResponse (Maybe Text)
vgrrEventId
= lens _vgrrEventId (\ s a -> s{_vgrrEventId = a})
instance FromJSON VideoGetRatingResponse where
parseJSON
= withObject "VideoGetRatingResponse"
(\ o ->
VideoGetRatingResponse' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "youtube#videoGetRatingResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON VideoGetRatingResponse where
toJSON VideoGetRatingResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _vgrrEtag,
Just ("kind" .= _vgrrKind),
("items" .=) <$> _vgrrItems,
("visitorId" .=) <$> _vgrrVisitorId,
("eventId" .=) <$> _vgrrEventId])
data SuperChatEventSnippet =
SuperChatEventSnippet'
{ _scesDisplayString :: !(Maybe Text)
, _scesSupporterDetails :: !(Maybe ChannelProFileDetails)
, _scesCreatedAt :: !(Maybe DateTime')
, _scesSuperStickerMetadata :: !(Maybe SuperStickerMetadata)
, _scesAmountMicros :: !(Maybe (Textual Word64))
, _scesMessageType :: !(Maybe (Textual Word32))
, _scesChannelId :: !(Maybe Text)
, _scesCommentText :: !(Maybe Text)
, _scesNonprofit :: !(Maybe Nonprofit)
, _scesCurrency :: !(Maybe Text)
, _scesIsSuperChatForGood :: !(Maybe Bool)
, _scesIsSuperStickerEvent :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
superChatEventSnippet
:: SuperChatEventSnippet
superChatEventSnippet =
SuperChatEventSnippet'
{ _scesDisplayString = Nothing
, _scesSupporterDetails = Nothing
, _scesCreatedAt = Nothing
, _scesSuperStickerMetadata = Nothing
, _scesAmountMicros = Nothing
, _scesMessageType = Nothing
, _scesChannelId = Nothing
, _scesCommentText = Nothing
, _scesNonprofit = Nothing
, _scesCurrency = Nothing
, _scesIsSuperChatForGood = Nothing
, _scesIsSuperStickerEvent = Nothing
}
scesDisplayString :: Lens' SuperChatEventSnippet (Maybe Text)
scesDisplayString
= lens _scesDisplayString
(\ s a -> s{_scesDisplayString = a})
scesSupporterDetails :: Lens' SuperChatEventSnippet (Maybe ChannelProFileDetails)
scesSupporterDetails
= lens _scesSupporterDetails
(\ s a -> s{_scesSupporterDetails = a})
scesCreatedAt :: Lens' SuperChatEventSnippet (Maybe UTCTime)
scesCreatedAt
= lens _scesCreatedAt
(\ s a -> s{_scesCreatedAt = a})
. mapping _DateTime
scesSuperStickerMetadata :: Lens' SuperChatEventSnippet (Maybe SuperStickerMetadata)
scesSuperStickerMetadata
= lens _scesSuperStickerMetadata
(\ s a -> s{_scesSuperStickerMetadata = a})
scesAmountMicros :: Lens' SuperChatEventSnippet (Maybe Word64)
scesAmountMicros
= lens _scesAmountMicros
(\ s a -> s{_scesAmountMicros = a})
. mapping _Coerce
scesMessageType :: Lens' SuperChatEventSnippet (Maybe Word32)
scesMessageType
= lens _scesMessageType
(\ s a -> s{_scesMessageType = a})
. mapping _Coerce
scesChannelId :: Lens' SuperChatEventSnippet (Maybe Text)
scesChannelId
= lens _scesChannelId
(\ s a -> s{_scesChannelId = a})
scesCommentText :: Lens' SuperChatEventSnippet (Maybe Text)
scesCommentText
= lens _scesCommentText
(\ s a -> s{_scesCommentText = a})
scesNonprofit :: Lens' SuperChatEventSnippet (Maybe Nonprofit)
scesNonprofit
= lens _scesNonprofit
(\ s a -> s{_scesNonprofit = a})
scesCurrency :: Lens' SuperChatEventSnippet (Maybe Text)
scesCurrency
= lens _scesCurrency (\ s a -> s{_scesCurrency = a})
scesIsSuperChatForGood :: Lens' SuperChatEventSnippet (Maybe Bool)
scesIsSuperChatForGood
= lens _scesIsSuperChatForGood
(\ s a -> s{_scesIsSuperChatForGood = a})
scesIsSuperStickerEvent :: Lens' SuperChatEventSnippet (Maybe Bool)
scesIsSuperStickerEvent
= lens _scesIsSuperStickerEvent
(\ s a -> s{_scesIsSuperStickerEvent = a})
instance FromJSON SuperChatEventSnippet where
parseJSON
= withObject "SuperChatEventSnippet"
(\ o ->
SuperChatEventSnippet' <$>
(o .:? "displayString") <*>
(o .:? "supporterDetails")
<*> (o .:? "createdAt")
<*> (o .:? "superStickerMetadata")
<*> (o .:? "amountMicros")
<*> (o .:? "messageType")
<*> (o .:? "channelId")
<*> (o .:? "commentText")
<*> (o .:? "nonprofit")
<*> (o .:? "currency")
<*> (o .:? "isSuperChatForGood")
<*> (o .:? "isSuperStickerEvent"))
instance ToJSON SuperChatEventSnippet where
toJSON SuperChatEventSnippet'{..}
= object
(catMaybes
[("displayString" .=) <$> _scesDisplayString,
("supporterDetails" .=) <$> _scesSupporterDetails,
("createdAt" .=) <$> _scesCreatedAt,
("superStickerMetadata" .=) <$>
_scesSuperStickerMetadata,
("amountMicros" .=) <$> _scesAmountMicros,
("messageType" .=) <$> _scesMessageType,
("channelId" .=) <$> _scesChannelId,
("commentText" .=) <$> _scesCommentText,
("nonprofit" .=) <$> _scesNonprofit,
("currency" .=) <$> _scesCurrency,
("isSuperChatForGood" .=) <$>
_scesIsSuperChatForGood,
("isSuperStickerEvent" .=) <$>
_scesIsSuperStickerEvent])
data VideoAbuseReportReasonSnippet =
VideoAbuseReportReasonSnippet'
{ _varrsSecondaryReasons :: !(Maybe [VideoAbuseReportSecondaryReason])
, _varrsLabel :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoAbuseReportReasonSnippet
:: VideoAbuseReportReasonSnippet
videoAbuseReportReasonSnippet =
VideoAbuseReportReasonSnippet'
{_varrsSecondaryReasons = Nothing, _varrsLabel = Nothing}
varrsSecondaryReasons :: Lens' VideoAbuseReportReasonSnippet [VideoAbuseReportSecondaryReason]
varrsSecondaryReasons
= lens _varrsSecondaryReasons
(\ s a -> s{_varrsSecondaryReasons = a})
. _Default
. _Coerce
varrsLabel :: Lens' VideoAbuseReportReasonSnippet (Maybe Text)
varrsLabel
= lens _varrsLabel (\ s a -> s{_varrsLabel = a})
instance FromJSON VideoAbuseReportReasonSnippet where
parseJSON
= withObject "VideoAbuseReportReasonSnippet"
(\ o ->
VideoAbuseReportReasonSnippet' <$>
(o .:? "secondaryReasons" .!= mempty) <*>
(o .:? "label"))
instance ToJSON VideoAbuseReportReasonSnippet where
toJSON VideoAbuseReportReasonSnippet'{..}
= object
(catMaybes
[("secondaryReasons" .=) <$> _varrsSecondaryReasons,
("label" .=) <$> _varrsLabel])
data Caption =
Caption'
{ _capEtag :: !(Maybe Text)
, _capSnippet :: !(Maybe CaptionSnippet)
, _capKind :: !Text
, _capId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
caption
:: Caption
caption =
Caption'
{ _capEtag = Nothing
, _capSnippet = Nothing
, _capKind = "youtube#caption"
, _capId = Nothing
}
capEtag :: Lens' Caption (Maybe Text)
capEtag = lens _capEtag (\ s a -> s{_capEtag = a})
capSnippet :: Lens' Caption (Maybe CaptionSnippet)
capSnippet
= lens _capSnippet (\ s a -> s{_capSnippet = a})
capKind :: Lens' Caption Text
capKind = lens _capKind (\ s a -> s{_capKind = a})
capId :: Lens' Caption (Maybe Text)
capId = lens _capId (\ s a -> s{_capId = a})
instance FromJSON Caption where
parseJSON
= withObject "Caption"
(\ o ->
Caption' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#caption")
<*> (o .:? "id"))
instance ToJSON Caption where
toJSON Caption'{..}
= object
(catMaybes
[("etag" .=) <$> _capEtag,
("snippet" .=) <$> _capSnippet,
Just ("kind" .= _capKind), ("id" .=) <$> _capId])
data VideoContentDetailsRegionRestriction =
VideoContentDetailsRegionRestriction'
{ _vcdrrAllowed :: !(Maybe [Text])
, _vcdrrBlocked :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
videoContentDetailsRegionRestriction
:: VideoContentDetailsRegionRestriction
videoContentDetailsRegionRestriction =
VideoContentDetailsRegionRestriction'
{_vcdrrAllowed = Nothing, _vcdrrBlocked = Nothing}
vcdrrAllowed :: Lens' VideoContentDetailsRegionRestriction [Text]
vcdrrAllowed
= lens _vcdrrAllowed (\ s a -> s{_vcdrrAllowed = a})
. _Default
. _Coerce
vcdrrBlocked :: Lens' VideoContentDetailsRegionRestriction [Text]
vcdrrBlocked
= lens _vcdrrBlocked (\ s a -> s{_vcdrrBlocked = a})
. _Default
. _Coerce
instance FromJSON
VideoContentDetailsRegionRestriction
where
parseJSON
= withObject "VideoContentDetailsRegionRestriction"
(\ o ->
VideoContentDetailsRegionRestriction' <$>
(o .:? "allowed" .!= mempty) <*>
(o .:? "blocked" .!= mempty))
instance ToJSON VideoContentDetailsRegionRestriction
where
toJSON VideoContentDetailsRegionRestriction'{..}
= object
(catMaybes
[("allowed" .=) <$> _vcdrrAllowed,
("blocked" .=) <$> _vcdrrBlocked])
data InvideoTiming =
InvideoTiming'
{ _itDurationMs :: !(Maybe (Textual Word64))
, _itOffSetMs :: !(Maybe (Textual Word64))
, _itType :: !(Maybe InvideoTimingType)
}
deriving (Eq, Show, Data, Typeable, Generic)
invideoTiming
:: InvideoTiming
invideoTiming =
InvideoTiming'
{_itDurationMs = Nothing, _itOffSetMs = Nothing, _itType = Nothing}
itDurationMs :: Lens' InvideoTiming (Maybe Word64)
itDurationMs
= lens _itDurationMs (\ s a -> s{_itDurationMs = a})
. mapping _Coerce
itOffSetMs :: Lens' InvideoTiming (Maybe Word64)
itOffSetMs
= lens _itOffSetMs (\ s a -> s{_itOffSetMs = a}) .
mapping _Coerce
itType :: Lens' InvideoTiming (Maybe InvideoTimingType)
itType = lens _itType (\ s a -> s{_itType = a})
instance FromJSON InvideoTiming where
parseJSON
= withObject "InvideoTiming"
(\ o ->
InvideoTiming' <$>
(o .:? "durationMs") <*> (o .:? "offsetMs") <*>
(o .:? "type"))
instance ToJSON InvideoTiming where
toJSON InvideoTiming'{..}
= object
(catMaybes
[("durationMs" .=) <$> _itDurationMs,
("offsetMs" .=) <$> _itOffSetMs,
("type" .=) <$> _itType])
newtype PlayListLocalizations =
PlayListLocalizations'
{ _pllAddtional :: HashMap Text PlayListLocalization
}
deriving (Eq, Show, Data, Typeable, Generic)
playListLocalizations
:: HashMap Text PlayListLocalization
-> PlayListLocalizations
playListLocalizations pPllAddtional_ =
PlayListLocalizations' {_pllAddtional = _Coerce # pPllAddtional_}
pllAddtional :: Lens' PlayListLocalizations (HashMap Text PlayListLocalization)
pllAddtional
= lens _pllAddtional (\ s a -> s{_pllAddtional = a})
. _Coerce
instance FromJSON PlayListLocalizations where
parseJSON
= withObject "PlayListLocalizations"
(\ o ->
PlayListLocalizations' <$> (parseJSONObject o))
instance ToJSON PlayListLocalizations where
toJSON = toJSON . _pllAddtional
data VideoProcessingDetailsProcessingProgress =
VideoProcessingDetailsProcessingProgress'
{ _vpdppTimeLeftMs :: !(Maybe (Textual Word64))
, _vpdppPartsTotal :: !(Maybe (Textual Word64))
, _vpdppPartsProcessed :: !(Maybe (Textual Word64))
}
deriving (Eq, Show, Data, Typeable, Generic)
videoProcessingDetailsProcessingProgress
:: VideoProcessingDetailsProcessingProgress
videoProcessingDetailsProcessingProgress =
VideoProcessingDetailsProcessingProgress'
{ _vpdppTimeLeftMs = Nothing
, _vpdppPartsTotal = Nothing
, _vpdppPartsProcessed = Nothing
}
vpdppTimeLeftMs :: Lens' VideoProcessingDetailsProcessingProgress (Maybe Word64)
vpdppTimeLeftMs
= lens _vpdppTimeLeftMs
(\ s a -> s{_vpdppTimeLeftMs = a})
. mapping _Coerce
vpdppPartsTotal :: Lens' VideoProcessingDetailsProcessingProgress (Maybe Word64)
vpdppPartsTotal
= lens _vpdppPartsTotal
(\ s a -> s{_vpdppPartsTotal = a})
. mapping _Coerce
vpdppPartsProcessed :: Lens' VideoProcessingDetailsProcessingProgress (Maybe Word64)
vpdppPartsProcessed
= lens _vpdppPartsProcessed
(\ s a -> s{_vpdppPartsProcessed = a})
. mapping _Coerce
instance FromJSON
VideoProcessingDetailsProcessingProgress
where
parseJSON
= withObject
"VideoProcessingDetailsProcessingProgress"
(\ o ->
VideoProcessingDetailsProcessingProgress' <$>
(o .:? "timeLeftMs") <*> (o .:? "partsTotal") <*>
(o .:? "partsProcessed"))
instance ToJSON
VideoProcessingDetailsProcessingProgress
where
toJSON VideoProcessingDetailsProcessingProgress'{..}
= object
(catMaybes
[("timeLeftMs" .=) <$> _vpdppTimeLeftMs,
("partsTotal" .=) <$> _vpdppPartsTotal,
("partsProcessed" .=) <$> _vpdppPartsProcessed])
data ChannelSnippet =
ChannelSnippet'
{ _csPublishedAt :: !(Maybe DateTime')
, _csCountry :: !(Maybe Text)
, _csThumbnails :: !(Maybe ThumbnailDetails)
, _csLocalized :: !(Maybe ChannelLocalization)
, _csCustomURL :: !(Maybe Text)
, _csTitle :: !(Maybe Text)
, _csDescription :: !(Maybe Text)
, _csDefaultLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelSnippet
:: ChannelSnippet
channelSnippet =
ChannelSnippet'
{ _csPublishedAt = Nothing
, _csCountry = Nothing
, _csThumbnails = Nothing
, _csLocalized = Nothing
, _csCustomURL = Nothing
, _csTitle = Nothing
, _csDescription = Nothing
, _csDefaultLanguage = Nothing
}
csPublishedAt :: Lens' ChannelSnippet (Maybe UTCTime)
csPublishedAt
= lens _csPublishedAt
(\ s a -> s{_csPublishedAt = a})
. mapping _DateTime
csCountry :: Lens' ChannelSnippet (Maybe Text)
csCountry
= lens _csCountry (\ s a -> s{_csCountry = a})
csThumbnails :: Lens' ChannelSnippet (Maybe ThumbnailDetails)
csThumbnails
= lens _csThumbnails (\ s a -> s{_csThumbnails = a})
csLocalized :: Lens' ChannelSnippet (Maybe ChannelLocalization)
csLocalized
= lens _csLocalized (\ s a -> s{_csLocalized = a})
csCustomURL :: Lens' ChannelSnippet (Maybe Text)
csCustomURL
= lens _csCustomURL (\ s a -> s{_csCustomURL = a})
csTitle :: Lens' ChannelSnippet (Maybe Text)
csTitle = lens _csTitle (\ s a -> s{_csTitle = a})
csDescription :: Lens' ChannelSnippet (Maybe Text)
csDescription
= lens _csDescription
(\ s a -> s{_csDescription = a})
csDefaultLanguage :: Lens' ChannelSnippet (Maybe Text)
csDefaultLanguage
= lens _csDefaultLanguage
(\ s a -> s{_csDefaultLanguage = a})
instance FromJSON ChannelSnippet where
parseJSON
= withObject "ChannelSnippet"
(\ o ->
ChannelSnippet' <$>
(o .:? "publishedAt") <*> (o .:? "country") <*>
(o .:? "thumbnails")
<*> (o .:? "localized")
<*> (o .:? "customUrl")
<*> (o .:? "title")
<*> (o .:? "description")
<*> (o .:? "defaultLanguage"))
instance ToJSON ChannelSnippet where
toJSON ChannelSnippet'{..}
= object
(catMaybes
[("publishedAt" .=) <$> _csPublishedAt,
("country" .=) <$> _csCountry,
("thumbnails" .=) <$> _csThumbnails,
("localized" .=) <$> _csLocalized,
("customUrl" .=) <$> _csCustomURL,
("title" .=) <$> _csTitle,
("description" .=) <$> _csDescription,
("defaultLanguage" .=) <$> _csDefaultLanguage])
data ThumbnailDetails =
ThumbnailDetails'
{ _tdMedium :: !(Maybe Thumbnail)
, _tdMaxres :: !(Maybe Thumbnail)
, _tdDefault :: !(Maybe Thumbnail)
, _tdStandard :: !(Maybe Thumbnail)
, _tdHigh :: !(Maybe Thumbnail)
}
deriving (Eq, Show, Data, Typeable, Generic)
thumbnailDetails
:: ThumbnailDetails
thumbnailDetails =
ThumbnailDetails'
{ _tdMedium = Nothing
, _tdMaxres = Nothing
, _tdDefault = Nothing
, _tdStandard = Nothing
, _tdHigh = Nothing
}
tdMedium :: Lens' ThumbnailDetails (Maybe Thumbnail)
tdMedium = lens _tdMedium (\ s a -> s{_tdMedium = a})
tdMaxres :: Lens' ThumbnailDetails (Maybe Thumbnail)
tdMaxres = lens _tdMaxres (\ s a -> s{_tdMaxres = a})
tdDefault :: Lens' ThumbnailDetails (Maybe Thumbnail)
tdDefault
= lens _tdDefault (\ s a -> s{_tdDefault = a})
tdStandard :: Lens' ThumbnailDetails (Maybe Thumbnail)
tdStandard
= lens _tdStandard (\ s a -> s{_tdStandard = a})
tdHigh :: Lens' ThumbnailDetails (Maybe Thumbnail)
tdHigh = lens _tdHigh (\ s a -> s{_tdHigh = a})
instance FromJSON ThumbnailDetails where
parseJSON
= withObject "ThumbnailDetails"
(\ o ->
ThumbnailDetails' <$>
(o .:? "medium") <*> (o .:? "maxres") <*>
(o .:? "default")
<*> (o .:? "standard")
<*> (o .:? "high"))
instance ToJSON ThumbnailDetails where
toJSON ThumbnailDetails'{..}
= object
(catMaybes
[("medium" .=) <$> _tdMedium,
("maxres" .=) <$> _tdMaxres,
("default" .=) <$> _tdDefault,
("standard" .=) <$> _tdStandard,
("high" .=) <$> _tdHigh])
data MonitorStreamInfo =
MonitorStreamInfo'
{ _msiBroadcastStreamDelayMs :: !(Maybe (Textual Word32))
, _msiEmbedHTML :: !(Maybe Text)
, _msiEnableMonitorStream :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
monitorStreamInfo
:: MonitorStreamInfo
monitorStreamInfo =
MonitorStreamInfo'
{ _msiBroadcastStreamDelayMs = Nothing
, _msiEmbedHTML = Nothing
, _msiEnableMonitorStream = Nothing
}
msiBroadcastStreamDelayMs :: Lens' MonitorStreamInfo (Maybe Word32)
msiBroadcastStreamDelayMs
= lens _msiBroadcastStreamDelayMs
(\ s a -> s{_msiBroadcastStreamDelayMs = a})
. mapping _Coerce
msiEmbedHTML :: Lens' MonitorStreamInfo (Maybe Text)
msiEmbedHTML
= lens _msiEmbedHTML (\ s a -> s{_msiEmbedHTML = a})
msiEnableMonitorStream :: Lens' MonitorStreamInfo (Maybe Bool)
msiEnableMonitorStream
= lens _msiEnableMonitorStream
(\ s a -> s{_msiEnableMonitorStream = a})
instance FromJSON MonitorStreamInfo where
parseJSON
= withObject "MonitorStreamInfo"
(\ o ->
MonitorStreamInfo' <$>
(o .:? "broadcastStreamDelayMs") <*>
(o .:? "embedHtml")
<*> (o .:? "enableMonitorStream"))
instance ToJSON MonitorStreamInfo where
toJSON MonitorStreamInfo'{..}
= object
(catMaybes
[("broadcastStreamDelayMs" .=) <$>
_msiBroadcastStreamDelayMs,
("embedHtml" .=) <$> _msiEmbedHTML,
("enableMonitorStream" .=) <$>
_msiEnableMonitorStream])
data LiveChatMessageSnippet =
LiveChatMessageSnippet'
{ _lcmsMessageDeletedDetails :: !(Maybe LiveChatMessageDeletedDetails)
, _lcmsSuperStickerDetails :: !(Maybe LiveChatSuperStickerDetails)
, _lcmsLiveChatId :: !(Maybe Text)
, _lcmsPublishedAt :: !(Maybe DateTime')
, _lcmsPollOpenedDetails :: !(Maybe LiveChatPollOpenedDetails)
, _lcmsPollVotedDetails :: !(Maybe LiveChatPollVotedDetails)
, _lcmsUserBannedDetails :: !(Maybe LiveChatUserBannedMessageDetails)
, _lcmsTextMessageDetails :: !(Maybe LiveChatTextMessageDetails)
, _lcmsPollClosedDetails :: !(Maybe LiveChatPollClosedDetails)
, _lcmsMessageRetractedDetails :: !(Maybe LiveChatMessageRetractedDetails)
, _lcmsSuperChatDetails :: !(Maybe LiveChatSuperChatDetails)
, _lcmsPollEditedDetails :: !(Maybe LiveChatPollEditedDetails)
, _lcmsType :: !(Maybe LiveChatMessageSnippetType)
, _lcmsAuthorChannelId :: !(Maybe Text)
, _lcmsFanFundingEventDetails :: !(Maybe LiveChatFanFundingEventDetails)
, _lcmsHasDisplayContent :: !(Maybe Bool)
, _lcmsDisplayMessage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatMessageSnippet
:: LiveChatMessageSnippet
liveChatMessageSnippet =
LiveChatMessageSnippet'
{ _lcmsMessageDeletedDetails = Nothing
, _lcmsSuperStickerDetails = Nothing
, _lcmsLiveChatId = Nothing
, _lcmsPublishedAt = Nothing
, _lcmsPollOpenedDetails = Nothing
, _lcmsPollVotedDetails = Nothing
, _lcmsUserBannedDetails = Nothing
, _lcmsTextMessageDetails = Nothing
, _lcmsPollClosedDetails = Nothing
, _lcmsMessageRetractedDetails = Nothing
, _lcmsSuperChatDetails = Nothing
, _lcmsPollEditedDetails = Nothing
, _lcmsType = Nothing
, _lcmsAuthorChannelId = Nothing
, _lcmsFanFundingEventDetails = Nothing
, _lcmsHasDisplayContent = Nothing
, _lcmsDisplayMessage = Nothing
}
lcmsMessageDeletedDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatMessageDeletedDetails)
lcmsMessageDeletedDetails
= lens _lcmsMessageDeletedDetails
(\ s a -> s{_lcmsMessageDeletedDetails = a})
lcmsSuperStickerDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatSuperStickerDetails)
lcmsSuperStickerDetails
= lens _lcmsSuperStickerDetails
(\ s a -> s{_lcmsSuperStickerDetails = a})
lcmsLiveChatId :: Lens' LiveChatMessageSnippet (Maybe Text)
lcmsLiveChatId
= lens _lcmsLiveChatId
(\ s a -> s{_lcmsLiveChatId = a})
lcmsPublishedAt :: Lens' LiveChatMessageSnippet (Maybe UTCTime)
lcmsPublishedAt
= lens _lcmsPublishedAt
(\ s a -> s{_lcmsPublishedAt = a})
. mapping _DateTime
lcmsPollOpenedDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatPollOpenedDetails)
lcmsPollOpenedDetails
= lens _lcmsPollOpenedDetails
(\ s a -> s{_lcmsPollOpenedDetails = a})
lcmsPollVotedDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatPollVotedDetails)
lcmsPollVotedDetails
= lens _lcmsPollVotedDetails
(\ s a -> s{_lcmsPollVotedDetails = a})
lcmsUserBannedDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatUserBannedMessageDetails)
lcmsUserBannedDetails
= lens _lcmsUserBannedDetails
(\ s a -> s{_lcmsUserBannedDetails = a})
lcmsTextMessageDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatTextMessageDetails)
lcmsTextMessageDetails
= lens _lcmsTextMessageDetails
(\ s a -> s{_lcmsTextMessageDetails = a})
lcmsPollClosedDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatPollClosedDetails)
lcmsPollClosedDetails
= lens _lcmsPollClosedDetails
(\ s a -> s{_lcmsPollClosedDetails = a})
lcmsMessageRetractedDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatMessageRetractedDetails)
lcmsMessageRetractedDetails
= lens _lcmsMessageRetractedDetails
(\ s a -> s{_lcmsMessageRetractedDetails = a})
lcmsSuperChatDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatSuperChatDetails)
lcmsSuperChatDetails
= lens _lcmsSuperChatDetails
(\ s a -> s{_lcmsSuperChatDetails = a})
lcmsPollEditedDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatPollEditedDetails)
lcmsPollEditedDetails
= lens _lcmsPollEditedDetails
(\ s a -> s{_lcmsPollEditedDetails = a})
lcmsType :: Lens' LiveChatMessageSnippet (Maybe LiveChatMessageSnippetType)
lcmsType = lens _lcmsType (\ s a -> s{_lcmsType = a})
lcmsAuthorChannelId :: Lens' LiveChatMessageSnippet (Maybe Text)
lcmsAuthorChannelId
= lens _lcmsAuthorChannelId
(\ s a -> s{_lcmsAuthorChannelId = a})
lcmsFanFundingEventDetails :: Lens' LiveChatMessageSnippet (Maybe LiveChatFanFundingEventDetails)
lcmsFanFundingEventDetails
= lens _lcmsFanFundingEventDetails
(\ s a -> s{_lcmsFanFundingEventDetails = a})
lcmsHasDisplayContent :: Lens' LiveChatMessageSnippet (Maybe Bool)
lcmsHasDisplayContent
= lens _lcmsHasDisplayContent
(\ s a -> s{_lcmsHasDisplayContent = a})
lcmsDisplayMessage :: Lens' LiveChatMessageSnippet (Maybe Text)
lcmsDisplayMessage
= lens _lcmsDisplayMessage
(\ s a -> s{_lcmsDisplayMessage = a})
instance FromJSON LiveChatMessageSnippet where
parseJSON
= withObject "LiveChatMessageSnippet"
(\ o ->
LiveChatMessageSnippet' <$>
(o .:? "messageDeletedDetails") <*>
(o .:? "superStickerDetails")
<*> (o .:? "liveChatId")
<*> (o .:? "publishedAt")
<*> (o .:? "pollOpenedDetails")
<*> (o .:? "pollVotedDetails")
<*> (o .:? "userBannedDetails")
<*> (o .:? "textMessageDetails")
<*> (o .:? "pollClosedDetails")
<*> (o .:? "messageRetractedDetails")
<*> (o .:? "superChatDetails")
<*> (o .:? "pollEditedDetails")
<*> (o .:? "type")
<*> (o .:? "authorChannelId")
<*> (o .:? "fanFundingEventDetails")
<*> (o .:? "hasDisplayContent")
<*> (o .:? "displayMessage"))
instance ToJSON LiveChatMessageSnippet where
toJSON LiveChatMessageSnippet'{..}
= object
(catMaybes
[("messageDeletedDetails" .=) <$>
_lcmsMessageDeletedDetails,
("superStickerDetails" .=) <$>
_lcmsSuperStickerDetails,
("liveChatId" .=) <$> _lcmsLiveChatId,
("publishedAt" .=) <$> _lcmsPublishedAt,
("pollOpenedDetails" .=) <$> _lcmsPollOpenedDetails,
("pollVotedDetails" .=) <$> _lcmsPollVotedDetails,
("userBannedDetails" .=) <$> _lcmsUserBannedDetails,
("textMessageDetails" .=) <$>
_lcmsTextMessageDetails,
("pollClosedDetails" .=) <$> _lcmsPollClosedDetails,
("messageRetractedDetails" .=) <$>
_lcmsMessageRetractedDetails,
("superChatDetails" .=) <$> _lcmsSuperChatDetails,
("pollEditedDetails" .=) <$> _lcmsPollEditedDetails,
("type" .=) <$> _lcmsType,
("authorChannelId" .=) <$> _lcmsAuthorChannelId,
("fanFundingEventDetails" .=) <$>
_lcmsFanFundingEventDetails,
("hasDisplayContent" .=) <$> _lcmsHasDisplayContent,
("displayMessage" .=) <$> _lcmsDisplayMessage])
data I18nRegion =
I18nRegion'
{ _irEtag :: !(Maybe Text)
, _irSnippet :: !(Maybe I18nRegionSnippet)
, _irKind :: !Text
, _irId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
i18nRegion
:: I18nRegion
i18nRegion =
I18nRegion'
{ _irEtag = Nothing
, _irSnippet = Nothing
, _irKind = "youtube#i18nRegion"
, _irId = Nothing
}
irEtag :: Lens' I18nRegion (Maybe Text)
irEtag = lens _irEtag (\ s a -> s{_irEtag = a})
irSnippet :: Lens' I18nRegion (Maybe I18nRegionSnippet)
irSnippet
= lens _irSnippet (\ s a -> s{_irSnippet = a})
irKind :: Lens' I18nRegion Text
irKind = lens _irKind (\ s a -> s{_irKind = a})
irId :: Lens' I18nRegion (Maybe Text)
irId = lens _irId (\ s a -> s{_irId = a})
instance FromJSON I18nRegion where
parseJSON
= withObject "I18nRegion"
(\ o ->
I18nRegion' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#i18nRegion")
<*> (o .:? "id"))
instance ToJSON I18nRegion where
toJSON I18nRegion'{..}
= object
(catMaybes
[("etag" .=) <$> _irEtag,
("snippet" .=) <$> _irSnippet,
Just ("kind" .= _irKind), ("id" .=) <$> _irId])
data ChannelStatistics =
ChannelStatistics'
{ _csCommentCount :: !(Maybe (Textual Word64))
, _csSubscriberCount :: !(Maybe (Textual Word64))
, _csVideoCount :: !(Maybe (Textual Word64))
, _csHiddenSubscriberCount :: !(Maybe Bool)
, _csViewCount :: !(Maybe (Textual Word64))
}
deriving (Eq, Show, Data, Typeable, Generic)
channelStatistics
:: ChannelStatistics
channelStatistics =
ChannelStatistics'
{ _csCommentCount = Nothing
, _csSubscriberCount = Nothing
, _csVideoCount = Nothing
, _csHiddenSubscriberCount = Nothing
, _csViewCount = Nothing
}
csCommentCount :: Lens' ChannelStatistics (Maybe Word64)
csCommentCount
= lens _csCommentCount
(\ s a -> s{_csCommentCount = a})
. mapping _Coerce
csSubscriberCount :: Lens' ChannelStatistics (Maybe Word64)
csSubscriberCount
= lens _csSubscriberCount
(\ s a -> s{_csSubscriberCount = a})
. mapping _Coerce
csVideoCount :: Lens' ChannelStatistics (Maybe Word64)
csVideoCount
= lens _csVideoCount (\ s a -> s{_csVideoCount = a})
. mapping _Coerce
csHiddenSubscriberCount :: Lens' ChannelStatistics (Maybe Bool)
csHiddenSubscriberCount
= lens _csHiddenSubscriberCount
(\ s a -> s{_csHiddenSubscriberCount = a})
csViewCount :: Lens' ChannelStatistics (Maybe Word64)
csViewCount
= lens _csViewCount (\ s a -> s{_csViewCount = a}) .
mapping _Coerce
instance FromJSON ChannelStatistics where
parseJSON
= withObject "ChannelStatistics"
(\ o ->
ChannelStatistics' <$>
(o .:? "commentCount") <*> (o .:? "subscriberCount")
<*> (o .:? "videoCount")
<*> (o .:? "hiddenSubscriberCount")
<*> (o .:? "viewCount"))
instance ToJSON ChannelStatistics where
toJSON ChannelStatistics'{..}
= object
(catMaybes
[("commentCount" .=) <$> _csCommentCount,
("subscriberCount" .=) <$> _csSubscriberCount,
("videoCount" .=) <$> _csVideoCount,
("hiddenSubscriberCount" .=) <$>
_csHiddenSubscriberCount,
("viewCount" .=) <$> _csViewCount])
data LiveChatFanFundingEventDetails =
LiveChatFanFundingEventDetails'
{ _lcffedUserComment :: !(Maybe Text)
, _lcffedAmountMicros :: !(Maybe (Textual Word64))
, _lcffedAmountDisplayString :: !(Maybe Text)
, _lcffedCurrency :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatFanFundingEventDetails
:: LiveChatFanFundingEventDetails
liveChatFanFundingEventDetails =
LiveChatFanFundingEventDetails'
{ _lcffedUserComment = Nothing
, _lcffedAmountMicros = Nothing
, _lcffedAmountDisplayString = Nothing
, _lcffedCurrency = Nothing
}
lcffedUserComment :: Lens' LiveChatFanFundingEventDetails (Maybe Text)
lcffedUserComment
= lens _lcffedUserComment
(\ s a -> s{_lcffedUserComment = a})
lcffedAmountMicros :: Lens' LiveChatFanFundingEventDetails (Maybe Word64)
lcffedAmountMicros
= lens _lcffedAmountMicros
(\ s a -> s{_lcffedAmountMicros = a})
. mapping _Coerce
lcffedAmountDisplayString :: Lens' LiveChatFanFundingEventDetails (Maybe Text)
lcffedAmountDisplayString
= lens _lcffedAmountDisplayString
(\ s a -> s{_lcffedAmountDisplayString = a})
lcffedCurrency :: Lens' LiveChatFanFundingEventDetails (Maybe Text)
lcffedCurrency
= lens _lcffedCurrency
(\ s a -> s{_lcffedCurrency = a})
instance FromJSON LiveChatFanFundingEventDetails
where
parseJSON
= withObject "LiveChatFanFundingEventDetails"
(\ o ->
LiveChatFanFundingEventDetails' <$>
(o .:? "userComment") <*> (o .:? "amountMicros") <*>
(o .:? "amountDisplayString")
<*> (o .:? "currency"))
instance ToJSON LiveChatFanFundingEventDetails where
toJSON LiveChatFanFundingEventDetails'{..}
= object
(catMaybes
[("userComment" .=) <$> _lcffedUserComment,
("amountMicros" .=) <$> _lcffedAmountMicros,
("amountDisplayString" .=) <$>
_lcffedAmountDisplayString,
("currency" .=) <$> _lcffedCurrency])
data ActivityContentDetails =
ActivityContentDetails'
{ _acdPromotedItem :: !(Maybe ActivityContentDetailsPromotedItem)
, _acdChannelItem :: !(Maybe ActivityContentDetailsChannelItem)
, _acdBulletin :: !(Maybe ActivityContentDetailsBulletin)
, _acdFavorite :: !(Maybe ActivityContentDetailsFavorite)
, _acdUpload :: !(Maybe ActivityContentDetailsUpload)
, _acdComment :: !(Maybe ActivityContentDetailsComment)
, _acdSocial :: !(Maybe ActivityContentDetailsSocial)
, _acdSubscription :: !(Maybe ActivityContentDetailsSubscription)
, _acdPlayListItem :: !(Maybe ActivityContentDetailsPlayListItem)
, _acdLike :: !(Maybe ActivityContentDetailsLike)
, _acdRecommendation :: !(Maybe ActivityContentDetailsRecommendation)
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetails
:: ActivityContentDetails
activityContentDetails =
ActivityContentDetails'
{ _acdPromotedItem = Nothing
, _acdChannelItem = Nothing
, _acdBulletin = Nothing
, _acdFavorite = Nothing
, _acdUpload = Nothing
, _acdComment = Nothing
, _acdSocial = Nothing
, _acdSubscription = Nothing
, _acdPlayListItem = Nothing
, _acdLike = Nothing
, _acdRecommendation = Nothing
}
acdPromotedItem :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsPromotedItem)
acdPromotedItem
= lens _acdPromotedItem
(\ s a -> s{_acdPromotedItem = a})
acdChannelItem :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsChannelItem)
acdChannelItem
= lens _acdChannelItem
(\ s a -> s{_acdChannelItem = a})
acdBulletin :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsBulletin)
acdBulletin
= lens _acdBulletin (\ s a -> s{_acdBulletin = a})
acdFavorite :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsFavorite)
acdFavorite
= lens _acdFavorite (\ s a -> s{_acdFavorite = a})
acdUpload :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsUpload)
acdUpload
= lens _acdUpload (\ s a -> s{_acdUpload = a})
acdComment :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsComment)
acdComment
= lens _acdComment (\ s a -> s{_acdComment = a})
acdSocial :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsSocial)
acdSocial
= lens _acdSocial (\ s a -> s{_acdSocial = a})
acdSubscription :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsSubscription)
acdSubscription
= lens _acdSubscription
(\ s a -> s{_acdSubscription = a})
acdPlayListItem :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsPlayListItem)
acdPlayListItem
= lens _acdPlayListItem
(\ s a -> s{_acdPlayListItem = a})
acdLike :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsLike)
acdLike = lens _acdLike (\ s a -> s{_acdLike = a})
acdRecommendation :: Lens' ActivityContentDetails (Maybe ActivityContentDetailsRecommendation)
acdRecommendation
= lens _acdRecommendation
(\ s a -> s{_acdRecommendation = a})
instance FromJSON ActivityContentDetails where
parseJSON
= withObject "ActivityContentDetails"
(\ o ->
ActivityContentDetails' <$>
(o .:? "promotedItem") <*> (o .:? "channelItem") <*>
(o .:? "bulletin")
<*> (o .:? "favorite")
<*> (o .:? "upload")
<*> (o .:? "comment")
<*> (o .:? "social")
<*> (o .:? "subscription")
<*> (o .:? "playlistItem")
<*> (o .:? "like")
<*> (o .:? "recommendation"))
instance ToJSON ActivityContentDetails where
toJSON ActivityContentDetails'{..}
= object
(catMaybes
[("promotedItem" .=) <$> _acdPromotedItem,
("channelItem" .=) <$> _acdChannelItem,
("bulletin" .=) <$> _acdBulletin,
("favorite" .=) <$> _acdFavorite,
("upload" .=) <$> _acdUpload,
("comment" .=) <$> _acdComment,
("social" .=) <$> _acdSocial,
("subscription" .=) <$> _acdSubscription,
("playlistItem" .=) <$> _acdPlayListItem,
("like" .=) <$> _acdLike,
("recommendation" .=) <$> _acdRecommendation])
data VideoCategory =
VideoCategory'
{ _vcEtag :: !(Maybe Text)
, _vcSnippet :: !(Maybe VideoCategorySnippet)
, _vcKind :: !Text
, _vcId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoCategory
:: VideoCategory
videoCategory =
VideoCategory'
{ _vcEtag = Nothing
, _vcSnippet = Nothing
, _vcKind = "youtube#videoCategory"
, _vcId = Nothing
}
vcEtag :: Lens' VideoCategory (Maybe Text)
vcEtag = lens _vcEtag (\ s a -> s{_vcEtag = a})
vcSnippet :: Lens' VideoCategory (Maybe VideoCategorySnippet)
vcSnippet
= lens _vcSnippet (\ s a -> s{_vcSnippet = a})
vcKind :: Lens' VideoCategory Text
vcKind = lens _vcKind (\ s a -> s{_vcKind = a})
vcId :: Lens' VideoCategory (Maybe Text)
vcId = lens _vcId (\ s a -> s{_vcId = a})
instance FromJSON VideoCategory where
parseJSON
= withObject "VideoCategory"
(\ o ->
VideoCategory' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#videoCategory")
<*> (o .:? "id"))
instance ToJSON VideoCategory where
toJSON VideoCategory'{..}
= object
(catMaybes
[("etag" .=) <$> _vcEtag,
("snippet" .=) <$> _vcSnippet,
Just ("kind" .= _vcKind), ("id" .=) <$> _vcId])
newtype VideoLocalizations =
VideoLocalizations'
{ _vlAddtional :: HashMap Text VideoLocalization
}
deriving (Eq, Show, Data, Typeable, Generic)
videoLocalizations
:: HashMap Text VideoLocalization
-> VideoLocalizations
videoLocalizations pVlAddtional_ =
VideoLocalizations' {_vlAddtional = _Coerce # pVlAddtional_}
vlAddtional :: Lens' VideoLocalizations (HashMap Text VideoLocalization)
vlAddtional
= lens _vlAddtional (\ s a -> s{_vlAddtional = a}) .
_Coerce
instance FromJSON VideoLocalizations where
parseJSON
= withObject "VideoLocalizations"
(\ o -> VideoLocalizations' <$> (parseJSONObject o))
instance ToJSON VideoLocalizations where
toJSON = toJSON . _vlAddtional
data ChannelSectionContentDetails =
ChannelSectionContentDetails'
{ _cscdChannels :: !(Maybe [Text])
, _cscdPlayLists :: !(Maybe [Text])
}
deriving (Eq, Show, Data, Typeable, Generic)
channelSectionContentDetails
:: ChannelSectionContentDetails
channelSectionContentDetails =
ChannelSectionContentDetails'
{_cscdChannels = Nothing, _cscdPlayLists = Nothing}
cscdChannels :: Lens' ChannelSectionContentDetails [Text]
cscdChannels
= lens _cscdChannels (\ s a -> s{_cscdChannels = a})
. _Default
. _Coerce
cscdPlayLists :: Lens' ChannelSectionContentDetails [Text]
cscdPlayLists
= lens _cscdPlayLists
(\ s a -> s{_cscdPlayLists = a})
. _Default
. _Coerce
instance FromJSON ChannelSectionContentDetails where
parseJSON
= withObject "ChannelSectionContentDetails"
(\ o ->
ChannelSectionContentDetails' <$>
(o .:? "channels" .!= mempty) <*>
(o .:? "playlists" .!= mempty))
instance ToJSON ChannelSectionContentDetails where
toJSON ChannelSectionContentDetails'{..}
= object
(catMaybes
[("channels" .=) <$> _cscdChannels,
("playlists" .=) <$> _cscdPlayLists])
data Video =
Video'
{ _vStatus :: !(Maybe VideoStatus)
, _vEtag :: !(Maybe Text)
, _vProjectDetails :: !(Maybe VideoProjectDetails)
, _vRecordingDetails :: !(Maybe VideoRecordingDetails)
, _vSnippet :: !(Maybe VideoSnippet)
, _vKind :: !Text
, _vTopicDetails :: !(Maybe VideoTopicDetails)
, _vContentDetails :: !(Maybe VideoContentDetails)
, _vAgeGating :: !(Maybe VideoAgeGating)
, _vFileDetails :: !(Maybe VideoFileDetails)
, _vSuggestions :: !(Maybe VideoSuggestions)
, _vId :: !(Maybe Text)
, _vStatistics :: !(Maybe VideoStatistics)
, _vLocalizations :: !(Maybe VideoLocalizations)
, _vLiveStreamingDetails :: !(Maybe VideoLiveStreamingDetails)
, _vPlayer :: !(Maybe VideoPlayer)
, _vProcessingDetails :: !(Maybe VideoProcessingDetails)
, _vMonetizationDetails :: !(Maybe VideoMonetizationDetails)
}
deriving (Eq, Show, Data, Typeable, Generic)
video
:: Video
video =
Video'
{ _vStatus = Nothing
, _vEtag = Nothing
, _vProjectDetails = Nothing
, _vRecordingDetails = Nothing
, _vSnippet = Nothing
, _vKind = "youtube#video"
, _vTopicDetails = Nothing
, _vContentDetails = Nothing
, _vAgeGating = Nothing
, _vFileDetails = Nothing
, _vSuggestions = Nothing
, _vId = Nothing
, _vStatistics = Nothing
, _vLocalizations = Nothing
, _vLiveStreamingDetails = Nothing
, _vPlayer = Nothing
, _vProcessingDetails = Nothing
, _vMonetizationDetails = Nothing
}
vStatus :: Lens' Video (Maybe VideoStatus)
vStatus = lens _vStatus (\ s a -> s{_vStatus = a})
vEtag :: Lens' Video (Maybe Text)
vEtag = lens _vEtag (\ s a -> s{_vEtag = a})
vProjectDetails :: Lens' Video (Maybe VideoProjectDetails)
vProjectDetails
= lens _vProjectDetails
(\ s a -> s{_vProjectDetails = a})
vRecordingDetails :: Lens' Video (Maybe VideoRecordingDetails)
vRecordingDetails
= lens _vRecordingDetails
(\ s a -> s{_vRecordingDetails = a})
vSnippet :: Lens' Video (Maybe VideoSnippet)
vSnippet = lens _vSnippet (\ s a -> s{_vSnippet = a})
vKind :: Lens' Video Text
vKind = lens _vKind (\ s a -> s{_vKind = a})
vTopicDetails :: Lens' Video (Maybe VideoTopicDetails)
vTopicDetails
= lens _vTopicDetails
(\ s a -> s{_vTopicDetails = a})
vContentDetails :: Lens' Video (Maybe VideoContentDetails)
vContentDetails
= lens _vContentDetails
(\ s a -> s{_vContentDetails = a})
vAgeGating :: Lens' Video (Maybe VideoAgeGating)
vAgeGating
= lens _vAgeGating (\ s a -> s{_vAgeGating = a})
vFileDetails :: Lens' Video (Maybe VideoFileDetails)
vFileDetails
= lens _vFileDetails (\ s a -> s{_vFileDetails = a})
vSuggestions :: Lens' Video (Maybe VideoSuggestions)
vSuggestions
= lens _vSuggestions (\ s a -> s{_vSuggestions = a})
vId :: Lens' Video (Maybe Text)
vId = lens _vId (\ s a -> s{_vId = a})
vStatistics :: Lens' Video (Maybe VideoStatistics)
vStatistics
= lens _vStatistics (\ s a -> s{_vStatistics = a})
vLocalizations :: Lens' Video (Maybe VideoLocalizations)
vLocalizations
= lens _vLocalizations
(\ s a -> s{_vLocalizations = a})
vLiveStreamingDetails :: Lens' Video (Maybe VideoLiveStreamingDetails)
vLiveStreamingDetails
= lens _vLiveStreamingDetails
(\ s a -> s{_vLiveStreamingDetails = a})
vPlayer :: Lens' Video (Maybe VideoPlayer)
vPlayer = lens _vPlayer (\ s a -> s{_vPlayer = a})
vProcessingDetails :: Lens' Video (Maybe VideoProcessingDetails)
vProcessingDetails
= lens _vProcessingDetails
(\ s a -> s{_vProcessingDetails = a})
vMonetizationDetails :: Lens' Video (Maybe VideoMonetizationDetails)
vMonetizationDetails
= lens _vMonetizationDetails
(\ s a -> s{_vMonetizationDetails = a})
instance FromJSON Video where
parseJSON
= withObject "Video"
(\ o ->
Video' <$>
(o .:? "status") <*> (o .:? "etag") <*>
(o .:? "projectDetails")
<*> (o .:? "recordingDetails")
<*> (o .:? "snippet")
<*> (o .:? "kind" .!= "youtube#video")
<*> (o .:? "topicDetails")
<*> (o .:? "contentDetails")
<*> (o .:? "ageGating")
<*> (o .:? "fileDetails")
<*> (o .:? "suggestions")
<*> (o .:? "id")
<*> (o .:? "statistics")
<*> (o .:? "localizations")
<*> (o .:? "liveStreamingDetails")
<*> (o .:? "player")
<*> (o .:? "processingDetails")
<*> (o .:? "monetizationDetails"))
instance ToJSON Video where
toJSON Video'{..}
= object
(catMaybes
[("status" .=) <$> _vStatus, ("etag" .=) <$> _vEtag,
("projectDetails" .=) <$> _vProjectDetails,
("recordingDetails" .=) <$> _vRecordingDetails,
("snippet" .=) <$> _vSnippet,
Just ("kind" .= _vKind),
("topicDetails" .=) <$> _vTopicDetails,
("contentDetails" .=) <$> _vContentDetails,
("ageGating" .=) <$> _vAgeGating,
("fileDetails" .=) <$> _vFileDetails,
("suggestions" .=) <$> _vSuggestions,
("id" .=) <$> _vId,
("statistics" .=) <$> _vStatistics,
("localizations" .=) <$> _vLocalizations,
("liveStreamingDetails" .=) <$>
_vLiveStreamingDetails,
("player" .=) <$> _vPlayer,
("processingDetails" .=) <$> _vProcessingDetails,
("monetizationDetails" .=) <$>
_vMonetizationDetails])
data LiveBroadcast =
LiveBroadcast'
{ _lbStatus :: !(Maybe LiveBroadcastStatus)
, _lbEtag :: !(Maybe Text)
, _lbSnippet :: !(Maybe LiveBroadcastSnippet)
, _lbKind :: !Text
, _lbContentDetails :: !(Maybe LiveBroadcastContentDetails)
, _lbId :: !(Maybe Text)
, _lbStatistics :: !(Maybe LiveBroadcastStatistics)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveBroadcast
:: LiveBroadcast
liveBroadcast =
LiveBroadcast'
{ _lbStatus = Nothing
, _lbEtag = Nothing
, _lbSnippet = Nothing
, _lbKind = "youtube#liveBroadcast"
, _lbContentDetails = Nothing
, _lbId = Nothing
, _lbStatistics = Nothing
}
lbStatus :: Lens' LiveBroadcast (Maybe LiveBroadcastStatus)
lbStatus = lens _lbStatus (\ s a -> s{_lbStatus = a})
lbEtag :: Lens' LiveBroadcast (Maybe Text)
lbEtag = lens _lbEtag (\ s a -> s{_lbEtag = a})
lbSnippet :: Lens' LiveBroadcast (Maybe LiveBroadcastSnippet)
lbSnippet
= lens _lbSnippet (\ s a -> s{_lbSnippet = a})
lbKind :: Lens' LiveBroadcast Text
lbKind = lens _lbKind (\ s a -> s{_lbKind = a})
lbContentDetails :: Lens' LiveBroadcast (Maybe LiveBroadcastContentDetails)
lbContentDetails
= lens _lbContentDetails
(\ s a -> s{_lbContentDetails = a})
lbId :: Lens' LiveBroadcast (Maybe Text)
lbId = lens _lbId (\ s a -> s{_lbId = a})
lbStatistics :: Lens' LiveBroadcast (Maybe LiveBroadcastStatistics)
lbStatistics
= lens _lbStatistics (\ s a -> s{_lbStatistics = a})
instance FromJSON LiveBroadcast where
parseJSON
= withObject "LiveBroadcast"
(\ o ->
LiveBroadcast' <$>
(o .:? "status") <*> (o .:? "etag") <*>
(o .:? "snippet")
<*> (o .:? "kind" .!= "youtube#liveBroadcast")
<*> (o .:? "contentDetails")
<*> (o .:? "id")
<*> (o .:? "statistics"))
instance ToJSON LiveBroadcast where
toJSON LiveBroadcast'{..}
= object
(catMaybes
[("status" .=) <$> _lbStatus,
("etag" .=) <$> _lbEtag,
("snippet" .=) <$> _lbSnippet,
Just ("kind" .= _lbKind),
("contentDetails" .=) <$> _lbContentDetails,
("id" .=) <$> _lbId,
("statistics" .=) <$> _lbStatistics])
data Nonprofit =
Nonprofit'
{ _nNonprofitId :: !(Maybe NonprofitId)
, _nNonprofitLegalName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
nonprofit
:: Nonprofit
nonprofit = Nonprofit' {_nNonprofitId = Nothing, _nNonprofitLegalName = Nothing}
nNonprofitId :: Lens' Nonprofit (Maybe NonprofitId)
nNonprofitId
= lens _nNonprofitId (\ s a -> s{_nNonprofitId = a})
nNonprofitLegalName :: Lens' Nonprofit (Maybe Text)
nNonprofitLegalName
= lens _nNonprofitLegalName
(\ s a -> s{_nNonprofitLegalName = a})
instance FromJSON Nonprofit where
parseJSON
= withObject "Nonprofit"
(\ o ->
Nonprofit' <$>
(o .:? "nonprofitId") <*>
(o .:? "nonprofitLegalName"))
instance ToJSON Nonprofit where
toJSON Nonprofit'{..}
= object
(catMaybes
[("nonprofitId" .=) <$> _nNonprofitId,
("nonprofitLegalName" .=) <$> _nNonprofitLegalName])
data LiveChatModerator =
LiveChatModerator'
{ _livEtag :: !(Maybe Text)
, _livSnippet :: !(Maybe LiveChatModeratorSnippet)
, _livKind :: !Text
, _livId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatModerator
:: LiveChatModerator
liveChatModerator =
LiveChatModerator'
{ _livEtag = Nothing
, _livSnippet = Nothing
, _livKind = "youtube#liveChatModerator"
, _livId = Nothing
}
livEtag :: Lens' LiveChatModerator (Maybe Text)
livEtag = lens _livEtag (\ s a -> s{_livEtag = a})
livSnippet :: Lens' LiveChatModerator (Maybe LiveChatModeratorSnippet)
livSnippet
= lens _livSnippet (\ s a -> s{_livSnippet = a})
livKind :: Lens' LiveChatModerator Text
livKind = lens _livKind (\ s a -> s{_livKind = a})
livId :: Lens' LiveChatModerator (Maybe Text)
livId = lens _livId (\ s a -> s{_livId = a})
instance FromJSON LiveChatModerator where
parseJSON
= withObject "LiveChatModerator"
(\ o ->
LiveChatModerator' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#liveChatModerator")
<*> (o .:? "id"))
instance ToJSON LiveChatModerator where
toJSON LiveChatModerator'{..}
= object
(catMaybes
[("etag" .=) <$> _livEtag,
("snippet" .=) <$> _livSnippet,
Just ("kind" .= _livKind), ("id" .=) <$> _livId])
data LiveStreamContentDetails =
LiveStreamContentDetails'
{ _lscdClosedCaptionsIngestionURL :: !(Maybe Text)
, _lscdIsReusable :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveStreamContentDetails
:: LiveStreamContentDetails
liveStreamContentDetails =
LiveStreamContentDetails'
{_lscdClosedCaptionsIngestionURL = Nothing, _lscdIsReusable = Nothing}
lscdClosedCaptionsIngestionURL :: Lens' LiveStreamContentDetails (Maybe Text)
lscdClosedCaptionsIngestionURL
= lens _lscdClosedCaptionsIngestionURL
(\ s a -> s{_lscdClosedCaptionsIngestionURL = a})
lscdIsReusable :: Lens' LiveStreamContentDetails (Maybe Bool)
lscdIsReusable
= lens _lscdIsReusable
(\ s a -> s{_lscdIsReusable = a})
instance FromJSON LiveStreamContentDetails where
parseJSON
= withObject "LiveStreamContentDetails"
(\ o ->
LiveStreamContentDetails' <$>
(o .:? "closedCaptionsIngestionUrl") <*>
(o .:? "isReusable"))
instance ToJSON LiveStreamContentDetails where
toJSON LiveStreamContentDetails'{..}
= object
(catMaybes
[("closedCaptionsIngestionUrl" .=) <$>
_lscdClosedCaptionsIngestionURL,
("isReusable" .=) <$> _lscdIsReusable])
data LiveChatModeratorSnippet =
LiveChatModeratorSnippet'
{ _lLiveChatId :: !(Maybe Text)
, _lModeratorDetails :: !(Maybe ChannelProFileDetails)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatModeratorSnippet
:: LiveChatModeratorSnippet
liveChatModeratorSnippet =
LiveChatModeratorSnippet'
{_lLiveChatId = Nothing, _lModeratorDetails = Nothing}
lLiveChatId :: Lens' LiveChatModeratorSnippet (Maybe Text)
lLiveChatId
= lens _lLiveChatId (\ s a -> s{_lLiveChatId = a})
lModeratorDetails :: Lens' LiveChatModeratorSnippet (Maybe ChannelProFileDetails)
lModeratorDetails
= lens _lModeratorDetails
(\ s a -> s{_lModeratorDetails = a})
instance FromJSON LiveChatModeratorSnippet where
parseJSON
= withObject "LiveChatModeratorSnippet"
(\ o ->
LiveChatModeratorSnippet' <$>
(o .:? "liveChatId") <*> (o .:? "moderatorDetails"))
instance ToJSON LiveChatModeratorSnippet where
toJSON LiveChatModeratorSnippet'{..}
= object
(catMaybes
[("liveChatId" .=) <$> _lLiveChatId,
("moderatorDetails" .=) <$> _lModeratorDetails])
data PropertyValue =
PropertyValue'
{ _pvProperty :: !(Maybe Text)
, _pvValue :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
propertyValue
:: PropertyValue
propertyValue = PropertyValue' {_pvProperty = Nothing, _pvValue = Nothing}
pvProperty :: Lens' PropertyValue (Maybe Text)
pvProperty
= lens _pvProperty (\ s a -> s{_pvProperty = a})
pvValue :: Lens' PropertyValue (Maybe Text)
pvValue = lens _pvValue (\ s a -> s{_pvValue = a})
instance FromJSON PropertyValue where
parseJSON
= withObject "PropertyValue"
(\ o ->
PropertyValue' <$>
(o .:? "property") <*> (o .:? "value"))
instance ToJSON PropertyValue where
toJSON PropertyValue'{..}
= object
(catMaybes
[("property" .=) <$> _pvProperty,
("value" .=) <$> _pvValue])
data VideoSnippet =
VideoSnippet'
{ _vsDefaultAudioLanguage :: !(Maybe Text)
, _vsPublishedAt :: !(Maybe DateTime')
, _vsChannelTitle :: !(Maybe Text)
, _vsChannelId :: !(Maybe Text)
, _vsThumbnails :: !(Maybe ThumbnailDetails)
, _vsLocalized :: !(Maybe VideoLocalization)
, _vsCategoryId :: !(Maybe Text)
, _vsTitle :: !(Maybe Text)
, _vsLiveBroadcastContent :: !(Maybe VideoSnippetLiveBroadcastContent)
, _vsDescription :: !(Maybe Text)
, _vsTags :: !(Maybe [Text])
, _vsDefaultLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoSnippet
:: VideoSnippet
videoSnippet =
VideoSnippet'
{ _vsDefaultAudioLanguage = Nothing
, _vsPublishedAt = Nothing
, _vsChannelTitle = Nothing
, _vsChannelId = Nothing
, _vsThumbnails = Nothing
, _vsLocalized = Nothing
, _vsCategoryId = Nothing
, _vsTitle = Nothing
, _vsLiveBroadcastContent = Nothing
, _vsDescription = Nothing
, _vsTags = Nothing
, _vsDefaultLanguage = Nothing
}
vsDefaultAudioLanguage :: Lens' VideoSnippet (Maybe Text)
vsDefaultAudioLanguage
= lens _vsDefaultAudioLanguage
(\ s a -> s{_vsDefaultAudioLanguage = a})
vsPublishedAt :: Lens' VideoSnippet (Maybe UTCTime)
vsPublishedAt
= lens _vsPublishedAt
(\ s a -> s{_vsPublishedAt = a})
. mapping _DateTime
vsChannelTitle :: Lens' VideoSnippet (Maybe Text)
vsChannelTitle
= lens _vsChannelTitle
(\ s a -> s{_vsChannelTitle = a})
vsChannelId :: Lens' VideoSnippet (Maybe Text)
vsChannelId
= lens _vsChannelId (\ s a -> s{_vsChannelId = a})
vsThumbnails :: Lens' VideoSnippet (Maybe ThumbnailDetails)
vsThumbnails
= lens _vsThumbnails (\ s a -> s{_vsThumbnails = a})
vsLocalized :: Lens' VideoSnippet (Maybe VideoLocalization)
vsLocalized
= lens _vsLocalized (\ s a -> s{_vsLocalized = a})
vsCategoryId :: Lens' VideoSnippet (Maybe Text)
vsCategoryId
= lens _vsCategoryId (\ s a -> s{_vsCategoryId = a})
vsTitle :: Lens' VideoSnippet (Maybe Text)
vsTitle = lens _vsTitle (\ s a -> s{_vsTitle = a})
vsLiveBroadcastContent :: Lens' VideoSnippet (Maybe VideoSnippetLiveBroadcastContent)
vsLiveBroadcastContent
= lens _vsLiveBroadcastContent
(\ s a -> s{_vsLiveBroadcastContent = a})
vsDescription :: Lens' VideoSnippet (Maybe Text)
vsDescription
= lens _vsDescription
(\ s a -> s{_vsDescription = a})
vsTags :: Lens' VideoSnippet [Text]
vsTags
= lens _vsTags (\ s a -> s{_vsTags = a}) . _Default .
_Coerce
vsDefaultLanguage :: Lens' VideoSnippet (Maybe Text)
vsDefaultLanguage
= lens _vsDefaultLanguage
(\ s a -> s{_vsDefaultLanguage = a})
instance FromJSON VideoSnippet where
parseJSON
= withObject "VideoSnippet"
(\ o ->
VideoSnippet' <$>
(o .:? "defaultAudioLanguage") <*>
(o .:? "publishedAt")
<*> (o .:? "channelTitle")
<*> (o .:? "channelId")
<*> (o .:? "thumbnails")
<*> (o .:? "localized")
<*> (o .:? "categoryId")
<*> (o .:? "title")
<*> (o .:? "liveBroadcastContent")
<*> (o .:? "description")
<*> (o .:? "tags" .!= mempty)
<*> (o .:? "defaultLanguage"))
instance ToJSON VideoSnippet where
toJSON VideoSnippet'{..}
= object
(catMaybes
[("defaultAudioLanguage" .=) <$>
_vsDefaultAudioLanguage,
("publishedAt" .=) <$> _vsPublishedAt,
("channelTitle" .=) <$> _vsChannelTitle,
("channelId" .=) <$> _vsChannelId,
("thumbnails" .=) <$> _vsThumbnails,
("localized" .=) <$> _vsLocalized,
("categoryId" .=) <$> _vsCategoryId,
("title" .=) <$> _vsTitle,
("liveBroadcastContent" .=) <$>
_vsLiveBroadcastContent,
("description" .=) <$> _vsDescription,
("tags" .=) <$> _vsTags,
("defaultLanguage" .=) <$> _vsDefaultLanguage])
data LiveBroadcastSnippet =
LiveBroadcastSnippet'
{ _lbsActualEndTime :: !(Maybe DateTime')
, _lbsLiveChatId :: !(Maybe Text)
, _lbsPublishedAt :: !(Maybe DateTime')
, _lbsScheduledEndTime :: !(Maybe DateTime')
, _lbsChannelId :: !(Maybe Text)
, _lbsScheduledStartTime :: !(Maybe DateTime')
, _lbsThumbnails :: !(Maybe ThumbnailDetails)
, _lbsTitle :: !(Maybe Text)
, _lbsActualStartTime :: !(Maybe DateTime')
, _lbsIsDefaultBroadcast :: !(Maybe Bool)
, _lbsDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveBroadcastSnippet
:: LiveBroadcastSnippet
liveBroadcastSnippet =
LiveBroadcastSnippet'
{ _lbsActualEndTime = Nothing
, _lbsLiveChatId = Nothing
, _lbsPublishedAt = Nothing
, _lbsScheduledEndTime = Nothing
, _lbsChannelId = Nothing
, _lbsScheduledStartTime = Nothing
, _lbsThumbnails = Nothing
, _lbsTitle = Nothing
, _lbsActualStartTime = Nothing
, _lbsIsDefaultBroadcast = Nothing
, _lbsDescription = Nothing
}
lbsActualEndTime :: Lens' LiveBroadcastSnippet (Maybe UTCTime)
lbsActualEndTime
= lens _lbsActualEndTime
(\ s a -> s{_lbsActualEndTime = a})
. mapping _DateTime
lbsLiveChatId :: Lens' LiveBroadcastSnippet (Maybe Text)
lbsLiveChatId
= lens _lbsLiveChatId
(\ s a -> s{_lbsLiveChatId = a})
lbsPublishedAt :: Lens' LiveBroadcastSnippet (Maybe UTCTime)
lbsPublishedAt
= lens _lbsPublishedAt
(\ s a -> s{_lbsPublishedAt = a})
. mapping _DateTime
lbsScheduledEndTime :: Lens' LiveBroadcastSnippet (Maybe UTCTime)
lbsScheduledEndTime
= lens _lbsScheduledEndTime
(\ s a -> s{_lbsScheduledEndTime = a})
. mapping _DateTime
lbsChannelId :: Lens' LiveBroadcastSnippet (Maybe Text)
lbsChannelId
= lens _lbsChannelId (\ s a -> s{_lbsChannelId = a})
lbsScheduledStartTime :: Lens' LiveBroadcastSnippet (Maybe UTCTime)
lbsScheduledStartTime
= lens _lbsScheduledStartTime
(\ s a -> s{_lbsScheduledStartTime = a})
. mapping _DateTime
lbsThumbnails :: Lens' LiveBroadcastSnippet (Maybe ThumbnailDetails)
lbsThumbnails
= lens _lbsThumbnails
(\ s a -> s{_lbsThumbnails = a})
lbsTitle :: Lens' LiveBroadcastSnippet (Maybe Text)
lbsTitle = lens _lbsTitle (\ s a -> s{_lbsTitle = a})
lbsActualStartTime :: Lens' LiveBroadcastSnippet (Maybe UTCTime)
lbsActualStartTime
= lens _lbsActualStartTime
(\ s a -> s{_lbsActualStartTime = a})
. mapping _DateTime
lbsIsDefaultBroadcast :: Lens' LiveBroadcastSnippet (Maybe Bool)
lbsIsDefaultBroadcast
= lens _lbsIsDefaultBroadcast
(\ s a -> s{_lbsIsDefaultBroadcast = a})
lbsDescription :: Lens' LiveBroadcastSnippet (Maybe Text)
lbsDescription
= lens _lbsDescription
(\ s a -> s{_lbsDescription = a})
instance FromJSON LiveBroadcastSnippet where
parseJSON
= withObject "LiveBroadcastSnippet"
(\ o ->
LiveBroadcastSnippet' <$>
(o .:? "actualEndTime") <*> (o .:? "liveChatId") <*>
(o .:? "publishedAt")
<*> (o .:? "scheduledEndTime")
<*> (o .:? "channelId")
<*> (o .:? "scheduledStartTime")
<*> (o .:? "thumbnails")
<*> (o .:? "title")
<*> (o .:? "actualStartTime")
<*> (o .:? "isDefaultBroadcast")
<*> (o .:? "description"))
instance ToJSON LiveBroadcastSnippet where
toJSON LiveBroadcastSnippet'{..}
= object
(catMaybes
[("actualEndTime" .=) <$> _lbsActualEndTime,
("liveChatId" .=) <$> _lbsLiveChatId,
("publishedAt" .=) <$> _lbsPublishedAt,
("scheduledEndTime" .=) <$> _lbsScheduledEndTime,
("channelId" .=) <$> _lbsChannelId,
("scheduledStartTime" .=) <$> _lbsScheduledStartTime,
("thumbnails" .=) <$> _lbsThumbnails,
("title" .=) <$> _lbsTitle,
("actualStartTime" .=) <$> _lbsActualStartTime,
("isDefaultBroadcast" .=) <$> _lbsIsDefaultBroadcast,
("description" .=) <$> _lbsDescription])
data AccessPolicy =
AccessPolicy'
{ _apException :: !(Maybe [Text])
, _apAllowed :: !(Maybe Bool)
}
deriving (Eq, Show, Data, Typeable, Generic)
accessPolicy
:: AccessPolicy
accessPolicy = AccessPolicy' {_apException = Nothing, _apAllowed = Nothing}
apException :: Lens' AccessPolicy [Text]
apException
= lens _apException (\ s a -> s{_apException = a}) .
_Default
. _Coerce
apAllowed :: Lens' AccessPolicy (Maybe Bool)
apAllowed
= lens _apAllowed (\ s a -> s{_apAllowed = a})
instance FromJSON AccessPolicy where
parseJSON
= withObject "AccessPolicy"
(\ o ->
AccessPolicy' <$>
(o .:? "exception" .!= mempty) <*> (o .:? "allowed"))
instance ToJSON AccessPolicy where
toJSON AccessPolicy'{..}
= object
(catMaybes
[("exception" .=) <$> _apException,
("allowed" .=) <$> _apAllowed])
data Sponsor =
Sponsor'
{ _sEtag :: !(Maybe Text)
, _sSnippet :: !(Maybe SponsorSnippet)
, _sKind :: !Text
}
deriving (Eq, Show, Data, Typeable, Generic)
sponsor
:: Sponsor
sponsor =
Sponsor' {_sEtag = Nothing, _sSnippet = Nothing, _sKind = "youtube#sponsor"}
sEtag :: Lens' Sponsor (Maybe Text)
sEtag = lens _sEtag (\ s a -> s{_sEtag = a})
sSnippet :: Lens' Sponsor (Maybe SponsorSnippet)
sSnippet = lens _sSnippet (\ s a -> s{_sSnippet = a})
sKind :: Lens' Sponsor Text
sKind = lens _sKind (\ s a -> s{_sKind = a})
instance FromJSON Sponsor where
parseJSON
= withObject "Sponsor"
(\ o ->
Sponsor' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#sponsor"))
instance ToJSON Sponsor where
toJSON Sponsor'{..}
= object
(catMaybes
[("etag" .=) <$> _sEtag,
("snippet" .=) <$> _sSnippet,
Just ("kind" .= _sKind)])
newtype LiveChatMessageDeletedDetails =
LiveChatMessageDeletedDetails'
{ _lcmddDeletedMessageId :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatMessageDeletedDetails
:: LiveChatMessageDeletedDetails
liveChatMessageDeletedDetails =
LiveChatMessageDeletedDetails' {_lcmddDeletedMessageId = Nothing}
lcmddDeletedMessageId :: Lens' LiveChatMessageDeletedDetails (Maybe Text)
lcmddDeletedMessageId
= lens _lcmddDeletedMessageId
(\ s a -> s{_lcmddDeletedMessageId = a})
instance FromJSON LiveChatMessageDeletedDetails where
parseJSON
= withObject "LiveChatMessageDeletedDetails"
(\ o ->
LiveChatMessageDeletedDetails' <$>
(o .:? "deletedMessageId"))
instance ToJSON LiveChatMessageDeletedDetails where
toJSON LiveChatMessageDeletedDetails'{..}
= object
(catMaybes
[("deletedMessageId" .=) <$> _lcmddDeletedMessageId])
data CommentThreadListResponse =
CommentThreadListResponse'
{ _ctlrEtag :: !(Maybe Text)
, _ctlrTokenPagination :: !(Maybe TokenPagination)
, _ctlrNextPageToken :: !(Maybe Text)
, _ctlrPageInfo :: !(Maybe PageInfo)
, _ctlrKind :: !Text
, _ctlrItems :: !(Maybe [CommentThread])
, _ctlrVisitorId :: !(Maybe Text)
, _ctlrEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
commentThreadListResponse
:: CommentThreadListResponse
commentThreadListResponse =
CommentThreadListResponse'
{ _ctlrEtag = Nothing
, _ctlrTokenPagination = Nothing
, _ctlrNextPageToken = Nothing
, _ctlrPageInfo = Nothing
, _ctlrKind = "youtube#commentThreadListResponse"
, _ctlrItems = Nothing
, _ctlrVisitorId = Nothing
, _ctlrEventId = Nothing
}
ctlrEtag :: Lens' CommentThreadListResponse (Maybe Text)
ctlrEtag = lens _ctlrEtag (\ s a -> s{_ctlrEtag = a})
ctlrTokenPagination :: Lens' CommentThreadListResponse (Maybe TokenPagination)
ctlrTokenPagination
= lens _ctlrTokenPagination
(\ s a -> s{_ctlrTokenPagination = a})
ctlrNextPageToken :: Lens' CommentThreadListResponse (Maybe Text)
ctlrNextPageToken
= lens _ctlrNextPageToken
(\ s a -> s{_ctlrNextPageToken = a})
ctlrPageInfo :: Lens' CommentThreadListResponse (Maybe PageInfo)
ctlrPageInfo
= lens _ctlrPageInfo (\ s a -> s{_ctlrPageInfo = a})
ctlrKind :: Lens' CommentThreadListResponse Text
ctlrKind = lens _ctlrKind (\ s a -> s{_ctlrKind = a})
ctlrItems :: Lens' CommentThreadListResponse [CommentThread]
ctlrItems
= lens _ctlrItems (\ s a -> s{_ctlrItems = a}) .
_Default
. _Coerce
ctlrVisitorId :: Lens' CommentThreadListResponse (Maybe Text)
ctlrVisitorId
= lens _ctlrVisitorId
(\ s a -> s{_ctlrVisitorId = a})
ctlrEventId :: Lens' CommentThreadListResponse (Maybe Text)
ctlrEventId
= lens _ctlrEventId (\ s a -> s{_ctlrEventId = a})
instance FromJSON CommentThreadListResponse where
parseJSON
= withObject "CommentThreadListResponse"
(\ o ->
CommentThreadListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!=
"youtube#commentThreadListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON CommentThreadListResponse where
toJSON CommentThreadListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _ctlrEtag,
("tokenPagination" .=) <$> _ctlrTokenPagination,
("nextPageToken" .=) <$> _ctlrNextPageToken,
("pageInfo" .=) <$> _ctlrPageInfo,
Just ("kind" .= _ctlrKind),
("items" .=) <$> _ctlrItems,
("visitorId" .=) <$> _ctlrVisitorId,
("eventId" .=) <$> _ctlrEventId])
data WatchSettings =
WatchSettings'
{ _wsFeaturedPlayListId :: !(Maybe Text)
, _wsBackgRoundColor :: !(Maybe Text)
, _wsTextColor :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
watchSettings
:: WatchSettings
watchSettings =
WatchSettings'
{ _wsFeaturedPlayListId = Nothing
, _wsBackgRoundColor = Nothing
, _wsTextColor = Nothing
}
wsFeaturedPlayListId :: Lens' WatchSettings (Maybe Text)
wsFeaturedPlayListId
= lens _wsFeaturedPlayListId
(\ s a -> s{_wsFeaturedPlayListId = a})
wsBackgRoundColor :: Lens' WatchSettings (Maybe Text)
wsBackgRoundColor
= lens _wsBackgRoundColor
(\ s a -> s{_wsBackgRoundColor = a})
wsTextColor :: Lens' WatchSettings (Maybe Text)
wsTextColor
= lens _wsTextColor (\ s a -> s{_wsTextColor = a})
instance FromJSON WatchSettings where
parseJSON
= withObject "WatchSettings"
(\ o ->
WatchSettings' <$>
(o .:? "featuredPlaylistId") <*>
(o .:? "backgroundColor")
<*> (o .:? "textColor"))
instance ToJSON WatchSettings where
toJSON WatchSettings'{..}
= object
(catMaybes
[("featuredPlaylistId" .=) <$> _wsFeaturedPlayListId,
("backgroundColor" .=) <$> _wsBackgRoundColor,
("textColor" .=) <$> _wsTextColor])
data CdnSettings =
CdnSettings'
{ _csIngestionInfo :: !(Maybe IngestionInfo)
, _csFrameRate :: !(Maybe CdnSettingsFrameRate)
, _csFormat :: !(Maybe Text)
, _csResolution :: !(Maybe CdnSettingsResolution)
, _csIngestionType :: !(Maybe CdnSettingsIngestionType)
}
deriving (Eq, Show, Data, Typeable, Generic)
cdnSettings
:: CdnSettings
cdnSettings =
CdnSettings'
{ _csIngestionInfo = Nothing
, _csFrameRate = Nothing
, _csFormat = Nothing
, _csResolution = Nothing
, _csIngestionType = Nothing
}
csIngestionInfo :: Lens' CdnSettings (Maybe IngestionInfo)
csIngestionInfo
= lens _csIngestionInfo
(\ s a -> s{_csIngestionInfo = a})
csFrameRate :: Lens' CdnSettings (Maybe CdnSettingsFrameRate)
csFrameRate
= lens _csFrameRate (\ s a -> s{_csFrameRate = a})
csFormat :: Lens' CdnSettings (Maybe Text)
csFormat = lens _csFormat (\ s a -> s{_csFormat = a})
csResolution :: Lens' CdnSettings (Maybe CdnSettingsResolution)
csResolution
= lens _csResolution (\ s a -> s{_csResolution = a})
csIngestionType :: Lens' CdnSettings (Maybe CdnSettingsIngestionType)
csIngestionType
= lens _csIngestionType
(\ s a -> s{_csIngestionType = a})
instance FromJSON CdnSettings where
parseJSON
= withObject "CdnSettings"
(\ o ->
CdnSettings' <$>
(o .:? "ingestionInfo") <*> (o .:? "frameRate") <*>
(o .:? "format")
<*> (o .:? "resolution")
<*> (o .:? "ingestionType"))
instance ToJSON CdnSettings where
toJSON CdnSettings'{..}
= object
(catMaybes
[("ingestionInfo" .=) <$> _csIngestionInfo,
("frameRate" .=) <$> _csFrameRate,
("format" .=) <$> _csFormat,
("resolution" .=) <$> _csResolution,
("ingestionType" .=) <$> _csIngestionType])
newtype NonprofitId =
NonprofitId'
{ _niValue :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
nonprofitId
:: NonprofitId
nonprofitId = NonprofitId' {_niValue = Nothing}
niValue :: Lens' NonprofitId (Maybe Text)
niValue = lens _niValue (\ s a -> s{_niValue = a})
instance FromJSON NonprofitId where
parseJSON
= withObject "NonprofitId"
(\ o -> NonprofitId' <$> (o .:? "value"))
instance ToJSON NonprofitId where
toJSON NonprofitId'{..}
= object (catMaybes [("value" .=) <$> _niValue])
data LiveBroadcastStatistics =
LiveBroadcastStatistics'
{ _lbsTotalChatCount :: !(Maybe (Textual Word64))
, _lbsConcurrentViewers :: !(Maybe (Textual Word64))
}
deriving (Eq, Show, Data, Typeable, Generic)
liveBroadcastStatistics
:: LiveBroadcastStatistics
liveBroadcastStatistics =
LiveBroadcastStatistics'
{_lbsTotalChatCount = Nothing, _lbsConcurrentViewers = Nothing}
lbsTotalChatCount :: Lens' LiveBroadcastStatistics (Maybe Word64)
lbsTotalChatCount
= lens _lbsTotalChatCount
(\ s a -> s{_lbsTotalChatCount = a})
. mapping _Coerce
lbsConcurrentViewers :: Lens' LiveBroadcastStatistics (Maybe Word64)
lbsConcurrentViewers
= lens _lbsConcurrentViewers
(\ s a -> s{_lbsConcurrentViewers = a})
. mapping _Coerce
instance FromJSON LiveBroadcastStatistics where
parseJSON
= withObject "LiveBroadcastStatistics"
(\ o ->
LiveBroadcastStatistics' <$>
(o .:? "totalChatCount") <*>
(o .:? "concurrentViewers"))
instance ToJSON LiveBroadcastStatistics where
toJSON LiveBroadcastStatistics'{..}
= object
(catMaybes
[("totalChatCount" .=) <$> _lbsTotalChatCount,
("concurrentViewers" .=) <$> _lbsConcurrentViewers])
data VideoCategorySnippet =
VideoCategorySnippet'
{ _vcsAssignable :: !(Maybe Bool)
, _vcsChannelId :: !Text
, _vcsTitle :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoCategorySnippet
:: VideoCategorySnippet
videoCategorySnippet =
VideoCategorySnippet'
{ _vcsAssignable = Nothing
, _vcsChannelId = "UCBR8-60-B28hp2BmDPdntcQ"
, _vcsTitle = Nothing
}
vcsAssignable :: Lens' VideoCategorySnippet (Maybe Bool)
vcsAssignable
= lens _vcsAssignable
(\ s a -> s{_vcsAssignable = a})
vcsChannelId :: Lens' VideoCategorySnippet Text
vcsChannelId
= lens _vcsChannelId (\ s a -> s{_vcsChannelId = a})
vcsTitle :: Lens' VideoCategorySnippet (Maybe Text)
vcsTitle = lens _vcsTitle (\ s a -> s{_vcsTitle = a})
instance FromJSON VideoCategorySnippet where
parseJSON
= withObject "VideoCategorySnippet"
(\ o ->
VideoCategorySnippet' <$>
(o .:? "assignable") <*>
(o .:? "channelId" .!= "UCBR8-60-B28hp2BmDPdntcQ")
<*> (o .:? "title"))
instance ToJSON VideoCategorySnippet where
toJSON VideoCategorySnippet'{..}
= object
(catMaybes
[("assignable" .=) <$> _vcsAssignable,
Just ("channelId" .= _vcsChannelId),
("title" .=) <$> _vcsTitle])
data I18nLanguage =
I18nLanguage'
{ _ilEtag :: !(Maybe Text)
, _ilSnippet :: !(Maybe I18nLanguageSnippet)
, _ilKind :: !Text
, _ilId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
i18nLanguage
:: I18nLanguage
i18nLanguage =
I18nLanguage'
{ _ilEtag = Nothing
, _ilSnippet = Nothing
, _ilKind = "youtube#i18nLanguage"
, _ilId = Nothing
}
ilEtag :: Lens' I18nLanguage (Maybe Text)
ilEtag = lens _ilEtag (\ s a -> s{_ilEtag = a})
ilSnippet :: Lens' I18nLanguage (Maybe I18nLanguageSnippet)
ilSnippet
= lens _ilSnippet (\ s a -> s{_ilSnippet = a})
ilKind :: Lens' I18nLanguage Text
ilKind = lens _ilKind (\ s a -> s{_ilKind = a})
ilId :: Lens' I18nLanguage (Maybe Text)
ilId = lens _ilId (\ s a -> s{_ilId = a})
instance FromJSON I18nLanguage where
parseJSON
= withObject "I18nLanguage"
(\ o ->
I18nLanguage' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#i18nLanguage")
<*> (o .:? "id"))
instance ToJSON I18nLanguage where
toJSON I18nLanguage'{..}
= object
(catMaybes
[("etag" .=) <$> _ilEtag,
("snippet" .=) <$> _ilSnippet,
Just ("kind" .= _ilKind), ("id" .=) <$> _ilId])
data VideoStatistics =
VideoStatistics'
{ _vsLikeCount :: !(Maybe (Textual Word64))
, _vsCommentCount :: !(Maybe (Textual Word64))
, _vsFavoriteCount :: !(Maybe (Textual Word64))
, _vsDislikeCount :: !(Maybe (Textual Word64))
, _vsViewCount :: !(Maybe (Textual Word64))
}
deriving (Eq, Show, Data, Typeable, Generic)
videoStatistics
:: VideoStatistics
videoStatistics =
VideoStatistics'
{ _vsLikeCount = Nothing
, _vsCommentCount = Nothing
, _vsFavoriteCount = Nothing
, _vsDislikeCount = Nothing
, _vsViewCount = Nothing
}
vsLikeCount :: Lens' VideoStatistics (Maybe Word64)
vsLikeCount
= lens _vsLikeCount (\ s a -> s{_vsLikeCount = a}) .
mapping _Coerce
vsCommentCount :: Lens' VideoStatistics (Maybe Word64)
vsCommentCount
= lens _vsCommentCount
(\ s a -> s{_vsCommentCount = a})
. mapping _Coerce
vsFavoriteCount :: Lens' VideoStatistics (Maybe Word64)
vsFavoriteCount
= lens _vsFavoriteCount
(\ s a -> s{_vsFavoriteCount = a})
. mapping _Coerce
vsDislikeCount :: Lens' VideoStatistics (Maybe Word64)
vsDislikeCount
= lens _vsDislikeCount
(\ s a -> s{_vsDislikeCount = a})
. mapping _Coerce
vsViewCount :: Lens' VideoStatistics (Maybe Word64)
vsViewCount
= lens _vsViewCount (\ s a -> s{_vsViewCount = a}) .
mapping _Coerce
instance FromJSON VideoStatistics where
parseJSON
= withObject "VideoStatistics"
(\ o ->
VideoStatistics' <$>
(o .:? "likeCount") <*> (o .:? "commentCount") <*>
(o .:? "favoriteCount")
<*> (o .:? "dislikeCount")
<*> (o .:? "viewCount"))
instance ToJSON VideoStatistics where
toJSON VideoStatistics'{..}
= object
(catMaybes
[("likeCount" .=) <$> _vsLikeCount,
("commentCount" .=) <$> _vsCommentCount,
("favoriteCount" .=) <$> _vsFavoriteCount,
("dislikeCount" .=) <$> _vsDislikeCount,
("viewCount" .=) <$> _vsViewCount])
data ActivityListResponse =
ActivityListResponse'
{ _alrEtag :: !(Maybe Text)
, _alrTokenPagination :: !(Maybe TokenPagination)
, _alrNextPageToken :: !(Maybe Text)
, _alrPageInfo :: !(Maybe PageInfo)
, _alrKind :: !Text
, _alrItems :: !(Maybe [Activity])
, _alrVisitorId :: !(Maybe Text)
, _alrEventId :: !(Maybe Text)
, _alrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
activityListResponse
:: ActivityListResponse
activityListResponse =
ActivityListResponse'
{ _alrEtag = Nothing
, _alrTokenPagination = Nothing
, _alrNextPageToken = Nothing
, _alrPageInfo = Nothing
, _alrKind = "youtube#activityListResponse"
, _alrItems = Nothing
, _alrVisitorId = Nothing
, _alrEventId = Nothing
, _alrPrevPageToken = Nothing
}
alrEtag :: Lens' ActivityListResponse (Maybe Text)
alrEtag = lens _alrEtag (\ s a -> s{_alrEtag = a})
alrTokenPagination :: Lens' ActivityListResponse (Maybe TokenPagination)
alrTokenPagination
= lens _alrTokenPagination
(\ s a -> s{_alrTokenPagination = a})
alrNextPageToken :: Lens' ActivityListResponse (Maybe Text)
alrNextPageToken
= lens _alrNextPageToken
(\ s a -> s{_alrNextPageToken = a})
alrPageInfo :: Lens' ActivityListResponse (Maybe PageInfo)
alrPageInfo
= lens _alrPageInfo (\ s a -> s{_alrPageInfo = a})
alrKind :: Lens' ActivityListResponse Text
alrKind = lens _alrKind (\ s a -> s{_alrKind = a})
alrItems :: Lens' ActivityListResponse [Activity]
alrItems
= lens _alrItems (\ s a -> s{_alrItems = a}) .
_Default
. _Coerce
alrVisitorId :: Lens' ActivityListResponse (Maybe Text)
alrVisitorId
= lens _alrVisitorId (\ s a -> s{_alrVisitorId = a})
alrEventId :: Lens' ActivityListResponse (Maybe Text)
alrEventId
= lens _alrEventId (\ s a -> s{_alrEventId = a})
alrPrevPageToken :: Lens' ActivityListResponse (Maybe Text)
alrPrevPageToken
= lens _alrPrevPageToken
(\ s a -> s{_alrPrevPageToken = a})
instance FromJSON ActivityListResponse where
parseJSON
= withObject "ActivityListResponse"
(\ o ->
ActivityListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*> (o .:? "kind" .!= "youtube#activityListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON ActivityListResponse where
toJSON ActivityListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _alrEtag,
("tokenPagination" .=) <$> _alrTokenPagination,
("nextPageToken" .=) <$> _alrNextPageToken,
("pageInfo" .=) <$> _alrPageInfo,
Just ("kind" .= _alrKind),
("items" .=) <$> _alrItems,
("visitorId" .=) <$> _alrVisitorId,
("eventId" .=) <$> _alrEventId,
("prevPageToken" .=) <$> _alrPrevPageToken])
newtype ActivityContentDetailsBulletin =
ActivityContentDetailsBulletin'
{ _acdbResourceId :: Maybe ResourceId
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsBulletin
:: ActivityContentDetailsBulletin
activityContentDetailsBulletin =
ActivityContentDetailsBulletin' {_acdbResourceId = Nothing}
acdbResourceId :: Lens' ActivityContentDetailsBulletin (Maybe ResourceId)
acdbResourceId
= lens _acdbResourceId
(\ s a -> s{_acdbResourceId = a})
instance FromJSON ActivityContentDetailsBulletin
where
parseJSON
= withObject "ActivityContentDetailsBulletin"
(\ o ->
ActivityContentDetailsBulletin' <$>
(o .:? "resourceId"))
instance ToJSON ActivityContentDetailsBulletin where
toJSON ActivityContentDetailsBulletin'{..}
= object
(catMaybes [("resourceId" .=) <$> _acdbResourceId])
data VideoAbuseReport =
VideoAbuseReport'
{ _varSecondaryReasonId :: !(Maybe Text)
, _varReasonId :: !(Maybe Text)
, _varVideoId :: !(Maybe Text)
, _varLanguage :: !(Maybe Text)
, _varComments :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoAbuseReport
:: VideoAbuseReport
videoAbuseReport =
VideoAbuseReport'
{ _varSecondaryReasonId = Nothing
, _varReasonId = Nothing
, _varVideoId = Nothing
, _varLanguage = Nothing
, _varComments = Nothing
}
varSecondaryReasonId :: Lens' VideoAbuseReport (Maybe Text)
varSecondaryReasonId
= lens _varSecondaryReasonId
(\ s a -> s{_varSecondaryReasonId = a})
varReasonId :: Lens' VideoAbuseReport (Maybe Text)
varReasonId
= lens _varReasonId (\ s a -> s{_varReasonId = a})
varVideoId :: Lens' VideoAbuseReport (Maybe Text)
varVideoId
= lens _varVideoId (\ s a -> s{_varVideoId = a})
varLanguage :: Lens' VideoAbuseReport (Maybe Text)
varLanguage
= lens _varLanguage (\ s a -> s{_varLanguage = a})
varComments :: Lens' VideoAbuseReport (Maybe Text)
varComments
= lens _varComments (\ s a -> s{_varComments = a})
instance FromJSON VideoAbuseReport where
parseJSON
= withObject "VideoAbuseReport"
(\ o ->
VideoAbuseReport' <$>
(o .:? "secondaryReasonId") <*> (o .:? "reasonId")
<*> (o .:? "videoId")
<*> (o .:? "language")
<*> (o .:? "comments"))
instance ToJSON VideoAbuseReport where
toJSON VideoAbuseReport'{..}
= object
(catMaybes
[("secondaryReasonId" .=) <$> _varSecondaryReasonId,
("reasonId" .=) <$> _varReasonId,
("videoId" .=) <$> _varVideoId,
("language" .=) <$> _varLanguage,
("comments" .=) <$> _varComments])
data VideoFileDetailsAudioStream =
VideoFileDetailsAudioStream'
{ _vfdasBitrateBps :: !(Maybe (Textual Word64))
, _vfdasVendor :: !(Maybe Text)
, _vfdasCodec :: !(Maybe Text)
, _vfdasChannelCount :: !(Maybe (Textual Word32))
}
deriving (Eq, Show, Data, Typeable, Generic)
videoFileDetailsAudioStream
:: VideoFileDetailsAudioStream
videoFileDetailsAudioStream =
VideoFileDetailsAudioStream'
{ _vfdasBitrateBps = Nothing
, _vfdasVendor = Nothing
, _vfdasCodec = Nothing
, _vfdasChannelCount = Nothing
}
vfdasBitrateBps :: Lens' VideoFileDetailsAudioStream (Maybe Word64)
vfdasBitrateBps
= lens _vfdasBitrateBps
(\ s a -> s{_vfdasBitrateBps = a})
. mapping _Coerce
vfdasVendor :: Lens' VideoFileDetailsAudioStream (Maybe Text)
vfdasVendor
= lens _vfdasVendor (\ s a -> s{_vfdasVendor = a})
vfdasCodec :: Lens' VideoFileDetailsAudioStream (Maybe Text)
vfdasCodec
= lens _vfdasCodec (\ s a -> s{_vfdasCodec = a})
vfdasChannelCount :: Lens' VideoFileDetailsAudioStream (Maybe Word32)
vfdasChannelCount
= lens _vfdasChannelCount
(\ s a -> s{_vfdasChannelCount = a})
. mapping _Coerce
instance FromJSON VideoFileDetailsAudioStream where
parseJSON
= withObject "VideoFileDetailsAudioStream"
(\ o ->
VideoFileDetailsAudioStream' <$>
(o .:? "bitrateBps") <*> (o .:? "vendor") <*>
(o .:? "codec")
<*> (o .:? "channelCount"))
instance ToJSON VideoFileDetailsAudioStream where
toJSON VideoFileDetailsAudioStream'{..}
= object
(catMaybes
[("bitrateBps" .=) <$> _vfdasBitrateBps,
("vendor" .=) <$> _vfdasVendor,
("codec" .=) <$> _vfdasCodec,
("channelCount" .=) <$> _vfdasChannelCount])
data I18nRegionListResponse =
I18nRegionListResponse'
{ _irlrEtag :: !(Maybe Text)
, _irlrKind :: !Text
, _irlrItems :: !(Maybe [I18nRegion])
, _irlrVisitorId :: !(Maybe Text)
, _irlrEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
i18nRegionListResponse
:: I18nRegionListResponse
i18nRegionListResponse =
I18nRegionListResponse'
{ _irlrEtag = Nothing
, _irlrKind = "youtube#i18nRegionListResponse"
, _irlrItems = Nothing
, _irlrVisitorId = Nothing
, _irlrEventId = Nothing
}
irlrEtag :: Lens' I18nRegionListResponse (Maybe Text)
irlrEtag = lens _irlrEtag (\ s a -> s{_irlrEtag = a})
irlrKind :: Lens' I18nRegionListResponse Text
irlrKind = lens _irlrKind (\ s a -> s{_irlrKind = a})
irlrItems :: Lens' I18nRegionListResponse [I18nRegion]
irlrItems
= lens _irlrItems (\ s a -> s{_irlrItems = a}) .
_Default
. _Coerce
irlrVisitorId :: Lens' I18nRegionListResponse (Maybe Text)
irlrVisitorId
= lens _irlrVisitorId
(\ s a -> s{_irlrVisitorId = a})
irlrEventId :: Lens' I18nRegionListResponse (Maybe Text)
irlrEventId
= lens _irlrEventId (\ s a -> s{_irlrEventId = a})
instance FromJSON I18nRegionListResponse where
parseJSON
= withObject "I18nRegionListResponse"
(\ o ->
I18nRegionListResponse' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "youtube#i18nRegionListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON I18nRegionListResponse where
toJSON I18nRegionListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _irlrEtag,
Just ("kind" .= _irlrKind),
("items" .=) <$> _irlrItems,
("visitorId" .=) <$> _irlrVisitorId,
("eventId" .=) <$> _irlrEventId])
data GuideCategorySnippet =
GuideCategorySnippet'
{ _gcsChannelId :: !Text
, _gcsTitle :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
guideCategorySnippet
:: GuideCategorySnippet
guideCategorySnippet =
GuideCategorySnippet'
{_gcsChannelId = "UCBR8-60-B28hp2BmDPdntcQ", _gcsTitle = Nothing}
gcsChannelId :: Lens' GuideCategorySnippet Text
gcsChannelId
= lens _gcsChannelId (\ s a -> s{_gcsChannelId = a})
gcsTitle :: Lens' GuideCategorySnippet (Maybe Text)
gcsTitle = lens _gcsTitle (\ s a -> s{_gcsTitle = a})
instance FromJSON GuideCategorySnippet where
parseJSON
= withObject "GuideCategorySnippet"
(\ o ->
GuideCategorySnippet' <$>
(o .:? "channelId" .!= "UCBR8-60-B28hp2BmDPdntcQ")
<*> (o .:? "title"))
instance ToJSON GuideCategorySnippet where
toJSON GuideCategorySnippet'{..}
= object
(catMaybes
[Just ("channelId" .= _gcsChannelId),
("title" .=) <$> _gcsTitle])
data CaptionListResponse =
CaptionListResponse'
{ _cEtag :: !(Maybe Text)
, _cKind :: !Text
, _cItems :: !(Maybe [Caption])
, _cVisitorId :: !(Maybe Text)
, _cEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
captionListResponse
:: CaptionListResponse
captionListResponse =
CaptionListResponse'
{ _cEtag = Nothing
, _cKind = "youtube#captionListResponse"
, _cItems = Nothing
, _cVisitorId = Nothing
, _cEventId = Nothing
}
cEtag :: Lens' CaptionListResponse (Maybe Text)
cEtag = lens _cEtag (\ s a -> s{_cEtag = a})
cKind :: Lens' CaptionListResponse Text
cKind = lens _cKind (\ s a -> s{_cKind = a})
cItems :: Lens' CaptionListResponse [Caption]
cItems
= lens _cItems (\ s a -> s{_cItems = a}) . _Default .
_Coerce
cVisitorId :: Lens' CaptionListResponse (Maybe Text)
cVisitorId
= lens _cVisitorId (\ s a -> s{_cVisitorId = a})
cEventId :: Lens' CaptionListResponse (Maybe Text)
cEventId = lens _cEventId (\ s a -> s{_cEventId = a})
instance FromJSON CaptionListResponse where
parseJSON
= withObject "CaptionListResponse"
(\ o ->
CaptionListResponse' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "youtube#captionListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON CaptionListResponse where
toJSON CaptionListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _cEtag, Just ("kind" .= _cKind),
("items" .=) <$> _cItems,
("visitorId" .=) <$> _cVisitorId,
("eventId" .=) <$> _cEventId])
newtype PlayListItemStatus =
PlayListItemStatus'
{ _plisPrivacyStatus :: Maybe PlayListItemStatusPrivacyStatus
}
deriving (Eq, Show, Data, Typeable, Generic)
playListItemStatus
:: PlayListItemStatus
playListItemStatus = PlayListItemStatus' {_plisPrivacyStatus = Nothing}
plisPrivacyStatus :: Lens' PlayListItemStatus (Maybe PlayListItemStatusPrivacyStatus)
plisPrivacyStatus
= lens _plisPrivacyStatus
(\ s a -> s{_plisPrivacyStatus = a})
instance FromJSON PlayListItemStatus where
parseJSON
= withObject "PlayListItemStatus"
(\ o ->
PlayListItemStatus' <$> (o .:? "privacyStatus"))
instance ToJSON PlayListItemStatus where
toJSON PlayListItemStatus'{..}
= object
(catMaybes
[("privacyStatus" .=) <$> _plisPrivacyStatus])
data InvideoPosition =
InvideoPosition'
{ _ipCornerPosition :: !(Maybe InvideoPositionCornerPosition)
, _ipType :: !(Maybe InvideoPositionType)
}
deriving (Eq, Show, Data, Typeable, Generic)
invideoPosition
:: InvideoPosition
invideoPosition =
InvideoPosition' {_ipCornerPosition = Nothing, _ipType = Nothing}
ipCornerPosition :: Lens' InvideoPosition (Maybe InvideoPositionCornerPosition)
ipCornerPosition
= lens _ipCornerPosition
(\ s a -> s{_ipCornerPosition = a})
ipType :: Lens' InvideoPosition (Maybe InvideoPositionType)
ipType = lens _ipType (\ s a -> s{_ipType = a})
instance FromJSON InvideoPosition where
parseJSON
= withObject "InvideoPosition"
(\ o ->
InvideoPosition' <$>
(o .:? "cornerPosition") <*> (o .:? "type"))
instance ToJSON InvideoPosition where
toJSON InvideoPosition'{..}
= object
(catMaybes
[("cornerPosition" .=) <$> _ipCornerPosition,
("type" .=) <$> _ipType])
data LiveChatSuperStickerDetails =
LiveChatSuperStickerDetails'
{ _lcssdSuperStickerMetadata :: !(Maybe SuperStickerMetadata)
, _lcssdAmountMicros :: !(Maybe (Textual Word64))
, _lcssdAmountDisplayString :: !(Maybe Text)
, _lcssdCurrency :: !(Maybe Text)
, _lcssdTier :: !(Maybe (Textual Word32))
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatSuperStickerDetails
:: LiveChatSuperStickerDetails
liveChatSuperStickerDetails =
LiveChatSuperStickerDetails'
{ _lcssdSuperStickerMetadata = Nothing
, _lcssdAmountMicros = Nothing
, _lcssdAmountDisplayString = Nothing
, _lcssdCurrency = Nothing
, _lcssdTier = Nothing
}
lcssdSuperStickerMetadata :: Lens' LiveChatSuperStickerDetails (Maybe SuperStickerMetadata)
lcssdSuperStickerMetadata
= lens _lcssdSuperStickerMetadata
(\ s a -> s{_lcssdSuperStickerMetadata = a})
lcssdAmountMicros :: Lens' LiveChatSuperStickerDetails (Maybe Word64)
lcssdAmountMicros
= lens _lcssdAmountMicros
(\ s a -> s{_lcssdAmountMicros = a})
. mapping _Coerce
lcssdAmountDisplayString :: Lens' LiveChatSuperStickerDetails (Maybe Text)
lcssdAmountDisplayString
= lens _lcssdAmountDisplayString
(\ s a -> s{_lcssdAmountDisplayString = a})
lcssdCurrency :: Lens' LiveChatSuperStickerDetails (Maybe Text)
lcssdCurrency
= lens _lcssdCurrency
(\ s a -> s{_lcssdCurrency = a})
lcssdTier :: Lens' LiveChatSuperStickerDetails (Maybe Word32)
lcssdTier
= lens _lcssdTier (\ s a -> s{_lcssdTier = a}) .
mapping _Coerce
instance FromJSON LiveChatSuperStickerDetails where
parseJSON
= withObject "LiveChatSuperStickerDetails"
(\ o ->
LiveChatSuperStickerDetails' <$>
(o .:? "superStickerMetadata") <*>
(o .:? "amountMicros")
<*> (o .:? "amountDisplayString")
<*> (o .:? "currency")
<*> (o .:? "tier"))
instance ToJSON LiveChatSuperStickerDetails where
toJSON LiveChatSuperStickerDetails'{..}
= object
(catMaybes
[("superStickerMetadata" .=) <$>
_lcssdSuperStickerMetadata,
("amountMicros" .=) <$> _lcssdAmountMicros,
("amountDisplayString" .=) <$>
_lcssdAmountDisplayString,
("currency" .=) <$> _lcssdCurrency,
("tier" .=) <$> _lcssdTier])
data LiveStreamHealthStatus =
LiveStreamHealthStatus'
{ _lshsStatus :: !(Maybe LiveStreamHealthStatusStatus)
, _lshsConfigurationIssues :: !(Maybe [LiveStreamConfigurationIssue])
, _lshsLastUpdateTimeSeconds :: !(Maybe (Textual Word64))
}
deriving (Eq, Show, Data, Typeable, Generic)
liveStreamHealthStatus
:: LiveStreamHealthStatus
liveStreamHealthStatus =
LiveStreamHealthStatus'
{ _lshsStatus = Nothing
, _lshsConfigurationIssues = Nothing
, _lshsLastUpdateTimeSeconds = Nothing
}
lshsStatus :: Lens' LiveStreamHealthStatus (Maybe LiveStreamHealthStatusStatus)
lshsStatus
= lens _lshsStatus (\ s a -> s{_lshsStatus = a})
lshsConfigurationIssues :: Lens' LiveStreamHealthStatus [LiveStreamConfigurationIssue]
lshsConfigurationIssues
= lens _lshsConfigurationIssues
(\ s a -> s{_lshsConfigurationIssues = a})
. _Default
. _Coerce
lshsLastUpdateTimeSeconds :: Lens' LiveStreamHealthStatus (Maybe Word64)
lshsLastUpdateTimeSeconds
= lens _lshsLastUpdateTimeSeconds
(\ s a -> s{_lshsLastUpdateTimeSeconds = a})
. mapping _Coerce
instance FromJSON LiveStreamHealthStatus where
parseJSON
= withObject "LiveStreamHealthStatus"
(\ o ->
LiveStreamHealthStatus' <$>
(o .:? "status") <*>
(o .:? "configurationIssues" .!= mempty)
<*> (o .:? "lastUpdateTimeSeconds"))
instance ToJSON LiveStreamHealthStatus where
toJSON LiveStreamHealthStatus'{..}
= object
(catMaybes
[("status" .=) <$> _lshsStatus,
("configurationIssues" .=) <$>
_lshsConfigurationIssues,
("lastUpdateTimeSeconds" .=) <$>
_lshsLastUpdateTimeSeconds])
newtype ChannelSectionLocalizations =
ChannelSectionLocalizations'
{ _cslAddtional :: HashMap Text ChannelSectionLocalization
}
deriving (Eq, Show, Data, Typeable, Generic)
channelSectionLocalizations
:: HashMap Text ChannelSectionLocalization
-> ChannelSectionLocalizations
channelSectionLocalizations pCslAddtional_ =
ChannelSectionLocalizations' {_cslAddtional = _Coerce # pCslAddtional_}
cslAddtional :: Lens' ChannelSectionLocalizations (HashMap Text ChannelSectionLocalization)
cslAddtional
= lens _cslAddtional (\ s a -> s{_cslAddtional = a})
. _Coerce
instance FromJSON ChannelSectionLocalizations where
parseJSON
= withObject "ChannelSectionLocalizations"
(\ o ->
ChannelSectionLocalizations' <$> (parseJSONObject o))
instance ToJSON ChannelSectionLocalizations where
toJSON = toJSON . _cslAddtional
data SubscriptionListResponse =
SubscriptionListResponse'
{ _subEtag :: !(Maybe Text)
, _subTokenPagination :: !(Maybe TokenPagination)
, _subNextPageToken :: !(Maybe Text)
, _subPageInfo :: !(Maybe PageInfo)
, _subKind :: !Text
, _subItems :: !(Maybe [Subscription])
, _subVisitorId :: !(Maybe Text)
, _subEventId :: !(Maybe Text)
, _subPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionListResponse
:: SubscriptionListResponse
subscriptionListResponse =
SubscriptionListResponse'
{ _subEtag = Nothing
, _subTokenPagination = Nothing
, _subNextPageToken = Nothing
, _subPageInfo = Nothing
, _subKind = "youtube#subscriptionListResponse"
, _subItems = Nothing
, _subVisitorId = Nothing
, _subEventId = Nothing
, _subPrevPageToken = Nothing
}
subEtag :: Lens' SubscriptionListResponse (Maybe Text)
subEtag = lens _subEtag (\ s a -> s{_subEtag = a})
subTokenPagination :: Lens' SubscriptionListResponse (Maybe TokenPagination)
subTokenPagination
= lens _subTokenPagination
(\ s a -> s{_subTokenPagination = a})
subNextPageToken :: Lens' SubscriptionListResponse (Maybe Text)
subNextPageToken
= lens _subNextPageToken
(\ s a -> s{_subNextPageToken = a})
subPageInfo :: Lens' SubscriptionListResponse (Maybe PageInfo)
subPageInfo
= lens _subPageInfo (\ s a -> s{_subPageInfo = a})
subKind :: Lens' SubscriptionListResponse Text
subKind = lens _subKind (\ s a -> s{_subKind = a})
subItems :: Lens' SubscriptionListResponse [Subscription]
subItems
= lens _subItems (\ s a -> s{_subItems = a}) .
_Default
. _Coerce
subVisitorId :: Lens' SubscriptionListResponse (Maybe Text)
subVisitorId
= lens _subVisitorId (\ s a -> s{_subVisitorId = a})
subEventId :: Lens' SubscriptionListResponse (Maybe Text)
subEventId
= lens _subEventId (\ s a -> s{_subEventId = a})
subPrevPageToken :: Lens' SubscriptionListResponse (Maybe Text)
subPrevPageToken
= lens _subPrevPageToken
(\ s a -> s{_subPrevPageToken = a})
instance FromJSON SubscriptionListResponse where
parseJSON
= withObject "SubscriptionListResponse"
(\ o ->
SubscriptionListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!= "youtube#subscriptionListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON SubscriptionListResponse where
toJSON SubscriptionListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _subEtag,
("tokenPagination" .=) <$> _subTokenPagination,
("nextPageToken" .=) <$> _subNextPageToken,
("pageInfo" .=) <$> _subPageInfo,
Just ("kind" .= _subKind),
("items" .=) <$> _subItems,
("visitorId" .=) <$> _subVisitorId,
("eventId" .=) <$> _subEventId,
("prevPageToken" .=) <$> _subPrevPageToken])
data VideoLocalization =
VideoLocalization'
{ _vlTitle :: !(Maybe Text)
, _vlDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoLocalization
:: VideoLocalization
videoLocalization =
VideoLocalization' {_vlTitle = Nothing, _vlDescription = Nothing}
vlTitle :: Lens' VideoLocalization (Maybe Text)
vlTitle = lens _vlTitle (\ s a -> s{_vlTitle = a})
vlDescription :: Lens' VideoLocalization (Maybe Text)
vlDescription
= lens _vlDescription
(\ s a -> s{_vlDescription = a})
instance FromJSON VideoLocalization where
parseJSON
= withObject "VideoLocalization"
(\ o ->
VideoLocalization' <$>
(o .:? "title") <*> (o .:? "description"))
instance ToJSON VideoLocalization where
toJSON VideoLocalization'{..}
= object
(catMaybes
[("title" .=) <$> _vlTitle,
("description" .=) <$> _vlDescription])
data CommentListResponse =
CommentListResponse'
{ _comEtag :: !(Maybe Text)
, _comTokenPagination :: !(Maybe TokenPagination)
, _comNextPageToken :: !(Maybe Text)
, _comPageInfo :: !(Maybe PageInfo)
, _comKind :: !Text
, _comItems :: !(Maybe [Comment])
, _comVisitorId :: !(Maybe Text)
, _comEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
commentListResponse
:: CommentListResponse
commentListResponse =
CommentListResponse'
{ _comEtag = Nothing
, _comTokenPagination = Nothing
, _comNextPageToken = Nothing
, _comPageInfo = Nothing
, _comKind = "youtube#commentListResponse"
, _comItems = Nothing
, _comVisitorId = Nothing
, _comEventId = Nothing
}
comEtag :: Lens' CommentListResponse (Maybe Text)
comEtag = lens _comEtag (\ s a -> s{_comEtag = a})
comTokenPagination :: Lens' CommentListResponse (Maybe TokenPagination)
comTokenPagination
= lens _comTokenPagination
(\ s a -> s{_comTokenPagination = a})
comNextPageToken :: Lens' CommentListResponse (Maybe Text)
comNextPageToken
= lens _comNextPageToken
(\ s a -> s{_comNextPageToken = a})
comPageInfo :: Lens' CommentListResponse (Maybe PageInfo)
comPageInfo
= lens _comPageInfo (\ s a -> s{_comPageInfo = a})
comKind :: Lens' CommentListResponse Text
comKind = lens _comKind (\ s a -> s{_comKind = a})
comItems :: Lens' CommentListResponse [Comment]
comItems
= lens _comItems (\ s a -> s{_comItems = a}) .
_Default
. _Coerce
comVisitorId :: Lens' CommentListResponse (Maybe Text)
comVisitorId
= lens _comVisitorId (\ s a -> s{_comVisitorId = a})
comEventId :: Lens' CommentListResponse (Maybe Text)
comEventId
= lens _comEventId (\ s a -> s{_comEventId = a})
instance FromJSON CommentListResponse where
parseJSON
= withObject "CommentListResponse"
(\ o ->
CommentListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*> (o .:? "kind" .!= "youtube#commentListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON CommentListResponse where
toJSON CommentListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _comEtag,
("tokenPagination" .=) <$> _comTokenPagination,
("nextPageToken" .=) <$> _comNextPageToken,
("pageInfo" .=) <$> _comPageInfo,
Just ("kind" .= _comKind),
("items" .=) <$> _comItems,
("visitorId" .=) <$> _comVisitorId,
("eventId" .=) <$> _comEventId])
data VideoPlayer =
VideoPlayer'
{ _vpEmbedHeight :: !(Maybe (Textual Int64))
, _vpEmbedWidth :: !(Maybe (Textual Int64))
, _vpEmbedHTML :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoPlayer
:: VideoPlayer
videoPlayer =
VideoPlayer'
{_vpEmbedHeight = Nothing, _vpEmbedWidth = Nothing, _vpEmbedHTML = Nothing}
vpEmbedHeight :: Lens' VideoPlayer (Maybe Int64)
vpEmbedHeight
= lens _vpEmbedHeight
(\ s a -> s{_vpEmbedHeight = a})
. mapping _Coerce
vpEmbedWidth :: Lens' VideoPlayer (Maybe Int64)
vpEmbedWidth
= lens _vpEmbedWidth (\ s a -> s{_vpEmbedWidth = a})
. mapping _Coerce
vpEmbedHTML :: Lens' VideoPlayer (Maybe Text)
vpEmbedHTML
= lens _vpEmbedHTML (\ s a -> s{_vpEmbedHTML = a})
instance FromJSON VideoPlayer where
parseJSON
= withObject "VideoPlayer"
(\ o ->
VideoPlayer' <$>
(o .:? "embedHeight") <*> (o .:? "embedWidth") <*>
(o .:? "embedHtml"))
instance ToJSON VideoPlayer where
toJSON VideoPlayer'{..}
= object
(catMaybes
[("embedHeight" .=) <$> _vpEmbedHeight,
("embedWidth" .=) <$> _vpEmbedWidth,
("embedHtml" .=) <$> _vpEmbedHTML])
data PromotedItemId =
PromotedItemId'
{ _piiRecentlyUploadedBy :: !(Maybe Text)
, _piiVideoId :: !(Maybe Text)
, _piiWebsiteURL :: !(Maybe Text)
, _piiType :: !(Maybe PromotedItemIdType)
}
deriving (Eq, Show, Data, Typeable, Generic)
promotedItemId
:: PromotedItemId
promotedItemId =
PromotedItemId'
{ _piiRecentlyUploadedBy = Nothing
, _piiVideoId = Nothing
, _piiWebsiteURL = Nothing
, _piiType = Nothing
}
piiRecentlyUploadedBy :: Lens' PromotedItemId (Maybe Text)
piiRecentlyUploadedBy
= lens _piiRecentlyUploadedBy
(\ s a -> s{_piiRecentlyUploadedBy = a})
piiVideoId :: Lens' PromotedItemId (Maybe Text)
piiVideoId
= lens _piiVideoId (\ s a -> s{_piiVideoId = a})
piiWebsiteURL :: Lens' PromotedItemId (Maybe Text)
piiWebsiteURL
= lens _piiWebsiteURL
(\ s a -> s{_piiWebsiteURL = a})
piiType :: Lens' PromotedItemId (Maybe PromotedItemIdType)
piiType = lens _piiType (\ s a -> s{_piiType = a})
instance FromJSON PromotedItemId where
parseJSON
= withObject "PromotedItemId"
(\ o ->
PromotedItemId' <$>
(o .:? "recentlyUploadedBy") <*> (o .:? "videoId")
<*> (o .:? "websiteUrl")
<*> (o .:? "type"))
instance ToJSON PromotedItemId where
toJSON PromotedItemId'{..}
= object
(catMaybes
[("recentlyUploadedBy" .=) <$>
_piiRecentlyUploadedBy,
("videoId" .=) <$> _piiVideoId,
("websiteUrl" .=) <$> _piiWebsiteURL,
("type" .=) <$> _piiType])
data LocalizedString =
LocalizedString'
{ _lsValue :: !(Maybe Text)
, _lsLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
localizedString
:: LocalizedString
localizedString = LocalizedString' {_lsValue = Nothing, _lsLanguage = Nothing}
lsValue :: Lens' LocalizedString (Maybe Text)
lsValue = lens _lsValue (\ s a -> s{_lsValue = a})
lsLanguage :: Lens' LocalizedString (Maybe Text)
lsLanguage
= lens _lsLanguage (\ s a -> s{_lsLanguage = a})
instance FromJSON LocalizedString where
parseJSON
= withObject "LocalizedString"
(\ o ->
LocalizedString' <$>
(o .:? "value") <*> (o .:? "language"))
instance ToJSON LocalizedString where
toJSON LocalizedString'{..}
= object
(catMaybes
[("value" .=) <$> _lsValue,
("language" .=) <$> _lsLanguage])
data PlayListItemListResponse =
PlayListItemListResponse'
{ _plilrEtag :: !(Maybe Text)
, _plilrTokenPagination :: !(Maybe TokenPagination)
, _plilrNextPageToken :: !(Maybe Text)
, _plilrPageInfo :: !(Maybe PageInfo)
, _plilrKind :: !Text
, _plilrItems :: !(Maybe [PlayListItem])
, _plilrVisitorId :: !(Maybe Text)
, _plilrEventId :: !(Maybe Text)
, _plilrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
playListItemListResponse
:: PlayListItemListResponse
playListItemListResponse =
PlayListItemListResponse'
{ _plilrEtag = Nothing
, _plilrTokenPagination = Nothing
, _plilrNextPageToken = Nothing
, _plilrPageInfo = Nothing
, _plilrKind = "youtube#playlistItemListResponse"
, _plilrItems = Nothing
, _plilrVisitorId = Nothing
, _plilrEventId = Nothing
, _plilrPrevPageToken = Nothing
}
plilrEtag :: Lens' PlayListItemListResponse (Maybe Text)
plilrEtag
= lens _plilrEtag (\ s a -> s{_plilrEtag = a})
plilrTokenPagination :: Lens' PlayListItemListResponse (Maybe TokenPagination)
plilrTokenPagination
= lens _plilrTokenPagination
(\ s a -> s{_plilrTokenPagination = a})
plilrNextPageToken :: Lens' PlayListItemListResponse (Maybe Text)
plilrNextPageToken
= lens _plilrNextPageToken
(\ s a -> s{_plilrNextPageToken = a})
plilrPageInfo :: Lens' PlayListItemListResponse (Maybe PageInfo)
plilrPageInfo
= lens _plilrPageInfo
(\ s a -> s{_plilrPageInfo = a})
plilrKind :: Lens' PlayListItemListResponse Text
plilrKind
= lens _plilrKind (\ s a -> s{_plilrKind = a})
plilrItems :: Lens' PlayListItemListResponse [PlayListItem]
plilrItems
= lens _plilrItems (\ s a -> s{_plilrItems = a}) .
_Default
. _Coerce
plilrVisitorId :: Lens' PlayListItemListResponse (Maybe Text)
plilrVisitorId
= lens _plilrVisitorId
(\ s a -> s{_plilrVisitorId = a})
plilrEventId :: Lens' PlayListItemListResponse (Maybe Text)
plilrEventId
= lens _plilrEventId (\ s a -> s{_plilrEventId = a})
plilrPrevPageToken :: Lens' PlayListItemListResponse (Maybe Text)
plilrPrevPageToken
= lens _plilrPrevPageToken
(\ s a -> s{_plilrPrevPageToken = a})
instance FromJSON PlayListItemListResponse where
parseJSON
= withObject "PlayListItemListResponse"
(\ o ->
PlayListItemListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!= "youtube#playlistItemListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON PlayListItemListResponse where
toJSON PlayListItemListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _plilrEtag,
("tokenPagination" .=) <$> _plilrTokenPagination,
("nextPageToken" .=) <$> _plilrNextPageToken,
("pageInfo" .=) <$> _plilrPageInfo,
Just ("kind" .= _plilrKind),
("items" .=) <$> _plilrItems,
("visitorId" .=) <$> _plilrVisitorId,
("eventId" .=) <$> _plilrEventId,
("prevPageToken" .=) <$> _plilrPrevPageToken])
data GuideCategory =
GuideCategory'
{ _gcEtag :: !(Maybe Text)
, _gcSnippet :: !(Maybe GuideCategorySnippet)
, _gcKind :: !Text
, _gcId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
guideCategory
:: GuideCategory
guideCategory =
GuideCategory'
{ _gcEtag = Nothing
, _gcSnippet = Nothing
, _gcKind = "youtube#guideCategory"
, _gcId = Nothing
}
gcEtag :: Lens' GuideCategory (Maybe Text)
gcEtag = lens _gcEtag (\ s a -> s{_gcEtag = a})
gcSnippet :: Lens' GuideCategory (Maybe GuideCategorySnippet)
gcSnippet
= lens _gcSnippet (\ s a -> s{_gcSnippet = a})
gcKind :: Lens' GuideCategory Text
gcKind = lens _gcKind (\ s a -> s{_gcKind = a})
gcId :: Lens' GuideCategory (Maybe Text)
gcId = lens _gcId (\ s a -> s{_gcId = a})
instance FromJSON GuideCategory where
parseJSON
= withObject "GuideCategory"
(\ o ->
GuideCategory' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#guideCategory")
<*> (o .:? "id"))
instance ToJSON GuideCategory where
toJSON GuideCategory'{..}
= object
(catMaybes
[("etag" .=) <$> _gcEtag,
("snippet" .=) <$> _gcSnippet,
Just ("kind" .= _gcKind), ("id" .=) <$> _gcId])
data SearchResultSnippet =
SearchResultSnippet'
{ _srsPublishedAt :: !(Maybe DateTime')
, _srsChannelTitle :: !(Maybe Text)
, _srsChannelId :: !(Maybe Text)
, _srsThumbnails :: !(Maybe ThumbnailDetails)
, _srsTitle :: !(Maybe Text)
, _srsLiveBroadcastContent :: !(Maybe SearchResultSnippetLiveBroadcastContent)
, _srsDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
searchResultSnippet
:: SearchResultSnippet
searchResultSnippet =
SearchResultSnippet'
{ _srsPublishedAt = Nothing
, _srsChannelTitle = Nothing
, _srsChannelId = Nothing
, _srsThumbnails = Nothing
, _srsTitle = Nothing
, _srsLiveBroadcastContent = Nothing
, _srsDescription = Nothing
}
srsPublishedAt :: Lens' SearchResultSnippet (Maybe UTCTime)
srsPublishedAt
= lens _srsPublishedAt
(\ s a -> s{_srsPublishedAt = a})
. mapping _DateTime
srsChannelTitle :: Lens' SearchResultSnippet (Maybe Text)
srsChannelTitle
= lens _srsChannelTitle
(\ s a -> s{_srsChannelTitle = a})
srsChannelId :: Lens' SearchResultSnippet (Maybe Text)
srsChannelId
= lens _srsChannelId (\ s a -> s{_srsChannelId = a})
srsThumbnails :: Lens' SearchResultSnippet (Maybe ThumbnailDetails)
srsThumbnails
= lens _srsThumbnails
(\ s a -> s{_srsThumbnails = a})
srsTitle :: Lens' SearchResultSnippet (Maybe Text)
srsTitle = lens _srsTitle (\ s a -> s{_srsTitle = a})
srsLiveBroadcastContent :: Lens' SearchResultSnippet (Maybe SearchResultSnippetLiveBroadcastContent)
srsLiveBroadcastContent
= lens _srsLiveBroadcastContent
(\ s a -> s{_srsLiveBroadcastContent = a})
srsDescription :: Lens' SearchResultSnippet (Maybe Text)
srsDescription
= lens _srsDescription
(\ s a -> s{_srsDescription = a})
instance FromJSON SearchResultSnippet where
parseJSON
= withObject "SearchResultSnippet"
(\ o ->
SearchResultSnippet' <$>
(o .:? "publishedAt") <*> (o .:? "channelTitle") <*>
(o .:? "channelId")
<*> (o .:? "thumbnails")
<*> (o .:? "title")
<*> (o .:? "liveBroadcastContent")
<*> (o .:? "description"))
instance ToJSON SearchResultSnippet where
toJSON SearchResultSnippet'{..}
= object
(catMaybes
[("publishedAt" .=) <$> _srsPublishedAt,
("channelTitle" .=) <$> _srsChannelTitle,
("channelId" .=) <$> _srsChannelId,
("thumbnails" .=) <$> _srsThumbnails,
("title" .=) <$> _srsTitle,
("liveBroadcastContent" .=) <$>
_srsLiveBroadcastContent,
("description" .=) <$> _srsDescription])
data LiveChatPollItem =
LiveChatPollItem'
{ _lcpiItemId :: !(Maybe Text)
, _lcpiDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatPollItem
:: LiveChatPollItem
liveChatPollItem =
LiveChatPollItem' {_lcpiItemId = Nothing, _lcpiDescription = Nothing}
lcpiItemId :: Lens' LiveChatPollItem (Maybe Text)
lcpiItemId
= lens _lcpiItemId (\ s a -> s{_lcpiItemId = a})
lcpiDescription :: Lens' LiveChatPollItem (Maybe Text)
lcpiDescription
= lens _lcpiDescription
(\ s a -> s{_lcpiDescription = a})
instance FromJSON LiveChatPollItem where
parseJSON
= withObject "LiveChatPollItem"
(\ o ->
LiveChatPollItem' <$>
(o .:? "itemId") <*> (o .:? "description"))
instance ToJSON LiveChatPollItem where
toJSON LiveChatPollItem'{..}
= object
(catMaybes
[("itemId" .=) <$> _lcpiItemId,
("description" .=) <$> _lcpiDescription])
data SponsorListResponse =
SponsorListResponse'
{ _spoEtag :: !(Maybe Text)
, _spoTokenPagination :: !(Maybe TokenPagination)
, _spoNextPageToken :: !(Maybe Text)
, _spoPageInfo :: !(Maybe PageInfo)
, _spoKind :: !Text
, _spoItems :: !(Maybe [Sponsor])
, _spoVisitorId :: !(Maybe Text)
, _spoEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
sponsorListResponse
:: SponsorListResponse
sponsorListResponse =
SponsorListResponse'
{ _spoEtag = Nothing
, _spoTokenPagination = Nothing
, _spoNextPageToken = Nothing
, _spoPageInfo = Nothing
, _spoKind = "youtube#sponsorListResponse"
, _spoItems = Nothing
, _spoVisitorId = Nothing
, _spoEventId = Nothing
}
spoEtag :: Lens' SponsorListResponse (Maybe Text)
spoEtag = lens _spoEtag (\ s a -> s{_spoEtag = a})
spoTokenPagination :: Lens' SponsorListResponse (Maybe TokenPagination)
spoTokenPagination
= lens _spoTokenPagination
(\ s a -> s{_spoTokenPagination = a})
spoNextPageToken :: Lens' SponsorListResponse (Maybe Text)
spoNextPageToken
= lens _spoNextPageToken
(\ s a -> s{_spoNextPageToken = a})
spoPageInfo :: Lens' SponsorListResponse (Maybe PageInfo)
spoPageInfo
= lens _spoPageInfo (\ s a -> s{_spoPageInfo = a})
spoKind :: Lens' SponsorListResponse Text
spoKind = lens _spoKind (\ s a -> s{_spoKind = a})
spoItems :: Lens' SponsorListResponse [Sponsor]
spoItems
= lens _spoItems (\ s a -> s{_spoItems = a}) .
_Default
. _Coerce
spoVisitorId :: Lens' SponsorListResponse (Maybe Text)
spoVisitorId
= lens _spoVisitorId (\ s a -> s{_spoVisitorId = a})
spoEventId :: Lens' SponsorListResponse (Maybe Text)
spoEventId
= lens _spoEventId (\ s a -> s{_spoEventId = a})
instance FromJSON SponsorListResponse where
parseJSON
= withObject "SponsorListResponse"
(\ o ->
SponsorListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*> (o .:? "kind" .!= "youtube#sponsorListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON SponsorListResponse where
toJSON SponsorListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _spoEtag,
("tokenPagination" .=) <$> _spoTokenPagination,
("nextPageToken" .=) <$> _spoNextPageToken,
("pageInfo" .=) <$> _spoPageInfo,
Just ("kind" .= _spoKind),
("items" .=) <$> _spoItems,
("visitorId" .=) <$> _spoVisitorId,
("eventId" .=) <$> _spoEventId])
data Activity =
Activity'
{ _aEtag :: !(Maybe Text)
, _aSnippet :: !(Maybe ActivitySnippet)
, _aKind :: !Text
, _aContentDetails :: !(Maybe ActivityContentDetails)
, _aId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
activity
:: Activity
activity =
Activity'
{ _aEtag = Nothing
, _aSnippet = Nothing
, _aKind = "youtube#activity"
, _aContentDetails = Nothing
, _aId = Nothing
}
aEtag :: Lens' Activity (Maybe Text)
aEtag = lens _aEtag (\ s a -> s{_aEtag = a})
aSnippet :: Lens' Activity (Maybe ActivitySnippet)
aSnippet = lens _aSnippet (\ s a -> s{_aSnippet = a})
aKind :: Lens' Activity Text
aKind = lens _aKind (\ s a -> s{_aKind = a})
aContentDetails :: Lens' Activity (Maybe ActivityContentDetails)
aContentDetails
= lens _aContentDetails
(\ s a -> s{_aContentDetails = a})
aId :: Lens' Activity (Maybe Text)
aId = lens _aId (\ s a -> s{_aId = a})
instance FromJSON Activity where
parseJSON
= withObject "Activity"
(\ o ->
Activity' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#activity")
<*> (o .:? "contentDetails")
<*> (o .:? "id"))
instance ToJSON Activity where
toJSON Activity'{..}
= object
(catMaybes
[("etag" .=) <$> _aEtag,
("snippet" .=) <$> _aSnippet,
Just ("kind" .= _aKind),
("contentDetails" .=) <$> _aContentDetails,
("id" .=) <$> _aId])
data InvideoPromotion =
InvideoPromotion'
{ _ipUseSmartTiming :: !(Maybe Bool)
, _ipItems :: !(Maybe [PromotedItem])
, _ipDefaultTiming :: !(Maybe InvideoTiming)
, _ipPosition :: !(Maybe InvideoPosition)
}
deriving (Eq, Show, Data, Typeable, Generic)
invideoPromotion
:: InvideoPromotion
invideoPromotion =
InvideoPromotion'
{ _ipUseSmartTiming = Nothing
, _ipItems = Nothing
, _ipDefaultTiming = Nothing
, _ipPosition = Nothing
}
ipUseSmartTiming :: Lens' InvideoPromotion (Maybe Bool)
ipUseSmartTiming
= lens _ipUseSmartTiming
(\ s a -> s{_ipUseSmartTiming = a})
ipItems :: Lens' InvideoPromotion [PromotedItem]
ipItems
= lens _ipItems (\ s a -> s{_ipItems = a}) . _Default
. _Coerce
ipDefaultTiming :: Lens' InvideoPromotion (Maybe InvideoTiming)
ipDefaultTiming
= lens _ipDefaultTiming
(\ s a -> s{_ipDefaultTiming = a})
ipPosition :: Lens' InvideoPromotion (Maybe InvideoPosition)
ipPosition
= lens _ipPosition (\ s a -> s{_ipPosition = a})
instance FromJSON InvideoPromotion where
parseJSON
= withObject "InvideoPromotion"
(\ o ->
InvideoPromotion' <$>
(o .:? "useSmartTiming") <*>
(o .:? "items" .!= mempty)
<*> (o .:? "defaultTiming")
<*> (o .:? "position"))
instance ToJSON InvideoPromotion where
toJSON InvideoPromotion'{..}
= object
(catMaybes
[("useSmartTiming" .=) <$> _ipUseSmartTiming,
("items" .=) <$> _ipItems,
("defaultTiming" .=) <$> _ipDefaultTiming,
("position" .=) <$> _ipPosition])
data InvideoBranding =
InvideoBranding'
{ _ibImageURL :: !(Maybe Text)
, _ibTargetChannelId :: !(Maybe Text)
, _ibTiming :: !(Maybe InvideoTiming)
, _ibImageBytes :: !(Maybe Bytes)
, _ibPosition :: !(Maybe InvideoPosition)
}
deriving (Eq, Show, Data, Typeable, Generic)
invideoBranding
:: InvideoBranding
invideoBranding =
InvideoBranding'
{ _ibImageURL = Nothing
, _ibTargetChannelId = Nothing
, _ibTiming = Nothing
, _ibImageBytes = Nothing
, _ibPosition = Nothing
}
ibImageURL :: Lens' InvideoBranding (Maybe Text)
ibImageURL
= lens _ibImageURL (\ s a -> s{_ibImageURL = a})
ibTargetChannelId :: Lens' InvideoBranding (Maybe Text)
ibTargetChannelId
= lens _ibTargetChannelId
(\ s a -> s{_ibTargetChannelId = a})
ibTiming :: Lens' InvideoBranding (Maybe InvideoTiming)
ibTiming = lens _ibTiming (\ s a -> s{_ibTiming = a})
ibImageBytes :: Lens' InvideoBranding (Maybe ByteString)
ibImageBytes
= lens _ibImageBytes (\ s a -> s{_ibImageBytes = a})
. mapping _Bytes
ibPosition :: Lens' InvideoBranding (Maybe InvideoPosition)
ibPosition
= lens _ibPosition (\ s a -> s{_ibPosition = a})
instance FromJSON InvideoBranding where
parseJSON
= withObject "InvideoBranding"
(\ o ->
InvideoBranding' <$>
(o .:? "imageUrl") <*> (o .:? "targetChannelId") <*>
(o .:? "timing")
<*> (o .:? "imageBytes")
<*> (o .:? "position"))
instance ToJSON InvideoBranding where
toJSON InvideoBranding'{..}
= object
(catMaybes
[("imageUrl" .=) <$> _ibImageURL,
("targetChannelId" .=) <$> _ibTargetChannelId,
("timing" .=) <$> _ibTiming,
("imageBytes" .=) <$> _ibImageBytes,
("position" .=) <$> _ibPosition])
data ChannelBannerResource =
ChannelBannerResource'
{ _cbrEtag :: !(Maybe Text)
, _cbrKind :: !Text
, _cbrURL :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelBannerResource
:: ChannelBannerResource
channelBannerResource =
ChannelBannerResource'
{ _cbrEtag = Nothing
, _cbrKind = "youtube#channelBannerResource"
, _cbrURL = Nothing
}
cbrEtag :: Lens' ChannelBannerResource (Maybe Text)
cbrEtag = lens _cbrEtag (\ s a -> s{_cbrEtag = a})
cbrKind :: Lens' ChannelBannerResource Text
cbrKind = lens _cbrKind (\ s a -> s{_cbrKind = a})
cbrURL :: Lens' ChannelBannerResource (Maybe Text)
cbrURL = lens _cbrURL (\ s a -> s{_cbrURL = a})
instance FromJSON ChannelBannerResource where
parseJSON
= withObject "ChannelBannerResource"
(\ o ->
ChannelBannerResource' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "youtube#channelBannerResource")
<*> (o .:? "url"))
instance ToJSON ChannelBannerResource where
toJSON ChannelBannerResource'{..}
= object
(catMaybes
[("etag" .=) <$> _cbrEtag, Just ("kind" .= _cbrKind),
("url" .=) <$> _cbrURL])
data I18nLanguageListResponse =
I18nLanguageListResponse'
{ _illrEtag :: !(Maybe Text)
, _illrKind :: !Text
, _illrItems :: !(Maybe [I18nLanguage])
, _illrVisitorId :: !(Maybe Text)
, _illrEventId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
i18nLanguageListResponse
:: I18nLanguageListResponse
i18nLanguageListResponse =
I18nLanguageListResponse'
{ _illrEtag = Nothing
, _illrKind = "youtube#i18nLanguageListResponse"
, _illrItems = Nothing
, _illrVisitorId = Nothing
, _illrEventId = Nothing
}
illrEtag :: Lens' I18nLanguageListResponse (Maybe Text)
illrEtag = lens _illrEtag (\ s a -> s{_illrEtag = a})
illrKind :: Lens' I18nLanguageListResponse Text
illrKind = lens _illrKind (\ s a -> s{_illrKind = a})
illrItems :: Lens' I18nLanguageListResponse [I18nLanguage]
illrItems
= lens _illrItems (\ s a -> s{_illrItems = a}) .
_Default
. _Coerce
illrVisitorId :: Lens' I18nLanguageListResponse (Maybe Text)
illrVisitorId
= lens _illrVisitorId
(\ s a -> s{_illrVisitorId = a})
illrEventId :: Lens' I18nLanguageListResponse (Maybe Text)
illrEventId
= lens _illrEventId (\ s a -> s{_illrEventId = a})
instance FromJSON I18nLanguageListResponse where
parseJSON
= withObject "I18nLanguageListResponse"
(\ o ->
I18nLanguageListResponse' <$>
(o .:? "etag") <*>
(o .:? "kind" .!= "youtube#i18nLanguageListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId"))
instance ToJSON I18nLanguageListResponse where
toJSON I18nLanguageListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _illrEtag,
Just ("kind" .= _illrKind),
("items" .=) <$> _illrItems,
("visitorId" .=) <$> _illrVisitorId,
("eventId" .=) <$> _illrEventId])
newtype PlayListPlayer =
PlayListPlayer'
{ _plpEmbedHTML :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
playListPlayer
:: PlayListPlayer
playListPlayer = PlayListPlayer' {_plpEmbedHTML = Nothing}
plpEmbedHTML :: Lens' PlayListPlayer (Maybe Text)
plpEmbedHTML
= lens _plpEmbedHTML (\ s a -> s{_plpEmbedHTML = a})
instance FromJSON PlayListPlayer where
parseJSON
= withObject "PlayListPlayer"
(\ o -> PlayListPlayer' <$> (o .:? "embedHtml"))
instance ToJSON PlayListPlayer where
toJSON PlayListPlayer'{..}
= object
(catMaybes [("embedHtml" .=) <$> _plpEmbedHTML])
data ChannelBrandingSettings =
ChannelBrandingSettings'
{ _cbsImage :: !(Maybe ImageSettings)
, _cbsHints :: !(Maybe [PropertyValue])
, _cbsChannel :: !(Maybe ChannelSettings)
, _cbsWatch :: !(Maybe WatchSettings)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelBrandingSettings
:: ChannelBrandingSettings
channelBrandingSettings =
ChannelBrandingSettings'
{ _cbsImage = Nothing
, _cbsHints = Nothing
, _cbsChannel = Nothing
, _cbsWatch = Nothing
}
cbsImage :: Lens' ChannelBrandingSettings (Maybe ImageSettings)
cbsImage = lens _cbsImage (\ s a -> s{_cbsImage = a})
cbsHints :: Lens' ChannelBrandingSettings [PropertyValue]
cbsHints
= lens _cbsHints (\ s a -> s{_cbsHints = a}) .
_Default
. _Coerce
cbsChannel :: Lens' ChannelBrandingSettings (Maybe ChannelSettings)
cbsChannel
= lens _cbsChannel (\ s a -> s{_cbsChannel = a})
cbsWatch :: Lens' ChannelBrandingSettings (Maybe WatchSettings)
cbsWatch = lens _cbsWatch (\ s a -> s{_cbsWatch = a})
instance FromJSON ChannelBrandingSettings where
parseJSON
= withObject "ChannelBrandingSettings"
(\ o ->
ChannelBrandingSettings' <$>
(o .:? "image") <*> (o .:? "hints" .!= mempty) <*>
(o .:? "channel")
<*> (o .:? "watch"))
instance ToJSON ChannelBrandingSettings where
toJSON ChannelBrandingSettings'{..}
= object
(catMaybes
[("image" .=) <$> _cbsImage,
("hints" .=) <$> _cbsHints,
("channel" .=) <$> _cbsChannel,
("watch" .=) <$> _cbsWatch])
data CommentThread =
CommentThread'
{ _ctEtag :: !(Maybe Text)
, _ctSnippet :: !(Maybe CommentThreadSnippet)
, _ctKind :: !Text
, _ctReplies :: !(Maybe CommentThreadReplies)
, _ctId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
commentThread
:: CommentThread
commentThread =
CommentThread'
{ _ctEtag = Nothing
, _ctSnippet = Nothing
, _ctKind = "youtube#commentThread"
, _ctReplies = Nothing
, _ctId = Nothing
}
ctEtag :: Lens' CommentThread (Maybe Text)
ctEtag = lens _ctEtag (\ s a -> s{_ctEtag = a})
ctSnippet :: Lens' CommentThread (Maybe CommentThreadSnippet)
ctSnippet
= lens _ctSnippet (\ s a -> s{_ctSnippet = a})
ctKind :: Lens' CommentThread Text
ctKind = lens _ctKind (\ s a -> s{_ctKind = a})
ctReplies :: Lens' CommentThread (Maybe CommentThreadReplies)
ctReplies
= lens _ctReplies (\ s a -> s{_ctReplies = a})
ctId :: Lens' CommentThread (Maybe Text)
ctId = lens _ctId (\ s a -> s{_ctId = a})
instance FromJSON CommentThread where
parseJSON
= withObject "CommentThread"
(\ o ->
CommentThread' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#commentThread")
<*> (o .:? "replies")
<*> (o .:? "id"))
instance ToJSON CommentThread where
toJSON CommentThread'{..}
= object
(catMaybes
[("etag" .=) <$> _ctEtag,
("snippet" .=) <$> _ctSnippet,
Just ("kind" .= _ctKind),
("replies" .=) <$> _ctReplies, ("id" .=) <$> _ctId])
data PlayListLocalization =
PlayListLocalization'
{ _pllTitle :: !(Maybe Text)
, _pllDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
playListLocalization
:: PlayListLocalization
playListLocalization =
PlayListLocalization' {_pllTitle = Nothing, _pllDescription = Nothing}
pllTitle :: Lens' PlayListLocalization (Maybe Text)
pllTitle = lens _pllTitle (\ s a -> s{_pllTitle = a})
pllDescription :: Lens' PlayListLocalization (Maybe Text)
pllDescription
= lens _pllDescription
(\ s a -> s{_pllDescription = a})
instance FromJSON PlayListLocalization where
parseJSON
= withObject "PlayListLocalization"
(\ o ->
PlayListLocalization' <$>
(o .:? "title") <*> (o .:? "description"))
instance ToJSON PlayListLocalization where
toJSON PlayListLocalization'{..}
= object
(catMaybes
[("title" .=) <$> _pllTitle,
("description" .=) <$> _pllDescription])
data LiveChatBanSnippet =
LiveChatBanSnippet'
{ _lcbsLiveChatId :: !(Maybe Text)
, _lcbsBannedUserDetails :: !(Maybe ChannelProFileDetails)
, _lcbsBanDurationSeconds :: !(Maybe (Textual Word64))
, _lcbsType :: !(Maybe LiveChatBanSnippetType)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatBanSnippet
:: LiveChatBanSnippet
liveChatBanSnippet =
LiveChatBanSnippet'
{ _lcbsLiveChatId = Nothing
, _lcbsBannedUserDetails = Nothing
, _lcbsBanDurationSeconds = Nothing
, _lcbsType = Nothing
}
lcbsLiveChatId :: Lens' LiveChatBanSnippet (Maybe Text)
lcbsLiveChatId
= lens _lcbsLiveChatId
(\ s a -> s{_lcbsLiveChatId = a})
lcbsBannedUserDetails :: Lens' LiveChatBanSnippet (Maybe ChannelProFileDetails)
lcbsBannedUserDetails
= lens _lcbsBannedUserDetails
(\ s a -> s{_lcbsBannedUserDetails = a})
lcbsBanDurationSeconds :: Lens' LiveChatBanSnippet (Maybe Word64)
lcbsBanDurationSeconds
= lens _lcbsBanDurationSeconds
(\ s a -> s{_lcbsBanDurationSeconds = a})
. mapping _Coerce
lcbsType :: Lens' LiveChatBanSnippet (Maybe LiveChatBanSnippetType)
lcbsType = lens _lcbsType (\ s a -> s{_lcbsType = a})
instance FromJSON LiveChatBanSnippet where
parseJSON
= withObject "LiveChatBanSnippet"
(\ o ->
LiveChatBanSnippet' <$>
(o .:? "liveChatId") <*> (o .:? "bannedUserDetails")
<*> (o .:? "banDurationSeconds")
<*> (o .:? "type"))
instance ToJSON LiveChatBanSnippet where
toJSON LiveChatBanSnippet'{..}
= object
(catMaybes
[("liveChatId" .=) <$> _lcbsLiveChatId,
("bannedUserDetails" .=) <$> _lcbsBannedUserDetails,
("banDurationSeconds" .=) <$>
_lcbsBanDurationSeconds,
("type" .=) <$> _lcbsType])
data SubscriptionContentDetails =
SubscriptionContentDetails'
{ _scdActivityType :: !(Maybe SubscriptionContentDetailsActivityType)
, _scdTotalItemCount :: !(Maybe (Textual Word32))
, _scdNewItemCount :: !(Maybe (Textual Word32))
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionContentDetails
:: SubscriptionContentDetails
subscriptionContentDetails =
SubscriptionContentDetails'
{ _scdActivityType = Nothing
, _scdTotalItemCount = Nothing
, _scdNewItemCount = Nothing
}
scdActivityType :: Lens' SubscriptionContentDetails (Maybe SubscriptionContentDetailsActivityType)
scdActivityType
= lens _scdActivityType
(\ s a -> s{_scdActivityType = a})
scdTotalItemCount :: Lens' SubscriptionContentDetails (Maybe Word32)
scdTotalItemCount
= lens _scdTotalItemCount
(\ s a -> s{_scdTotalItemCount = a})
. mapping _Coerce
scdNewItemCount :: Lens' SubscriptionContentDetails (Maybe Word32)
scdNewItemCount
= lens _scdNewItemCount
(\ s a -> s{_scdNewItemCount = a})
. mapping _Coerce
instance FromJSON SubscriptionContentDetails where
parseJSON
= withObject "SubscriptionContentDetails"
(\ o ->
SubscriptionContentDetails' <$>
(o .:? "activityType") <*> (o .:? "totalItemCount")
<*> (o .:? "newItemCount"))
instance ToJSON SubscriptionContentDetails where
toJSON SubscriptionContentDetails'{..}
= object
(catMaybes
[("activityType" .=) <$> _scdActivityType,
("totalItemCount" .=) <$> _scdTotalItemCount,
("newItemCount" .=) <$> _scdNewItemCount])
newtype ChannelConversionPings =
ChannelConversionPings'
{ _ccpPings :: Maybe [ChannelConversionPing]
}
deriving (Eq, Show, Data, Typeable, Generic)
channelConversionPings
:: ChannelConversionPings
channelConversionPings = ChannelConversionPings' {_ccpPings = Nothing}
ccpPings :: Lens' ChannelConversionPings [ChannelConversionPing]
ccpPings
= lens _ccpPings (\ s a -> s{_ccpPings = a}) .
_Default
. _Coerce
instance FromJSON ChannelConversionPings where
parseJSON
= withObject "ChannelConversionPings"
(\ o ->
ChannelConversionPings' <$>
(o .:? "pings" .!= mempty))
instance ToJSON ChannelConversionPings where
toJSON ChannelConversionPings'{..}
= object (catMaybes [("pings" .=) <$> _ccpPings])
data LocalizedProperty =
LocalizedProperty'
{ _lpDefault :: !(Maybe Text)
, _lpLocalized :: !(Maybe [LocalizedString])
, _lpDefaultLanguage :: !(Maybe LanguageTag)
}
deriving (Eq, Show, Data, Typeable, Generic)
localizedProperty
:: LocalizedProperty
localizedProperty =
LocalizedProperty'
{_lpDefault = Nothing, _lpLocalized = Nothing, _lpDefaultLanguage = Nothing}
lpDefault :: Lens' LocalizedProperty (Maybe Text)
lpDefault
= lens _lpDefault (\ s a -> s{_lpDefault = a})
lpLocalized :: Lens' LocalizedProperty [LocalizedString]
lpLocalized
= lens _lpLocalized (\ s a -> s{_lpLocalized = a}) .
_Default
. _Coerce
lpDefaultLanguage :: Lens' LocalizedProperty (Maybe LanguageTag)
lpDefaultLanguage
= lens _lpDefaultLanguage
(\ s a -> s{_lpDefaultLanguage = a})
instance FromJSON LocalizedProperty where
parseJSON
= withObject "LocalizedProperty"
(\ o ->
LocalizedProperty' <$>
(o .:? "default") <*> (o .:? "localized" .!= mempty)
<*> (o .:? "defaultLanguage"))
instance ToJSON LocalizedProperty where
toJSON LocalizedProperty'{..}
= object
(catMaybes
[("default" .=) <$> _lpDefault,
("localized" .=) <$> _lpLocalized,
("defaultLanguage" .=) <$> _lpDefaultLanguage])
data ChannelLocalization =
ChannelLocalization'
{ _clTitle :: !(Maybe Text)
, _clDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelLocalization
:: ChannelLocalization
channelLocalization =
ChannelLocalization' {_clTitle = Nothing, _clDescription = Nothing}
clTitle :: Lens' ChannelLocalization (Maybe Text)
clTitle = lens _clTitle (\ s a -> s{_clTitle = a})
clDescription :: Lens' ChannelLocalization (Maybe Text)
clDescription
= lens _clDescription
(\ s a -> s{_clDescription = a})
instance FromJSON ChannelLocalization where
parseJSON
= withObject "ChannelLocalization"
(\ o ->
ChannelLocalization' <$>
(o .:? "title") <*> (o .:? "description"))
instance ToJSON ChannelLocalization where
toJSON ChannelLocalization'{..}
= object
(catMaybes
[("title" .=) <$> _clTitle,
("description" .=) <$> _clDescription])
data PlayListItemContentDetails =
PlayListItemContentDetails'
{ _plicdStartAt :: !(Maybe Text)
, _plicdNote :: !(Maybe Text)
, _plicdVideoPublishedAt :: !(Maybe DateTime')
, _plicdVideoId :: !(Maybe Text)
, _plicdEndAt :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
playListItemContentDetails
:: PlayListItemContentDetails
playListItemContentDetails =
PlayListItemContentDetails'
{ _plicdStartAt = Nothing
, _plicdNote = Nothing
, _plicdVideoPublishedAt = Nothing
, _plicdVideoId = Nothing
, _plicdEndAt = Nothing
}
plicdStartAt :: Lens' PlayListItemContentDetails (Maybe Text)
plicdStartAt
= lens _plicdStartAt (\ s a -> s{_plicdStartAt = a})
plicdNote :: Lens' PlayListItemContentDetails (Maybe Text)
plicdNote
= lens _plicdNote (\ s a -> s{_plicdNote = a})
plicdVideoPublishedAt :: Lens' PlayListItemContentDetails (Maybe UTCTime)
plicdVideoPublishedAt
= lens _plicdVideoPublishedAt
(\ s a -> s{_plicdVideoPublishedAt = a})
. mapping _DateTime
plicdVideoId :: Lens' PlayListItemContentDetails (Maybe Text)
plicdVideoId
= lens _plicdVideoId (\ s a -> s{_plicdVideoId = a})
plicdEndAt :: Lens' PlayListItemContentDetails (Maybe Text)
plicdEndAt
= lens _plicdEndAt (\ s a -> s{_plicdEndAt = a})
instance FromJSON PlayListItemContentDetails where
parseJSON
= withObject "PlayListItemContentDetails"
(\ o ->
PlayListItemContentDetails' <$>
(o .:? "startAt") <*> (o .:? "note") <*>
(o .:? "videoPublishedAt")
<*> (o .:? "videoId")
<*> (o .:? "endAt"))
instance ToJSON PlayListItemContentDetails where
toJSON PlayListItemContentDetails'{..}
= object
(catMaybes
[("startAt" .=) <$> _plicdStartAt,
("note" .=) <$> _plicdNote,
("videoPublishedAt" .=) <$> _plicdVideoPublishedAt,
("videoId" .=) <$> _plicdVideoId,
("endAt" .=) <$> _plicdEndAt])
data VideoAgeGating =
VideoAgeGating'
{ _vagAlcoholContent :: !(Maybe Bool)
, _vagRestricted :: !(Maybe Bool)
, _vagVideoGameRating :: !(Maybe VideoAgeGatingVideoGameRating)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoAgeGating
:: VideoAgeGating
videoAgeGating =
VideoAgeGating'
{ _vagAlcoholContent = Nothing
, _vagRestricted = Nothing
, _vagVideoGameRating = Nothing
}
vagAlcoholContent :: Lens' VideoAgeGating (Maybe Bool)
vagAlcoholContent
= lens _vagAlcoholContent
(\ s a -> s{_vagAlcoholContent = a})
vagRestricted :: Lens' VideoAgeGating (Maybe Bool)
vagRestricted
= lens _vagRestricted
(\ s a -> s{_vagRestricted = a})
vagVideoGameRating :: Lens' VideoAgeGating (Maybe VideoAgeGatingVideoGameRating)
vagVideoGameRating
= lens _vagVideoGameRating
(\ s a -> s{_vagVideoGameRating = a})
instance FromJSON VideoAgeGating where
parseJSON
= withObject "VideoAgeGating"
(\ o ->
VideoAgeGating' <$>
(o .:? "alcoholContent") <*> (o .:? "restricted") <*>
(o .:? "videoGameRating"))
instance ToJSON VideoAgeGating where
toJSON VideoAgeGating'{..}
= object
(catMaybes
[("alcoholContent" .=) <$> _vagAlcoholContent,
("restricted" .=) <$> _vagRestricted,
("videoGameRating" .=) <$> _vagVideoGameRating])
newtype LanguageTag =
LanguageTag'
{ _ltValue :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
languageTag
:: LanguageTag
languageTag = LanguageTag' {_ltValue = Nothing}
ltValue :: Lens' LanguageTag (Maybe Text)
ltValue = lens _ltValue (\ s a -> s{_ltValue = a})
instance FromJSON LanguageTag where
parseJSON
= withObject "LanguageTag"
(\ o -> LanguageTag' <$> (o .:? "value"))
instance ToJSON LanguageTag where
toJSON LanguageTag'{..}
= object (catMaybes [("value" .=) <$> _ltValue])
data LiveChatPollOpenedDetails =
LiveChatPollOpenedDetails'
{ _lcpodPrompt :: !(Maybe Text)
, _lcpodItems :: !(Maybe [LiveChatPollItem])
, _lcpodId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatPollOpenedDetails
:: LiveChatPollOpenedDetails
liveChatPollOpenedDetails =
LiveChatPollOpenedDetails'
{_lcpodPrompt = Nothing, _lcpodItems = Nothing, _lcpodId = Nothing}
lcpodPrompt :: Lens' LiveChatPollOpenedDetails (Maybe Text)
lcpodPrompt
= lens _lcpodPrompt (\ s a -> s{_lcpodPrompt = a})
lcpodItems :: Lens' LiveChatPollOpenedDetails [LiveChatPollItem]
lcpodItems
= lens _lcpodItems (\ s a -> s{_lcpodItems = a}) .
_Default
. _Coerce
lcpodId :: Lens' LiveChatPollOpenedDetails (Maybe Text)
lcpodId = lens _lcpodId (\ s a -> s{_lcpodId = a})
instance FromJSON LiveChatPollOpenedDetails where
parseJSON
= withObject "LiveChatPollOpenedDetails"
(\ o ->
LiveChatPollOpenedDetails' <$>
(o .:? "prompt") <*> (o .:? "items" .!= mempty) <*>
(o .:? "id"))
instance ToJSON LiveChatPollOpenedDetails where
toJSON LiveChatPollOpenedDetails'{..}
= object
(catMaybes
[("prompt" .=) <$> _lcpodPrompt,
("items" .=) <$> _lcpodItems,
("id" .=) <$> _lcpodId])
data VideoFileDetailsVideoStream =
VideoFileDetailsVideoStream'
{ _vfdvsHeightPixels :: !(Maybe (Textual Word32))
, _vfdvsBitrateBps :: !(Maybe (Textual Word64))
, _vfdvsVendor :: !(Maybe Text)
, _vfdvsRotation :: !(Maybe VideoFileDetailsVideoStreamRotation)
, _vfdvsFrameRateFps :: !(Maybe (Textual Double))
, _vfdvsCodec :: !(Maybe Text)
, _vfdvsAspectRatio :: !(Maybe (Textual Double))
, _vfdvsWidthPixels :: !(Maybe (Textual Word32))
}
deriving (Eq, Show, Data, Typeable, Generic)
videoFileDetailsVideoStream
:: VideoFileDetailsVideoStream
videoFileDetailsVideoStream =
VideoFileDetailsVideoStream'
{ _vfdvsHeightPixels = Nothing
, _vfdvsBitrateBps = Nothing
, _vfdvsVendor = Nothing
, _vfdvsRotation = Nothing
, _vfdvsFrameRateFps = Nothing
, _vfdvsCodec = Nothing
, _vfdvsAspectRatio = Nothing
, _vfdvsWidthPixels = Nothing
}
vfdvsHeightPixels :: Lens' VideoFileDetailsVideoStream (Maybe Word32)
vfdvsHeightPixels
= lens _vfdvsHeightPixels
(\ s a -> s{_vfdvsHeightPixels = a})
. mapping _Coerce
vfdvsBitrateBps :: Lens' VideoFileDetailsVideoStream (Maybe Word64)
vfdvsBitrateBps
= lens _vfdvsBitrateBps
(\ s a -> s{_vfdvsBitrateBps = a})
. mapping _Coerce
vfdvsVendor :: Lens' VideoFileDetailsVideoStream (Maybe Text)
vfdvsVendor
= lens _vfdvsVendor (\ s a -> s{_vfdvsVendor = a})
vfdvsRotation :: Lens' VideoFileDetailsVideoStream (Maybe VideoFileDetailsVideoStreamRotation)
vfdvsRotation
= lens _vfdvsRotation
(\ s a -> s{_vfdvsRotation = a})
vfdvsFrameRateFps :: Lens' VideoFileDetailsVideoStream (Maybe Double)
vfdvsFrameRateFps
= lens _vfdvsFrameRateFps
(\ s a -> s{_vfdvsFrameRateFps = a})
. mapping _Coerce
vfdvsCodec :: Lens' VideoFileDetailsVideoStream (Maybe Text)
vfdvsCodec
= lens _vfdvsCodec (\ s a -> s{_vfdvsCodec = a})
vfdvsAspectRatio :: Lens' VideoFileDetailsVideoStream (Maybe Double)
vfdvsAspectRatio
= lens _vfdvsAspectRatio
(\ s a -> s{_vfdvsAspectRatio = a})
. mapping _Coerce
vfdvsWidthPixels :: Lens' VideoFileDetailsVideoStream (Maybe Word32)
vfdvsWidthPixels
= lens _vfdvsWidthPixels
(\ s a -> s{_vfdvsWidthPixels = a})
. mapping _Coerce
instance FromJSON VideoFileDetailsVideoStream where
parseJSON
= withObject "VideoFileDetailsVideoStream"
(\ o ->
VideoFileDetailsVideoStream' <$>
(o .:? "heightPixels") <*> (o .:? "bitrateBps") <*>
(o .:? "vendor")
<*> (o .:? "rotation")
<*> (o .:? "frameRateFps")
<*> (o .:? "codec")
<*> (o .:? "aspectRatio")
<*> (o .:? "widthPixels"))
instance ToJSON VideoFileDetailsVideoStream where
toJSON VideoFileDetailsVideoStream'{..}
= object
(catMaybes
[("heightPixels" .=) <$> _vfdvsHeightPixels,
("bitrateBps" .=) <$> _vfdvsBitrateBps,
("vendor" .=) <$> _vfdvsVendor,
("rotation" .=) <$> _vfdvsRotation,
("frameRateFps" .=) <$> _vfdvsFrameRateFps,
("codec" .=) <$> _vfdvsCodec,
("aspectRatio" .=) <$> _vfdvsAspectRatio,
("widthPixels" .=) <$> _vfdvsWidthPixels])
data ChannelConversionPing =
ChannelConversionPing'
{ _ccpContext :: !(Maybe ChannelConversionPingContext)
, _ccpConversionURL :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelConversionPing
:: ChannelConversionPing
channelConversionPing =
ChannelConversionPing' {_ccpContext = Nothing, _ccpConversionURL = Nothing}
ccpContext :: Lens' ChannelConversionPing (Maybe ChannelConversionPingContext)
ccpContext
= lens _ccpContext (\ s a -> s{_ccpContext = a})
ccpConversionURL :: Lens' ChannelConversionPing (Maybe Text)
ccpConversionURL
= lens _ccpConversionURL
(\ s a -> s{_ccpConversionURL = a})
instance FromJSON ChannelConversionPing where
parseJSON
= withObject "ChannelConversionPing"
(\ o ->
ChannelConversionPing' <$>
(o .:? "context") <*> (o .:? "conversionUrl"))
instance ToJSON ChannelConversionPing where
toJSON ChannelConversionPing'{..}
= object
(catMaybes
[("context" .=) <$> _ccpContext,
("conversionUrl" .=) <$> _ccpConversionURL])
data PlayListItem =
PlayListItem'
{ _pliStatus :: !(Maybe PlayListItemStatus)
, _pliEtag :: !(Maybe Text)
, _pliSnippet :: !(Maybe PlayListItemSnippet)
, _pliKind :: !Text
, _pliContentDetails :: !(Maybe PlayListItemContentDetails)
, _pliId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
playListItem
:: PlayListItem
playListItem =
PlayListItem'
{ _pliStatus = Nothing
, _pliEtag = Nothing
, _pliSnippet = Nothing
, _pliKind = "youtube#playlistItem"
, _pliContentDetails = Nothing
, _pliId = Nothing
}
pliStatus :: Lens' PlayListItem (Maybe PlayListItemStatus)
pliStatus
= lens _pliStatus (\ s a -> s{_pliStatus = a})
pliEtag :: Lens' PlayListItem (Maybe Text)
pliEtag = lens _pliEtag (\ s a -> s{_pliEtag = a})
pliSnippet :: Lens' PlayListItem (Maybe PlayListItemSnippet)
pliSnippet
= lens _pliSnippet (\ s a -> s{_pliSnippet = a})
pliKind :: Lens' PlayListItem Text
pliKind = lens _pliKind (\ s a -> s{_pliKind = a})
pliContentDetails :: Lens' PlayListItem (Maybe PlayListItemContentDetails)
pliContentDetails
= lens _pliContentDetails
(\ s a -> s{_pliContentDetails = a})
pliId :: Lens' PlayListItem (Maybe Text)
pliId = lens _pliId (\ s a -> s{_pliId = a})
instance FromJSON PlayListItem where
parseJSON
= withObject "PlayListItem"
(\ o ->
PlayListItem' <$>
(o .:? "status") <*> (o .:? "etag") <*>
(o .:? "snippet")
<*> (o .:? "kind" .!= "youtube#playlistItem")
<*> (o .:? "contentDetails")
<*> (o .:? "id"))
instance ToJSON PlayListItem where
toJSON PlayListItem'{..}
= object
(catMaybes
[("status" .=) <$> _pliStatus,
("etag" .=) <$> _pliEtag,
("snippet" .=) <$> _pliSnippet,
Just ("kind" .= _pliKind),
("contentDetails" .=) <$> _pliContentDetails,
("id" .=) <$> _pliId])
data GuideCategoryListResponse =
GuideCategoryListResponse'
{ _gclrEtag :: !(Maybe Text)
, _gclrTokenPagination :: !(Maybe TokenPagination)
, _gclrNextPageToken :: !(Maybe Text)
, _gclrPageInfo :: !(Maybe PageInfo)
, _gclrKind :: !Text
, _gclrItems :: !(Maybe [GuideCategory])
, _gclrVisitorId :: !(Maybe Text)
, _gclrEventId :: !(Maybe Text)
, _gclrPrevPageToken :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
guideCategoryListResponse
:: GuideCategoryListResponse
guideCategoryListResponse =
GuideCategoryListResponse'
{ _gclrEtag = Nothing
, _gclrTokenPagination = Nothing
, _gclrNextPageToken = Nothing
, _gclrPageInfo = Nothing
, _gclrKind = "youtube#guideCategoryListResponse"
, _gclrItems = Nothing
, _gclrVisitorId = Nothing
, _gclrEventId = Nothing
, _gclrPrevPageToken = Nothing
}
gclrEtag :: Lens' GuideCategoryListResponse (Maybe Text)
gclrEtag = lens _gclrEtag (\ s a -> s{_gclrEtag = a})
gclrTokenPagination :: Lens' GuideCategoryListResponse (Maybe TokenPagination)
gclrTokenPagination
= lens _gclrTokenPagination
(\ s a -> s{_gclrTokenPagination = a})
gclrNextPageToken :: Lens' GuideCategoryListResponse (Maybe Text)
gclrNextPageToken
= lens _gclrNextPageToken
(\ s a -> s{_gclrNextPageToken = a})
gclrPageInfo :: Lens' GuideCategoryListResponse (Maybe PageInfo)
gclrPageInfo
= lens _gclrPageInfo (\ s a -> s{_gclrPageInfo = a})
gclrKind :: Lens' GuideCategoryListResponse Text
gclrKind = lens _gclrKind (\ s a -> s{_gclrKind = a})
gclrItems :: Lens' GuideCategoryListResponse [GuideCategory]
gclrItems
= lens _gclrItems (\ s a -> s{_gclrItems = a}) .
_Default
. _Coerce
gclrVisitorId :: Lens' GuideCategoryListResponse (Maybe Text)
gclrVisitorId
= lens _gclrVisitorId
(\ s a -> s{_gclrVisitorId = a})
gclrEventId :: Lens' GuideCategoryListResponse (Maybe Text)
gclrEventId
= lens _gclrEventId (\ s a -> s{_gclrEventId = a})
gclrPrevPageToken :: Lens' GuideCategoryListResponse (Maybe Text)
gclrPrevPageToken
= lens _gclrPrevPageToken
(\ s a -> s{_gclrPrevPageToken = a})
instance FromJSON GuideCategoryListResponse where
parseJSON
= withObject "GuideCategoryListResponse"
(\ o ->
GuideCategoryListResponse' <$>
(o .:? "etag") <*> (o .:? "tokenPagination") <*>
(o .:? "nextPageToken")
<*> (o .:? "pageInfo")
<*>
(o .:? "kind" .!=
"youtube#guideCategoryListResponse")
<*> (o .:? "items" .!= mempty)
<*> (o .:? "visitorId")
<*> (o .:? "eventId")
<*> (o .:? "prevPageToken"))
instance ToJSON GuideCategoryListResponse where
toJSON GuideCategoryListResponse'{..}
= object
(catMaybes
[("etag" .=) <$> _gclrEtag,
("tokenPagination" .=) <$> _gclrTokenPagination,
("nextPageToken" .=) <$> _gclrNextPageToken,
("pageInfo" .=) <$> _gclrPageInfo,
Just ("kind" .= _gclrKind),
("items" .=) <$> _gclrItems,
("visitorId" .=) <$> _gclrVisitorId,
("eventId" .=) <$> _gclrEventId,
("prevPageToken" .=) <$> _gclrPrevPageToken])
data CaptionSnippet =
CaptionSnippet'
{ _csFailureReason :: !(Maybe CaptionSnippetFailureReason)
, _csStatus :: !(Maybe CaptionSnippetStatus)
, _csLastUpdated :: !(Maybe DateTime')
, _csTrackKind :: !(Maybe CaptionSnippetTrackKind)
, _csIsDraft :: !(Maybe Bool)
, _csIsCC :: !(Maybe Bool)
, _csVideoId :: !(Maybe Text)
, _csName :: !(Maybe Text)
, _csIsLarge :: !(Maybe Bool)
, _csLanguage :: !(Maybe Text)
, _csIsAutoSynced :: !(Maybe Bool)
, _csIsEasyReader :: !(Maybe Bool)
, _csAudioTrackType :: !(Maybe CaptionSnippetAudioTrackType)
}
deriving (Eq, Show, Data, Typeable, Generic)
captionSnippet
:: CaptionSnippet
captionSnippet =
CaptionSnippet'
{ _csFailureReason = Nothing
, _csStatus = Nothing
, _csLastUpdated = Nothing
, _csTrackKind = Nothing
, _csIsDraft = Nothing
, _csIsCC = Nothing
, _csVideoId = Nothing
, _csName = Nothing
, _csIsLarge = Nothing
, _csLanguage = Nothing
, _csIsAutoSynced = Nothing
, _csIsEasyReader = Nothing
, _csAudioTrackType = Nothing
}
csFailureReason :: Lens' CaptionSnippet (Maybe CaptionSnippetFailureReason)
csFailureReason
= lens _csFailureReason
(\ s a -> s{_csFailureReason = a})
csStatus :: Lens' CaptionSnippet (Maybe CaptionSnippetStatus)
csStatus = lens _csStatus (\ s a -> s{_csStatus = a})
csLastUpdated :: Lens' CaptionSnippet (Maybe UTCTime)
csLastUpdated
= lens _csLastUpdated
(\ s a -> s{_csLastUpdated = a})
. mapping _DateTime
csTrackKind :: Lens' CaptionSnippet (Maybe CaptionSnippetTrackKind)
csTrackKind
= lens _csTrackKind (\ s a -> s{_csTrackKind = a})
csIsDraft :: Lens' CaptionSnippet (Maybe Bool)
csIsDraft
= lens _csIsDraft (\ s a -> s{_csIsDraft = a})
csIsCC :: Lens' CaptionSnippet (Maybe Bool)
csIsCC = lens _csIsCC (\ s a -> s{_csIsCC = a})
csVideoId :: Lens' CaptionSnippet (Maybe Text)
csVideoId
= lens _csVideoId (\ s a -> s{_csVideoId = a})
csName :: Lens' CaptionSnippet (Maybe Text)
csName = lens _csName (\ s a -> s{_csName = a})
csIsLarge :: Lens' CaptionSnippet (Maybe Bool)
csIsLarge
= lens _csIsLarge (\ s a -> s{_csIsLarge = a})
csLanguage :: Lens' CaptionSnippet (Maybe Text)
csLanguage
= lens _csLanguage (\ s a -> s{_csLanguage = a})
csIsAutoSynced :: Lens' CaptionSnippet (Maybe Bool)
csIsAutoSynced
= lens _csIsAutoSynced
(\ s a -> s{_csIsAutoSynced = a})
csIsEasyReader :: Lens' CaptionSnippet (Maybe Bool)
csIsEasyReader
= lens _csIsEasyReader
(\ s a -> s{_csIsEasyReader = a})
csAudioTrackType :: Lens' CaptionSnippet (Maybe CaptionSnippetAudioTrackType)
csAudioTrackType
= lens _csAudioTrackType
(\ s a -> s{_csAudioTrackType = a})
instance FromJSON CaptionSnippet where
parseJSON
= withObject "CaptionSnippet"
(\ o ->
CaptionSnippet' <$>
(o .:? "failureReason") <*> (o .:? "status") <*>
(o .:? "lastUpdated")
<*> (o .:? "trackKind")
<*> (o .:? "isDraft")
<*> (o .:? "isCC")
<*> (o .:? "videoId")
<*> (o .:? "name")
<*> (o .:? "isLarge")
<*> (o .:? "language")
<*> (o .:? "isAutoSynced")
<*> (o .:? "isEasyReader")
<*> (o .:? "audioTrackType"))
instance ToJSON CaptionSnippet where
toJSON CaptionSnippet'{..}
= object
(catMaybes
[("failureReason" .=) <$> _csFailureReason,
("status" .=) <$> _csStatus,
("lastUpdated" .=) <$> _csLastUpdated,
("trackKind" .=) <$> _csTrackKind,
("isDraft" .=) <$> _csIsDraft,
("isCC" .=) <$> _csIsCC,
("videoId" .=) <$> _csVideoId,
("name" .=) <$> _csName,
("isLarge" .=) <$> _csIsLarge,
("language" .=) <$> _csLanguage,
("isAutoSynced" .=) <$> _csIsAutoSynced,
("isEasyReader" .=) <$> _csIsEasyReader,
("audioTrackType" .=) <$> _csAudioTrackType])
data Comment =
Comment'
{ _ccEtag :: !(Maybe Text)
, _ccSnippet :: !(Maybe CommentSnippet)
, _ccKind :: !Text
, _ccId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
comment
:: Comment
comment =
Comment'
{ _ccEtag = Nothing
, _ccSnippet = Nothing
, _ccKind = "youtube#comment"
, _ccId = Nothing
}
ccEtag :: Lens' Comment (Maybe Text)
ccEtag = lens _ccEtag (\ s a -> s{_ccEtag = a})
ccSnippet :: Lens' Comment (Maybe CommentSnippet)
ccSnippet
= lens _ccSnippet (\ s a -> s{_ccSnippet = a})
ccKind :: Lens' Comment Text
ccKind = lens _ccKind (\ s a -> s{_ccKind = a})
ccId :: Lens' Comment (Maybe Text)
ccId = lens _ccId (\ s a -> s{_ccId = a})
instance FromJSON Comment where
parseJSON
= withObject "Comment"
(\ o ->
Comment' <$>
(o .:? "etag") <*> (o .:? "snippet") <*>
(o .:? "kind" .!= "youtube#comment")
<*> (o .:? "id"))
instance ToJSON Comment where
toJSON Comment'{..}
= object
(catMaybes
[("etag" .=) <$> _ccEtag,
("snippet" .=) <$> _ccSnippet,
Just ("kind" .= _ccKind), ("id" .=) <$> _ccId])
data I18nRegionSnippet =
I18nRegionSnippet'
{ _irsName :: !(Maybe Text)
, _irsGl :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
i18nRegionSnippet
:: I18nRegionSnippet
i18nRegionSnippet = I18nRegionSnippet' {_irsName = Nothing, _irsGl = Nothing}
irsName :: Lens' I18nRegionSnippet (Maybe Text)
irsName = lens _irsName (\ s a -> s{_irsName = a})
irsGl :: Lens' I18nRegionSnippet (Maybe Text)
irsGl = lens _irsGl (\ s a -> s{_irsGl = a})
instance FromJSON I18nRegionSnippet where
parseJSON
= withObject "I18nRegionSnippet"
(\ o ->
I18nRegionSnippet' <$>
(o .:? "name") <*> (o .:? "gl"))
instance ToJSON I18nRegionSnippet where
toJSON I18nRegionSnippet'{..}
= object
(catMaybes
[("name" .=) <$> _irsName, ("gl" .=) <$> _irsGl])
data Subscription =
Subscription'
{ _ssEtag :: !(Maybe Text)
, _ssSubscriberSnippet :: !(Maybe SubscriptionSubscriberSnippet)
, _ssSnippet :: !(Maybe SubscriptionSnippet)
, _ssKind :: !Text
, _ssContentDetails :: !(Maybe SubscriptionContentDetails)
, _ssId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
subscription
:: Subscription
subscription =
Subscription'
{ _ssEtag = Nothing
, _ssSubscriberSnippet = Nothing
, _ssSnippet = Nothing
, _ssKind = "youtube#subscription"
, _ssContentDetails = Nothing
, _ssId = Nothing
}
ssEtag :: Lens' Subscription (Maybe Text)
ssEtag = lens _ssEtag (\ s a -> s{_ssEtag = a})
ssSubscriberSnippet :: Lens' Subscription (Maybe SubscriptionSubscriberSnippet)
ssSubscriberSnippet
= lens _ssSubscriberSnippet
(\ s a -> s{_ssSubscriberSnippet = a})
ssSnippet :: Lens' Subscription (Maybe SubscriptionSnippet)
ssSnippet
= lens _ssSnippet (\ s a -> s{_ssSnippet = a})
ssKind :: Lens' Subscription Text
ssKind = lens _ssKind (\ s a -> s{_ssKind = a})
ssContentDetails :: Lens' Subscription (Maybe SubscriptionContentDetails)
ssContentDetails
= lens _ssContentDetails
(\ s a -> s{_ssContentDetails = a})
ssId :: Lens' Subscription (Maybe Text)
ssId = lens _ssId (\ s a -> s{_ssId = a})
instance FromJSON Subscription where
parseJSON
= withObject "Subscription"
(\ o ->
Subscription' <$>
(o .:? "etag") <*> (o .:? "subscriberSnippet") <*>
(o .:? "snippet")
<*> (o .:? "kind" .!= "youtube#subscription")
<*> (o .:? "contentDetails")
<*> (o .:? "id"))
instance ToJSON Subscription where
toJSON Subscription'{..}
= object
(catMaybes
[("etag" .=) <$> _ssEtag,
("subscriberSnippet" .=) <$> _ssSubscriberSnippet,
("snippet" .=) <$> _ssSnippet,
Just ("kind" .= _ssKind),
("contentDetails" .=) <$> _ssContentDetails,
("id" .=) <$> _ssId])
data VideoRecordingDetails =
VideoRecordingDetails'
{ _vrdLocation :: !(Maybe GeoPoint)
, _vrdLocationDescription :: !(Maybe Text)
, _vrdRecordingDate :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
videoRecordingDetails
:: VideoRecordingDetails
videoRecordingDetails =
VideoRecordingDetails'
{ _vrdLocation = Nothing
, _vrdLocationDescription = Nothing
, _vrdRecordingDate = Nothing
}
vrdLocation :: Lens' VideoRecordingDetails (Maybe GeoPoint)
vrdLocation
= lens _vrdLocation (\ s a -> s{_vrdLocation = a})
vrdLocationDescription :: Lens' VideoRecordingDetails (Maybe Text)
vrdLocationDescription
= lens _vrdLocationDescription
(\ s a -> s{_vrdLocationDescription = a})
vrdRecordingDate :: Lens' VideoRecordingDetails (Maybe UTCTime)
vrdRecordingDate
= lens _vrdRecordingDate
(\ s a -> s{_vrdRecordingDate = a})
. mapping _DateTime
instance FromJSON VideoRecordingDetails where
parseJSON
= withObject "VideoRecordingDetails"
(\ o ->
VideoRecordingDetails' <$>
(o .:? "location") <*> (o .:? "locationDescription")
<*> (o .:? "recordingDate"))
instance ToJSON VideoRecordingDetails where
toJSON VideoRecordingDetails'{..}
= object
(catMaybes
[("location" .=) <$> _vrdLocation,
("locationDescription" .=) <$>
_vrdLocationDescription,
("recordingDate" .=) <$> _vrdRecordingDate])
data VideoRating =
VideoRating'
{ _vRating :: !(Maybe VideoRatingRating)
, _vVideoId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoRating
:: VideoRating
videoRating = VideoRating' {_vRating = Nothing, _vVideoId = Nothing}
vRating :: Lens' VideoRating (Maybe VideoRatingRating)
vRating = lens _vRating (\ s a -> s{_vRating = a})
vVideoId :: Lens' VideoRating (Maybe Text)
vVideoId = lens _vVideoId (\ s a -> s{_vVideoId = a})
instance FromJSON VideoRating where
parseJSON
= withObject "VideoRating"
(\ o ->
VideoRating' <$>
(o .:? "rating") <*> (o .:? "videoId"))
instance ToJSON VideoRating where
toJSON VideoRating'{..}
= object
(catMaybes
[("rating" .=) <$> _vRating,
("videoId" .=) <$> _vVideoId])
data CommentSnippet =
CommentSnippet'
{ _cViewerRating :: !(Maybe CommentSnippetViewerRating)
, _cPublishedAt :: !(Maybe DateTime')
, _cAuthorChannelURL :: !(Maybe Text)
, _cModerationStatus :: !(Maybe CommentSnippetModerationStatus)
, _cLikeCount :: !(Maybe (Textual Word32))
, _cChannelId :: !(Maybe Text)
, _cTextOriginal :: !(Maybe Text)
, _cVideoId :: !(Maybe Text)
, _cTextDisplay :: !(Maybe Text)
, _cAuthorProFileImageURL :: !(Maybe Text)
, _cAuthorDisplayName :: !(Maybe Text)
, _cUpdatedAt :: !(Maybe DateTime')
, _cAuthorChannelId :: !(Maybe JSONValue)
, _cCanRate :: !(Maybe Bool)
, _cParentId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
commentSnippet
:: CommentSnippet
commentSnippet =
CommentSnippet'
{ _cViewerRating = Nothing
, _cPublishedAt = Nothing
, _cAuthorChannelURL = Nothing
, _cModerationStatus = Nothing
, _cLikeCount = Nothing
, _cChannelId = Nothing
, _cTextOriginal = Nothing
, _cVideoId = Nothing
, _cTextDisplay = Nothing
, _cAuthorProFileImageURL = Nothing
, _cAuthorDisplayName = Nothing
, _cUpdatedAt = Nothing
, _cAuthorChannelId = Nothing
, _cCanRate = Nothing
, _cParentId = Nothing
}
cViewerRating :: Lens' CommentSnippet (Maybe CommentSnippetViewerRating)
cViewerRating
= lens _cViewerRating
(\ s a -> s{_cViewerRating = a})
cPublishedAt :: Lens' CommentSnippet (Maybe UTCTime)
cPublishedAt
= lens _cPublishedAt (\ s a -> s{_cPublishedAt = a})
. mapping _DateTime
cAuthorChannelURL :: Lens' CommentSnippet (Maybe Text)
cAuthorChannelURL
= lens _cAuthorChannelURL
(\ s a -> s{_cAuthorChannelURL = a})
cModerationStatus :: Lens' CommentSnippet (Maybe CommentSnippetModerationStatus)
cModerationStatus
= lens _cModerationStatus
(\ s a -> s{_cModerationStatus = a})
cLikeCount :: Lens' CommentSnippet (Maybe Word32)
cLikeCount
= lens _cLikeCount (\ s a -> s{_cLikeCount = a}) .
mapping _Coerce
cChannelId :: Lens' CommentSnippet (Maybe Text)
cChannelId
= lens _cChannelId (\ s a -> s{_cChannelId = a})
cTextOriginal :: Lens' CommentSnippet (Maybe Text)
cTextOriginal
= lens _cTextOriginal
(\ s a -> s{_cTextOriginal = a})
cVideoId :: Lens' CommentSnippet (Maybe Text)
cVideoId = lens _cVideoId (\ s a -> s{_cVideoId = a})
cTextDisplay :: Lens' CommentSnippet (Maybe Text)
cTextDisplay
= lens _cTextDisplay (\ s a -> s{_cTextDisplay = a})
cAuthorProFileImageURL :: Lens' CommentSnippet (Maybe Text)
cAuthorProFileImageURL
= lens _cAuthorProFileImageURL
(\ s a -> s{_cAuthorProFileImageURL = a})
cAuthorDisplayName :: Lens' CommentSnippet (Maybe Text)
cAuthorDisplayName
= lens _cAuthorDisplayName
(\ s a -> s{_cAuthorDisplayName = a})
cUpdatedAt :: Lens' CommentSnippet (Maybe UTCTime)
cUpdatedAt
= lens _cUpdatedAt (\ s a -> s{_cUpdatedAt = a}) .
mapping _DateTime
cAuthorChannelId :: Lens' CommentSnippet (Maybe JSONValue)
cAuthorChannelId
= lens _cAuthorChannelId
(\ s a -> s{_cAuthorChannelId = a})
cCanRate :: Lens' CommentSnippet (Maybe Bool)
cCanRate = lens _cCanRate (\ s a -> s{_cCanRate = a})
cParentId :: Lens' CommentSnippet (Maybe Text)
cParentId
= lens _cParentId (\ s a -> s{_cParentId = a})
instance FromJSON CommentSnippet where
parseJSON
= withObject "CommentSnippet"
(\ o ->
CommentSnippet' <$>
(o .:? "viewerRating") <*> (o .:? "publishedAt") <*>
(o .:? "authorChannelUrl")
<*> (o .:? "moderationStatus")
<*> (o .:? "likeCount")
<*> (o .:? "channelId")
<*> (o .:? "textOriginal")
<*> (o .:? "videoId")
<*> (o .:? "textDisplay")
<*> (o .:? "authorProfileImageUrl")
<*> (o .:? "authorDisplayName")
<*> (o .:? "updatedAt")
<*> (o .:? "authorChannelId")
<*> (o .:? "canRate")
<*> (o .:? "parentId"))
instance ToJSON CommentSnippet where
toJSON CommentSnippet'{..}
= object
(catMaybes
[("viewerRating" .=) <$> _cViewerRating,
("publishedAt" .=) <$> _cPublishedAt,
("authorChannelUrl" .=) <$> _cAuthorChannelURL,
("moderationStatus" .=) <$> _cModerationStatus,
("likeCount" .=) <$> _cLikeCount,
("channelId" .=) <$> _cChannelId,
("textOriginal" .=) <$> _cTextOriginal,
("videoId" .=) <$> _cVideoId,
("textDisplay" .=) <$> _cTextDisplay,
("authorProfileImageUrl" .=) <$>
_cAuthorProFileImageURL,
("authorDisplayName" .=) <$> _cAuthorDisplayName,
("updatedAt" .=) <$> _cUpdatedAt,
("authorChannelId" .=) <$> _cAuthorChannelId,
("canRate" .=) <$> _cCanRate,
("parentId" .=) <$> _cParentId])
data LiveStreamStatus =
LiveStreamStatus'
{ _lssStreamStatus :: !(Maybe LiveStreamStatusStreamStatus)
, _lssHealthStatus :: !(Maybe LiveStreamHealthStatus)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveStreamStatus
:: LiveStreamStatus
liveStreamStatus =
LiveStreamStatus' {_lssStreamStatus = Nothing, _lssHealthStatus = Nothing}
lssStreamStatus :: Lens' LiveStreamStatus (Maybe LiveStreamStatusStreamStatus)
lssStreamStatus
= lens _lssStreamStatus
(\ s a -> s{_lssStreamStatus = a})
lssHealthStatus :: Lens' LiveStreamStatus (Maybe LiveStreamHealthStatus)
lssHealthStatus
= lens _lssHealthStatus
(\ s a -> s{_lssHealthStatus = a})
instance FromJSON LiveStreamStatus where
parseJSON
= withObject "LiveStreamStatus"
(\ o ->
LiveStreamStatus' <$>
(o .:? "streamStatus") <*> (o .:? "healthStatus"))
instance ToJSON LiveStreamStatus where
toJSON LiveStreamStatus'{..}
= object
(catMaybes
[("streamStatus" .=) <$> _lssStreamStatus,
("healthStatus" .=) <$> _lssHealthStatus])
data VideoSuggestions =
VideoSuggestions'
{ _vsProcessingErrors :: !(Maybe [VideoSuggestionsProcessingErrorsItem])
, _vsProcessingHints :: !(Maybe [VideoSuggestionsProcessingHintsItem])
, _vsEditorSuggestions :: !(Maybe [VideoSuggestionsEditorSuggestionsItem])
, _vsProcessingWarnings :: !(Maybe [VideoSuggestionsProcessingWarningsItem])
, _vsTagSuggestions :: !(Maybe [VideoSuggestionsTagSuggestion])
}
deriving (Eq, Show, Data, Typeable, Generic)
videoSuggestions
:: VideoSuggestions
videoSuggestions =
VideoSuggestions'
{ _vsProcessingErrors = Nothing
, _vsProcessingHints = Nothing
, _vsEditorSuggestions = Nothing
, _vsProcessingWarnings = Nothing
, _vsTagSuggestions = Nothing
}
vsProcessingErrors :: Lens' VideoSuggestions [VideoSuggestionsProcessingErrorsItem]
vsProcessingErrors
= lens _vsProcessingErrors
(\ s a -> s{_vsProcessingErrors = a})
. _Default
. _Coerce
vsProcessingHints :: Lens' VideoSuggestions [VideoSuggestionsProcessingHintsItem]
vsProcessingHints
= lens _vsProcessingHints
(\ s a -> s{_vsProcessingHints = a})
. _Default
. _Coerce
vsEditorSuggestions :: Lens' VideoSuggestions [VideoSuggestionsEditorSuggestionsItem]
vsEditorSuggestions
= lens _vsEditorSuggestions
(\ s a -> s{_vsEditorSuggestions = a})
. _Default
. _Coerce
vsProcessingWarnings :: Lens' VideoSuggestions [VideoSuggestionsProcessingWarningsItem]
vsProcessingWarnings
= lens _vsProcessingWarnings
(\ s a -> s{_vsProcessingWarnings = a})
. _Default
. _Coerce
vsTagSuggestions :: Lens' VideoSuggestions [VideoSuggestionsTagSuggestion]
vsTagSuggestions
= lens _vsTagSuggestions
(\ s a -> s{_vsTagSuggestions = a})
. _Default
. _Coerce
instance FromJSON VideoSuggestions where
parseJSON
= withObject "VideoSuggestions"
(\ o ->
VideoSuggestions' <$>
(o .:? "processingErrors" .!= mempty) <*>
(o .:? "processingHints" .!= mempty)
<*> (o .:? "editorSuggestions" .!= mempty)
<*> (o .:? "processingWarnings" .!= mempty)
<*> (o .:? "tagSuggestions" .!= mempty))
instance ToJSON VideoSuggestions where
toJSON VideoSuggestions'{..}
= object
(catMaybes
[("processingErrors" .=) <$> _vsProcessingErrors,
("processingHints" .=) <$> _vsProcessingHints,
("editorSuggestions" .=) <$> _vsEditorSuggestions,
("processingWarnings" .=) <$> _vsProcessingWarnings,
("tagSuggestions" .=) <$> _vsTagSuggestions])
data PlayListItemSnippet =
PlayListItemSnippet'
{ _plisResourceId :: !(Maybe ResourceId)
, _plisPublishedAt :: !(Maybe DateTime')
, _plisChannelTitle :: !(Maybe Text)
, _plisChannelId :: !(Maybe Text)
, _plisThumbnails :: !(Maybe ThumbnailDetails)
, _plisTitle :: !(Maybe Text)
, _plisPlayListId :: !(Maybe Text)
, _plisDescription :: !(Maybe Text)
, _plisPosition :: !(Maybe (Textual Word32))
}
deriving (Eq, Show, Data, Typeable, Generic)
playListItemSnippet
:: PlayListItemSnippet
playListItemSnippet =
PlayListItemSnippet'
{ _plisResourceId = Nothing
, _plisPublishedAt = Nothing
, _plisChannelTitle = Nothing
, _plisChannelId = Nothing
, _plisThumbnails = Nothing
, _plisTitle = Nothing
, _plisPlayListId = Nothing
, _plisDescription = Nothing
, _plisPosition = Nothing
}
plisResourceId :: Lens' PlayListItemSnippet (Maybe ResourceId)
plisResourceId
= lens _plisResourceId
(\ s a -> s{_plisResourceId = a})
plisPublishedAt :: Lens' PlayListItemSnippet (Maybe UTCTime)
plisPublishedAt
= lens _plisPublishedAt
(\ s a -> s{_plisPublishedAt = a})
. mapping _DateTime
plisChannelTitle :: Lens' PlayListItemSnippet (Maybe Text)
plisChannelTitle
= lens _plisChannelTitle
(\ s a -> s{_plisChannelTitle = a})
plisChannelId :: Lens' PlayListItemSnippet (Maybe Text)
plisChannelId
= lens _plisChannelId
(\ s a -> s{_plisChannelId = a})
plisThumbnails :: Lens' PlayListItemSnippet (Maybe ThumbnailDetails)
plisThumbnails
= lens _plisThumbnails
(\ s a -> s{_plisThumbnails = a})
plisTitle :: Lens' PlayListItemSnippet (Maybe Text)
plisTitle
= lens _plisTitle (\ s a -> s{_plisTitle = a})
plisPlayListId :: Lens' PlayListItemSnippet (Maybe Text)
plisPlayListId
= lens _plisPlayListId
(\ s a -> s{_plisPlayListId = a})
plisDescription :: Lens' PlayListItemSnippet (Maybe Text)
plisDescription
= lens _plisDescription
(\ s a -> s{_plisDescription = a})
plisPosition :: Lens' PlayListItemSnippet (Maybe Word32)
plisPosition
= lens _plisPosition (\ s a -> s{_plisPosition = a})
. mapping _Coerce
instance FromJSON PlayListItemSnippet where
parseJSON
= withObject "PlayListItemSnippet"
(\ o ->
PlayListItemSnippet' <$>
(o .:? "resourceId") <*> (o .:? "publishedAt") <*>
(o .:? "channelTitle")
<*> (o .:? "channelId")
<*> (o .:? "thumbnails")
<*> (o .:? "title")
<*> (o .:? "playlistId")
<*> (o .:? "description")
<*> (o .:? "position"))
instance ToJSON PlayListItemSnippet where
toJSON PlayListItemSnippet'{..}
= object
(catMaybes
[("resourceId" .=) <$> _plisResourceId,
("publishedAt" .=) <$> _plisPublishedAt,
("channelTitle" .=) <$> _plisChannelTitle,
("channelId" .=) <$> _plisChannelId,
("thumbnails" .=) <$> _plisThumbnails,
("title" .=) <$> _plisTitle,
("playlistId" .=) <$> _plisPlayListId,
("description" .=) <$> _plisDescription,
("position" .=) <$> _plisPosition])
newtype VideoProjectDetails =
VideoProjectDetails'
{ _vpdTags :: Maybe [Text]
}
deriving (Eq, Show, Data, Typeable, Generic)
videoProjectDetails
:: VideoProjectDetails
videoProjectDetails = VideoProjectDetails' {_vpdTags = Nothing}
vpdTags :: Lens' VideoProjectDetails [Text]
vpdTags
= lens _vpdTags (\ s a -> s{_vpdTags = a}) . _Default
. _Coerce
instance FromJSON VideoProjectDetails where
parseJSON
= withObject "VideoProjectDetails"
(\ o ->
VideoProjectDetails' <$> (o .:? "tags" .!= mempty))
instance ToJSON VideoProjectDetails where
toJSON VideoProjectDetails'{..}
= object (catMaybes [("tags" .=) <$> _vpdTags])
data ContentRating =
ContentRating'
{ _crFpbRatingReasons :: !(Maybe [ContentRatingFpbRatingReasonsItem])
, _crPefilmRating :: !(Maybe ContentRatingPefilmRating)
, _crCccRating :: !(Maybe ContentRatingCccRating)
, _crAnatelRating :: !(Maybe ContentRatingAnatelRating)
, _crMpaaRating :: !(Maybe ContentRatingMpaaRating)
, _crCceRating :: !(Maybe ContentRatingCceRating)
, _crMccaaRating :: !(Maybe ContentRatingMccaaRating)
, _crChfilmRating :: !(Maybe ContentRatingChfilmRating)
, _crIcaaRating :: !(Maybe ContentRatingIcaaRating)
, _crFcbmRating :: !(Maybe ContentRatingFcbmRating)
, _crBmukkRating :: !(Maybe ContentRatingBmukkRating)
, _crMoctwRating :: !(Maybe ContentRatingMoctwRating)
, _crNfvcbRating :: !(Maybe ContentRatingNfvcbRating)
, _crDjctqRatingReasons :: !(Maybe [ContentRatingDjctqRatingReasonsItem])
, _crAgcomRating :: !(Maybe ContentRatingAgcomRating)
, _crCnaRating :: !(Maybe ContentRatingCnaRating)
, _crCatvfrRating :: !(Maybe ContentRatingCatvfrRating)
, _crCbfcRating :: !(Maybe ContentRatingCbfcRating)
, _crKfcbRating :: !(Maybe ContentRatingKfcbRating)
, _crSmsaRating :: !(Maybe ContentRatingSmsaRating)
, _crChvrsRating :: !(Maybe ContentRatingChvrsRating)
, _crIncaaRating :: !(Maybe ContentRatingIncaaRating)
, _crMcstRating :: !(Maybe ContentRatingMcstRating)
, _crNfrcRating :: !(Maybe ContentRatingNfrcRating)
, _crCsaRating :: !(Maybe ContentRatingCsaRating)
, _crMocRating :: !(Maybe ContentRatingMocRating)
, _crEirinRating :: !(Maybe ContentRatingEirinRating)
, _crFskRating :: !(Maybe ContentRatingFskRating)
, _crEefilmRating :: !(Maybe ContentRatingEefilmRating)
, _crRcnofRating :: !(Maybe ContentRatingRcnofRating)
, _crMekuRating :: !(Maybe ContentRatingMekuRating)
, _crIlfilmRating :: !(Maybe ContentRatingIlfilmRating)
, _crIfcoRating :: !(Maybe ContentRatingIfcoRating)
, _crNbcplRating :: !(Maybe ContentRatingNbcplRating)
, _crGrfilmRating :: !(Maybe ContentRatingGrfilmRating)
, _crRteRating :: !(Maybe ContentRatingRteRating)
, _crAcbRating :: !(Maybe ContentRatingAcbRating)
, _crCatvRating :: !(Maybe ContentRatingCatvRating)
, _crMdaRating :: !(Maybe ContentRatingMdaRating)
, _crDjctqRating :: !(Maybe ContentRatingDjctqRating)
, _crSmaisRating :: !(Maybe ContentRatingSmaisRating)
, _crCscfRating :: !(Maybe ContentRatingCscfRating)
, _crTvpgRating :: !(Maybe ContentRatingTvpgRating)
, _crRtcRating :: !(Maybe ContentRatingRtcRating)
, _crYtRating :: !(Maybe ContentRatingYtRating)
, _crBbfcRating :: !(Maybe ContentRatingBbfcRating)
, _crMenaMpaaRating :: !(Maybe ContentRatingMenaMpaaRating)
, _crKijkwijzerRating :: !(Maybe ContentRatingKijkwijzerRating)
, _crMtrcbRating :: !(Maybe ContentRatingMtrcbRating)
, _crFcoRating :: !(Maybe ContentRatingFcoRating)
, _crCicfRating :: !(Maybe ContentRatingCicfRating)
, _crCzfilmRating :: !(Maybe ContentRatingCzfilmRating)
, _crNbcRating :: !(Maybe ContentRatingNbcRating)
, _crFmocRating :: !(Maybe ContentRatingFmocRating)
, _crRussiaRating :: !(Maybe ContentRatingRussiaRating)
, _crEgfilmRating :: !(Maybe ContentRatingEgfilmRating)
, _crResorteviolenciaRating :: !(Maybe ContentRatingResorteviolenciaRating)
, _crMibacRating :: !(Maybe ContentRatingMibacRating)
, _crMedietilsynetRating :: !(Maybe ContentRatingMedietilsynetRating)
, _crMccypRating :: !(Maybe ContentRatingMccypRating)
, _crNkclvRating :: !(Maybe ContentRatingNkclvRating)
, _crFpbRating :: !(Maybe ContentRatingFpbRating)
, _crLsfRating :: !(Maybe ContentRatingLsfRating)
, _crBfvcRating :: !(Maybe ContentRatingBfvcRating)
, _crMpaatRating :: !(Maybe ContentRatingMpaatRating)
, _crEcbmctRating :: !(Maybe ContentRatingEcbmctRating)
, _crCNCRating :: !(Maybe ContentRatingCNCRating)
, _crSkfilmRating :: !(Maybe ContentRatingSkfilmRating)
, _crOflcRating :: !(Maybe ContentRatingOflcRating)
, _crKmrbRating :: !(Maybe ContentRatingKmrbRating)
}
deriving (Eq, Show, Data, Typeable, Generic)
contentRating
:: ContentRating
contentRating =
ContentRating'
{ _crFpbRatingReasons = Nothing
, _crPefilmRating = Nothing
, _crCccRating = Nothing
, _crAnatelRating = Nothing
, _crMpaaRating = Nothing
, _crCceRating = Nothing
, _crMccaaRating = Nothing
, _crChfilmRating = Nothing
, _crIcaaRating = Nothing
, _crFcbmRating = Nothing
, _crBmukkRating = Nothing
, _crMoctwRating = Nothing
, _crNfvcbRating = Nothing
, _crDjctqRatingReasons = Nothing
, _crAgcomRating = Nothing
, _crCnaRating = Nothing
, _crCatvfrRating = Nothing
, _crCbfcRating = Nothing
, _crKfcbRating = Nothing
, _crSmsaRating = Nothing
, _crChvrsRating = Nothing
, _crIncaaRating = Nothing
, _crMcstRating = Nothing
, _crNfrcRating = Nothing
, _crCsaRating = Nothing
, _crMocRating = Nothing
, _crEirinRating = Nothing
, _crFskRating = Nothing
, _crEefilmRating = Nothing
, _crRcnofRating = Nothing
, _crMekuRating = Nothing
, _crIlfilmRating = Nothing
, _crIfcoRating = Nothing
, _crNbcplRating = Nothing
, _crGrfilmRating = Nothing
, _crRteRating = Nothing
, _crAcbRating = Nothing
, _crCatvRating = Nothing
, _crMdaRating = Nothing
, _crDjctqRating = Nothing
, _crSmaisRating = Nothing
, _crCscfRating = Nothing
, _crTvpgRating = Nothing
, _crRtcRating = Nothing
, _crYtRating = Nothing
, _crBbfcRating = Nothing
, _crMenaMpaaRating = Nothing
, _crKijkwijzerRating = Nothing
, _crMtrcbRating = Nothing
, _crFcoRating = Nothing
, _crCicfRating = Nothing
, _crCzfilmRating = Nothing
, _crNbcRating = Nothing
, _crFmocRating = Nothing
, _crRussiaRating = Nothing
, _crEgfilmRating = Nothing
, _crResorteviolenciaRating = Nothing
, _crMibacRating = Nothing
, _crMedietilsynetRating = Nothing
, _crMccypRating = Nothing
, _crNkclvRating = Nothing
, _crFpbRating = Nothing
, _crLsfRating = Nothing
, _crBfvcRating = Nothing
, _crMpaatRating = Nothing
, _crEcbmctRating = Nothing
, _crCNCRating = Nothing
, _crSkfilmRating = Nothing
, _crOflcRating = Nothing
, _crKmrbRating = Nothing
}
crFpbRatingReasons :: Lens' ContentRating [ContentRatingFpbRatingReasonsItem]
crFpbRatingReasons
= lens _crFpbRatingReasons
(\ s a -> s{_crFpbRatingReasons = a})
. _Default
. _Coerce
crPefilmRating :: Lens' ContentRating (Maybe ContentRatingPefilmRating)
crPefilmRating
= lens _crPefilmRating
(\ s a -> s{_crPefilmRating = a})
crCccRating :: Lens' ContentRating (Maybe ContentRatingCccRating)
crCccRating
= lens _crCccRating (\ s a -> s{_crCccRating = a})
crAnatelRating :: Lens' ContentRating (Maybe ContentRatingAnatelRating)
crAnatelRating
= lens _crAnatelRating
(\ s a -> s{_crAnatelRating = a})
crMpaaRating :: Lens' ContentRating (Maybe ContentRatingMpaaRating)
crMpaaRating
= lens _crMpaaRating (\ s a -> s{_crMpaaRating = a})
crCceRating :: Lens' ContentRating (Maybe ContentRatingCceRating)
crCceRating
= lens _crCceRating (\ s a -> s{_crCceRating = a})
crMccaaRating :: Lens' ContentRating (Maybe ContentRatingMccaaRating)
crMccaaRating
= lens _crMccaaRating
(\ s a -> s{_crMccaaRating = a})
crChfilmRating :: Lens' ContentRating (Maybe ContentRatingChfilmRating)
crChfilmRating
= lens _crChfilmRating
(\ s a -> s{_crChfilmRating = a})
crIcaaRating :: Lens' ContentRating (Maybe ContentRatingIcaaRating)
crIcaaRating
= lens _crIcaaRating (\ s a -> s{_crIcaaRating = a})
crFcbmRating :: Lens' ContentRating (Maybe ContentRatingFcbmRating)
crFcbmRating
= lens _crFcbmRating (\ s a -> s{_crFcbmRating = a})
crBmukkRating :: Lens' ContentRating (Maybe ContentRatingBmukkRating)
crBmukkRating
= lens _crBmukkRating
(\ s a -> s{_crBmukkRating = a})
crMoctwRating :: Lens' ContentRating (Maybe ContentRatingMoctwRating)
crMoctwRating
= lens _crMoctwRating
(\ s a -> s{_crMoctwRating = a})
crNfvcbRating :: Lens' ContentRating (Maybe ContentRatingNfvcbRating)
crNfvcbRating
= lens _crNfvcbRating
(\ s a -> s{_crNfvcbRating = a})
crDjctqRatingReasons :: Lens' ContentRating [ContentRatingDjctqRatingReasonsItem]
crDjctqRatingReasons
= lens _crDjctqRatingReasons
(\ s a -> s{_crDjctqRatingReasons = a})
. _Default
. _Coerce
crAgcomRating :: Lens' ContentRating (Maybe ContentRatingAgcomRating)
crAgcomRating
= lens _crAgcomRating
(\ s a -> s{_crAgcomRating = a})
crCnaRating :: Lens' ContentRating (Maybe ContentRatingCnaRating)
crCnaRating
= lens _crCnaRating (\ s a -> s{_crCnaRating = a})
crCatvfrRating :: Lens' ContentRating (Maybe ContentRatingCatvfrRating)
crCatvfrRating
= lens _crCatvfrRating
(\ s a -> s{_crCatvfrRating = a})
crCbfcRating :: Lens' ContentRating (Maybe ContentRatingCbfcRating)
crCbfcRating
= lens _crCbfcRating (\ s a -> s{_crCbfcRating = a})
crKfcbRating :: Lens' ContentRating (Maybe ContentRatingKfcbRating)
crKfcbRating
= lens _crKfcbRating (\ s a -> s{_crKfcbRating = a})
crSmsaRating :: Lens' ContentRating (Maybe ContentRatingSmsaRating)
crSmsaRating
= lens _crSmsaRating (\ s a -> s{_crSmsaRating = a})
crChvrsRating :: Lens' ContentRating (Maybe ContentRatingChvrsRating)
crChvrsRating
= lens _crChvrsRating
(\ s a -> s{_crChvrsRating = a})
crIncaaRating :: Lens' ContentRating (Maybe ContentRatingIncaaRating)
crIncaaRating
= lens _crIncaaRating
(\ s a -> s{_crIncaaRating = a})
crMcstRating :: Lens' ContentRating (Maybe ContentRatingMcstRating)
crMcstRating
= lens _crMcstRating (\ s a -> s{_crMcstRating = a})
crNfrcRating :: Lens' ContentRating (Maybe ContentRatingNfrcRating)
crNfrcRating
= lens _crNfrcRating (\ s a -> s{_crNfrcRating = a})
crCsaRating :: Lens' ContentRating (Maybe ContentRatingCsaRating)
crCsaRating
= lens _crCsaRating (\ s a -> s{_crCsaRating = a})
crMocRating :: Lens' ContentRating (Maybe ContentRatingMocRating)
crMocRating
= lens _crMocRating (\ s a -> s{_crMocRating = a})
crEirinRating :: Lens' ContentRating (Maybe ContentRatingEirinRating)
crEirinRating
= lens _crEirinRating
(\ s a -> s{_crEirinRating = a})
crFskRating :: Lens' ContentRating (Maybe ContentRatingFskRating)
crFskRating
= lens _crFskRating (\ s a -> s{_crFskRating = a})
crEefilmRating :: Lens' ContentRating (Maybe ContentRatingEefilmRating)
crEefilmRating
= lens _crEefilmRating
(\ s a -> s{_crEefilmRating = a})
crRcnofRating :: Lens' ContentRating (Maybe ContentRatingRcnofRating)
crRcnofRating
= lens _crRcnofRating
(\ s a -> s{_crRcnofRating = a})
crMekuRating :: Lens' ContentRating (Maybe ContentRatingMekuRating)
crMekuRating
= lens _crMekuRating (\ s a -> s{_crMekuRating = a})
crIlfilmRating :: Lens' ContentRating (Maybe ContentRatingIlfilmRating)
crIlfilmRating
= lens _crIlfilmRating
(\ s a -> s{_crIlfilmRating = a})
crIfcoRating :: Lens' ContentRating (Maybe ContentRatingIfcoRating)
crIfcoRating
= lens _crIfcoRating (\ s a -> s{_crIfcoRating = a})
crNbcplRating :: Lens' ContentRating (Maybe ContentRatingNbcplRating)
crNbcplRating
= lens _crNbcplRating
(\ s a -> s{_crNbcplRating = a})
crGrfilmRating :: Lens' ContentRating (Maybe ContentRatingGrfilmRating)
crGrfilmRating
= lens _crGrfilmRating
(\ s a -> s{_crGrfilmRating = a})
crRteRating :: Lens' ContentRating (Maybe ContentRatingRteRating)
crRteRating
= lens _crRteRating (\ s a -> s{_crRteRating = a})
crAcbRating :: Lens' ContentRating (Maybe ContentRatingAcbRating)
crAcbRating
= lens _crAcbRating (\ s a -> s{_crAcbRating = a})
crCatvRating :: Lens' ContentRating (Maybe ContentRatingCatvRating)
crCatvRating
= lens _crCatvRating (\ s a -> s{_crCatvRating = a})
crMdaRating :: Lens' ContentRating (Maybe ContentRatingMdaRating)
crMdaRating
= lens _crMdaRating (\ s a -> s{_crMdaRating = a})
crDjctqRating :: Lens' ContentRating (Maybe ContentRatingDjctqRating)
crDjctqRating
= lens _crDjctqRating
(\ s a -> s{_crDjctqRating = a})
crSmaisRating :: Lens' ContentRating (Maybe ContentRatingSmaisRating)
crSmaisRating
= lens _crSmaisRating
(\ s a -> s{_crSmaisRating = a})
crCscfRating :: Lens' ContentRating (Maybe ContentRatingCscfRating)
crCscfRating
= lens _crCscfRating (\ s a -> s{_crCscfRating = a})
crTvpgRating :: Lens' ContentRating (Maybe ContentRatingTvpgRating)
crTvpgRating
= lens _crTvpgRating (\ s a -> s{_crTvpgRating = a})
crRtcRating :: Lens' ContentRating (Maybe ContentRatingRtcRating)
crRtcRating
= lens _crRtcRating (\ s a -> s{_crRtcRating = a})
crYtRating :: Lens' ContentRating (Maybe ContentRatingYtRating)
crYtRating
= lens _crYtRating (\ s a -> s{_crYtRating = a})
crBbfcRating :: Lens' ContentRating (Maybe ContentRatingBbfcRating)
crBbfcRating
= lens _crBbfcRating (\ s a -> s{_crBbfcRating = a})
crMenaMpaaRating :: Lens' ContentRating (Maybe ContentRatingMenaMpaaRating)
crMenaMpaaRating
= lens _crMenaMpaaRating
(\ s a -> s{_crMenaMpaaRating = a})
crKijkwijzerRating :: Lens' ContentRating (Maybe ContentRatingKijkwijzerRating)
crKijkwijzerRating
= lens _crKijkwijzerRating
(\ s a -> s{_crKijkwijzerRating = a})
crMtrcbRating :: Lens' ContentRating (Maybe ContentRatingMtrcbRating)
crMtrcbRating
= lens _crMtrcbRating
(\ s a -> s{_crMtrcbRating = a})
crFcoRating :: Lens' ContentRating (Maybe ContentRatingFcoRating)
crFcoRating
= lens _crFcoRating (\ s a -> s{_crFcoRating = a})
crCicfRating :: Lens' ContentRating (Maybe ContentRatingCicfRating)
crCicfRating
= lens _crCicfRating (\ s a -> s{_crCicfRating = a})
crCzfilmRating :: Lens' ContentRating (Maybe ContentRatingCzfilmRating)
crCzfilmRating
= lens _crCzfilmRating
(\ s a -> s{_crCzfilmRating = a})
crNbcRating :: Lens' ContentRating (Maybe ContentRatingNbcRating)
crNbcRating
= lens _crNbcRating (\ s a -> s{_crNbcRating = a})
crFmocRating :: Lens' ContentRating (Maybe ContentRatingFmocRating)
crFmocRating
= lens _crFmocRating (\ s a -> s{_crFmocRating = a})
crRussiaRating :: Lens' ContentRating (Maybe ContentRatingRussiaRating)
crRussiaRating
= lens _crRussiaRating
(\ s a -> s{_crRussiaRating = a})
crEgfilmRating :: Lens' ContentRating (Maybe ContentRatingEgfilmRating)
crEgfilmRating
= lens _crEgfilmRating
(\ s a -> s{_crEgfilmRating = a})
crResorteviolenciaRating :: Lens' ContentRating (Maybe ContentRatingResorteviolenciaRating)
crResorteviolenciaRating
= lens _crResorteviolenciaRating
(\ s a -> s{_crResorteviolenciaRating = a})
crMibacRating :: Lens' ContentRating (Maybe ContentRatingMibacRating)
crMibacRating
= lens _crMibacRating
(\ s a -> s{_crMibacRating = a})
crMedietilsynetRating :: Lens' ContentRating (Maybe ContentRatingMedietilsynetRating)
crMedietilsynetRating
= lens _crMedietilsynetRating
(\ s a -> s{_crMedietilsynetRating = a})
crMccypRating :: Lens' ContentRating (Maybe ContentRatingMccypRating)
crMccypRating
= lens _crMccypRating
(\ s a -> s{_crMccypRating = a})
crNkclvRating :: Lens' ContentRating (Maybe ContentRatingNkclvRating)
crNkclvRating
= lens _crNkclvRating
(\ s a -> s{_crNkclvRating = a})
crFpbRating :: Lens' ContentRating (Maybe ContentRatingFpbRating)
crFpbRating
= lens _crFpbRating (\ s a -> s{_crFpbRating = a})
crLsfRating :: Lens' ContentRating (Maybe ContentRatingLsfRating)
crLsfRating
= lens _crLsfRating (\ s a -> s{_crLsfRating = a})
crBfvcRating :: Lens' ContentRating (Maybe ContentRatingBfvcRating)
crBfvcRating
= lens _crBfvcRating (\ s a -> s{_crBfvcRating = a})
crMpaatRating :: Lens' ContentRating (Maybe ContentRatingMpaatRating)
crMpaatRating
= lens _crMpaatRating
(\ s a -> s{_crMpaatRating = a})
crEcbmctRating :: Lens' ContentRating (Maybe ContentRatingEcbmctRating)
crEcbmctRating
= lens _crEcbmctRating
(\ s a -> s{_crEcbmctRating = a})
crCNCRating :: Lens' ContentRating (Maybe ContentRatingCNCRating)
crCNCRating
= lens _crCNCRating (\ s a -> s{_crCNCRating = a})
crSkfilmRating :: Lens' ContentRating (Maybe ContentRatingSkfilmRating)
crSkfilmRating
= lens _crSkfilmRating
(\ s a -> s{_crSkfilmRating = a})
crOflcRating :: Lens' ContentRating (Maybe ContentRatingOflcRating)
crOflcRating
= lens _crOflcRating (\ s a -> s{_crOflcRating = a})
crKmrbRating :: Lens' ContentRating (Maybe ContentRatingKmrbRating)
crKmrbRating
= lens _crKmrbRating (\ s a -> s{_crKmrbRating = a})
instance FromJSON ContentRating where
parseJSON
= withObject "ContentRating"
(\ o ->
ContentRating' <$>
(o .:? "fpbRatingReasons" .!= mempty) <*>
(o .:? "pefilmRating")
<*> (o .:? "cccRating")
<*> (o .:? "anatelRating")
<*> (o .:? "mpaaRating")
<*> (o .:? "cceRating")
<*> (o .:? "mccaaRating")
<*> (o .:? "chfilmRating")
<*> (o .:? "icaaRating")
<*> (o .:? "fcbmRating")
<*> (o .:? "bmukkRating")
<*> (o .:? "moctwRating")
<*> (o .:? "nfvcbRating")
<*> (o .:? "djctqRatingReasons" .!= mempty)
<*> (o .:? "agcomRating")
<*> (o .:? "cnaRating")
<*> (o .:? "catvfrRating")
<*> (o .:? "cbfcRating")
<*> (o .:? "kfcbRating")
<*> (o .:? "smsaRating")
<*> (o .:? "chvrsRating")
<*> (o .:? "incaaRating")
<*> (o .:? "mcstRating")
<*> (o .:? "nfrcRating")
<*> (o .:? "csaRating")
<*> (o .:? "mocRating")
<*> (o .:? "eirinRating")
<*> (o .:? "fskRating")
<*> (o .:? "eefilmRating")
<*> (o .:? "rcnofRating")
<*> (o .:? "mekuRating")
<*> (o .:? "ilfilmRating")
<*> (o .:? "ifcoRating")
<*> (o .:? "nbcplRating")
<*> (o .:? "grfilmRating")
<*> (o .:? "rteRating")
<*> (o .:? "acbRating")
<*> (o .:? "catvRating")
<*> (o .:? "mdaRating")
<*> (o .:? "djctqRating")
<*> (o .:? "smaisRating")
<*> (o .:? "cscfRating")
<*> (o .:? "tvpgRating")
<*> (o .:? "rtcRating")
<*> (o .:? "ytRating")
<*> (o .:? "bbfcRating")
<*> (o .:? "menaMpaaRating")
<*> (o .:? "kijkwijzerRating")
<*> (o .:? "mtrcbRating")
<*> (o .:? "fcoRating")
<*> (o .:? "cicfRating")
<*> (o .:? "czfilmRating")
<*> (o .:? "nbcRating")
<*> (o .:? "fmocRating")
<*> (o .:? "russiaRating")
<*> (o .:? "egfilmRating")
<*> (o .:? "resorteviolenciaRating")
<*> (o .:? "mibacRating")
<*> (o .:? "medietilsynetRating")
<*> (o .:? "mccypRating")
<*> (o .:? "nkclvRating")
<*> (o .:? "fpbRating")
<*> (o .:? "lsfRating")
<*> (o .:? "bfvcRating")
<*> (o .:? "mpaatRating")
<*> (o .:? "ecbmctRating")
<*> (o .:? "cncRating")
<*> (o .:? "skfilmRating")
<*> (o .:? "oflcRating")
<*> (o .:? "kmrbRating"))
instance ToJSON ContentRating where
toJSON ContentRating'{..}
= object
(catMaybes
[("fpbRatingReasons" .=) <$> _crFpbRatingReasons,
("pefilmRating" .=) <$> _crPefilmRating,
("cccRating" .=) <$> _crCccRating,
("anatelRating" .=) <$> _crAnatelRating,
("mpaaRating" .=) <$> _crMpaaRating,
("cceRating" .=) <$> _crCceRating,
("mccaaRating" .=) <$> _crMccaaRating,
("chfilmRating" .=) <$> _crChfilmRating,
("icaaRating" .=) <$> _crIcaaRating,
("fcbmRating" .=) <$> _crFcbmRating,
("bmukkRating" .=) <$> _crBmukkRating,
("moctwRating" .=) <$> _crMoctwRating,
("nfvcbRating" .=) <$> _crNfvcbRating,
("djctqRatingReasons" .=) <$> _crDjctqRatingReasons,
("agcomRating" .=) <$> _crAgcomRating,
("cnaRating" .=) <$> _crCnaRating,
("catvfrRating" .=) <$> _crCatvfrRating,
("cbfcRating" .=) <$> _crCbfcRating,
("kfcbRating" .=) <$> _crKfcbRating,
("smsaRating" .=) <$> _crSmsaRating,
("chvrsRating" .=) <$> _crChvrsRating,
("incaaRating" .=) <$> _crIncaaRating,
("mcstRating" .=) <$> _crMcstRating,
("nfrcRating" .=) <$> _crNfrcRating,
("csaRating" .=) <$> _crCsaRating,
("mocRating" .=) <$> _crMocRating,
("eirinRating" .=) <$> _crEirinRating,
("fskRating" .=) <$> _crFskRating,
("eefilmRating" .=) <$> _crEefilmRating,
("rcnofRating" .=) <$> _crRcnofRating,
("mekuRating" .=) <$> _crMekuRating,
("ilfilmRating" .=) <$> _crIlfilmRating,
("ifcoRating" .=) <$> _crIfcoRating,
("nbcplRating" .=) <$> _crNbcplRating,
("grfilmRating" .=) <$> _crGrfilmRating,
("rteRating" .=) <$> _crRteRating,
("acbRating" .=) <$> _crAcbRating,
("catvRating" .=) <$> _crCatvRating,
("mdaRating" .=) <$> _crMdaRating,
("djctqRating" .=) <$> _crDjctqRating,
("smaisRating" .=) <$> _crSmaisRating,
("cscfRating" .=) <$> _crCscfRating,
("tvpgRating" .=) <$> _crTvpgRating,
("rtcRating" .=) <$> _crRtcRating,
("ytRating" .=) <$> _crYtRating,
("bbfcRating" .=) <$> _crBbfcRating,
("menaMpaaRating" .=) <$> _crMenaMpaaRating,
("kijkwijzerRating" .=) <$> _crKijkwijzerRating,
("mtrcbRating" .=) <$> _crMtrcbRating,
("fcoRating" .=) <$> _crFcoRating,
("cicfRating" .=) <$> _crCicfRating,
("czfilmRating" .=) <$> _crCzfilmRating,
("nbcRating" .=) <$> _crNbcRating,
("fmocRating" .=) <$> _crFmocRating,
("russiaRating" .=) <$> _crRussiaRating,
("egfilmRating" .=) <$> _crEgfilmRating,
("resorteviolenciaRating" .=) <$>
_crResorteviolenciaRating,
("mibacRating" .=) <$> _crMibacRating,
("medietilsynetRating" .=) <$>
_crMedietilsynetRating,
("mccypRating" .=) <$> _crMccypRating,
("nkclvRating" .=) <$> _crNkclvRating,
("fpbRating" .=) <$> _crFpbRating,
("lsfRating" .=) <$> _crLsfRating,
("bfvcRating" .=) <$> _crBfvcRating,
("mpaatRating" .=) <$> _crMpaatRating,
("ecbmctRating" .=) <$> _crEcbmctRating,
("cncRating" .=) <$> _crCNCRating,
("skfilmRating" .=) <$> _crSkfilmRating,
("oflcRating" .=) <$> _crOflcRating,
("kmrbRating" .=) <$> _crKmrbRating])
data PlayList =
PlayList'
{ _plStatus :: !(Maybe PlayListStatus)
, _plEtag :: !(Maybe Text)
, _plSnippet :: !(Maybe PlayListSnippet)
, _plKind :: !Text
, _plContentDetails :: !(Maybe PlayListContentDetails)
, _plId :: !(Maybe Text)
, _plLocalizations :: !(Maybe PlayListLocalizations)
, _plPlayer :: !(Maybe PlayListPlayer)
}
deriving (Eq, Show, Data, Typeable, Generic)
playList
:: PlayList
playList =
PlayList'
{ _plStatus = Nothing
, _plEtag = Nothing
, _plSnippet = Nothing
, _plKind = "youtube#playlist"
, _plContentDetails = Nothing
, _plId = Nothing
, _plLocalizations = Nothing
, _plPlayer = Nothing
}
plStatus :: Lens' PlayList (Maybe PlayListStatus)
plStatus = lens _plStatus (\ s a -> s{_plStatus = a})
plEtag :: Lens' PlayList (Maybe Text)
plEtag = lens _plEtag (\ s a -> s{_plEtag = a})
plSnippet :: Lens' PlayList (Maybe PlayListSnippet)
plSnippet
= lens _plSnippet (\ s a -> s{_plSnippet = a})
plKind :: Lens' PlayList Text
plKind = lens _plKind (\ s a -> s{_plKind = a})
plContentDetails :: Lens' PlayList (Maybe PlayListContentDetails)
plContentDetails
= lens _plContentDetails
(\ s a -> s{_plContentDetails = a})
plId :: Lens' PlayList (Maybe Text)
plId = lens _plId (\ s a -> s{_plId = a})
plLocalizations :: Lens' PlayList (Maybe PlayListLocalizations)
plLocalizations
= lens _plLocalizations
(\ s a -> s{_plLocalizations = a})
plPlayer :: Lens' PlayList (Maybe PlayListPlayer)
plPlayer = lens _plPlayer (\ s a -> s{_plPlayer = a})
instance FromJSON PlayList where
parseJSON
= withObject "PlayList"
(\ o ->
PlayList' <$>
(o .:? "status") <*> (o .:? "etag") <*>
(o .:? "snippet")
<*> (o .:? "kind" .!= "youtube#playlist")
<*> (o .:? "contentDetails")
<*> (o .:? "id")
<*> (o .:? "localizations")
<*> (o .:? "player"))
instance ToJSON PlayList where
toJSON PlayList'{..}
= object
(catMaybes
[("status" .=) <$> _plStatus,
("etag" .=) <$> _plEtag,
("snippet" .=) <$> _plSnippet,
Just ("kind" .= _plKind),
("contentDetails" .=) <$> _plContentDetails,
("id" .=) <$> _plId,
("localizations" .=) <$> _plLocalizations,
("player" .=) <$> _plPlayer])
data ChannelSettings =
ChannelSettings'
{ _cShowRelatedChannels :: !(Maybe Bool)
, _cDefaultTab :: !(Maybe Text)
, _cFeaturedChannelsTitle :: !(Maybe Text)
, _cCountry :: !(Maybe Text)
, _cProFileColor :: !(Maybe Text)
, _cModerateComments :: !(Maybe Bool)
, _cKeywords :: !(Maybe Text)
, _cUnsubscribedTrailer :: !(Maybe Text)
, _cTrackingAnalyticsAccountId :: !(Maybe Text)
, _cFeaturedChannelsURLs :: !(Maybe [Text])
, _cShowBrowseView :: !(Maybe Bool)
, _cTitle :: !(Maybe Text)
, _cDescription :: !(Maybe Text)
, _cDefaultLanguage :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelSettings
:: ChannelSettings
channelSettings =
ChannelSettings'
{ _cShowRelatedChannels = Nothing
, _cDefaultTab = Nothing
, _cFeaturedChannelsTitle = Nothing
, _cCountry = Nothing
, _cProFileColor = Nothing
, _cModerateComments = Nothing
, _cKeywords = Nothing
, _cUnsubscribedTrailer = Nothing
, _cTrackingAnalyticsAccountId = Nothing
, _cFeaturedChannelsURLs = Nothing
, _cShowBrowseView = Nothing
, _cTitle = Nothing
, _cDescription = Nothing
, _cDefaultLanguage = Nothing
}
cShowRelatedChannels :: Lens' ChannelSettings (Maybe Bool)
cShowRelatedChannels
= lens _cShowRelatedChannels
(\ s a -> s{_cShowRelatedChannels = a})
cDefaultTab :: Lens' ChannelSettings (Maybe Text)
cDefaultTab
= lens _cDefaultTab (\ s a -> s{_cDefaultTab = a})
cFeaturedChannelsTitle :: Lens' ChannelSettings (Maybe Text)
cFeaturedChannelsTitle
= lens _cFeaturedChannelsTitle
(\ s a -> s{_cFeaturedChannelsTitle = a})
cCountry :: Lens' ChannelSettings (Maybe Text)
cCountry = lens _cCountry (\ s a -> s{_cCountry = a})
cProFileColor :: Lens' ChannelSettings (Maybe Text)
cProFileColor
= lens _cProFileColor
(\ s a -> s{_cProFileColor = a})
cModerateComments :: Lens' ChannelSettings (Maybe Bool)
cModerateComments
= lens _cModerateComments
(\ s a -> s{_cModerateComments = a})
cKeywords :: Lens' ChannelSettings (Maybe Text)
cKeywords
= lens _cKeywords (\ s a -> s{_cKeywords = a})
cUnsubscribedTrailer :: Lens' ChannelSettings (Maybe Text)
cUnsubscribedTrailer
= lens _cUnsubscribedTrailer
(\ s a -> s{_cUnsubscribedTrailer = a})
cTrackingAnalyticsAccountId :: Lens' ChannelSettings (Maybe Text)
cTrackingAnalyticsAccountId
= lens _cTrackingAnalyticsAccountId
(\ s a -> s{_cTrackingAnalyticsAccountId = a})
cFeaturedChannelsURLs :: Lens' ChannelSettings [Text]
cFeaturedChannelsURLs
= lens _cFeaturedChannelsURLs
(\ s a -> s{_cFeaturedChannelsURLs = a})
. _Default
. _Coerce
cShowBrowseView :: Lens' ChannelSettings (Maybe Bool)
cShowBrowseView
= lens _cShowBrowseView
(\ s a -> s{_cShowBrowseView = a})
cTitle :: Lens' ChannelSettings (Maybe Text)
cTitle = lens _cTitle (\ s a -> s{_cTitle = a})
cDescription :: Lens' ChannelSettings (Maybe Text)
cDescription
= lens _cDescription (\ s a -> s{_cDescription = a})
cDefaultLanguage :: Lens' ChannelSettings (Maybe Text)
cDefaultLanguage
= lens _cDefaultLanguage
(\ s a -> s{_cDefaultLanguage = a})
instance FromJSON ChannelSettings where
parseJSON
= withObject "ChannelSettings"
(\ o ->
ChannelSettings' <$>
(o .:? "showRelatedChannels") <*>
(o .:? "defaultTab")
<*> (o .:? "featuredChannelsTitle")
<*> (o .:? "country")
<*> (o .:? "profileColor")
<*> (o .:? "moderateComments")
<*> (o .:? "keywords")
<*> (o .:? "unsubscribedTrailer")
<*> (o .:? "trackingAnalyticsAccountId")
<*> (o .:? "featuredChannelsUrls" .!= mempty)
<*> (o .:? "showBrowseView")
<*> (o .:? "title")
<*> (o .:? "description")
<*> (o .:? "defaultLanguage"))
instance ToJSON ChannelSettings where
toJSON ChannelSettings'{..}
= object
(catMaybes
[("showRelatedChannels" .=) <$>
_cShowRelatedChannels,
("defaultTab" .=) <$> _cDefaultTab,
("featuredChannelsTitle" .=) <$>
_cFeaturedChannelsTitle,
("country" .=) <$> _cCountry,
("profileColor" .=) <$> _cProFileColor,
("moderateComments" .=) <$> _cModerateComments,
("keywords" .=) <$> _cKeywords,
("unsubscribedTrailer" .=) <$> _cUnsubscribedTrailer,
("trackingAnalyticsAccountId" .=) <$>
_cTrackingAnalyticsAccountId,
("featuredChannelsUrls" .=) <$>
_cFeaturedChannelsURLs,
("showBrowseView" .=) <$> _cShowBrowseView,
("title" .=) <$> _cTitle,
("description" .=) <$> _cDescription,
("defaultLanguage" .=) <$> _cDefaultLanguage])
data SubscriptionSnippet =
SubscriptionSnippet'
{ _ssResourceId :: !(Maybe ResourceId)
, _ssPublishedAt :: !(Maybe DateTime')
, _ssChannelTitle :: !(Maybe Text)
, _ssChannelId :: !(Maybe Text)
, _ssThumbnails :: !(Maybe ThumbnailDetails)
, _ssTitle :: !(Maybe Text)
, _ssDescription :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
subscriptionSnippet
:: SubscriptionSnippet
subscriptionSnippet =
SubscriptionSnippet'
{ _ssResourceId = Nothing
, _ssPublishedAt = Nothing
, _ssChannelTitle = Nothing
, _ssChannelId = Nothing
, _ssThumbnails = Nothing
, _ssTitle = Nothing
, _ssDescription = Nothing
}
ssResourceId :: Lens' SubscriptionSnippet (Maybe ResourceId)
ssResourceId
= lens _ssResourceId (\ s a -> s{_ssResourceId = a})
ssPublishedAt :: Lens' SubscriptionSnippet (Maybe UTCTime)
ssPublishedAt
= lens _ssPublishedAt
(\ s a -> s{_ssPublishedAt = a})
. mapping _DateTime
ssChannelTitle :: Lens' SubscriptionSnippet (Maybe Text)
ssChannelTitle
= lens _ssChannelTitle
(\ s a -> s{_ssChannelTitle = a})
ssChannelId :: Lens' SubscriptionSnippet (Maybe Text)
ssChannelId
= lens _ssChannelId (\ s a -> s{_ssChannelId = a})
ssThumbnails :: Lens' SubscriptionSnippet (Maybe ThumbnailDetails)
ssThumbnails
= lens _ssThumbnails (\ s a -> s{_ssThumbnails = a})
ssTitle :: Lens' SubscriptionSnippet (Maybe Text)
ssTitle = lens _ssTitle (\ s a -> s{_ssTitle = a})
ssDescription :: Lens' SubscriptionSnippet (Maybe Text)
ssDescription
= lens _ssDescription
(\ s a -> s{_ssDescription = a})
instance FromJSON SubscriptionSnippet where
parseJSON
= withObject "SubscriptionSnippet"
(\ o ->
SubscriptionSnippet' <$>
(o .:? "resourceId") <*> (o .:? "publishedAt") <*>
(o .:? "channelTitle")
<*> (o .:? "channelId")
<*> (o .:? "thumbnails")
<*> (o .:? "title")
<*> (o .:? "description"))
instance ToJSON SubscriptionSnippet where
toJSON SubscriptionSnippet'{..}
= object
(catMaybes
[("resourceId" .=) <$> _ssResourceId,
("publishedAt" .=) <$> _ssPublishedAt,
("channelTitle" .=) <$> _ssChannelTitle,
("channelId" .=) <$> _ssChannelId,
("thumbnails" .=) <$> _ssThumbnails,
("title" .=) <$> _ssTitle,
("description" .=) <$> _ssDescription])
data VideoLiveStreamingDetails =
VideoLiveStreamingDetails'
{ _vlsdActualEndTime :: !(Maybe DateTime')
, _vlsdConcurrentViewers :: !(Maybe (Textual Word64))
, _vlsdScheduledEndTime :: !(Maybe DateTime')
, _vlsdScheduledStartTime :: !(Maybe DateTime')
, _vlsdActualStartTime :: !(Maybe DateTime')
, _vlsdActiveLiveChatId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoLiveStreamingDetails
:: VideoLiveStreamingDetails
videoLiveStreamingDetails =
VideoLiveStreamingDetails'
{ _vlsdActualEndTime = Nothing
, _vlsdConcurrentViewers = Nothing
, _vlsdScheduledEndTime = Nothing
, _vlsdScheduledStartTime = Nothing
, _vlsdActualStartTime = Nothing
, _vlsdActiveLiveChatId = Nothing
}
vlsdActualEndTime :: Lens' VideoLiveStreamingDetails (Maybe UTCTime)
vlsdActualEndTime
= lens _vlsdActualEndTime
(\ s a -> s{_vlsdActualEndTime = a})
. mapping _DateTime
vlsdConcurrentViewers :: Lens' VideoLiveStreamingDetails (Maybe Word64)
vlsdConcurrentViewers
= lens _vlsdConcurrentViewers
(\ s a -> s{_vlsdConcurrentViewers = a})
. mapping _Coerce
vlsdScheduledEndTime :: Lens' VideoLiveStreamingDetails (Maybe UTCTime)
vlsdScheduledEndTime
= lens _vlsdScheduledEndTime
(\ s a -> s{_vlsdScheduledEndTime = a})
. mapping _DateTime
vlsdScheduledStartTime :: Lens' VideoLiveStreamingDetails (Maybe UTCTime)
vlsdScheduledStartTime
= lens _vlsdScheduledStartTime
(\ s a -> s{_vlsdScheduledStartTime = a})
. mapping _DateTime
vlsdActualStartTime :: Lens' VideoLiveStreamingDetails (Maybe UTCTime)
vlsdActualStartTime
= lens _vlsdActualStartTime
(\ s a -> s{_vlsdActualStartTime = a})
. mapping _DateTime
vlsdActiveLiveChatId :: Lens' VideoLiveStreamingDetails (Maybe Text)
vlsdActiveLiveChatId
= lens _vlsdActiveLiveChatId
(\ s a -> s{_vlsdActiveLiveChatId = a})
instance FromJSON VideoLiveStreamingDetails where
parseJSON
= withObject "VideoLiveStreamingDetails"
(\ o ->
VideoLiveStreamingDetails' <$>
(o .:? "actualEndTime") <*>
(o .:? "concurrentViewers")
<*> (o .:? "scheduledEndTime")
<*> (o .:? "scheduledStartTime")
<*> (o .:? "actualStartTime")
<*> (o .:? "activeLiveChatId"))
instance ToJSON VideoLiveStreamingDetails where
toJSON VideoLiveStreamingDetails'{..}
= object
(catMaybes
[("actualEndTime" .=) <$> _vlsdActualEndTime,
("concurrentViewers" .=) <$> _vlsdConcurrentViewers,
("scheduledEndTime" .=) <$> _vlsdScheduledEndTime,
("scheduledStartTime" .=) <$>
_vlsdScheduledStartTime,
("actualStartTime" .=) <$> _vlsdActualStartTime,
("activeLiveChatId" .=) <$> _vlsdActiveLiveChatId])
data ActivityContentDetailsPromotedItem =
ActivityContentDetailsPromotedItem'
{ _acdpiDestinationURL :: !(Maybe Text)
, _acdpiClickTrackingURL :: !(Maybe Text)
, _acdpiForecastingURL :: !(Maybe [Text])
, _acdpiDescriptionText :: !(Maybe Text)
, _acdpiCtaType :: !(Maybe ActivityContentDetailsPromotedItemCtaType)
, _acdpiVideoId :: !(Maybe Text)
, _acdpiAdTag :: !(Maybe Text)
, _acdpiCreativeViewURL :: !(Maybe Text)
, _acdpiImpressionURL :: !(Maybe [Text])
, _acdpiCustomCtaButtonText :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
activityContentDetailsPromotedItem
:: ActivityContentDetailsPromotedItem
activityContentDetailsPromotedItem =
ActivityContentDetailsPromotedItem'
{ _acdpiDestinationURL = Nothing
, _acdpiClickTrackingURL = Nothing
, _acdpiForecastingURL = Nothing
, _acdpiDescriptionText = Nothing
, _acdpiCtaType = Nothing
, _acdpiVideoId = Nothing
, _acdpiAdTag = Nothing
, _acdpiCreativeViewURL = Nothing
, _acdpiImpressionURL = Nothing
, _acdpiCustomCtaButtonText = Nothing
}
acdpiDestinationURL :: Lens' ActivityContentDetailsPromotedItem (Maybe Text)
acdpiDestinationURL
= lens _acdpiDestinationURL
(\ s a -> s{_acdpiDestinationURL = a})
acdpiClickTrackingURL :: Lens' ActivityContentDetailsPromotedItem (Maybe Text)
acdpiClickTrackingURL
= lens _acdpiClickTrackingURL
(\ s a -> s{_acdpiClickTrackingURL = a})
acdpiForecastingURL :: Lens' ActivityContentDetailsPromotedItem [Text]
acdpiForecastingURL
= lens _acdpiForecastingURL
(\ s a -> s{_acdpiForecastingURL = a})
. _Default
. _Coerce
acdpiDescriptionText :: Lens' ActivityContentDetailsPromotedItem (Maybe Text)
acdpiDescriptionText
= lens _acdpiDescriptionText
(\ s a -> s{_acdpiDescriptionText = a})
acdpiCtaType :: Lens' ActivityContentDetailsPromotedItem (Maybe ActivityContentDetailsPromotedItemCtaType)
acdpiCtaType
= lens _acdpiCtaType (\ s a -> s{_acdpiCtaType = a})
acdpiVideoId :: Lens' ActivityContentDetailsPromotedItem (Maybe Text)
acdpiVideoId
= lens _acdpiVideoId (\ s a -> s{_acdpiVideoId = a})
acdpiAdTag :: Lens' ActivityContentDetailsPromotedItem (Maybe Text)
acdpiAdTag
= lens _acdpiAdTag (\ s a -> s{_acdpiAdTag = a})
acdpiCreativeViewURL :: Lens' ActivityContentDetailsPromotedItem (Maybe Text)
acdpiCreativeViewURL
= lens _acdpiCreativeViewURL
(\ s a -> s{_acdpiCreativeViewURL = a})
acdpiImpressionURL :: Lens' ActivityContentDetailsPromotedItem [Text]
acdpiImpressionURL
= lens _acdpiImpressionURL
(\ s a -> s{_acdpiImpressionURL = a})
. _Default
. _Coerce
acdpiCustomCtaButtonText :: Lens' ActivityContentDetailsPromotedItem (Maybe Text)
acdpiCustomCtaButtonText
= lens _acdpiCustomCtaButtonText
(\ s a -> s{_acdpiCustomCtaButtonText = a})
instance FromJSON ActivityContentDetailsPromotedItem
where
parseJSON
= withObject "ActivityContentDetailsPromotedItem"
(\ o ->
ActivityContentDetailsPromotedItem' <$>
(o .:? "destinationUrl") <*>
(o .:? "clickTrackingUrl")
<*> (o .:? "forecastingUrl" .!= mempty)
<*> (o .:? "descriptionText")
<*> (o .:? "ctaType")
<*> (o .:? "videoId")
<*> (o .:? "adTag")
<*> (o .:? "creativeViewUrl")
<*> (o .:? "impressionUrl" .!= mempty)
<*> (o .:? "customCtaButtonText"))
instance ToJSON ActivityContentDetailsPromotedItem
where
toJSON ActivityContentDetailsPromotedItem'{..}
= object
(catMaybes
[("destinationUrl" .=) <$> _acdpiDestinationURL,
("clickTrackingUrl" .=) <$> _acdpiClickTrackingURL,
("forecastingUrl" .=) <$> _acdpiForecastingURL,
("descriptionText" .=) <$> _acdpiDescriptionText,
("ctaType" .=) <$> _acdpiCtaType,
("videoId" .=) <$> _acdpiVideoId,
("adTag" .=) <$> _acdpiAdTag,
("creativeViewUrl" .=) <$> _acdpiCreativeViewURL,
("impressionUrl" .=) <$> _acdpiImpressionURL,
("customCtaButtonText" .=) <$>
_acdpiCustomCtaButtonText])
data SponsorSnippet =
SponsorSnippet'
{ _sCumulativeDurationMonths :: !(Maybe (Textual Int32))
, _sChannelId :: !(Maybe Text)
, _sSponsorDetails :: !(Maybe ChannelProFileDetails)
, _sSponsorSince :: !(Maybe DateTime')
}
deriving (Eq, Show, Data, Typeable, Generic)
sponsorSnippet
:: SponsorSnippet
sponsorSnippet =
SponsorSnippet'
{ _sCumulativeDurationMonths = Nothing
, _sChannelId = Nothing
, _sSponsorDetails = Nothing
, _sSponsorSince = Nothing
}
sCumulativeDurationMonths :: Lens' SponsorSnippet (Maybe Int32)
sCumulativeDurationMonths
= lens _sCumulativeDurationMonths
(\ s a -> s{_sCumulativeDurationMonths = a})
. mapping _Coerce
sChannelId :: Lens' SponsorSnippet (Maybe Text)
sChannelId
= lens _sChannelId (\ s a -> s{_sChannelId = a})
sSponsorDetails :: Lens' SponsorSnippet (Maybe ChannelProFileDetails)
sSponsorDetails
= lens _sSponsorDetails
(\ s a -> s{_sSponsorDetails = a})
sSponsorSince :: Lens' SponsorSnippet (Maybe UTCTime)
sSponsorSince
= lens _sSponsorSince
(\ s a -> s{_sSponsorSince = a})
. mapping _DateTime
instance FromJSON SponsorSnippet where
parseJSON
= withObject "SponsorSnippet"
(\ o ->
SponsorSnippet' <$>
(o .:? "cumulativeDurationMonths") <*>
(o .:? "channelId")
<*> (o .:? "sponsorDetails")
<*> (o .:? "sponsorSince"))
instance ToJSON SponsorSnippet where
toJSON SponsorSnippet'{..}
= object
(catMaybes
[("cumulativeDurationMonths" .=) <$>
_sCumulativeDurationMonths,
("channelId" .=) <$> _sChannelId,
("sponsorDetails" .=) <$> _sSponsorDetails,
("sponsorSince" .=) <$> _sSponsorSince])
data GeoPoint =
GeoPoint'
{ _gpLatitude :: !(Maybe (Textual Double))
, _gpAltitude :: !(Maybe (Textual Double))
, _gpLongitude :: !(Maybe (Textual Double))
}
deriving (Eq, Show, Data, Typeable, Generic)
geoPoint
:: GeoPoint
geoPoint =
GeoPoint'
{_gpLatitude = Nothing, _gpAltitude = Nothing, _gpLongitude = Nothing}
gpLatitude :: Lens' GeoPoint (Maybe Double)
gpLatitude
= lens _gpLatitude (\ s a -> s{_gpLatitude = a}) .
mapping _Coerce
gpAltitude :: Lens' GeoPoint (Maybe Double)
gpAltitude
= lens _gpAltitude (\ s a -> s{_gpAltitude = a}) .
mapping _Coerce
gpLongitude :: Lens' GeoPoint (Maybe Double)
gpLongitude
= lens _gpLongitude (\ s a -> s{_gpLongitude = a}) .
mapping _Coerce
instance FromJSON GeoPoint where
parseJSON
= withObject "GeoPoint"
(\ o ->
GeoPoint' <$>
(o .:? "latitude") <*> (o .:? "altitude") <*>
(o .:? "longitude"))
instance ToJSON GeoPoint where
toJSON GeoPoint'{..}
= object
(catMaybes
[("latitude" .=) <$> _gpLatitude,
("altitude" .=) <$> _gpAltitude,
("longitude" .=) <$> _gpLongitude])
newtype CommentThreadReplies =
CommentThreadReplies'
{ _ctrComments :: Maybe [Comment]
}
deriving (Eq, Show, Data, Typeable, Generic)
commentThreadReplies
:: CommentThreadReplies
commentThreadReplies = CommentThreadReplies' {_ctrComments = Nothing}
ctrComments :: Lens' CommentThreadReplies [Comment]
ctrComments
= lens _ctrComments (\ s a -> s{_ctrComments = a}) .
_Default
. _Coerce
instance FromJSON CommentThreadReplies where
parseJSON
= withObject "CommentThreadReplies"
(\ o ->
CommentThreadReplies' <$>
(o .:? "comments" .!= mempty))
instance ToJSON CommentThreadReplies where
toJSON CommentThreadReplies'{..}
= object
(catMaybes [("comments" .=) <$> _ctrComments])
newtype ChannelSectionLocalization =
ChannelSectionLocalization'
{ _cslTitle :: Maybe Text
}
deriving (Eq, Show, Data, Typeable, Generic)
channelSectionLocalization
:: ChannelSectionLocalization
channelSectionLocalization = ChannelSectionLocalization' {_cslTitle = Nothing}
cslTitle :: Lens' ChannelSectionLocalization (Maybe Text)
cslTitle = lens _cslTitle (\ s a -> s{_cslTitle = a})
instance FromJSON ChannelSectionLocalization where
parseJSON
= withObject "ChannelSectionLocalization"
(\ o ->
ChannelSectionLocalization' <$> (o .:? "title"))
instance ToJSON ChannelSectionLocalization where
toJSON ChannelSectionLocalization'{..}
= object (catMaybes [("title" .=) <$> _cslTitle])
data VideoAbuseReportSecondaryReason =
VideoAbuseReportSecondaryReason'
{ _varsrId :: !(Maybe Text)
, _varsrLabel :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
videoAbuseReportSecondaryReason
:: VideoAbuseReportSecondaryReason
videoAbuseReportSecondaryReason =
VideoAbuseReportSecondaryReason' {_varsrId = Nothing, _varsrLabel = Nothing}
varsrId :: Lens' VideoAbuseReportSecondaryReason (Maybe Text)
varsrId = lens _varsrId (\ s a -> s{_varsrId = a})
varsrLabel :: Lens' VideoAbuseReportSecondaryReason (Maybe Text)
varsrLabel
= lens _varsrLabel (\ s a -> s{_varsrLabel = a})
instance FromJSON VideoAbuseReportSecondaryReason
where
parseJSON
= withObject "VideoAbuseReportSecondaryReason"
(\ o ->
VideoAbuseReportSecondaryReason' <$>
(o .:? "id") <*> (o .:? "label"))
instance ToJSON VideoAbuseReportSecondaryReason where
toJSON VideoAbuseReportSecondaryReason'{..}
= object
(catMaybes
[("id" .=) <$> _varsrId,
("label" .=) <$> _varsrLabel])
data ChannelContentOwnerDetails =
ChannelContentOwnerDetails'
{ _ccodTimeLinked :: !(Maybe DateTime')
, _ccodContentOwner :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
channelContentOwnerDetails
:: ChannelContentOwnerDetails
channelContentOwnerDetails =
ChannelContentOwnerDetails'
{_ccodTimeLinked = Nothing, _ccodContentOwner = Nothing}
ccodTimeLinked :: Lens' ChannelContentOwnerDetails (Maybe UTCTime)
ccodTimeLinked
= lens _ccodTimeLinked
(\ s a -> s{_ccodTimeLinked = a})
. mapping _DateTime
ccodContentOwner :: Lens' ChannelContentOwnerDetails (Maybe Text)
ccodContentOwner
= lens _ccodContentOwner
(\ s a -> s{_ccodContentOwner = a})
instance FromJSON ChannelContentOwnerDetails where
parseJSON
= withObject "ChannelContentOwnerDetails"
(\ o ->
ChannelContentOwnerDetails' <$>
(o .:? "timeLinked") <*> (o .:? "contentOwner"))
instance ToJSON ChannelContentOwnerDetails where
toJSON ChannelContentOwnerDetails'{..}
= object
(catMaybes
[("timeLinked" .=) <$> _ccodTimeLinked,
("contentOwner" .=) <$> _ccodContentOwner])
data I18nLanguageSnippet =
I18nLanguageSnippet'
{ _ilsHl :: !(Maybe Text)
, _ilsName :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
i18nLanguageSnippet
:: I18nLanguageSnippet
i18nLanguageSnippet =
I18nLanguageSnippet' {_ilsHl = Nothing, _ilsName = Nothing}
ilsHl :: Lens' I18nLanguageSnippet (Maybe Text)
ilsHl = lens _ilsHl (\ s a -> s{_ilsHl = a})
ilsName :: Lens' I18nLanguageSnippet (Maybe Text)
ilsName = lens _ilsName (\ s a -> s{_ilsName = a})
instance FromJSON I18nLanguageSnippet where
parseJSON
= withObject "I18nLanguageSnippet"
(\ o ->
I18nLanguageSnippet' <$>
(o .:? "hl") <*> (o .:? "name"))
instance ToJSON I18nLanguageSnippet where
toJSON I18nLanguageSnippet'{..}
= object
(catMaybes
[("hl" .=) <$> _ilsHl, ("name" .=) <$> _ilsName])
data LiveChatPollVotedDetails =
LiveChatPollVotedDetails'
{ _lcpvdPollId :: !(Maybe Text)
, _lcpvdItemId :: !(Maybe Text)
}
deriving (Eq, Show, Data, Typeable, Generic)
liveChatPollVotedDetails
:: LiveChatPollVotedDetails
liveChatPollVotedDetails =
LiveChatPollVotedDetails' {_lcpvdPollId = Nothing, _lcpvdItemId = Nothing}
lcpvdPollId :: Lens' LiveChatPollVotedDetails (Maybe Text)
lcpvdPollId
= lens _lcpvdPollId (\ s a -> s{_lcpvdPollId = a})
lcpvdItemId :: Lens' LiveChatPollVotedDetails (Maybe Text)
lcpvdItemId
= lens _lcpvdItemId (\ s a -> s{_lcpvdItemId = a})
instance FromJSON LiveChatPollVotedDetails where
parseJSON
= withObject "LiveChatPollVotedDetails"
(\ o ->
LiveChatPollVotedDetails' <$>
(o .:? "pollId") <*> (o .:? "itemId"))
instance ToJSON LiveChatPollVotedDetails where
toJSON LiveChatPollVotedDetails'{..}
= object
(catMaybes
[("pollId" .=) <$> _lcpvdPollId,
("itemId" .=) <$> _lcpvdItemId])