{-# 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
-- Copyright   : (c) 2015-2016 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
module Network.Google.YouTube.Types.Product where

import           Network.Google.Prelude
import           Network.Google.YouTube.Types.Sum

--
-- /See:/ 'liveChatMessageAuthorDetails' smart constructor.
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)


-- | Creates a value of 'LiveChatMessageAuthorDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcmadIsVerified'
--
-- * 'lcmadIsChatOwner'
--
-- * 'lcmadChannelId'
--
-- * 'lcmadProFileImageURL'
--
-- * 'lcmadIsChatModerator'
--
-- * 'lcmadDisplayName'
--
-- * 'lcmadIsChatSponsor'
--
-- * 'lcmadChannelURL'
liveChatMessageAuthorDetails
    :: LiveChatMessageAuthorDetails
liveChatMessageAuthorDetails =
  LiveChatMessageAuthorDetails'
    { _lcmadIsVerified = Nothing
    , _lcmadIsChatOwner = Nothing
    , _lcmadChannelId = Nothing
    , _lcmadProFileImageURL = Nothing
    , _lcmadIsChatModerator = Nothing
    , _lcmadDisplayName = Nothing
    , _lcmadIsChatSponsor = Nothing
    , _lcmadChannelURL = Nothing
    }


-- | Whether the author\'s identity has been verified by YouTube.
lcmadIsVerified :: Lens' LiveChatMessageAuthorDetails (Maybe Bool)
lcmadIsVerified
  = lens _lcmadIsVerified
      (\ s a -> s{_lcmadIsVerified = a})

-- | Whether the author is the owner of the live chat.
lcmadIsChatOwner :: Lens' LiveChatMessageAuthorDetails (Maybe Bool)
lcmadIsChatOwner
  = lens _lcmadIsChatOwner
      (\ s a -> s{_lcmadIsChatOwner = a})

-- | The YouTube channel ID.
lcmadChannelId :: Lens' LiveChatMessageAuthorDetails (Maybe Text)
lcmadChannelId
  = lens _lcmadChannelId
      (\ s a -> s{_lcmadChannelId = a})

-- | The channels\'s avatar URL.
lcmadProFileImageURL :: Lens' LiveChatMessageAuthorDetails (Maybe Text)
lcmadProFileImageURL
  = lens _lcmadProFileImageURL
      (\ s a -> s{_lcmadProFileImageURL = a})

-- | Whether the author is a moderator of the live chat.
lcmadIsChatModerator :: Lens' LiveChatMessageAuthorDetails (Maybe Bool)
lcmadIsChatModerator
  = lens _lcmadIsChatModerator
      (\ s a -> s{_lcmadIsChatModerator = a})

-- | The channel\'s display name.
lcmadDisplayName :: Lens' LiveChatMessageAuthorDetails (Maybe Text)
lcmadDisplayName
  = lens _lcmadDisplayName
      (\ s a -> s{_lcmadDisplayName = a})

-- | Whether the author is a sponsor of the live chat.
lcmadIsChatSponsor :: Lens' LiveChatMessageAuthorDetails (Maybe Bool)
lcmadIsChatSponsor
  = lens _lcmadIsChatSponsor
      (\ s a -> s{_lcmadIsChatSponsor = a})

-- | The channel\'s URL.
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])

-- | Basic details about a subscription\'s subscriber including title,
-- description, channel ID and thumbnails.
--
-- /See:/ 'subscriptionSubscriberSnippet' smart constructor.
data SubscriptionSubscriberSnippet =
  SubscriptionSubscriberSnippet'
    { _sssChannelId   :: !(Maybe Text)
    , _sssThumbnails  :: !(Maybe ThumbnailDetails)
    , _sssTitle       :: !(Maybe Text)
    , _sssDescription :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'SubscriptionSubscriberSnippet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'sssChannelId'
--
-- * 'sssThumbnails'
--
-- * 'sssTitle'
--
-- * 'sssDescription'
subscriptionSubscriberSnippet
    :: SubscriptionSubscriberSnippet
subscriptionSubscriberSnippet =
  SubscriptionSubscriberSnippet'
    { _sssChannelId = Nothing
    , _sssThumbnails = Nothing
    , _sssTitle = Nothing
    , _sssDescription = Nothing
    }


-- | The channel ID of the subscriber.
sssChannelId :: Lens' SubscriptionSubscriberSnippet (Maybe Text)
sssChannelId
  = lens _sssChannelId (\ s a -> s{_sssChannelId = a})

-- | Thumbnails for this subscriber.
sssThumbnails :: Lens' SubscriptionSubscriberSnippet (Maybe ThumbnailDetails)
sssThumbnails
  = lens _sssThumbnails
      (\ s a -> s{_sssThumbnails = a})

-- | The title of the subscriber.
sssTitle :: Lens' SubscriptionSubscriberSnippet (Maybe Text)
sssTitle = lens _sssTitle (\ s a -> s{_sssTitle = a})

-- | The description of the subscriber.
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])

-- | Describes information necessary for ingesting an RTMP or an HTTP stream.
--
-- /See:/ 'ingestionInfo' smart constructor.
data IngestionInfo =
  IngestionInfo'
    { _iiBackupIngestionAddress :: !(Maybe Text)
    , _iiIngestionAddress       :: !(Maybe Text)
    , _iiStreamName             :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'IngestionInfo' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'iiBackupIngestionAddress'
--
-- * 'iiIngestionAddress'
--
-- * 'iiStreamName'
ingestionInfo
    :: IngestionInfo
ingestionInfo =
  IngestionInfo'
    { _iiBackupIngestionAddress = Nothing
    , _iiIngestionAddress = Nothing
    , _iiStreamName = Nothing
    }


-- | The backup ingestion URL that you should use to stream video to YouTube.
-- You have the option of simultaneously streaming the content that you are
-- sending to the ingestionAddress to this URL.
iiBackupIngestionAddress :: Lens' IngestionInfo (Maybe Text)
iiBackupIngestionAddress
  = lens _iiBackupIngestionAddress
      (\ s a -> s{_iiBackupIngestionAddress = a})

-- | The primary ingestion URL that you should use to stream video to
-- YouTube. You must stream video to this URL. Depending on which
-- application or tool you use to encode your video stream, you may need to
-- enter the stream URL and stream name separately or you may need to
-- concatenate them in the following format: STREAM_URL\/STREAM_NAME
iiIngestionAddress :: Lens' IngestionInfo (Maybe Text)
iiIngestionAddress
  = lens _iiIngestionAddress
      (\ s a -> s{_iiIngestionAddress = a})

-- | The HTTP or RTMP stream name that YouTube assigns to the video stream.
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])

-- | The auditDetails object encapsulates channel data that is relevant for
-- YouTube Partners during the audit process.
--
-- /See:/ 'channelAuditDetails' smart constructor.
data ChannelAuditDetails =
  ChannelAuditDetails'
    { _cadContentIdClaimsGoodStanding     :: !(Maybe Bool)
    , _cadCopyrightStrikesGoodStanding    :: !(Maybe Bool)
    , _cadCommUnityGuidelinesGoodStanding :: !(Maybe Bool)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ChannelAuditDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cadContentIdClaimsGoodStanding'
--
-- * 'cadCopyrightStrikesGoodStanding'
--
-- * 'cadCommUnityGuidelinesGoodStanding'
channelAuditDetails
    :: ChannelAuditDetails
channelAuditDetails =
  ChannelAuditDetails'
    { _cadContentIdClaimsGoodStanding = Nothing
    , _cadCopyrightStrikesGoodStanding = Nothing
    , _cadCommUnityGuidelinesGoodStanding = Nothing
    }


-- | Whether or not the channel has any unresolved claims.
cadContentIdClaimsGoodStanding :: Lens' ChannelAuditDetails (Maybe Bool)
cadContentIdClaimsGoodStanding
  = lens _cadContentIdClaimsGoodStanding
      (\ s a -> s{_cadContentIdClaimsGoodStanding = a})

-- | Whether or not the channel has any copyright strikes.
cadCopyrightStrikesGoodStanding :: Lens' ChannelAuditDetails (Maybe Bool)
cadCopyrightStrikesGoodStanding
  = lens _cadCopyrightStrikesGoodStanding
      (\ s a -> s{_cadCopyrightStrikesGoodStanding = a})

-- | Whether or not the channel respects the community guidelines.
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])

-- | A thumbnail is an image representing a YouTube resource.
--
-- /See:/ 'thumbnail' smart constructor.
data Thumbnail =
  Thumbnail'
    { _tHeight :: !(Maybe (Textual Word32))
    , _tURL    :: !(Maybe Text)
    , _tWidth  :: !(Maybe (Textual Word32))
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'Thumbnail' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'tHeight'
--
-- * 'tURL'
--
-- * 'tWidth'
thumbnail
    :: Thumbnail
thumbnail = Thumbnail' {_tHeight = Nothing, _tURL = Nothing, _tWidth = Nothing}


-- | (Optional) Height of the thumbnail image.
tHeight :: Lens' Thumbnail (Maybe Word32)
tHeight
  = lens _tHeight (\ s a -> s{_tHeight = a}) .
      mapping _Coerce

-- | The thumbnail image\'s URL.
tURL :: Lens' Thumbnail (Maybe Text)
tURL = lens _tURL (\ s a -> s{_tURL = a})

-- | (Optional) Width of the thumbnail image.
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])

--
-- /See:/ 'liveChatTextMessageDetails' smart constructor.
newtype LiveChatTextMessageDetails =
  LiveChatTextMessageDetails'
    { _lctmdMessageText :: Maybe Text
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'LiveChatTextMessageDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lctmdMessageText'
liveChatTextMessageDetails
    :: LiveChatTextMessageDetails
liveChatTextMessageDetails =
  LiveChatTextMessageDetails' {_lctmdMessageText = Nothing}


-- | The user\'s message.
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])

-- | Information that identifies the recommended resource.
--
-- /See:/ 'activityContentDetailsRecommendation' smart constructor.
data ActivityContentDetailsRecommendation =
  ActivityContentDetailsRecommendation'
    { _acdrResourceId     :: !(Maybe ResourceId)
    , _acdrSeedResourceId :: !(Maybe ResourceId)
    , _acdrReason         :: !(Maybe ActivityContentDetailsRecommendationReason)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ActivityContentDetailsRecommendation' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acdrResourceId'
--
-- * 'acdrSeedResourceId'
--
-- * 'acdrReason'
activityContentDetailsRecommendation
    :: ActivityContentDetailsRecommendation
activityContentDetailsRecommendation =
  ActivityContentDetailsRecommendation'
    { _acdrResourceId = Nothing
    , _acdrSeedResourceId = Nothing
    , _acdrReason = Nothing
    }


-- | The resourceId object contains information that identifies the
-- recommended resource.
acdrResourceId :: Lens' ActivityContentDetailsRecommendation (Maybe ResourceId)
acdrResourceId
  = lens _acdrResourceId
      (\ s a -> s{_acdrResourceId = a})

-- | The seedResourceId object contains information about the resource that
-- caused the recommendation.
acdrSeedResourceId :: Lens' ActivityContentDetailsRecommendation (Maybe ResourceId)
acdrSeedResourceId
  = lens _acdrSeedResourceId
      (\ s a -> s{_acdrSeedResourceId = a})

-- | The reason that the resource is recommended to the user.
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])

--
-- /See:/ 'liveChatMessageRetractedDetails' smart constructor.
newtype LiveChatMessageRetractedDetails =
  LiveChatMessageRetractedDetails'
    { _lcmrdRetractedMessageId :: Maybe Text
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'LiveChatMessageRetractedDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcmrdRetractedMessageId'
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])

--
-- /See:/ 'playListListResponse' smart constructor.
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)


-- | Creates a value of 'PlayListListResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'pllrEtag'
--
-- * 'pllrTokenPagination'
--
-- * 'pllrNextPageToken'
--
-- * 'pllrPageInfo'
--
-- * 'pllrKind'
--
-- * 'pllrItems'
--
-- * 'pllrVisitorId'
--
-- * 'pllrEventId'
--
-- * 'pllrPrevPageToken'
playListListResponse
    :: PlayListListResponse
playListListResponse =
  PlayListListResponse'
    { _pllrEtag = Nothing
    , _pllrTokenPagination = Nothing
    , _pllrNextPageToken = Nothing
    , _pllrPageInfo = Nothing
    , _pllrKind = "youtube#playlistListResponse"
    , _pllrItems = Nothing
    , _pllrVisitorId = Nothing
    , _pllrEventId = Nothing
    , _pllrPrevPageToken = Nothing
    }


-- | Etag of this resource.
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})

-- | The token that can be used as the value of the pageToken parameter to
-- retrieve the next page in the result set.
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})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#playlistListResponse\".
pllrKind :: Lens' PlayListListResponse Text
pllrKind = lens _pllrKind (\ s a -> s{_pllrKind = a})

-- | A list of playlists that match the request criteria.
pllrItems :: Lens' PlayListListResponse [PlayList]
pllrItems
  = lens _pllrItems (\ s a -> s{_pllrItems = a}) .
      _Default
      . _Coerce

-- | The visitorId identifies the visitor.
pllrVisitorId :: Lens' PlayListListResponse (Maybe Text)
pllrVisitorId
  = lens _pllrVisitorId
      (\ s a -> s{_pllrVisitorId = a})

-- | Serialized EventId of the request which produced this response.
pllrEventId :: Lens' PlayListListResponse (Maybe Text)
pllrEventId
  = lens _pllrEventId (\ s a -> s{_pllrEventId = a})

-- | The token that can be used as the value of the pageToken parameter to
-- retrieve the previous page in the result set.
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])

-- | Basic details about a channel section, including title, style and
-- position.
--
-- /See:/ 'channelSectionSnippet' smart constructor.
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)


-- | Creates a value of 'ChannelSectionSnippet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cssStyle'
--
-- * 'cssChannelId'
--
-- * 'cssLocalized'
--
-- * 'cssTitle'
--
-- * 'cssType'
--
-- * 'cssPosition'
--
-- * 'cssDefaultLanguage'
channelSectionSnippet
    :: ChannelSectionSnippet
channelSectionSnippet =
  ChannelSectionSnippet'
    { _cssStyle = Nothing
    , _cssChannelId = Nothing
    , _cssLocalized = Nothing
    , _cssTitle = Nothing
    , _cssType = Nothing
    , _cssPosition = Nothing
    , _cssDefaultLanguage = Nothing
    }


-- | The style of the channel section.
cssStyle :: Lens' ChannelSectionSnippet (Maybe ChannelSectionSnippetStyle)
cssStyle = lens _cssStyle (\ s a -> s{_cssStyle = a})

-- | The ID that YouTube uses to uniquely identify the channel that published
-- the channel section.
cssChannelId :: Lens' ChannelSectionSnippet (Maybe Text)
cssChannelId
  = lens _cssChannelId (\ s a -> s{_cssChannelId = a})

-- | Localized title, read-only.
cssLocalized :: Lens' ChannelSectionSnippet (Maybe ChannelSectionLocalization)
cssLocalized
  = lens _cssLocalized (\ s a -> s{_cssLocalized = a})

-- | The channel section\'s title for multiple_playlists and
-- multiple_channels.
cssTitle :: Lens' ChannelSectionSnippet (Maybe Text)
cssTitle = lens _cssTitle (\ s a -> s{_cssTitle = a})

-- | The type of the channel section.
cssType :: Lens' ChannelSectionSnippet (Maybe ChannelSectionSnippetType)
cssType = lens _cssType (\ s a -> s{_cssType = a})

-- | The position of the channel section in the channel.
cssPosition :: Lens' ChannelSectionSnippet (Maybe Word32)
cssPosition
  = lens _cssPosition (\ s a -> s{_cssPosition = a}) .
      mapping _Coerce

-- | The language of the channel section\'s default title and description.
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])

-- | JSON template for the status part of a channel.
--
-- /See:/ 'channelStatus' smart constructor.
data ChannelStatus =
  ChannelStatus'
    { _csIsLinked          :: !(Maybe Bool)
    , _csLongUploadsStatus :: !(Maybe ChannelStatusLongUploadsStatus)
    , _csPrivacyStatus     :: !(Maybe ChannelStatusPrivacyStatus)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ChannelStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csIsLinked'
--
-- * 'csLongUploadsStatus'
--
-- * 'csPrivacyStatus'
channelStatus
    :: ChannelStatus
channelStatus =
  ChannelStatus'
    { _csIsLinked = Nothing
    , _csLongUploadsStatus = Nothing
    , _csPrivacyStatus = Nothing
    }


-- | If true, then the user is linked to either a YouTube username or G+
-- account. Otherwise, the user doesn\'t have a public YouTube identity.
csIsLinked :: Lens' ChannelStatus (Maybe Bool)
csIsLinked
  = lens _csIsLinked (\ s a -> s{_csIsLinked = a})

-- | The long uploads status of this channel. See
csLongUploadsStatus :: Lens' ChannelStatus (Maybe ChannelStatusLongUploadsStatus)
csLongUploadsStatus
  = lens _csLongUploadsStatus
      (\ s a -> s{_csLongUploadsStatus = a})

-- | Privacy status of the channel.
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])

--
-- /See:/ 'liveChatPollClosedDetails' smart constructor.
newtype LiveChatPollClosedDetails =
  LiveChatPollClosedDetails'
    { _lcpcdPollId :: Maybe Text
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'LiveChatPollClosedDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcpcdPollId'
liveChatPollClosedDetails
    :: LiveChatPollClosedDetails
liveChatPollClosedDetails = LiveChatPollClosedDetails' {_lcpcdPollId = Nothing}


-- | The id of the poll that was closed.
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])

-- | Describes a single promoted item.
--
-- /See:/ 'promotedItem' smart constructor.
data PromotedItem =
  PromotedItem'
    { _piCustomMessage          :: !(Maybe Text)
    , _piPromotedByContentOwner :: !(Maybe Bool)
    , _piId                     :: !(Maybe PromotedItemId)
    , _piTiming                 :: !(Maybe InvideoTiming)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'PromotedItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'piCustomMessage'
--
-- * 'piPromotedByContentOwner'
--
-- * 'piId'
--
-- * 'piTiming'
promotedItem
    :: PromotedItem
promotedItem =
  PromotedItem'
    { _piCustomMessage = Nothing
    , _piPromotedByContentOwner = Nothing
    , _piId = Nothing
    , _piTiming = Nothing
    }


-- | A custom message to display for this promotion. This field is currently
-- ignored unless the promoted item is a website.
piCustomMessage :: Lens' PromotedItem (Maybe Text)
piCustomMessage
  = lens _piCustomMessage
      (\ s a -> s{_piCustomMessage = a})

-- | If true, the content owner\'s name will be used when displaying the
-- promotion. This field can only be set when the update is made on behalf
-- of the content owner.
piPromotedByContentOwner :: Lens' PromotedItem (Maybe Bool)
piPromotedByContentOwner
  = lens _piPromotedByContentOwner
      (\ s a -> s{_piPromotedByContentOwner = a})

-- | Identifies the promoted item.
piId :: Lens' PromotedItem (Maybe PromotedItemId)
piId = lens _piId (\ s a -> s{_piId = a})

-- | The temporal position within the video where the promoted item will be
-- displayed. If present, it overrides the default timing.
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])

--
-- /See:/ 'liveStreamSnippet' smart constructor.
data LiveStreamSnippet =
  LiveStreamSnippet'
    { _lssPublishedAt     :: !(Maybe DateTime')
    , _lssChannelId       :: !(Maybe Text)
    , _lssIsDefaultStream :: !(Maybe Bool)
    , _lssTitle           :: !(Maybe Text)
    , _lssDescription     :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'LiveStreamSnippet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lssPublishedAt'
--
-- * 'lssChannelId'
--
-- * 'lssIsDefaultStream'
--
-- * 'lssTitle'
--
-- * 'lssDescription'
liveStreamSnippet
    :: LiveStreamSnippet
liveStreamSnippet =
  LiveStreamSnippet'
    { _lssPublishedAt = Nothing
    , _lssChannelId = Nothing
    , _lssIsDefaultStream = Nothing
    , _lssTitle = Nothing
    , _lssDescription = Nothing
    }


-- | The date and time that the stream was created. The value is specified in
-- ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
lssPublishedAt :: Lens' LiveStreamSnippet (Maybe UTCTime)
lssPublishedAt
  = lens _lssPublishedAt
      (\ s a -> s{_lssPublishedAt = a})
      . mapping _DateTime

-- | The ID that YouTube uses to uniquely identify the channel that is
-- transmitting the stream.
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})

-- | The stream\'s title. The value must be between 1 and 128 characters
-- long.
lssTitle :: Lens' LiveStreamSnippet (Maybe Text)
lssTitle = lens _lssTitle (\ s a -> s{_lssTitle = a})

-- | The stream\'s description. The value cannot be longer than 10000
-- characters.
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])

-- | A search result contains information about a YouTube video, channel, or
-- playlist that matches the search parameters specified in an API request.
-- While a search result points to a uniquely identifiable resource, like a
-- video, it does not have its own persistent data.
--
-- /See:/ 'searchResult' smart constructor.
data SearchResult =
  SearchResult'
    { _srEtag    :: !(Maybe Text)
    , _srSnippet :: !(Maybe SearchResultSnippet)
    , _srKind    :: !Text
    , _srId      :: !(Maybe ResourceId)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'SearchResult' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'srEtag'
--
-- * 'srSnippet'
--
-- * 'srKind'
--
-- * 'srId'
searchResult
    :: SearchResult
searchResult =
  SearchResult'
    { _srEtag = Nothing
    , _srSnippet = Nothing
    , _srKind = "youtube#searchResult"
    , _srId = Nothing
    }


-- | Etag of this resource.
srEtag :: Lens' SearchResult (Maybe Text)
srEtag = lens _srEtag (\ s a -> s{_srEtag = a})

-- | The snippet object contains basic details about a search result, such as
-- its title or description. For example, if the search result is a video,
-- then the title will be the video\'s title and the description will be
-- the video\'s description.
srSnippet :: Lens' SearchResult (Maybe SearchResultSnippet)
srSnippet
  = lens _srSnippet (\ s a -> s{_srSnippet = a})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#searchResult\".
srKind :: Lens' SearchResult Text
srKind = lens _srKind (\ s a -> s{_srKind = a})

-- | The id object contains information that can be used to uniquely identify
-- the resource that matches the search request.
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])

-- | Stub token pagination template to suppress results.
--
-- /See:/ 'tokenPagination' smart constructor.
data TokenPagination =
  TokenPagination'
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'TokenPagination' with the minimum fields required to make a request.
--
tokenPagination
    :: TokenPagination
tokenPagination = TokenPagination'


instance FromJSON TokenPagination where
        parseJSON
          = withObject "TokenPagination"
              (\ o -> pure TokenPagination')

instance ToJSON TokenPagination where
        toJSON = const emptyObject

-- | A resource id is a generic reference that points to another YouTube
-- resource.
--
-- /See:/ 'resourceId' smart constructor.
data ResourceId =
  ResourceId'
    { _riKind       :: !(Maybe Text)
    , _riChannelId  :: !(Maybe Text)
    , _riVideoId    :: !(Maybe Text)
    , _riPlayListId :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ResourceId' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'riKind'
--
-- * 'riChannelId'
--
-- * 'riVideoId'
--
-- * 'riPlayListId'
resourceId
    :: ResourceId
resourceId =
  ResourceId'
    { _riKind = Nothing
    , _riChannelId = Nothing
    , _riVideoId = Nothing
    , _riPlayListId = Nothing
    }


-- | The type of the API resource.
riKind :: Lens' ResourceId (Maybe Text)
riKind = lens _riKind (\ s a -> s{_riKind = a})

-- | The ID that YouTube uses to uniquely identify the referred resource, if
-- that resource is a channel. This property is only present if the
-- resourceId.kind value is youtube#channel.
riChannelId :: Lens' ResourceId (Maybe Text)
riChannelId
  = lens _riChannelId (\ s a -> s{_riChannelId = a})

-- | The ID that YouTube uses to uniquely identify the referred resource, if
-- that resource is a video. This property is only present if the
-- resourceId.kind value is youtube#video.
riVideoId :: Lens' ResourceId (Maybe Text)
riVideoId
  = lens _riVideoId (\ s a -> s{_riVideoId = a})

-- | The ID that YouTube uses to uniquely identify the referred resource, if
-- that resource is a playlist. This property is only present if the
-- resourceId.kind value is youtube#playlist.
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])

--
-- /See:/ 'searchListResponse' smart constructor.
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)


-- | Creates a value of 'SearchListResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'slrEtag'
--
-- * 'slrTokenPagination'
--
-- * 'slrNextPageToken'
--
-- * 'slrRegionCode'
--
-- * 'slrPageInfo'
--
-- * 'slrKind'
--
-- * 'slrItems'
--
-- * 'slrVisitorId'
--
-- * 'slrEventId'
--
-- * 'slrPrevPageToken'
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
    }


-- | Etag of this resource.
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})

-- | The token that can be used as the value of the pageToken parameter to
-- retrieve the next page in the result set.
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})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#searchListResponse\".
slrKind :: Lens' SearchListResponse Text
slrKind = lens _slrKind (\ s a -> s{_slrKind = a})

-- | A list of results that match the search criteria.
slrItems :: Lens' SearchListResponse [SearchResult]
slrItems
  = lens _slrItems (\ s a -> s{_slrItems = a}) .
      _Default
      . _Coerce

-- | The visitorId identifies the visitor.
slrVisitorId :: Lens' SearchListResponse (Maybe Text)
slrVisitorId
  = lens _slrVisitorId (\ s a -> s{_slrVisitorId = a})

-- | Serialized EventId of the request which produced this response.
slrEventId :: Lens' SearchListResponse (Maybe Text)
slrEventId
  = lens _slrEventId (\ s a -> s{_slrEventId = a})

-- | The token that can be used as the value of the pageToken parameter to
-- retrieve the previous page in the result set.
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])

--
-- /See:/ 'playListStatus' smart constructor.
newtype PlayListStatus =
  PlayListStatus'
    { _plsPrivacyStatus :: Maybe PlayListStatusPrivacyStatus
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'PlayListStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'plsPrivacyStatus'
playListStatus
    :: PlayListStatus
playListStatus = PlayListStatus' {_plsPrivacyStatus = Nothing}


-- | The playlist\'s privacy status.
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])

--
-- /See:/ 'liveChatMessageListResponse' smart constructor.
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)


-- | Creates a value of 'LiveChatMessageListResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcmlrOfflineAt'
--
-- * 'lcmlrEtag'
--
-- * 'lcmlrTokenPagination'
--
-- * 'lcmlrNextPageToken'
--
-- * 'lcmlrPageInfo'
--
-- * 'lcmlrKind'
--
-- * 'lcmlrItems'
--
-- * 'lcmlrVisitorId'
--
-- * 'lcmlrPollingIntervalMillis'
--
-- * 'lcmlrEventId'
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
    }


-- | The date and time when the underlying stream went offline. The value is
-- specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format.
lcmlrOfflineAt :: Lens' LiveChatMessageListResponse (Maybe UTCTime)
lcmlrOfflineAt
  = lens _lcmlrOfflineAt
      (\ s a -> s{_lcmlrOfflineAt = a})
      . mapping _DateTime

-- | Etag of this resource.
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})

-- | The token that can be used as the value of the pageToken parameter to
-- retrieve the next page in the result set.
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})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#liveChatMessageListResponse\".
lcmlrKind :: Lens' LiveChatMessageListResponse Text
lcmlrKind
  = lens _lcmlrKind (\ s a -> s{_lcmlrKind = a})

-- | A list of live chat messages.
lcmlrItems :: Lens' LiveChatMessageListResponse [LiveChatMessage]
lcmlrItems
  = lens _lcmlrItems (\ s a -> s{_lcmlrItems = a}) .
      _Default
      . _Coerce

-- | The visitorId identifies the visitor.
lcmlrVisitorId :: Lens' LiveChatMessageListResponse (Maybe Text)
lcmlrVisitorId
  = lens _lcmlrVisitorId
      (\ s a -> s{_lcmlrVisitorId = a})

-- | The amount of time the client should wait before polling again.
lcmlrPollingIntervalMillis :: Lens' LiveChatMessageListResponse (Maybe Word32)
lcmlrPollingIntervalMillis
  = lens _lcmlrPollingIntervalMillis
      (\ s a -> s{_lcmlrPollingIntervalMillis = a})
      . mapping _Coerce

-- | Serialized EventId of the request which produced this response.
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])

--
-- /See:/ 'channelListResponse' smart constructor.
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)


-- | Creates a value of 'ChannelListResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'clrEtag'
--
-- * 'clrTokenPagination'
--
-- * 'clrNextPageToken'
--
-- * 'clrPageInfo'
--
-- * 'clrKind'
--
-- * 'clrItems'
--
-- * 'clrVisitorId'
--
-- * 'clrEventId'
--
-- * 'clrPrevPageToken'
channelListResponse
    :: ChannelListResponse
channelListResponse =
  ChannelListResponse'
    { _clrEtag = Nothing
    , _clrTokenPagination = Nothing
    , _clrNextPageToken = Nothing
    , _clrPageInfo = Nothing
    , _clrKind = "youtube#channelListResponse"
    , _clrItems = Nothing
    , _clrVisitorId = Nothing
    , _clrEventId = Nothing
    , _clrPrevPageToken = Nothing
    }


-- | Etag of this resource.
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})

-- | The token that can be used as the value of the pageToken parameter to
-- retrieve the next page in the result set.
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})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#channelListResponse\".
clrKind :: Lens' ChannelListResponse Text
clrKind = lens _clrKind (\ s a -> s{_clrKind = a})

-- | A list of channels that match the request criteria.
clrItems :: Lens' ChannelListResponse [Channel]
clrItems
  = lens _clrItems (\ s a -> s{_clrItems = a}) .
      _Default
      . _Coerce

-- | The visitorId identifies the visitor.
clrVisitorId :: Lens' ChannelListResponse (Maybe Text)
clrVisitorId
  = lens _clrVisitorId (\ s a -> s{_clrVisitorId = a})

-- | Serialized EventId of the request which produced this response.
clrEventId :: Lens' ChannelListResponse (Maybe Text)
clrEventId
  = lens _clrEventId (\ s a -> s{_clrEventId = a})

-- | The token that can be used as the value of the pageToken parameter to
-- retrieve the previous page in the result set.
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])

--
-- /See:/ 'channelProFileDetails' smart constructor.
data ChannelProFileDetails =
  ChannelProFileDetails'
    { _cpfdChannelId       :: !(Maybe Text)
    , _cpfdProFileImageURL :: !(Maybe Text)
    , _cpfdDisplayName     :: !(Maybe Text)
    , _cpfdChannelURL      :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ChannelProFileDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cpfdChannelId'
--
-- * 'cpfdProFileImageURL'
--
-- * 'cpfdDisplayName'
--
-- * 'cpfdChannelURL'
channelProFileDetails
    :: ChannelProFileDetails
channelProFileDetails =
  ChannelProFileDetails'
    { _cpfdChannelId = Nothing
    , _cpfdProFileImageURL = Nothing
    , _cpfdDisplayName = Nothing
    , _cpfdChannelURL = Nothing
    }


-- | The YouTube channel ID.
cpfdChannelId :: Lens' ChannelProFileDetails (Maybe Text)
cpfdChannelId
  = lens _cpfdChannelId
      (\ s a -> s{_cpfdChannelId = a})

-- | The channels\'s avatar URL.
cpfdProFileImageURL :: Lens' ChannelProFileDetails (Maybe Text)
cpfdProFileImageURL
  = lens _cpfdProFileImageURL
      (\ s a -> s{_cpfdProFileImageURL = a})

-- | The channel\'s display name.
cpfdDisplayName :: Lens' ChannelProFileDetails (Maybe Text)
cpfdDisplayName
  = lens _cpfdDisplayName
      (\ s a -> s{_cpfdDisplayName = a})

-- | The channel\'s URL.
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])

--
-- /See:/ 'superChatEventListResponse' smart constructor.
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)


-- | Creates a value of 'SuperChatEventListResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'scelrEtag'
--
-- * 'scelrTokenPagination'
--
-- * 'scelrNextPageToken'
--
-- * 'scelrPageInfo'
--
-- * 'scelrKind'
--
-- * 'scelrItems'
--
-- * 'scelrVisitorId'
--
-- * 'scelrEventId'
superChatEventListResponse
    :: SuperChatEventListResponse
superChatEventListResponse =
  SuperChatEventListResponse'
    { _scelrEtag = Nothing
    , _scelrTokenPagination = Nothing
    , _scelrNextPageToken = Nothing
    , _scelrPageInfo = Nothing
    , _scelrKind = "youtube#superChatEventListResponse"
    , _scelrItems = Nothing
    , _scelrVisitorId = Nothing
    , _scelrEventId = Nothing
    }


-- | Etag of this resource.
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})

-- | The token that can be used as the value of the pageToken parameter to
-- retrieve the next page in the result set.
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})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#superChatEventListResponse\".
scelrKind :: Lens' SuperChatEventListResponse Text
scelrKind
  = lens _scelrKind (\ s a -> s{_scelrKind = a})

-- | A list of Super Chat purchases that match the request criteria.
scelrItems :: Lens' SuperChatEventListResponse [SuperChatEvent]
scelrItems
  = lens _scelrItems (\ s a -> s{_scelrItems = a}) .
      _Default
      . _Coerce

-- | The visitorId identifies the visitor.
scelrVisitorId :: Lens' SuperChatEventListResponse (Maybe Text)
scelrVisitorId
  = lens _scelrVisitorId
      (\ s a -> s{_scelrVisitorId = a})

-- | Serialized EventId of the request which produced this response.
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])

--
-- /See:/ 'videoAbuseReportReasonListResponse' smart constructor.
data VideoAbuseReportReasonListResponse =
  VideoAbuseReportReasonListResponse'
    { _varrlrEtag      :: !(Maybe Text)
    , _varrlrKind      :: !Text
    , _varrlrItems     :: !(Maybe [VideoAbuseReportReason])
    , _varrlrVisitorId :: !(Maybe Text)
    , _varrlrEventId   :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'VideoAbuseReportReasonListResponse' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'varrlrEtag'
--
-- * 'varrlrKind'
--
-- * 'varrlrItems'
--
-- * 'varrlrVisitorId'
--
-- * 'varrlrEventId'
videoAbuseReportReasonListResponse
    :: VideoAbuseReportReasonListResponse
videoAbuseReportReasonListResponse =
  VideoAbuseReportReasonListResponse'
    { _varrlrEtag = Nothing
    , _varrlrKind = "youtube#videoAbuseReportReasonListResponse"
    , _varrlrItems = Nothing
    , _varrlrVisitorId = Nothing
    , _varrlrEventId = Nothing
    }


-- | Etag of this resource.
varrlrEtag :: Lens' VideoAbuseReportReasonListResponse (Maybe Text)
varrlrEtag
  = lens _varrlrEtag (\ s a -> s{_varrlrEtag = a})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#videoAbuseReportReasonListResponse\".
varrlrKind :: Lens' VideoAbuseReportReasonListResponse Text
varrlrKind
  = lens _varrlrKind (\ s a -> s{_varrlrKind = a})

-- | A list of valid abuse reasons that are used with video.ReportAbuse.
varrlrItems :: Lens' VideoAbuseReportReasonListResponse [VideoAbuseReportReason]
varrlrItems
  = lens _varrlrItems (\ s a -> s{_varrlrItems = a}) .
      _Default
      . _Coerce

-- | The visitorId identifies the visitor.
varrlrVisitorId :: Lens' VideoAbuseReportReasonListResponse (Maybe Text)
varrlrVisitorId
  = lens _varrlrVisitorId
      (\ s a -> s{_varrlrVisitorId = a})

-- | Serialized EventId of the request which produced this response.
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])

--
-- /See:/ 'liveChatUserBannedMessageDetails' smart constructor.
data LiveChatUserBannedMessageDetails =
  LiveChatUserBannedMessageDetails'
    { _lcubmdBanType            :: !(Maybe LiveChatUserBannedMessageDetailsBanType)
    , _lcubmdBannedUserDetails  :: !(Maybe ChannelProFileDetails)
    , _lcubmdBanDurationSeconds :: !(Maybe (Textual Word64))
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'LiveChatUserBannedMessageDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcubmdBanType'
--
-- * 'lcubmdBannedUserDetails'
--
-- * 'lcubmdBanDurationSeconds'
liveChatUserBannedMessageDetails
    :: LiveChatUserBannedMessageDetails
liveChatUserBannedMessageDetails =
  LiveChatUserBannedMessageDetails'
    { _lcubmdBanType = Nothing
    , _lcubmdBannedUserDetails = Nothing
    , _lcubmdBanDurationSeconds = Nothing
    }


-- | The type of ban.
lcubmdBanType :: Lens' LiveChatUserBannedMessageDetails (Maybe LiveChatUserBannedMessageDetailsBanType)
lcubmdBanType
  = lens _lcubmdBanType
      (\ s a -> s{_lcubmdBanType = a})

-- | The details of the user that was banned.
lcubmdBannedUserDetails :: Lens' LiveChatUserBannedMessageDetails (Maybe ChannelProFileDetails)
lcubmdBannedUserDetails
  = lens _lcubmdBannedUserDetails
      (\ s a -> s{_lcubmdBannedUserDetails = a})

-- | The duration of the ban. This property is only present if the banType is
-- temporary.
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])

-- | Detailed settings of a broadcast.
--
-- /See:/ 'liveBroadcastContentDetails' smart constructor.
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)


-- | Creates a value of 'LiveBroadcastContentDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lbcdEnableContentEncryption'
--
-- * 'lbcdEnableLowLatency'
--
-- * 'lbcdLatencyPreference'
--
-- * 'lbcdClosedCaptionsType'
--
-- * 'lbcdEnableEmbed'
--
-- * 'lbcdStartWithSlate'
--
-- * 'lbcdProjection'
--
-- * 'lbcdMonitorStream'
--
-- * 'lbcdStereoLayout'
--
-- * 'lbcdBoundStreamId'
--
-- * 'lbcdRecordFromStart'
--
-- * 'lbcdMesh'
--
-- * 'lbcdEnableClosedCaptions'
--
-- * 'lbcdEnableAutoStart'
--
-- * 'lbcdBoundStreamLastUpdateTimeMs'
--
-- * 'lbcdEnableDvr'
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
    }


-- | This setting indicates whether YouTube should enable content encryption
-- for the broadcast.
lbcdEnableContentEncryption :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableContentEncryption
  = lens _lbcdEnableContentEncryption
      (\ s a -> s{_lbcdEnableContentEncryption = a})

-- | Indicates whether this broadcast has low latency enabled.
lbcdEnableLowLatency :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableLowLatency
  = lens _lbcdEnableLowLatency
      (\ s a -> s{_lbcdEnableLowLatency = a})

-- | If both this and enable_low_latency are set, they must match.
-- LATENCY_NORMAL should match enable_low_latency=false LATENCY_LOW should
-- match enable_low_latency=true LATENCY_ULTRA_LOW should have
-- enable_low_latency omitted.
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})

-- | This setting indicates whether the broadcast video can be played in an
-- embedded player. If you choose to archive the video (using the
-- enableArchive property), this setting will also apply to the archived
-- video.
lbcdEnableEmbed :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableEmbed
  = lens _lbcdEnableEmbed
      (\ s a -> s{_lbcdEnableEmbed = a})

-- | This setting indicates whether the broadcast should automatically begin
-- with an in-stream slate when you update the broadcast\'s status to live.
-- After updating the status, you then need to send a liveCuepoints.insert
-- request that sets the cuepoint\'s eventState to end to remove the
-- in-stream slate and make your broadcast stream visible to viewers.
lbcdStartWithSlate :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdStartWithSlate
  = lens _lbcdStartWithSlate
      (\ s a -> s{_lbcdStartWithSlate = a})

-- | The projection format of this broadcast. This defaults to rectangular.
lbcdProjection :: Lens' LiveBroadcastContentDetails (Maybe LiveBroadcastContentDetailsProjection)
lbcdProjection
  = lens _lbcdProjection
      (\ s a -> s{_lbcdProjection = a})

-- | The monitorStream object contains information about the monitor stream,
-- which the broadcaster can use to review the event content before the
-- broadcast stream is shown publicly.
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})

-- | This value uniquely identifies the live stream bound to the broadcast.
lbcdBoundStreamId :: Lens' LiveBroadcastContentDetails (Maybe Text)
lbcdBoundStreamId
  = lens _lbcdBoundStreamId
      (\ s a -> s{_lbcdBoundStreamId = a})

-- | Automatically start recording after the event goes live. The default
-- value for this property is true. Important: You must also set the
-- enableDvr property\'s value to true if you want the playback to be
-- available immediately after the broadcast ends. If you set this
-- property\'s value to true but do not also set the enableDvr property to
-- true, there may be a delay of around one day before the archived video
-- will be available for playback.
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

-- | This setting indicates whether HTTP POST closed captioning is enabled
-- for this broadcast. The ingestion URL of the closed captions is returned
-- through the liveStreams API. This is mutually exclusive with using the
-- closed_captions_type property, and is equivalent to setting
-- closed_captions_type to CLOSED_CAPTIONS_HTTP_POST.
lbcdEnableClosedCaptions :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableClosedCaptions
  = lens _lbcdEnableClosedCaptions
      (\ s a -> s{_lbcdEnableClosedCaptions = a})

-- | This setting indicates whether auto start is enabled for this broadcast.
lbcdEnableAutoStart :: Lens' LiveBroadcastContentDetails (Maybe Bool)
lbcdEnableAutoStart
  = lens _lbcdEnableAutoStart
      (\ s a -> s{_lbcdEnableAutoStart = a})

-- | The date and time that the live stream referenced by boundStreamId was
-- last updated.
lbcdBoundStreamLastUpdateTimeMs :: Lens' LiveBroadcastContentDetails (Maybe UTCTime)
lbcdBoundStreamLastUpdateTimeMs
  = lens _lbcdBoundStreamLastUpdateTimeMs
      (\ s a -> s{_lbcdBoundStreamLastUpdateTimeMs = a})
      . mapping _DateTime

-- | This setting determines whether viewers can access DVR controls while
-- watching the video. DVR controls enable the viewer to control the video
-- playback experience by pausing, rewinding, or fast forwarding content.
-- The default value for this property is true. Important: You must set the
-- value to true and also set the enableArchive property\'s value to true
-- if you want to make playback available immediately after the broadcast
-- ends.
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])

--
-- /See:/ 'channelSection' smart constructor.
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)


-- | Creates a value of 'ChannelSection' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csEtag'
--
-- * 'csSnippet'
--
-- * 'csKind'
--
-- * 'csContentDetails'
--
-- * 'csTargeting'
--
-- * 'csId'
--
-- * 'csLocalizations'
channelSection
    :: ChannelSection
channelSection =
  ChannelSection'
    { _csEtag = Nothing
    , _csSnippet = Nothing
    , _csKind = "youtube#channelSection"
    , _csContentDetails = Nothing
    , _csTargeting = Nothing
    , _csId = Nothing
    , _csLocalizations = Nothing
    }


-- | Etag of this resource.
csEtag :: Lens' ChannelSection (Maybe Text)
csEtag = lens _csEtag (\ s a -> s{_csEtag = a})

-- | The snippet object contains basic details about the channel section,
-- such as its type, style and title.
csSnippet :: Lens' ChannelSection (Maybe ChannelSectionSnippet)
csSnippet
  = lens _csSnippet (\ s a -> s{_csSnippet = a})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#channelSection\".
csKind :: Lens' ChannelSection Text
csKind = lens _csKind (\ s a -> s{_csKind = a})

-- | The contentDetails object contains details about the channel section
-- content, such as a list of playlists or channels featured in the
-- section.
csContentDetails :: Lens' ChannelSection (Maybe ChannelSectionContentDetails)
csContentDetails
  = lens _csContentDetails
      (\ s a -> s{_csContentDetails = a})

-- | The targeting object contains basic targeting settings about the channel
-- section.
csTargeting :: Lens' ChannelSection (Maybe ChannelSectionTargeting)
csTargeting
  = lens _csTargeting (\ s a -> s{_csTargeting = a})

-- | The ID that YouTube uses to uniquely identify the channel section.
csId :: Lens' ChannelSection (Maybe Text)
csId = lens _csId (\ s a -> s{_csId = a})

-- | Localizations for different languages
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])

--
-- /See:/ 'channelContentDetailsRelatedPlayLists' smart constructor.
data ChannelContentDetailsRelatedPlayLists =
  ChannelContentDetailsRelatedPlayLists'
    { _ccdrplFavorites    :: !(Maybe Text)
    , _ccdrplWatchHistory :: !(Maybe Text)
    , _ccdrplWatchLater   :: !(Maybe Text)
    , _ccdrplUploads      :: !(Maybe Text)
    , _ccdrplLikes        :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ChannelContentDetailsRelatedPlayLists' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ccdrplFavorites'
--
-- * 'ccdrplWatchHistory'
--
-- * 'ccdrplWatchLater'
--
-- * 'ccdrplUploads'
--
-- * 'ccdrplLikes'
channelContentDetailsRelatedPlayLists
    :: ChannelContentDetailsRelatedPlayLists
channelContentDetailsRelatedPlayLists =
  ChannelContentDetailsRelatedPlayLists'
    { _ccdrplFavorites = Nothing
    , _ccdrplWatchHistory = Nothing
    , _ccdrplWatchLater = Nothing
    , _ccdrplUploads = Nothing
    , _ccdrplLikes = Nothing
    }


-- | The ID of the playlist that contains the channel\"s favorite videos. Use
-- the playlistItems.insert and playlistItems.delete to add or remove items
-- from that list.
ccdrplFavorites :: Lens' ChannelContentDetailsRelatedPlayLists (Maybe Text)
ccdrplFavorites
  = lens _ccdrplFavorites
      (\ s a -> s{_ccdrplFavorites = a})

-- | The ID of the playlist that contains the channel\"s watch history. Use
-- the playlistItems.insert and playlistItems.delete to add or remove items
-- from that list.
ccdrplWatchHistory :: Lens' ChannelContentDetailsRelatedPlayLists (Maybe Text)
ccdrplWatchHistory
  = lens _ccdrplWatchHistory
      (\ s a -> s{_ccdrplWatchHistory = a})

-- | The ID of the playlist that contains the channel\"s watch later
-- playlist. Use the playlistItems.insert and playlistItems.delete to add
-- or remove items from that list.
ccdrplWatchLater :: Lens' ChannelContentDetailsRelatedPlayLists (Maybe Text)
ccdrplWatchLater
  = lens _ccdrplWatchLater
      (\ s a -> s{_ccdrplWatchLater = a})

-- | The ID of the playlist that contains the channel\"s uploaded videos. Use
-- the videos.insert method to upload new videos and the videos.delete
-- method to delete previously uploaded videos.
ccdrplUploads :: Lens' ChannelContentDetailsRelatedPlayLists (Maybe Text)
ccdrplUploads
  = lens _ccdrplUploads
      (\ s a -> s{_ccdrplUploads = a})

-- | The ID of the playlist that contains the channel\"s liked videos. Use
-- the playlistItems.insert and playlistItems.delete to add or remove items
-- from that list.
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])

-- | A live stream describes a live ingestion point.
--
-- /See:/ 'liveStream' smart constructor.
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)


-- | Creates a value of 'LiveStream' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lsStatus'
--
-- * 'lsEtag'
--
-- * 'lsSnippet'
--
-- * 'lsKind'
--
-- * 'lsContentDetails'
--
-- * 'lsId'
--
-- * 'lsCdn'
liveStream
    :: LiveStream
liveStream =
  LiveStream'
    { _lsStatus = Nothing
    , _lsEtag = Nothing
    , _lsSnippet = Nothing
    , _lsKind = "youtube#liveStream"
    , _lsContentDetails = Nothing
    , _lsId = Nothing
    , _lsCdn = Nothing
    }


-- | The status object contains information about live stream\'s status.
lsStatus :: Lens' LiveStream (Maybe LiveStreamStatus)
lsStatus = lens _lsStatus (\ s a -> s{_lsStatus = a})

-- | Etag of this resource.
lsEtag :: Lens' LiveStream (Maybe Text)
lsEtag = lens _lsEtag (\ s a -> s{_lsEtag = a})

-- | The snippet object contains basic details about the stream, including
-- its channel, title, and description.
lsSnippet :: Lens' LiveStream (Maybe LiveStreamSnippet)
lsSnippet
  = lens _lsSnippet (\ s a -> s{_lsSnippet = a})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#liveStream\".
lsKind :: Lens' LiveStream Text
lsKind = lens _lsKind (\ s a -> s{_lsKind = a})

-- | The content_details object contains information about the stream,
-- including the closed captions ingestion URL.
lsContentDetails :: Lens' LiveStream (Maybe LiveStreamContentDetails)
lsContentDetails
  = lens _lsContentDetails
      (\ s a -> s{_lsContentDetails = a})

-- | The ID that YouTube assigns to uniquely identify the stream.
lsId :: Lens' LiveStream (Maybe Text)
lsId = lens _lsId (\ s a -> s{_lsId = a})

-- | The cdn object defines the live stream\'s content delivery network (CDN)
-- settings. These settings provide details about the manner in which you
-- stream your content to YouTube.
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])

-- | Information about a video that was marked as a favorite video.
--
-- /See:/ 'activityContentDetailsFavorite' smart constructor.
newtype ActivityContentDetailsFavorite =
  ActivityContentDetailsFavorite'
    { _acdfResourceId :: Maybe ResourceId
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ActivityContentDetailsFavorite' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acdfResourceId'
activityContentDetailsFavorite
    :: ActivityContentDetailsFavorite
activityContentDetailsFavorite =
  ActivityContentDetailsFavorite' {_acdfResourceId = Nothing}


-- | The resourceId object contains information that identifies the resource
-- that was marked as a favorite.
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])

-- | Details about the content of a YouTube Video.
--
-- /See:/ 'videoContentDetails' smart constructor.
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)


-- | Creates a value of 'VideoContentDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vcdCountryRestriction'
--
-- * 'vcdHasCustomThumbnail'
--
-- * 'vcdDefinition'
--
-- * 'vcdDimension'
--
-- * 'vcdCaption'
--
-- * 'vcdRegionRestriction'
--
-- * 'vcdProjection'
--
-- * 'vcdDuration'
--
-- * 'vcdContentRating'
--
-- * 'vcdLicensedContent'
videoContentDetails
    :: VideoContentDetails
videoContentDetails =
  VideoContentDetails'
    { _vcdCountryRestriction = Nothing
    , _vcdHasCustomThumbnail = Nothing
    , _vcdDefinition = Nothing
    , _vcdDimension = Nothing
    , _vcdCaption = Nothing
    , _vcdRegionRestriction = Nothing
    , _vcdProjection = Nothing
    , _vcdDuration = Nothing
    , _vcdContentRating = Nothing
    , _vcdLicensedContent = Nothing
    }


-- | The countryRestriction object contains information about the countries
-- where a video is (or is not) viewable.
vcdCountryRestriction :: Lens' VideoContentDetails (Maybe AccessPolicy)
vcdCountryRestriction
  = lens _vcdCountryRestriction
      (\ s a -> s{_vcdCountryRestriction = a})

-- | Indicates whether the video uploader has provided a custom thumbnail
-- image for the video. This property is only visible to the video
-- uploader.
vcdHasCustomThumbnail :: Lens' VideoContentDetails (Maybe Bool)
vcdHasCustomThumbnail
  = lens _vcdHasCustomThumbnail
      (\ s a -> s{_vcdHasCustomThumbnail = a})

-- | The value of definition indicates whether the video is available in high
-- definition or only in standard definition.
vcdDefinition :: Lens' VideoContentDetails (Maybe VideoContentDetailsDefinition)
vcdDefinition
  = lens _vcdDefinition
      (\ s a -> s{_vcdDefinition = a})

-- | The value of dimension indicates whether the video is available in 3D or
-- in 2D.
vcdDimension :: Lens' VideoContentDetails (Maybe Text)
vcdDimension
  = lens _vcdDimension (\ s a -> s{_vcdDimension = a})

-- | The value of captions indicates whether the video has captions or not.
vcdCaption :: Lens' VideoContentDetails (Maybe VideoContentDetailsCaption)
vcdCaption
  = lens _vcdCaption (\ s a -> s{_vcdCaption = a})

-- | The regionRestriction object contains information about the countries
-- where a video is (or is not) viewable. The object will contain either
-- the contentDetails.regionRestriction.allowed property or the
-- contentDetails.regionRestriction.blocked property.
vcdRegionRestriction :: Lens' VideoContentDetails (Maybe VideoContentDetailsRegionRestriction)
vcdRegionRestriction
  = lens _vcdRegionRestriction
      (\ s a -> s{_vcdRegionRestriction = a})

-- | Specifies the projection format of the video.
vcdProjection :: Lens' VideoContentDetails (Maybe VideoContentDetailsProjection)
vcdProjection
  = lens _vcdProjection
      (\ s a -> s{_vcdProjection = a})

-- | The length of the video. The tag value is an ISO 8601 duration in the
-- format PT#M#S, in which the letters PT indicate that the value specifies
-- a period of time, and the letters M and S refer to length in minutes and
-- seconds, respectively. The # characters preceding the M and S letters
-- are both integers that specify the number of minutes (or seconds) of the
-- video. For example, a value of PT15M51S indicates that the video is 15
-- minutes and 51 seconds long.
vcdDuration :: Lens' VideoContentDetails (Maybe Text)
vcdDuration
  = lens _vcdDuration (\ s a -> s{_vcdDuration = a})

-- | Specifies the ratings that the video received under various rating
-- schemes.
vcdContentRating :: Lens' VideoContentDetails (Maybe ContentRating)
vcdContentRating
  = lens _vcdContentRating
      (\ s a -> s{_vcdContentRating = a})

-- | The value of is_license_content indicates whether the video is licensed
-- content.
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])

-- | Branding properties for images associated with the channel.
--
-- /See:/ 'imageSettings' smart constructor.
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)


-- | Creates a value of 'ImageSettings' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'isBannerMobileLowImageURL'
--
-- * 'isBannerTabletExtraHdImageURL'
--
-- * 'isSmallBrandedBannerImageImapScript'
--
-- * 'isBannerTvHighImageURL'
--
-- * 'isBannerMobileHdImageURL'
--
-- * 'isBannerTvMediumImageURL'
--
-- * 'isBannerTvImageURL'
--
-- * 'isBannerTabletImageURL'
--
-- * 'isBannerMobileImageURL'
--
-- * 'isTrackingImageURL'
--
-- * 'isBannerMobileMediumHdImageURL'
--
-- * 'isLargeBrandedBannerImageURL'
--
-- * 'isBannerExternalURL'
--
-- * 'isBackgRoundImageURL'
--
-- * 'isSmallBrandedBannerImageURL'
--
-- * 'isBannerImageURL'
--
-- * 'isWatchIconImageURL'
--
-- * 'isBannerTvLowImageURL'
--
-- * 'isBannerMobileExtraHdImageURL'
--
-- * 'isLargeBrandedBannerImageImapScript'
--
-- * 'isBannerTabletLowImageURL'
--
-- * 'isBannerTabletHdImageURL'
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
    }


-- | Banner image. Mobile size low resolution (320x88).
isBannerMobileLowImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileLowImageURL
  = lens _isBannerMobileLowImageURL
      (\ s a -> s{_isBannerMobileLowImageURL = a})

-- | Banner image. Tablet size extra high resolution (2560x424).
isBannerTabletExtraHdImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTabletExtraHdImageURL
  = lens _isBannerTabletExtraHdImageURL
      (\ s a -> s{_isBannerTabletExtraHdImageURL = a})

-- | The image map script for the small banner image.
isSmallBrandedBannerImageImapScript :: Lens' ImageSettings (Maybe LocalizedProperty)
isSmallBrandedBannerImageImapScript
  = lens _isSmallBrandedBannerImageImapScript
      (\ s a ->
         s{_isSmallBrandedBannerImageImapScript = a})

-- | Banner image. TV size high resolution (1920x1080).
isBannerTvHighImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTvHighImageURL
  = lens _isBannerTvHighImageURL
      (\ s a -> s{_isBannerTvHighImageURL = a})

-- | Banner image. Mobile size high resolution (1280x360).
isBannerMobileHdImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileHdImageURL
  = lens _isBannerMobileHdImageURL
      (\ s a -> s{_isBannerMobileHdImageURL = a})

-- | Banner image. TV size medium resolution (1280x720).
isBannerTvMediumImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTvMediumImageURL
  = lens _isBannerTvMediumImageURL
      (\ s a -> s{_isBannerTvMediumImageURL = a})

-- | Banner image. TV size extra high resolution (2120x1192).
isBannerTvImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTvImageURL
  = lens _isBannerTvImageURL
      (\ s a -> s{_isBannerTvImageURL = a})

-- | Banner image. Tablet size (1707x283).
isBannerTabletImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTabletImageURL
  = lens _isBannerTabletImageURL
      (\ s a -> s{_isBannerTabletImageURL = a})

-- | Banner image. Mobile size (640x175).
isBannerMobileImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileImageURL
  = lens _isBannerMobileImageURL
      (\ s a -> s{_isBannerMobileImageURL = a})

-- | The URL for a 1px by 1px tracking pixel that can be used to collect
-- statistics for views of the channel or video pages.
isTrackingImageURL :: Lens' ImageSettings (Maybe Text)
isTrackingImageURL
  = lens _isTrackingImageURL
      (\ s a -> s{_isTrackingImageURL = a})

-- | Banner image. Mobile size medium\/high resolution (960x263).
isBannerMobileMediumHdImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileMediumHdImageURL
  = lens _isBannerMobileMediumHdImageURL
      (\ s a -> s{_isBannerMobileMediumHdImageURL = a})

-- | The URL for the 854px by 70px image that appears below the video player
-- in the expanded video view of the video watch page.
isLargeBrandedBannerImageURL :: Lens' ImageSettings (Maybe LocalizedProperty)
isLargeBrandedBannerImageURL
  = lens _isLargeBrandedBannerImageURL
      (\ s a -> s{_isLargeBrandedBannerImageURL = a})

-- | This is used only in update requests; if it\'s set, we use this URL to
-- generate all of the above banner URLs.
isBannerExternalURL :: Lens' ImageSettings (Maybe Text)
isBannerExternalURL
  = lens _isBannerExternalURL
      (\ s a -> s{_isBannerExternalURL = a})

-- | The URL for the background image shown on the video watch page. The
-- image should be 1200px by 615px, with a maximum file size of 128k.
isBackgRoundImageURL :: Lens' ImageSettings (Maybe LocalizedProperty)
isBackgRoundImageURL
  = lens _isBackgRoundImageURL
      (\ s a -> s{_isBackgRoundImageURL = a})

-- | The URL for the 640px by 70px banner image that appears below the video
-- player in the default view of the video watch page.
isSmallBrandedBannerImageURL :: Lens' ImageSettings (Maybe LocalizedProperty)
isSmallBrandedBannerImageURL
  = lens _isSmallBrandedBannerImageURL
      (\ s a -> s{_isSmallBrandedBannerImageURL = a})

-- | Banner image. Desktop size (1060x175).
isBannerImageURL :: Lens' ImageSettings (Maybe Text)
isBannerImageURL
  = lens _isBannerImageURL
      (\ s a -> s{_isBannerImageURL = a})

-- | The URL for the image that appears above the top-left corner of the
-- video player. This is a 25-pixel-high image with a flexible width that
-- cannot exceed 170 pixels.
isWatchIconImageURL :: Lens' ImageSettings (Maybe Text)
isWatchIconImageURL
  = lens _isWatchIconImageURL
      (\ s a -> s{_isWatchIconImageURL = a})

-- | Banner image. TV size low resolution (854x480).
isBannerTvLowImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTvLowImageURL
  = lens _isBannerTvLowImageURL
      (\ s a -> s{_isBannerTvLowImageURL = a})

-- | Banner image. Mobile size high resolution (1440x395).
isBannerMobileExtraHdImageURL :: Lens' ImageSettings (Maybe Text)
isBannerMobileExtraHdImageURL
  = lens _isBannerMobileExtraHdImageURL
      (\ s a -> s{_isBannerMobileExtraHdImageURL = a})

-- | The image map script for the large banner image.
isLargeBrandedBannerImageImapScript :: Lens' ImageSettings (Maybe LocalizedProperty)
isLargeBrandedBannerImageImapScript
  = lens _isLargeBrandedBannerImageImapScript
      (\ s a ->
         s{_isLargeBrandedBannerImageImapScript = a})

-- | Banner image. Tablet size low resolution (1138x188).
isBannerTabletLowImageURL :: Lens' ImageSettings (Maybe Text)
isBannerTabletLowImageURL
  = lens _isBannerTabletLowImageURL
      (\ s a -> s{_isBannerTabletLowImageURL = a})

-- | Banner image. Tablet size high resolution (2276x377).
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])

-- | Freebase topic information related to the video.
--
-- /See:/ 'videoTopicDetails' smart constructor.
data VideoTopicDetails =
  VideoTopicDetails'
    { _vtdTopicIds         :: !(Maybe [Text])
    , _vtdRelevantTopicIds :: !(Maybe [Text])
    , _vtdTopicCategories  :: !(Maybe [Text])
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'VideoTopicDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'vtdTopicIds'
--
-- * 'vtdRelevantTopicIds'
--
-- * 'vtdTopicCategories'
videoTopicDetails
    :: VideoTopicDetails
videoTopicDetails =
  VideoTopicDetails'
    { _vtdTopicIds = Nothing
    , _vtdRelevantTopicIds = Nothing
    , _vtdTopicCategories = Nothing
    }


-- | A list of Freebase topic IDs that are centrally associated with the
-- video. These are topics that are centrally featured in the video, and it
-- can be said that the video is mainly about each of these. You can
-- retrieve information about each topic using the Freebase Topic API.
vtdTopicIds :: Lens' VideoTopicDetails [Text]
vtdTopicIds
  = lens _vtdTopicIds (\ s a -> s{_vtdTopicIds = a}) .
      _Default
      . _Coerce

-- | Similar to topic_id, except that these topics are merely relevant to the
-- video. These are topics that may be mentioned in, or appear in the
-- video. You can retrieve information about each topic using Freebase
-- Topic API.
vtdRelevantTopicIds :: Lens' VideoTopicDetails [Text]
vtdRelevantTopicIds
  = lens _vtdRelevantTopicIds
      (\ s a -> s{_vtdRelevantTopicIds = a})
      . _Default
      . _Coerce

-- | A list of Wikipedia URLs that provide a high-level description of the
-- video\'s content.
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])

-- | Information about a resource that received a comment.
--
-- /See:/ 'activityContentDetailsComment' smart constructor.
newtype ActivityContentDetailsComment =
  ActivityContentDetailsComment'
    { _acdcResourceId :: Maybe ResourceId
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ActivityContentDetailsComment' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acdcResourceId'
activityContentDetailsComment
    :: ActivityContentDetailsComment
activityContentDetailsComment =
  ActivityContentDetailsComment' {_acdcResourceId = Nothing}


-- | The resourceId object contains information that identifies the resource
-- associated with the comment.
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])

--
-- /See:/ 'liveBroadcastStatus' smart constructor.
data LiveBroadcastStatus =
  LiveBroadcastStatus'
    { _lbsLiveBroadcastPriority :: !(Maybe LiveBroadcastStatusLiveBroadcastPriority)
    , _lbsRecordingStatus       :: !(Maybe LiveBroadcastStatusRecordingStatus)
    , _lbsLifeCycleStatus       :: !(Maybe LiveBroadcastStatusLifeCycleStatus)
    , _lbsPrivacyStatus         :: !(Maybe LiveBroadcastStatusPrivacyStatus)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'LiveBroadcastStatus' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lbsLiveBroadcastPriority'
--
-- * 'lbsRecordingStatus'
--
-- * 'lbsLifeCycleStatus'
--
-- * 'lbsPrivacyStatus'
liveBroadcastStatus
    :: LiveBroadcastStatus
liveBroadcastStatus =
  LiveBroadcastStatus'
    { _lbsLiveBroadcastPriority = Nothing
    , _lbsRecordingStatus = Nothing
    , _lbsLifeCycleStatus = Nothing
    , _lbsPrivacyStatus = Nothing
    }


-- | Priority of the live broadcast event (internal state).
lbsLiveBroadcastPriority :: Lens' LiveBroadcastStatus (Maybe LiveBroadcastStatusLiveBroadcastPriority)
lbsLiveBroadcastPriority
  = lens _lbsLiveBroadcastPriority
      (\ s a -> s{_lbsLiveBroadcastPriority = a})

-- | The broadcast\'s recording status.
lbsRecordingStatus :: Lens' LiveBroadcastStatus (Maybe LiveBroadcastStatusRecordingStatus)
lbsRecordingStatus
  = lens _lbsRecordingStatus
      (\ s a -> s{_lbsRecordingStatus = a})

-- | The broadcast\'s status. The status can be updated using the API\'s
-- liveBroadcasts.transition method.
lbsLifeCycleStatus :: Lens' LiveBroadcastStatus (Maybe LiveBroadcastStatusLifeCycleStatus)
lbsLifeCycleStatus
  = lens _lbsLifeCycleStatus
      (\ s a -> s{_lbsLifeCycleStatus = a})

-- | The broadcast\'s privacy status. Note that the broadcast represents
-- exactly one YouTube video, so the privacy settings are identical to
-- those supported for videos. In addition, you can set this field by
-- modifying the broadcast resource or by setting the privacyStatus field
-- of the corresponding video resource.
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])

-- | Information about the uploaded video.
--
-- /See:/ 'activityContentDetailsUpload' smart constructor.
newtype ActivityContentDetailsUpload =
  ActivityContentDetailsUpload'
    { _acduVideoId :: Maybe Text
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ActivityContentDetailsUpload' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acduVideoId'
activityContentDetailsUpload
    :: ActivityContentDetailsUpload
activityContentDetailsUpload =
  ActivityContentDetailsUpload' {_acduVideoId = Nothing}


-- | The ID that YouTube uses to uniquely identify the uploaded video.
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])

-- | Information about a new playlist item.
--
-- /See:/ 'activityContentDetailsPlayListItem' smart constructor.
data ActivityContentDetailsPlayListItem =
  ActivityContentDetailsPlayListItem'
    { _acdpliResourceId     :: !(Maybe ResourceId)
    , _acdpliPlayListId     :: !(Maybe Text)
    , _acdpliPlayListItemId :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ActivityContentDetailsPlayListItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acdpliResourceId'
--
-- * 'acdpliPlayListId'
--
-- * 'acdpliPlayListItemId'
activityContentDetailsPlayListItem
    :: ActivityContentDetailsPlayListItem
activityContentDetailsPlayListItem =
  ActivityContentDetailsPlayListItem'
    { _acdpliResourceId = Nothing
    , _acdpliPlayListId = Nothing
    , _acdpliPlayListItemId = Nothing
    }


-- | The resourceId object contains information about the resource that was
-- added to the playlist.
acdpliResourceId :: Lens' ActivityContentDetailsPlayListItem (Maybe ResourceId)
acdpliResourceId
  = lens _acdpliResourceId
      (\ s a -> s{_acdpliResourceId = a})

-- | The value that YouTube uses to uniquely identify the playlist.
acdpliPlayListId :: Lens' ActivityContentDetailsPlayListItem (Maybe Text)
acdpliPlayListId
  = lens _acdpliPlayListId
      (\ s a -> s{_acdpliPlayListId = a})

-- | ID of the item within the playlist.
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])

--
-- /See:/ 'superStickerMetadata' smart constructor.
data SuperStickerMetadata =
  SuperStickerMetadata'
    { _ssmAltText         :: !(Maybe Text)
    , _ssmStickerId       :: !(Maybe Text)
    , _ssmAltTextLanguage :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'SuperStickerMetadata' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ssmAltText'
--
-- * 'ssmStickerId'
--
-- * 'ssmAltTextLanguage'
superStickerMetadata
    :: SuperStickerMetadata
superStickerMetadata =
  SuperStickerMetadata'
    { _ssmAltText = Nothing
    , _ssmStickerId = Nothing
    , _ssmAltTextLanguage = Nothing
    }


-- | Internationalized alt text that describes the sticker image and any
-- animation associated with it.
ssmAltText :: Lens' SuperStickerMetadata (Maybe Text)
ssmAltText
  = lens _ssmAltText (\ s a -> s{_ssmAltText = a})

-- | Unique identifier of the Super Sticker. This is a shorter form of the
-- alt_text that includes pack name and a recognizable characteristic of
-- the sticker.
ssmStickerId :: Lens' SuperStickerMetadata (Maybe Text)
ssmStickerId
  = lens _ssmStickerId (\ s a -> s{_ssmStickerId = a})

-- | Specifies the localization language in which the alt text is returned.
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])

-- | Details about a social network post.
--
-- /See:/ 'activityContentDetailsSocial' smart constructor.
data ActivityContentDetailsSocial =
  ActivityContentDetailsSocial'
    { _acdsResourceId   :: !(Maybe ResourceId)
    , _acdsImageURL     :: !(Maybe Text)
    , _acdsAuthor       :: !(Maybe Text)
    , _acdsReferenceURL :: !(Maybe Text)
    , _acdsType         :: !(Maybe ActivityContentDetailsSocialType)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ActivityContentDetailsSocial' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acdsResourceId'
--
-- * 'acdsImageURL'
--
-- * 'acdsAuthor'
--
-- * 'acdsReferenceURL'
--
-- * 'acdsType'
activityContentDetailsSocial
    :: ActivityContentDetailsSocial
activityContentDetailsSocial =
  ActivityContentDetailsSocial'
    { _acdsResourceId = Nothing
    , _acdsImageURL = Nothing
    , _acdsAuthor = Nothing
    , _acdsReferenceURL = Nothing
    , _acdsType = Nothing
    }


-- | The resourceId object encapsulates information that identifies the
-- resource associated with a social network post.
acdsResourceId :: Lens' ActivityContentDetailsSocial (Maybe ResourceId)
acdsResourceId
  = lens _acdsResourceId
      (\ s a -> s{_acdsResourceId = a})

-- | An image of the post\'s author.
acdsImageURL :: Lens' ActivityContentDetailsSocial (Maybe Text)
acdsImageURL
  = lens _acdsImageURL (\ s a -> s{_acdsImageURL = a})

-- | The author of the social network post.
acdsAuthor :: Lens' ActivityContentDetailsSocial (Maybe Text)
acdsAuthor
  = lens _acdsAuthor (\ s a -> s{_acdsAuthor = a})

-- | The URL of the social network post.
acdsReferenceURL :: Lens' ActivityContentDetailsSocial (Maybe Text)
acdsReferenceURL
  = lens _acdsReferenceURL
      (\ s a -> s{_acdsReferenceURL = a})

-- | The name of the social network.
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])

-- | A liveChatBan resource represents a ban for a YouTube live chat.
--
-- /See:/ 'liveChatBan' smart constructor.
data LiveChatBan =
  LiveChatBan'
    { _lcbEtag    :: !(Maybe Text)
    , _lcbSnippet :: !(Maybe LiveChatBanSnippet)
    , _lcbKind    :: !Text
    , _lcbId      :: !(Maybe Text)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'LiveChatBan' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcbEtag'
--
-- * 'lcbSnippet'
--
-- * 'lcbKind'
--
-- * 'lcbId'
liveChatBan
    :: LiveChatBan
liveChatBan =
  LiveChatBan'
    { _lcbEtag = Nothing
    , _lcbSnippet = Nothing
    , _lcbKind = "youtube#liveChatBan"
    , _lcbId = Nothing
    }


-- | Etag of this resource.
lcbEtag :: Lens' LiveChatBan (Maybe Text)
lcbEtag = lens _lcbEtag (\ s a -> s{_lcbEtag = a})

-- | The snippet object contains basic details about the ban.
lcbSnippet :: Lens' LiveChatBan (Maybe LiveChatBanSnippet)
lcbSnippet
  = lens _lcbSnippet (\ s a -> s{_lcbSnippet = a})

-- | Identifies what kind of resource this is. Value: the fixed string
-- \"youtube#liveChatBan\".
lcbKind :: Lens' LiveChatBan Text
lcbKind = lens _lcbKind (\ s a -> s{_lcbKind = a})

-- | The ID that YouTube assigns to uniquely identify the ban.
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])

-- | Information about a channel that a user subscribed to.
--
-- /See:/ 'activityContentDetailsSubscription' smart constructor.
newtype ActivityContentDetailsSubscription =
  ActivityContentDetailsSubscription'
    { _aResourceId :: Maybe ResourceId
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ActivityContentDetailsSubscription' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aResourceId'
activityContentDetailsSubscription
    :: ActivityContentDetailsSubscription
activityContentDetailsSubscription =
  ActivityContentDetailsSubscription' {_aResourceId = Nothing}


-- | The resourceId object contains information that identifies the resource
-- that the user subscribed to.
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])

-- | Information about a resource that received a positive (like) rating.
--
-- /See:/ 'activityContentDetailsLike' smart constructor.
newtype ActivityContentDetailsLike =
  ActivityContentDetailsLike'
    { _acdlResourceId :: Maybe ResourceId
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'ActivityContentDetailsLike' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'acdlResourceId'
activityContentDetailsLike
    :: ActivityContentDetailsLike
activityContentDetailsLike =
  ActivityContentDetailsLike' {_acdlResourceId = Nothing}


-- | The resourceId object contains information that identifies the rated
-- resource.
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])

--
-- /See:/ 'playListContentDetails' smart constructor.
newtype PlayListContentDetails =
  PlayListContentDetails'
    { _plcdItemCount :: Maybe (Textual Word32)
    }
  deriving (Eq, Show, Data, Typeable, Generic)


-- | Creates a value of 'PlayListContentDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'plcdItemCount'
playListContentDetails
    :: PlayListContentDetails
playListContentDetails = PlayListContentDetails' {_plcdItemCount = Nothing}


-- | The number of videos in the playlist.
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])

--
-- /See:/ 'liveChatSuperChatDetails' smart constructor.
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)


-- | Creates a value of 'LiveChatSuperChatDetails' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'lcscdUserComment'
--
-- * 'lcscdAmountMicros'
--
-- * 'lcscdAmountDisplayString'
--
-- * 'lcscdCurrency'
--
-- * 'lcscdTier'
liveChatSuperChatDetails
    :: LiveChatSuperChatDetails
liveChatSuperChatDetails =
  LiveChatSuperChatDetails'
    { _lcscdUserComment = Nothing
    , _lcscdAmountMicros = Nothing
    , _lcscdAmountDisplayString = Nothing
    , _lcscdCurrency = Nothing
    , _lcscdTier = Nothing
    }


-- | The comment added by the user to this Super Chat event.
lcscdUserComment :: Lens' LiveChatSuperChatDetails (Maybe Text)
lcscdUserComment