{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric      #-}
{-# LANGUAGE LambdaCase         #-}
{-# LANGUAGE NoImplicitPrelude  #-}
{-# LANGUAGE OverloadedStrings  #-}

{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- |
-- Module      : Network.Google.YouTube.Types.Sum
-- 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.Sum where

import           Network.Google.Prelude hiding (Bytes)

-- | The video\'s rating from Portugal\'s Comissão de Classificação de
-- Espect´culos.
data ContentRatingCceRating
    = CCEM12
      -- ^ @cceM12@
    | CCEM14
      -- ^ @cceM14@
    | CCEM16
      -- ^ @cceM16@
    | CCEM18
      -- ^ @cceM18@
    | CCEM4
      -- ^ @cceM4@
    | CCEM6
      -- ^ @cceM6@
    | CceUnrated
      -- ^ @cceUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingCceRating

instance FromHttpApiData ContentRatingCceRating where
    parseQueryParam = \case
        "cceM12" -> Right CCEM12
        "cceM14" -> Right CCEM14
        "cceM16" -> Right CCEM16
        "cceM18" -> Right CCEM18
        "cceM4" -> Right CCEM4
        "cceM6" -> Right CCEM6
        "cceUnrated" -> Right CceUnrated
        x -> Left ("Unable to parse ContentRatingCceRating from: " <> x)

instance ToHttpApiData ContentRatingCceRating where
    toQueryParam = \case
        CCEM12 -> "cceM12"
        CCEM14 -> "cceM14"
        CCEM16 -> "cceM16"
        CCEM18 -> "cceM18"
        CCEM4 -> "cceM4"
        CCEM6 -> "cceM6"
        CceUnrated -> "cceUnrated"

instance FromJSON ContentRatingCceRating where
    parseJSON = parseJSONText "ContentRatingCceRating"

instance ToJSON ContentRatingCceRating where
    toJSON = toJSONText

-- | The video\'s rating in Switzerland.
data ContentRatingChfilmRating
    = CHFILM0
      -- ^ @chfilm0@
    | CHFILM12
      -- ^ @chfilm12@
    | CHFILM16
      -- ^ @chfilm16@
    | CHFILM18
      -- ^ @chfilm18@
    | CHFILM6
      -- ^ @chfilm6@
    | ChfilmUnrated
      -- ^ @chfilmUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingChfilmRating

instance FromHttpApiData ContentRatingChfilmRating where
    parseQueryParam = \case
        "chfilm0" -> Right CHFILM0
        "chfilm12" -> Right CHFILM12
        "chfilm16" -> Right CHFILM16
        "chfilm18" -> Right CHFILM18
        "chfilm6" -> Right CHFILM6
        "chfilmUnrated" -> Right ChfilmUnrated
        x -> Left ("Unable to parse ContentRatingChfilmRating from: " <> x)

instance ToHttpApiData ContentRatingChfilmRating where
    toQueryParam = \case
        CHFILM0 -> "chfilm0"
        CHFILM12 -> "chfilm12"
        CHFILM16 -> "chfilm16"
        CHFILM18 -> "chfilm18"
        CHFILM6 -> "chfilm6"
        ChfilmUnrated -> "chfilmUnrated"

instance FromJSON ContentRatingChfilmRating where
    parseJSON = parseJSONText "ContentRatingChfilmRating"

instance ToJSON ContentRatingChfilmRating where
    toJSON = toJSONText

-- | The video\'s rating from Malta\'s Film Age-Classification Board.
data ContentRatingMccaaRating
    = MCCAA12
      -- ^ @mccaa12@
    | Mccaa12a
      -- ^ @mccaa12a@
    | MCCAA14
      -- ^ @mccaa14@
    | MCCAA15
      -- ^ @mccaa15@
    | MCCAA16
      -- ^ @mccaa16@
    | MCCAA18
      -- ^ @mccaa18@
    | MccaaPg
      -- ^ @mccaaPg@
    | MccaaU
      -- ^ @mccaaU@
    | MccaaUnrated
      -- ^ @mccaaUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingMccaaRating

instance FromHttpApiData ContentRatingMccaaRating where
    parseQueryParam = \case
        "mccaa12" -> Right MCCAA12
        "mccaa12a" -> Right Mccaa12a
        "mccaa14" -> Right MCCAA14
        "mccaa15" -> Right MCCAA15
        "mccaa16" -> Right MCCAA16
        "mccaa18" -> Right MCCAA18
        "mccaaPg" -> Right MccaaPg
        "mccaaU" -> Right MccaaU
        "mccaaUnrated" -> Right MccaaUnrated
        x -> Left ("Unable to parse ContentRatingMccaaRating from: " <> x)

instance ToHttpApiData ContentRatingMccaaRating where
    toQueryParam = \case
        MCCAA12 -> "mccaa12"
        Mccaa12a -> "mccaa12a"
        MCCAA14 -> "mccaa14"
        MCCAA15 -> "mccaa15"
        MCCAA16 -> "mccaa16"
        MCCAA18 -> "mccaa18"
        MccaaPg -> "mccaaPg"
        MccaaU -> "mccaaU"
        MccaaUnrated -> "mccaaUnrated"

instance FromJSON ContentRatingMccaaRating where
    parseJSON = parseJSONText "ContentRatingMccaaRating"

instance ToJSON ContentRatingMccaaRating where
    toJSON = toJSONText

-- | The chart parameter identifies the chart that you want to retrieve.
data VideosListChart
    = MostPopular
      -- ^ @mostPopular@
      -- Return the most popular videos for the specified content region and
      -- video category.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideosListChart

instance FromHttpApiData VideosListChart where
    parseQueryParam = \case
        "mostPopular" -> Right MostPopular
        x -> Left ("Unable to parse VideosListChart from: " <> x)

instance ToHttpApiData VideosListChart where
    toQueryParam = \case
        MostPopular -> "mostPopular"

instance FromJSON VideosListChart where
    parseJSON = parseJSONText "VideosListChart"

instance ToJSON VideosListChart where
    toJSON = toJSONText

-- | The video\'s Motion Picture Association of America (MPAA) rating.
data ContentRatingMpaaRating
    = MpaaG
      -- ^ @mpaaG@
    | MPAANC17
      -- ^ @mpaaNc17@
    | MpaaPg
      -- ^ @mpaaPg@
    | MPAAPG13
      -- ^ @mpaaPg13@
    | MpaaR
      -- ^ @mpaaR@
    | MpaaUnrated
      -- ^ @mpaaUnrated@
    | MpaaX
      -- ^ @mpaaX@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingMpaaRating

instance FromHttpApiData ContentRatingMpaaRating where
    parseQueryParam = \case
        "mpaaG" -> Right MpaaG
        "mpaaNc17" -> Right MPAANC17
        "mpaaPg" -> Right MpaaPg
        "mpaaPg13" -> Right MPAAPG13
        "mpaaR" -> Right MpaaR
        "mpaaUnrated" -> Right MpaaUnrated
        "mpaaX" -> Right MpaaX
        x -> Left ("Unable to parse ContentRatingMpaaRating from: " <> x)

instance ToHttpApiData ContentRatingMpaaRating where
    toQueryParam = \case
        MpaaG -> "mpaaG"
        MPAANC17 -> "mpaaNc17"
        MpaaPg -> "mpaaPg"
        MPAAPG13 -> "mpaaPg13"
        MpaaR -> "mpaaR"
        MpaaUnrated -> "mpaaUnrated"
        MpaaX -> "mpaaX"

instance FromJSON ContentRatingMpaaRating where
    parseJSON = parseJSONText "ContentRatingMpaaRating"

instance ToJSON ContentRatingMpaaRating where
    toJSON = toJSONText

-- | The caption track\'s type.
data CaptionSnippetTrackKind
    = Asr
      -- ^ @ASR@
    | Forced
      -- ^ @forced@
    | Standard
      -- ^ @standard@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CaptionSnippetTrackKind

instance FromHttpApiData CaptionSnippetTrackKind where
    parseQueryParam = \case
        "ASR" -> Right Asr
        "forced" -> Right Forced
        "standard" -> Right Standard
        x -> Left ("Unable to parse CaptionSnippetTrackKind from: " <> x)

instance ToHttpApiData CaptionSnippetTrackKind where
    toQueryParam = \case
        Asr -> "ASR"
        Forced -> "forced"
        Standard -> "standard"

instance FromJSON CaptionSnippetTrackKind where
    parseJSON = parseJSONText "CaptionSnippetTrackKind"

instance ToJSON CaptionSnippetTrackKind where
    toJSON = toJSONText

-- | Indicates if the video is an upcoming\/active live broadcast. Or it\'s
-- \"none\" if the video is not an upcoming\/active live broadcast.
data VideoSnippetLiveBroadcastContent
    = Live
      -- ^ @live@
    | None
      -- ^ @none@
    | Upcoming
      -- ^ @upcoming@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoSnippetLiveBroadcastContent

instance FromHttpApiData VideoSnippetLiveBroadcastContent where
    parseQueryParam = \case
        "live" -> Right Live
        "none" -> Right None
        "upcoming" -> Right Upcoming
        x -> Left ("Unable to parse VideoSnippetLiveBroadcastContent from: " <> x)

instance ToHttpApiData VideoSnippetLiveBroadcastContent where
    toQueryParam = \case
        Live -> "live"
        None -> "none"
        Upcoming -> "upcoming"

instance FromJSON VideoSnippetLiveBroadcastContent where
    parseJSON = parseJSONText "VideoSnippetLiveBroadcastContent"

instance ToJSON VideoSnippetLiveBroadcastContent where
    toJSON = toJSONText

-- | Defines the context of the ping.
data ChannelConversionPingContext
    = Cview
      -- ^ @cview@
    | Subscribe
      -- ^ @subscribe@
    | Unsubscribe
      -- ^ @unsubscribe@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ChannelConversionPingContext

instance FromHttpApiData ChannelConversionPingContext where
    parseQueryParam = \case
        "cview" -> Right Cview
        "subscribe" -> Right Subscribe
        "unsubscribe" -> Right Unsubscribe
        x -> Left ("Unable to parse ChannelConversionPingContext from: " <> x)

instance ToHttpApiData ChannelConversionPingContext where
    toQueryParam = \case
        Cview -> "cview"
        Subscribe -> "subscribe"
        Unsubscribe -> "unsubscribe"

instance FromJSON ChannelConversionPingContext where
    parseJSON = parseJSONText "ChannelConversionPingContext"

instance ToJSON ChannelConversionPingContext where
    toJSON = toJSONText

-- | The video\'s rating from the Hungarian Nemzeti Filmiroda, the Rating
-- Committee of the National Office of Film.
data ContentRatingRcnofRating
    = RcnofI
      -- ^ @rcnofI@
    | RcnofIi
      -- ^ @rcnofIi@
    | RcnofIii
      -- ^ @rcnofIii@
    | RcnofIv
      -- ^ @rcnofIv@
    | RcnofUnrated
      -- ^ @rcnofUnrated@
    | RcnofV
      -- ^ @rcnofV@
    | RcnofVi
      -- ^ @rcnofVi@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingRcnofRating

instance FromHttpApiData ContentRatingRcnofRating where
    parseQueryParam = \case
        "rcnofI" -> Right RcnofI
        "rcnofIi" -> Right RcnofIi
        "rcnofIii" -> Right RcnofIii
        "rcnofIv" -> Right RcnofIv
        "rcnofUnrated" -> Right RcnofUnrated
        "rcnofV" -> Right RcnofV
        "rcnofVi" -> Right RcnofVi
        x -> Left ("Unable to parse ContentRatingRcnofRating from: " <> x)

instance ToHttpApiData ContentRatingRcnofRating where
    toQueryParam = \case
        RcnofI -> "rcnofI"
        RcnofIi -> "rcnofIi"
        RcnofIii -> "rcnofIii"
        RcnofIv -> "rcnofIv"
        RcnofUnrated -> "rcnofUnrated"
        RcnofV -> "rcnofV"
        RcnofVi -> "rcnofVi"

instance FromJSON ContentRatingRcnofRating where
    parseJSON = parseJSONText "ContentRatingRcnofRating"

instance ToJSON ContentRatingRcnofRating where
    toJSON = toJSONText

-- | The video\'s privacy status.
data VideoStatusPrivacyStatus
    = Private
      -- ^ @private@
    | Public
      -- ^ @public@
    | UnListed
      -- ^ @unlisted@
    | UnListedNew
      -- ^ @unlisted_new@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoStatusPrivacyStatus

instance FromHttpApiData VideoStatusPrivacyStatus where
    parseQueryParam = \case
        "private" -> Right Private
        "public" -> Right Public
        "unlisted" -> Right UnListed
        "unlisted_new" -> Right UnListedNew
        x -> Left ("Unable to parse VideoStatusPrivacyStatus from: " <> x)

instance ToHttpApiData VideoStatusPrivacyStatus where
    toQueryParam = \case
        Private -> "private"
        Public -> "public"
        UnListed -> "unlisted"
        UnListedNew -> "unlisted_new"

instance FromJSON VideoStatusPrivacyStatus where
    parseJSON = parseJSONText "VideoStatusPrivacyStatus"

instance ToJSON VideoStatusPrivacyStatus where
    toJSON = toJSONText

-- | The broadcast\'s status. The status can be updated using the API\'s
-- liveBroadcasts.transition method.
data LiveBroadcastStatusLifeCycleStatus
    = LBSLCSComplete
      -- ^ @complete@
    | LBSLCSCreated
      -- ^ @created@
    | LBSLCSLive
      -- ^ @live@
    | LBSLCSLiveStarting
      -- ^ @liveStarting@
    | LBSLCSReady
      -- ^ @ready@
    | LBSLCSRevoked
      -- ^ @revoked@
    | LBSLCSTestStarting
      -- ^ @testStarting@
    | LBSLCSTesting
      -- ^ @testing@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastStatusLifeCycleStatus

instance FromHttpApiData LiveBroadcastStatusLifeCycleStatus where
    parseQueryParam = \case
        "complete" -> Right LBSLCSComplete
        "created" -> Right LBSLCSCreated
        "live" -> Right LBSLCSLive
        "liveStarting" -> Right LBSLCSLiveStarting
        "ready" -> Right LBSLCSReady
        "revoked" -> Right LBSLCSRevoked
        "testStarting" -> Right LBSLCSTestStarting
        "testing" -> Right LBSLCSTesting
        x -> Left ("Unable to parse LiveBroadcastStatusLifeCycleStatus from: " <> x)

instance ToHttpApiData LiveBroadcastStatusLifeCycleStatus where
    toQueryParam = \case
        LBSLCSComplete -> "complete"
        LBSLCSCreated -> "created"
        LBSLCSLive -> "live"
        LBSLCSLiveStarting -> "liveStarting"
        LBSLCSReady -> "ready"
        LBSLCSRevoked -> "revoked"
        LBSLCSTestStarting -> "testStarting"
        LBSLCSTesting -> "testing"

instance FromJSON LiveBroadcastStatusLifeCycleStatus where
    parseJSON = parseJSONText "LiveBroadcastStatusLifeCycleStatus"

instance ToJSON LiveBroadcastStatusLifeCycleStatus where
    toJSON = toJSONText

-- | The reason that YouTube failed to process the caption track. This
-- property is only present if the state property\'s value is failed.
data CaptionSnippetFailureReason
    = ProcessingFailed
      -- ^ @processingFailed@
    | UnknownFormat
      -- ^ @unknownFormat@
    | UnsupportedFormat
      -- ^ @unsupportedFormat@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CaptionSnippetFailureReason

instance FromHttpApiData CaptionSnippetFailureReason where
    parseQueryParam = \case
        "processingFailed" -> Right ProcessingFailed
        "unknownFormat" -> Right UnknownFormat
        "unsupportedFormat" -> Right UnsupportedFormat
        x -> Left ("Unable to parse CaptionSnippetFailureReason from: " <> x)

instance ToHttpApiData CaptionSnippetFailureReason where
    toQueryParam = \case
        ProcessingFailed -> "processingFailed"
        UnknownFormat -> "unknownFormat"
        UnsupportedFormat -> "unsupportedFormat"

instance FromJSON CaptionSnippetFailureReason where
    parseJSON = parseJSONText "CaptionSnippetFailureReason"

instance ToJSON CaptionSnippetFailureReason where
    toJSON = toJSONText

-- | The type of ban.
data LiveChatUserBannedMessageDetailsBanType
    = Permanent
      -- ^ @permanent@
    | Temporary
      -- ^ @temporary@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveChatUserBannedMessageDetailsBanType

instance FromHttpApiData LiveChatUserBannedMessageDetailsBanType where
    parseQueryParam = \case
        "permanent" -> Right Permanent
        "temporary" -> Right Temporary
        x -> Left ("Unable to parse LiveChatUserBannedMessageDetailsBanType from: " <> x)

instance ToHttpApiData LiveChatUserBannedMessageDetailsBanType where
    toQueryParam = \case
        Permanent -> "permanent"
        Temporary -> "temporary"

instance FromJSON LiveChatUserBannedMessageDetailsBanType where
    parseJSON = parseJSONText "LiveChatUserBannedMessageDetailsBanType"

instance ToJSON LiveChatUserBannedMessageDetailsBanType where
    toJSON = toJSONText

-- | The reason that YouTube failed to process the video. This property will
-- only have a value if the processingStatus property\'s value is failed.
data VideoProcessingDetailsProcessingFailureReason
    = Other
      -- ^ @other@
    | StreamingFailed
      -- ^ @streamingFailed@
    | TranscodeFailed
      -- ^ @transcodeFailed@
    | UploadFailed
      -- ^ @uploadFailed@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoProcessingDetailsProcessingFailureReason

instance FromHttpApiData VideoProcessingDetailsProcessingFailureReason where
    parseQueryParam = \case
        "other" -> Right Other
        "streamingFailed" -> Right StreamingFailed
        "transcodeFailed" -> Right TranscodeFailed
        "uploadFailed" -> Right UploadFailed
        x -> Left ("Unable to parse VideoProcessingDetailsProcessingFailureReason from: " <> x)

instance ToHttpApiData VideoProcessingDetailsProcessingFailureReason where
    toQueryParam = \case
        Other -> "other"
        StreamingFailed -> "streamingFailed"
        TranscodeFailed -> "transcodeFailed"
        UploadFailed -> "uploadFailed"

instance FromJSON VideoProcessingDetailsProcessingFailureReason where
    parseJSON = parseJSONText "VideoProcessingDetailsProcessingFailureReason"

instance ToJSON VideoProcessingDetailsProcessingFailureReason where
    toJSON = toJSONText

-- | Defines the position type.
data InvideoPositionType
    = Corner
      -- ^ @corner@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable InvideoPositionType

instance FromHttpApiData InvideoPositionType where
    parseQueryParam = \case
        "corner" -> Right Corner
        x -> Left ("Unable to parse InvideoPositionType from: " <> x)

instance ToHttpApiData InvideoPositionType where
    toQueryParam = \case
        Corner -> "corner"

instance FromJSON InvideoPositionType where
    parseJSON = parseJSONText "InvideoPositionType"

instance ToJSON InvideoPositionType where
    toJSON = toJSONText

-- | The video\'s Freiwillige Selbstkontrolle der Filmwirtschaft (FSK -
-- Germany) rating.
data ContentRatingFskRating
    = FSK0
      -- ^ @fsk0@
    | FSK12
      -- ^ @fsk12@
    | FSK16
      -- ^ @fsk16@
    | FSK18
      -- ^ @fsk18@
    | FSK6
      -- ^ @fsk6@
    | FskUnrated
      -- ^ @fskUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingFskRating

instance FromHttpApiData ContentRatingFskRating where
    parseQueryParam = \case
        "fsk0" -> Right FSK0
        "fsk12" -> Right FSK12
        "fsk16" -> Right FSK16
        "fsk18" -> Right FSK18
        "fsk6" -> Right FSK6
        "fskUnrated" -> Right FskUnrated
        x -> Left ("Unable to parse ContentRatingFskRating from: " <> x)

instance ToHttpApiData ContentRatingFskRating where
    toQueryParam = \case
        FSK0 -> "fsk0"
        FSK12 -> "fsk12"
        FSK16 -> "fsk16"
        FSK18 -> "fsk18"
        FSK6 -> "fsk6"
        FskUnrated -> "fskUnrated"

instance FromJSON ContentRatingFskRating where
    parseJSON = parseJSONText "ContentRatingFskRating"

instance ToJSON ContentRatingFskRating where
    toJSON = toJSONText

-- | The video\'s rating from Finland\'s Kansallinen Audiovisuaalinen
-- Instituutti (National Audiovisual Institute).
data ContentRatingMekuRating
    = MEKU12
      -- ^ @meku12@
    | MEKU16
      -- ^ @meku16@
    | MEKU18
      -- ^ @meku18@
    | MEKU7
      -- ^ @meku7@
    | MekuS
      -- ^ @mekuS@
    | MekuUnrated
      -- ^ @mekuUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingMekuRating

instance FromHttpApiData ContentRatingMekuRating where
    parseQueryParam = \case
        "meku12" -> Right MEKU12
        "meku16" -> Right MEKU16
        "meku18" -> Right MEKU18
        "meku7" -> Right MEKU7
        "mekuS" -> Right MekuS
        "mekuUnrated" -> Right MekuUnrated
        x -> Left ("Unable to parse ContentRatingMekuRating from: " <> x)

instance ToHttpApiData ContentRatingMekuRating where
    toQueryParam = \case
        MEKU12 -> "meku12"
        MEKU16 -> "meku16"
        MEKU18 -> "meku18"
        MEKU7 -> "meku7"
        MekuS -> "mekuS"
        MekuUnrated -> "mekuUnrated"

instance FromJSON ContentRatingMekuRating where
    parseJSON = parseJSONText "ContentRatingMekuRating"

instance ToJSON ContentRatingMekuRating where
    toJSON = toJSONText

-- | The value of definition indicates whether the video is available in high
-- definition or only in standard definition.
data VideoContentDetailsDefinition
    = HD
      -- ^ @hd@
    | SD
      -- ^ @sd@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoContentDetailsDefinition

instance FromHttpApiData VideoContentDetailsDefinition where
    parseQueryParam = \case
        "hd" -> Right HD
        "sd" -> Right SD
        x -> Left ("Unable to parse VideoContentDetailsDefinition from: " <> x)

instance ToHttpApiData VideoContentDetailsDefinition where
    toQueryParam = \case
        HD -> "hd"
        SD -> "sd"

instance FromJSON VideoContentDetailsDefinition where
    parseJSON = parseJSONText "VideoContentDetailsDefinition"

instance ToJSON VideoContentDetailsDefinition where
    toJSON = toJSONText

-- | The video\'s rating in Estonia.
data ContentRatingEefilmRating
    = EEFILMK12
      -- ^ @eefilmK12@
    | EEFILMK14
      -- ^ @eefilmK14@
    | EEFILMK16
      -- ^ @eefilmK16@
    | EEFILMK6
      -- ^ @eefilmK6@
    | EefilmL
      -- ^ @eefilmL@
    | EEFILMMS12
      -- ^ @eefilmMs12@
    | EEFILMMS6
      -- ^ @eefilmMs6@
    | EefilmPere
      -- ^ @eefilmPere@
    | EefilmUnrated
      -- ^ @eefilmUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingEefilmRating

instance FromHttpApiData ContentRatingEefilmRating where
    parseQueryParam = \case
        "eefilmK12" -> Right EEFILMK12
        "eefilmK14" -> Right EEFILMK14
        "eefilmK16" -> Right EEFILMK16
        "eefilmK6" -> Right EEFILMK6
        "eefilmL" -> Right EefilmL
        "eefilmMs12" -> Right EEFILMMS12
        "eefilmMs6" -> Right EEFILMMS6
        "eefilmPere" -> Right EefilmPere
        "eefilmUnrated" -> Right EefilmUnrated
        x -> Left ("Unable to parse ContentRatingEefilmRating from: " <> x)

instance ToHttpApiData ContentRatingEefilmRating where
    toQueryParam = \case
        EEFILMK12 -> "eefilmK12"
        EEFILMK14 -> "eefilmK14"
        EEFILMK16 -> "eefilmK16"
        EEFILMK6 -> "eefilmK6"
        EefilmL -> "eefilmL"
        EEFILMMS12 -> "eefilmMs12"
        EEFILMMS6 -> "eefilmMs6"
        EefilmPere -> "eefilmPere"
        EefilmUnrated -> "eefilmUnrated"

instance FromJSON ContentRatingEefilmRating where
    parseJSON = parseJSONText "ContentRatingEefilmRating"

instance ToJSON ContentRatingEefilmRating where
    toJSON = toJSONText

-- | 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.
data LiveBroadcastStatusPrivacyStatus
    = LBSPSPrivate
      -- ^ @private@
    | LBSPSPublic
      -- ^ @public@
    | LBSPSUnListed
      -- ^ @unlisted@
    | LBSPSUnListedNew
      -- ^ @unlisted_new@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastStatusPrivacyStatus

instance FromHttpApiData LiveBroadcastStatusPrivacyStatus where
    parseQueryParam = \case
        "private" -> Right LBSPSPrivate
        "public" -> Right LBSPSPublic
        "unlisted" -> Right LBSPSUnListed
        "unlisted_new" -> Right LBSPSUnListedNew
        x -> Left ("Unable to parse LiveBroadcastStatusPrivacyStatus from: " <> x)

instance ToHttpApiData LiveBroadcastStatusPrivacyStatus where
    toQueryParam = \case
        LBSPSPrivate -> "private"
        LBSPSPublic -> "public"
        LBSPSUnListed -> "unlisted"
        LBSPSUnListedNew -> "unlisted_new"

instance FromJSON LiveBroadcastStatusPrivacyStatus where
    parseJSON = parseJSONText "LiveBroadcastStatusPrivacyStatus"

instance ToJSON LiveBroadcastStatusPrivacyStatus where
    toJSON = toJSONText

-- | The tfmt parameter specifies that the caption track should be returned
-- in a specific format. If the parameter is not included in the request,
-- the track is returned in its original format.
data CaptionsDownloadTfmt
    = Sbv
      -- ^ @sbv@
      -- SubViewer subtitle.
    | Scc
      -- ^ @scc@
      -- Scenarist Closed Caption format.
    | Srt
      -- ^ @srt@
      -- SubRip subtitle.
    | Ttml
      -- ^ @ttml@
      -- Timed Text Markup Language caption.
    | Vtt
      -- ^ @vtt@
      -- Web Video Text Tracks caption.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CaptionsDownloadTfmt

instance FromHttpApiData CaptionsDownloadTfmt where
    parseQueryParam = \case
        "sbv" -> Right Sbv
        "scc" -> Right Scc
        "srt" -> Right Srt
        "ttml" -> Right Ttml
        "vtt" -> Right Vtt
        x -> Left ("Unable to parse CaptionsDownloadTfmt from: " <> x)

instance ToHttpApiData CaptionsDownloadTfmt where
    toQueryParam = \case
        Sbv -> "sbv"
        Scc -> "scc"
        Srt -> "srt"
        Ttml -> "ttml"
        Vtt -> "vtt"

instance FromJSON CaptionsDownloadTfmt where
    parseJSON = parseJSONText "CaptionsDownloadTfmt"

instance ToJSON CaptionsDownloadTfmt where
    toJSON = toJSONText

-- | Describes the type of the promoted item.
data PromotedItemIdType
    = PIITRecentUpload
      -- ^ @recentUpload@
    | PIITVideo
      -- ^ @video@
    | PIITWebsite
      -- ^ @website@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable PromotedItemIdType

instance FromHttpApiData PromotedItemIdType where
    parseQueryParam = \case
        "recentUpload" -> Right PIITRecentUpload
        "video" -> Right PIITVideo
        "website" -> Right PIITWebsite
        x -> Left ("Unable to parse PromotedItemIdType from: " <> x)

instance ToHttpApiData PromotedItemIdType where
    toQueryParam = \case
        PIITRecentUpload -> "recentUpload"
        PIITVideo -> "video"
        PIITWebsite -> "website"

instance FromJSON PromotedItemIdType where
    parseJSON = parseJSONText "PromotedItemIdType"

instance ToJSON PromotedItemIdType where
    toJSON = toJSONText

-- | The video\'s rating in Peru.
data ContentRatingPefilmRating
    = PEFILM14
      -- ^ @pefilm14@
    | PEFILM18
      -- ^ @pefilm18@
    | PefilmPg
      -- ^ @pefilmPg@
    | PefilmPt
      -- ^ @pefilmPt@
    | PefilmUnrated
      -- ^ @pefilmUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingPefilmRating

instance FromHttpApiData ContentRatingPefilmRating where
    parseQueryParam = \case
        "pefilm14" -> Right PEFILM14
        "pefilm18" -> Right PEFILM18
        "pefilmPg" -> Right PefilmPg
        "pefilmPt" -> Right PefilmPt
        "pefilmUnrated" -> Right PefilmUnrated
        x -> Left ("Unable to parse ContentRatingPefilmRating from: " <> x)

instance ToHttpApiData ContentRatingPefilmRating where
    toQueryParam = \case
        PEFILM14 -> "pefilm14"
        PEFILM18 -> "pefilm18"
        PefilmPg -> "pefilmPg"
        PefilmPt -> "pefilmPt"
        PefilmUnrated -> "pefilmUnrated"

instance FromJSON ContentRatingPefilmRating where
    parseJSON = parseJSONText "ContentRatingPefilmRating"

instance ToJSON ContentRatingPefilmRating where
    toJSON = toJSONText

-- | The resolution of the inbound video data.
data CdnSettingsResolution
    = CSR1080p
      -- ^ @1080p@
    | CSR1440p
      -- ^ @1440p@
    | CSR2160p
      -- ^ @2160p@
    | CSR240p
      -- ^ @240p@
    | CSR360p
      -- ^ @360p@
    | CSR480p
      -- ^ @480p@
    | CSR720p
      -- ^ @720p@
    | CSRVariable
      -- ^ @variable@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CdnSettingsResolution

instance FromHttpApiData CdnSettingsResolution where
    parseQueryParam = \case
        "1080p" -> Right CSR1080p
        "1440p" -> Right CSR1440p
        "2160p" -> Right CSR2160p
        "240p" -> Right CSR240p
        "360p" -> Right CSR360p
        "480p" -> Right CSR480p
        "720p" -> Right CSR720p
        "variable" -> Right CSRVariable
        x -> Left ("Unable to parse CdnSettingsResolution from: " <> x)

instance ToHttpApiData CdnSettingsResolution where
    toQueryParam = \case
        CSR1080p -> "1080p"
        CSR1440p -> "1440p"
        CSR2160p -> "2160p"
        CSR240p -> "240p"
        CSR360p -> "360p"
        CSR480p -> "480p"
        CSR720p -> "720p"
        CSRVariable -> "variable"

instance FromJSON CdnSettingsResolution where
    parseJSON = parseJSONText "CdnSettingsResolution"

instance ToJSON CdnSettingsResolution where
    toJSON = toJSONText

-- | It indicates if the resource (video or channel) has upcoming\/active
-- live broadcast content. Or it\'s \"none\" if there is not any
-- upcoming\/active live broadcasts.
data SearchResultSnippetLiveBroadcastContent
    = SRSLBCLive
      -- ^ @live@
    | SRSLBCNone
      -- ^ @none@
    | SRSLBCUpcoming
      -- ^ @upcoming@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable SearchResultSnippetLiveBroadcastContent

instance FromHttpApiData SearchResultSnippetLiveBroadcastContent where
    parseQueryParam = \case
        "live" -> Right SRSLBCLive
        "none" -> Right SRSLBCNone
        "upcoming" -> Right SRSLBCUpcoming
        x -> Left ("Unable to parse SearchResultSnippetLiveBroadcastContent from: " <> x)

instance ToHttpApiData SearchResultSnippetLiveBroadcastContent where
    toQueryParam = \case
        SRSLBCLive -> "live"
        SRSLBCNone -> "none"
        SRSLBCUpcoming -> "upcoming"

instance FromJSON SearchResultSnippetLiveBroadcastContent where
    parseJSON = parseJSONText "SearchResultSnippetLiveBroadcastContent"

instance ToJSON SearchResultSnippetLiveBroadcastContent where
    toJSON = toJSONText

-- | The video\'s Anatel (Asociación Nacional de Televisión) rating for
-- Chilean television.
data ContentRatingAnatelRating
    = AnatelA
      -- ^ @anatelA@
    | AnatelF
      -- ^ @anatelF@
    | AnatelI
      -- ^ @anatelI@
    | ANATELI10
      -- ^ @anatelI10@
    | ANATELI12
      -- ^ @anatelI12@
    | ANATELI7
      -- ^ @anatelI7@
    | AnatelR
      -- ^ @anatelR@
    | AnatelUnrated
      -- ^ @anatelUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingAnatelRating

instance FromHttpApiData ContentRatingAnatelRating where
    parseQueryParam = \case
        "anatelA" -> Right AnatelA
        "anatelF" -> Right AnatelF
        "anatelI" -> Right AnatelI
        "anatelI10" -> Right ANATELI10
        "anatelI12" -> Right ANATELI12
        "anatelI7" -> Right ANATELI7
        "anatelR" -> Right AnatelR
        "anatelUnrated" -> Right AnatelUnrated
        x -> Left ("Unable to parse ContentRatingAnatelRating from: " <> x)

instance ToHttpApiData ContentRatingAnatelRating where
    toQueryParam = \case
        AnatelA -> "anatelA"
        AnatelF -> "anatelF"
        AnatelI -> "anatelI"
        ANATELI10 -> "anatelI10"
        ANATELI12 -> "anatelI12"
        ANATELI7 -> "anatelI7"
        AnatelR -> "anatelR"
        AnatelUnrated -> "anatelUnrated"

instance FromJSON ContentRatingAnatelRating where
    parseJSON = parseJSONText "ContentRatingAnatelRating"

instance ToJSON ContentRatingAnatelRating where
    toJSON = toJSONText

-- | The order parameter specifies the method that will be used to order
-- resources in the API response.
data SearchListOrder
    = Date
      -- ^ @date@
      -- Resources are sorted in reverse chronological order based on the date
      -- they were created.
    | Rating
      -- ^ @rating@
      -- Resources are sorted from highest to lowest rating.
    | Relevance
      -- ^ @relevance@
      -- Resources are sorted based on their relevance to the search query. This
      -- is the default value for this parameter.
    | Title
      -- ^ @title@
      -- Resources are sorted alphabetically by title.
    | VideoCount
      -- ^ @videoCount@
      -- Channels are sorted in descending order of their number of uploaded
      -- videos.
    | ViewCount
      -- ^ @viewCount@
      -- Resources are sorted from highest to lowest number of views.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable SearchListOrder

instance FromHttpApiData SearchListOrder where
    parseQueryParam = \case
        "date" -> Right Date
        "rating" -> Right Rating
        "relevance" -> Right Relevance
        "title" -> Right Title
        "videoCount" -> Right VideoCount
        "viewCount" -> Right ViewCount
        x -> Left ("Unable to parse SearchListOrder from: " <> x)

instance ToHttpApiData SearchListOrder where
    toQueryParam = \case
        Date -> "date"
        Rating -> "rating"
        Relevance -> "relevance"
        Title -> "title"
        VideoCount -> "videoCount"
        ViewCount -> "viewCount"

instance FromJSON SearchListOrder where
    parseJSON = parseJSONText "SearchListOrder"

instance ToJSON SearchListOrder where
    toJSON = toJSONText

-- | The video\'s Consejo de Calificación Cinematográfica (Chile) rating.
data ContentRatingCccRating
    = CCC14
      -- ^ @ccc14@
    | CCC18
      -- ^ @ccc18@
    | Ccc18s
      -- ^ @ccc18s@
    | Ccc18v
      -- ^ @ccc18v@
    | CCC6
      -- ^ @ccc6@
    | CccTe
      -- ^ @cccTe@
    | CccUnrated
      -- ^ @cccUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingCccRating

instance FromHttpApiData ContentRatingCccRating where
    parseQueryParam = \case
        "ccc14" -> Right CCC14
        "ccc18" -> Right CCC18
        "ccc18s" -> Right Ccc18s
        "ccc18v" -> Right Ccc18v
        "ccc6" -> Right CCC6
        "cccTe" -> Right CccTe
        "cccUnrated" -> Right CccUnrated
        x -> Left ("Unable to parse ContentRatingCccRating from: " <> x)

instance ToHttpApiData ContentRatingCccRating where
    toQueryParam = \case
        CCC14 -> "ccc14"
        CCC18 -> "ccc18"
        Ccc18s -> "ccc18s"
        Ccc18v -> "ccc18v"
        CCC6 -> "ccc6"
        CccTe -> "cccTe"
        CccUnrated -> "cccUnrated"

instance FromJSON ContentRatingCccRating where
    parseJSON = parseJSONText "ContentRatingCccRating"

instance ToJSON ContentRatingCccRating where
    toJSON = toJSONText

-- | The type of audio track associated with the caption track.
data CaptionSnippetAudioTrackType
    = Commentary
      -- ^ @commentary@
    | Descriptive
      -- ^ @descriptive@
    | Primary
      -- ^ @primary@
    | Unknown
      -- ^ @unknown@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CaptionSnippetAudioTrackType

instance FromHttpApiData CaptionSnippetAudioTrackType where
    parseQueryParam = \case
        "commentary" -> Right Commentary
        "descriptive" -> Right Descriptive
        "primary" -> Right Primary
        "unknown" -> Right Unknown
        x -> Left ("Unable to parse CaptionSnippetAudioTrackType from: " <> x)

instance ToHttpApiData CaptionSnippetAudioTrackType where
    toQueryParam = \case
        Commentary -> "commentary"
        Descriptive -> "descriptive"
        Primary -> "primary"
        Unknown -> "unknown"

instance FromJSON CaptionSnippetAudioTrackType where
    parseJSON = parseJSONText "CaptionSnippetAudioTrackType"

instance ToJSON CaptionSnippetAudioTrackType where
    toJSON = toJSONText

-- | Privacy status of the channel.
data ChannelStatusPrivacyStatus
    = CSPSPrivate
      -- ^ @private@
    | CSPSPublic
      -- ^ @public@
    | CSPSUnListed
      -- ^ @unlisted@
    | CSPSUnListedNew
      -- ^ @unlisted_new@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ChannelStatusPrivacyStatus

instance FromHttpApiData ChannelStatusPrivacyStatus where
    parseQueryParam = \case
        "private" -> Right CSPSPrivate
        "public" -> Right CSPSPublic
        "unlisted" -> Right CSPSUnListed
        "unlisted_new" -> Right CSPSUnListedNew
        x -> Left ("Unable to parse ChannelStatusPrivacyStatus from: " <> x)

instance ToHttpApiData ChannelStatusPrivacyStatus where
    toQueryParam = \case
        CSPSPrivate -> "private"
        CSPSPublic -> "public"
        CSPSUnListed -> "unlisted"
        CSPSUnListedNew -> "unlisted_new"

instance FromJSON ChannelStatusPrivacyStatus where
    parseJSON = parseJSONText "ChannelStatusPrivacyStatus"

instance ToJSON ChannelStatusPrivacyStatus where
    toJSON = toJSONText

data VideoSuggestionsEditorSuggestionsItem
    = AudioQuietAudioSwap
      -- ^ @audioQuietAudioSwap@
    | VideoAutoLevels
      -- ^ @videoAutoLevels@
    | VideoCrop
      -- ^ @videoCrop@
    | VideoStabilize
      -- ^ @videoStabilize@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoSuggestionsEditorSuggestionsItem

instance FromHttpApiData VideoSuggestionsEditorSuggestionsItem where
    parseQueryParam = \case
        "audioQuietAudioSwap" -> Right AudioQuietAudioSwap
        "videoAutoLevels" -> Right VideoAutoLevels
        "videoCrop" -> Right VideoCrop
        "videoStabilize" -> Right VideoStabilize
        x -> Left ("Unable to parse VideoSuggestionsEditorSuggestionsItem from: " <> x)

instance ToHttpApiData VideoSuggestionsEditorSuggestionsItem where
    toQueryParam = \case
        AudioQuietAudioSwap -> "audioQuietAudioSwap"
        VideoAutoLevels -> "videoAutoLevels"
        VideoCrop -> "videoCrop"
        VideoStabilize -> "videoStabilize"

instance FromJSON VideoSuggestionsEditorSuggestionsItem where
    parseJSON = parseJSONText "VideoSuggestionsEditorSuggestionsItem"

instance ToJSON VideoSuggestionsEditorSuggestionsItem where
    toJSON = toJSONText

-- | The video\'s rating from the Canadian Radio-Television and
-- Telecommunications Commission (CRTC) for Canadian French-language
-- broadcasts. For more information, see the Canadian Broadcast Standards
-- Council website.
data ContentRatingCatvfrRating
    = Catvfr13plus
      -- ^ @catvfr13plus@
    | Catvfr16plus
      -- ^ @catvfr16plus@
    | Catvfr18plus
      -- ^ @catvfr18plus@
    | Catvfr8plus
      -- ^ @catvfr8plus@
    | CatvfrG
      -- ^ @catvfrG@
    | CatvfrUnrated
      -- ^ @catvfrUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingCatvfrRating

instance FromHttpApiData ContentRatingCatvfrRating where
    parseQueryParam = \case
        "catvfr13plus" -> Right Catvfr13plus
        "catvfr16plus" -> Right Catvfr16plus
        "catvfr18plus" -> Right Catvfr18plus
        "catvfr8plus" -> Right Catvfr8plus
        "catvfrG" -> Right CatvfrG
        "catvfrUnrated" -> Right CatvfrUnrated
        x -> Left ("Unable to parse ContentRatingCatvfrRating from: " <> x)

instance ToHttpApiData ContentRatingCatvfrRating where
    toQueryParam = \case
        Catvfr13plus -> "catvfr13plus"
        Catvfr16plus -> "catvfr16plus"
        Catvfr18plus -> "catvfr18plus"
        Catvfr8plus -> "catvfr8plus"
        CatvfrG -> "catvfrG"
        CatvfrUnrated -> "catvfrUnrated"

instance FromJSON ContentRatingCatvfrRating where
    parseJSON = parseJSONText "ContentRatingCatvfrRating"

instance ToJSON ContentRatingCatvfrRating where
    toJSON = toJSONText

-- | The video\'s rating from Romania\'s CONSILIUL NATIONAL AL
-- AUDIOVIZUALULUI (CNA).
data ContentRatingCnaRating
    = CNA12
      -- ^ @cna12@
    | CNA15
      -- ^ @cna15@
    | CNA18
      -- ^ @cna18@
    | Cna18plus
      -- ^ @cna18plus@
    | CnaAp
      -- ^ @cnaAp@
    | CnaUnrated
      -- ^ @cnaUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingCnaRating

instance FromHttpApiData ContentRatingCnaRating where
    parseQueryParam = \case
        "cna12" -> Right CNA12
        "cna15" -> Right CNA15
        "cna18" -> Right CNA18
        "cna18plus" -> Right Cna18plus
        "cnaAp" -> Right CnaAp
        "cnaUnrated" -> Right CnaUnrated
        x -> Left ("Unable to parse ContentRatingCnaRating from: " <> x)

instance ToHttpApiData ContentRatingCnaRating where
    toQueryParam = \case
        CNA12 -> "cna12"
        CNA15 -> "cna15"
        CNA18 -> "cna18"
        Cna18plus -> "cna18plus"
        CnaAp -> "cnaAp"
        CnaUnrated -> "cnaUnrated"

instance FromJSON ContentRatingCnaRating where
    parseJSON = parseJSONText "ContentRatingCnaRating"

instance ToJSON ContentRatingCnaRating where
    toJSON = toJSONText

-- | The video\'s Canadian Home Video Rating System (CHVRS) rating.
data ContentRatingChvrsRating
    = Chvrs14a
      -- ^ @chvrs14a@
    | Chvrs18a
      -- ^ @chvrs18a@
    | ChvrsE
      -- ^ @chvrsE@
    | ChvrsG
      -- ^ @chvrsG@
    | ChvrsPg
      -- ^ @chvrsPg@
    | ChvrsR
      -- ^ @chvrsR@
    | ChvrsUnrated
      -- ^ @chvrsUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingChvrsRating

instance FromHttpApiData ContentRatingChvrsRating where
    parseQueryParam = \case
        "chvrs14a" -> Right Chvrs14a
        "chvrs18a" -> Right Chvrs18a
        "chvrsE" -> Right ChvrsE
        "chvrsG" -> Right ChvrsG
        "chvrsPg" -> Right ChvrsPg
        "chvrsR" -> Right ChvrsR
        "chvrsUnrated" -> Right ChvrsUnrated
        x -> Left ("Unable to parse ContentRatingChvrsRating from: " <> x)

instance ToHttpApiData ContentRatingChvrsRating where
    toQueryParam = \case
        Chvrs14a -> "chvrs14a"
        Chvrs18a -> "chvrs18a"
        ChvrsE -> "chvrsE"
        ChvrsG -> "chvrsG"
        ChvrsPg -> "chvrsPg"
        ChvrsR -> "chvrsR"
        ChvrsUnrated -> "chvrsUnrated"

instance FromJSON ContentRatingChvrsRating where
    parseJSON = parseJSONText "ContentRatingChvrsRating"

instance ToJSON ContentRatingChvrsRating where
    toJSON = toJSONText

-- | The video\'s INCAA (Instituto Nacional de Cine y Artes Audiovisuales -
-- Argentina) rating.
data ContentRatingIncaaRating
    = IncaaAtp
      -- ^ @incaaAtp@
    | IncaaC
      -- ^ @incaaC@
    | INCAASAM13
      -- ^ @incaaSam13@
    | INCAASAM16
      -- ^ @incaaSam16@
    | INCAASAM18
      -- ^ @incaaSam18@
    | IncaaUnrated
      -- ^ @incaaUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingIncaaRating

instance FromHttpApiData ContentRatingIncaaRating where
    parseQueryParam = \case
        "incaaAtp" -> Right IncaaAtp
        "incaaC" -> Right IncaaC
        "incaaSam13" -> Right INCAASAM13
        "incaaSam16" -> Right INCAASAM16
        "incaaSam18" -> Right INCAASAM18
        "incaaUnrated" -> Right IncaaUnrated
        x -> Left ("Unable to parse ContentRatingIncaaRating from: " <> x)

instance ToHttpApiData ContentRatingIncaaRating where
    toQueryParam = \case
        IncaaAtp -> "incaaAtp"
        IncaaC -> "incaaC"
        INCAASAM13 -> "incaaSam13"
        INCAASAM16 -> "incaaSam16"
        INCAASAM18 -> "incaaSam18"
        IncaaUnrated -> "incaaUnrated"

instance FromJSON ContentRatingIncaaRating where
    parseJSON = parseJSONText "ContentRatingIncaaRating"

instance ToJSON ContentRatingIncaaRating where
    toJSON = toJSONText

-- | The video\'s rating from Statens medieråd (Sweden\'s National Media
-- Council).
data ContentRatingSmsaRating
    = SMSA11
      -- ^ @smsa11@
    | SMSA15
      -- ^ @smsa15@
    | SMSA7
      -- ^ @smsa7@
    | SmsaA
      -- ^ @smsaA@
    | SmsaUnrated
      -- ^ @smsaUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingSmsaRating

instance FromHttpApiData ContentRatingSmsaRating where
    parseQueryParam = \case
        "smsa11" -> Right SMSA11
        "smsa15" -> Right SMSA15
        "smsa7" -> Right SMSA7
        "smsaA" -> Right SmsaA
        "smsaUnrated" -> Right SmsaUnrated
        x -> Left ("Unable to parse ContentRatingSmsaRating from: " <> x)

instance ToHttpApiData ContentRatingSmsaRating where
    toQueryParam = \case
        SMSA11 -> "smsa11"
        SMSA15 -> "smsa15"
        SMSA7 -> "smsa7"
        SmsaA -> "smsaA"
        SmsaUnrated -> "smsaUnrated"

instance FromJSON ContentRatingSmsaRating where
    parseJSON = parseJSONText "ContentRatingSmsaRating"

instance ToJSON ContentRatingSmsaRating where
    toJSON = toJSONText

-- | The video\'s Central Board of Film Certification (CBFC - India) rating.
data ContentRatingCbfcRating
    = CbfcA
      -- ^ @cbfcA@
    | CbfcS
      -- ^ @cbfcS@
    | CbfcU
      -- ^ @cbfcU@
    | CbfcUA
      -- ^ @cbfcUA@
    | CbfcUnrated
      -- ^ @cbfcUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingCbfcRating

instance FromHttpApiData ContentRatingCbfcRating where
    parseQueryParam = \case
        "cbfcA" -> Right CbfcA
        "cbfcS" -> Right CbfcS
        "cbfcU" -> Right CbfcU
        "cbfcUA" -> Right CbfcUA
        "cbfcUnrated" -> Right CbfcUnrated
        x -> Left ("Unable to parse ContentRatingCbfcRating from: " <> x)

instance ToHttpApiData ContentRatingCbfcRating where
    toQueryParam = \case
        CbfcA -> "cbfcA"
        CbfcS -> "cbfcS"
        CbfcU -> "cbfcU"
        CbfcUA -> "cbfcUA"
        CbfcUnrated -> "cbfcUnrated"

instance FromJSON ContentRatingCbfcRating where
    parseJSON = parseJSONText "ContentRatingCbfcRating"

instance ToJSON ContentRatingCbfcRating where
    toJSON = toJSONText

-- | The video\'s rating from the Kenya Film Classification Board.
data ContentRatingKfcbRating
    = Kfcb16plus
      -- ^ @kfcb16plus@
    | KfcbG
      -- ^ @kfcbG@
    | KfcbPg
      -- ^ @kfcbPg@
    | KfcbR
      -- ^ @kfcbR@
    | KfcbUnrated
      -- ^ @kfcbUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingKfcbRating

instance FromHttpApiData ContentRatingKfcbRating where
    parseQueryParam = \case
        "kfcb16plus" -> Right Kfcb16plus
        "kfcbG" -> Right KfcbG
        "kfcbPg" -> Right KfcbPg
        "kfcbR" -> Right KfcbR
        "kfcbUnrated" -> Right KfcbUnrated
        x -> Left ("Unable to parse ContentRatingKfcbRating from: " <> x)

instance ToHttpApiData ContentRatingKfcbRating where
    toQueryParam = \case
        Kfcb16plus -> "kfcb16plus"
        KfcbG -> "kfcbG"
        KfcbPg -> "kfcbPg"
        KfcbR -> "kfcbR"
        KfcbUnrated -> "kfcbUnrated"

instance FromJSON ContentRatingKfcbRating where
    parseJSON = parseJSONText "ContentRatingKfcbRating"

instance ToJSON ContentRatingKfcbRating where
    toJSON = toJSONText

-- | How severe this issue is to the stream.
data LiveStreamConfigurationIssueSeverity
    = Error'
      -- ^ @error@
    | Info
      -- ^ @info@
    | Warning
      -- ^ @warning@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveStreamConfigurationIssueSeverity

instance FromHttpApiData LiveStreamConfigurationIssueSeverity where
    parseQueryParam = \case
        "error" -> Right Error'
        "info" -> Right Info
        "warning" -> Right Warning
        x -> Left ("Unable to parse LiveStreamConfigurationIssueSeverity from: " <> x)

instance ToHttpApiData LiveStreamConfigurationIssueSeverity where
    toQueryParam = \case
        Error' -> "error"
        Info -> "info"
        Warning -> "warning"

instance FromJSON LiveStreamConfigurationIssueSeverity where
    parseJSON = parseJSONText "LiveStreamConfigurationIssueSeverity"

instance ToJSON LiveStreamConfigurationIssueSeverity where
    toJSON = toJSONText

-- | The videoDefinition parameter lets you restrict a search to only include
-- either high definition (HD) or standard definition (SD) videos. HD
-- videos are available for playback in at least 720p, though higher
-- resolutions, like 1080p, might also be available. If you specify a value
-- for this parameter, you must also set the type parameter\'s value to
-- video.
data SearchListVideoDefinition
    = SLVDAny
      -- ^ @any@
      -- Return all videos, regardless of their resolution.
    | SLVDHigh
      -- ^ @high@
      -- Only retrieve HD videos.
    | SLVDStandard
      -- ^ @standard@
      -- Only retrieve videos in standard definition.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable SearchListVideoDefinition

instance FromHttpApiData SearchListVideoDefinition where
    parseQueryParam = \case
        "any" -> Right SLVDAny
        "high" -> Right SLVDHigh
        "standard" -> Right SLVDStandard
        x -> Left ("Unable to parse SearchListVideoDefinition from: " <> x)

instance ToHttpApiData SearchListVideoDefinition where
    toQueryParam = \case
        SLVDAny -> "any"
        SLVDHigh -> "high"
        SLVDStandard -> "standard"

instance FromJSON SearchListVideoDefinition where
    parseJSON = parseJSONText "SearchListVideoDefinition"

instance ToJSON SearchListVideoDefinition where
    toJSON = toJSONText

-- | Video game rating, if any.
data VideoAgeGatingVideoGameRating
    = Anyone
      -- ^ @anyone@
    | M15Plus
      -- ^ @m15Plus@
    | M16Plus
      -- ^ @m16Plus@
    | M17Plus
      -- ^ @m17Plus@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoAgeGatingVideoGameRating

instance FromHttpApiData VideoAgeGatingVideoGameRating where
    parseQueryParam = \case
        "anyone" -> Right Anyone
        "m15Plus" -> Right M15Plus
        "m16Plus" -> Right M16Plus
        "m17Plus" -> Right M17Plus
        x -> Left ("Unable to parse VideoAgeGatingVideoGameRating from: " <> x)

instance ToHttpApiData VideoAgeGatingVideoGameRating where
    toQueryParam = \case
        Anyone -> "anyone"
        M15Plus -> "m15Plus"
        M16Plus -> "m16Plus"
        M17Plus -> "m17Plus"

instance FromJSON VideoAgeGatingVideoGameRating where
    parseJSON = parseJSONText "VideoAgeGatingVideoGameRating"

instance ToJSON VideoAgeGatingVideoGameRating where
    toJSON = toJSONText

-- | The video\'s rating from Indonesia\'s Lembaga Sensor Film.
data ContentRatingLsfRating
    = LSF13
      -- ^ @lsf13@
    | LSF17
      -- ^ @lsf17@
    | LSF21
      -- ^ @lsf21@
    | LsfA
      -- ^ @lsfA@
    | LsfBo
      -- ^ @lsfBo@
    | LsfD
      -- ^ @lsfD@
    | LsfR
      -- ^ @lsfR@
    | LsfSu
      -- ^ @lsfSu@
    | LsfUnrated
      -- ^ @lsfUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingLsfRating

instance FromHttpApiData ContentRatingLsfRating where
    parseQueryParam = \case
        "lsf13" -> Right LSF13
        "lsf17" -> Right LSF17
        "lsf21" -> Right LSF21
        "lsfA" -> Right LsfA
        "lsfBo" -> Right LsfBo
        "lsfD" -> Right LsfD
        "lsfR" -> Right LsfR
        "lsfSu" -> Right LsfSu
        "lsfUnrated" -> Right LsfUnrated
        x -> Left ("Unable to parse ContentRatingLsfRating from: " <> x)

instance ToHttpApiData ContentRatingLsfRating where
    toQueryParam = \case
        LSF13 -> "lsf13"
        LSF17 -> "lsf17"
        LSF21 -> "lsf21"
        LsfA -> "lsfA"
        LsfBo -> "lsfBo"
        LsfD -> "lsfD"
        LsfR -> "lsfR"
        LsfSu -> "lsfSu"
        LsfUnrated -> "lsfUnrated"

instance FromJSON ContentRatingLsfRating where
    parseJSON = parseJSONText "ContentRatingLsfRating"

instance ToJSON ContentRatingLsfRating where
    toJSON = toJSONText

-- | The rating system for trailer, DVD, and Ad in the US. See
-- http:\/\/movielabs.com\/md\/ratings\/v2.3\/html\/US_MPAAT_Ratings.html.
data ContentRatingMpaatRating
    = MpaatGb
      -- ^ @mpaatGb@
    | MpaatRb
      -- ^ @mpaatRb@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingMpaatRating

instance FromHttpApiData ContentRatingMpaatRating where
    parseQueryParam = \case
        "mpaatGb" -> Right MpaatGb
        "mpaatRb" -> Right MpaatRb
        x -> Left ("Unable to parse ContentRatingMpaatRating from: " <> x)

instance ToHttpApiData ContentRatingMpaatRating where
    toQueryParam = \case
        MpaatGb -> "mpaatGb"
        MpaatRb -> "mpaatRb"

instance FromJSON ContentRatingMpaatRating where
    parseJSON = parseJSONText "ContentRatingMpaatRating"

instance ToJSON ContentRatingMpaatRating where
    toJSON = toJSONText

-- | The type of ban.
data LiveChatBanSnippetType
    = LCBSTPermanent
      -- ^ @permanent@
    | LCBSTTemporary
      -- ^ @temporary@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveChatBanSnippetType

instance FromHttpApiData LiveChatBanSnippetType where
    parseQueryParam = \case
        "permanent" -> Right LCBSTPermanent
        "temporary" -> Right LCBSTTemporary
        x -> Left ("Unable to parse LiveChatBanSnippetType from: " <> x)

instance ToHttpApiData LiveChatBanSnippetType where
    toQueryParam = \case
        LCBSTPermanent -> "permanent"
        LCBSTTemporary -> "temporary"

instance FromJSON LiveChatBanSnippetType where
    parseJSON = parseJSONText "LiveChatBanSnippetType"

instance ToJSON LiveChatBanSnippetType where
    toJSON = toJSONText

-- | The video\'s rating from Thailand\'s Board of Film and Video Censors.
data ContentRatingBfvcRating
    = BFVC13
      -- ^ @bfvc13@
    | BFVC15
      -- ^ @bfvc15@
    | BFVC18
      -- ^ @bfvc18@
    | BFVC20
      -- ^ @bfvc20@
    | BfvcB
      -- ^ @bfvcB@
    | BfvcE
      -- ^ @bfvcE@
    | BfvcG
      -- ^ @bfvcG@
    | BfvcUnrated
      -- ^ @bfvcUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingBfvcRating

instance FromHttpApiData ContentRatingBfvcRating where
    parseQueryParam = \case
        "bfvc13" -> Right BFVC13
        "bfvc15" -> Right BFVC15
        "bfvc18" -> Right BFVC18
        "bfvc20" -> Right BFVC20
        "bfvcB" -> Right BfvcB
        "bfvcE" -> Right BfvcE
        "bfvcG" -> Right BfvcG
        "bfvcUnrated" -> Right BfvcUnrated
        x -> Left ("Unable to parse ContentRatingBfvcRating from: " <> x)

instance ToHttpApiData ContentRatingBfvcRating where
    toQueryParam = \case
        BFVC13 -> "bfvc13"
        BFVC15 -> "bfvc15"
        BFVC18 -> "bfvc18"
        BFVC20 -> "bfvc20"
        BfvcB -> "bfvcB"
        BfvcE -> "bfvcE"
        BfvcG -> "bfvcG"
        BfvcUnrated -> "bfvcUnrated"

instance FromJSON ContentRatingBfvcRating where
    parseJSON = parseJSONText "ContentRatingBfvcRating"

instance ToJSON ContentRatingBfvcRating where
    toJSON = toJSONText

-- | The videoDuration parameter filters video search results based on their
-- duration. If you specify a value for this parameter, you must also set
-- the type parameter\'s value to video.
data SearchListVideoDuration
    = Any
      -- ^ @any@
      -- Do not filter video search results based on their duration. This is the
      -- default value.
    | Long
      -- ^ @long@
      -- Only include videos longer than 20 minutes.
    | Medium
      -- ^ @medium@
      -- Only include videos that are between four and 20 minutes long
      -- (inclusive).
    | Short
      -- ^ @short@
      -- Only include videos that are less than four minutes long.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable SearchListVideoDuration

instance FromHttpApiData SearchListVideoDuration where
    parseQueryParam = \case
        "any" -> Right Any
        "long" -> Right Long
        "medium" -> Right Medium
        "short" -> Right Short
        x -> Left ("Unable to parse SearchListVideoDuration from: " <> x)

instance ToHttpApiData SearchListVideoDuration where
    toQueryParam = \case
        Any -> "any"
        Long -> "long"
        Medium -> "medium"
        Short -> "short"

instance FromJSON SearchListVideoDuration where
    parseJSON = parseJSONText "SearchListVideoDuration"

instance ToJSON SearchListVideoDuration where
    toJSON = toJSONText

-- | The videoCaption parameter indicates whether the API should filter video
-- search results based on whether they have captions. If you specify a
-- value for this parameter, you must also set the type parameter\'s value
-- to video.
data SearchListVideoCaption
    = SLVCAny
      -- ^ @any@
      -- Do not filter results based on caption availability.
    | SLVCClosedCaption
      -- ^ @closedCaption@
      -- Only include videos that have captions.
    | SLVCNone
      -- ^ @none@
      -- Only include videos that do not have captions.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable SearchListVideoCaption

instance FromHttpApiData SearchListVideoCaption where
    parseQueryParam = \case
        "any" -> Right SLVCAny
        "closedCaption" -> Right SLVCClosedCaption
        "none" -> Right SLVCNone
        x -> Left ("Unable to parse SearchListVideoCaption from: " <> x)

instance ToHttpApiData SearchListVideoCaption where
    toQueryParam = \case
        SLVCAny -> "any"
        SLVCClosedCaption -> "closedCaption"
        SLVCNone -> "none"

instance FromJSON SearchListVideoCaption where
    parseJSON = parseJSONText "SearchListVideoCaption"

instance ToJSON SearchListVideoCaption where
    toJSON = toJSONText

-- | Set this parameter\'s value to like or dislike to instruct the API to
-- only return videos liked or disliked by the authenticated user.
data VideosListMyRating
    = Dislike
      -- ^ @dislike@
      -- Returns only videos disliked by the authenticated user.
    | Like
      -- ^ @like@
      -- Returns only video liked by the authenticated user.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideosListMyRating

instance FromHttpApiData VideosListMyRating where
    parseQueryParam = \case
        "dislike" -> Right Dislike
        "like" -> Right Like
        x -> Left ("Unable to parse VideosListMyRating from: " <> x)

instance ToHttpApiData VideosListMyRating where
    toQueryParam = \case
        Dislike -> "dislike"
        Like -> "like"

instance FromJSON VideosListMyRating where
    parseJSON = parseJSONText "VideosListMyRating"

instance ToJSON VideosListMyRating where
    toJSON = toJSONText

-- | The rating the viewer has given to this comment. For the time being this
-- will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE.
-- This may change in the future.
data CommentSnippetViewerRating
    = CSVRDislike
      -- ^ @dislike@
    | CSVRLike
      -- ^ @like@
    | CSVRNone
      -- ^ @none@
    | CSVRUnspecified
      -- ^ @unspecified@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CommentSnippetViewerRating

instance FromHttpApiData CommentSnippetViewerRating where
    parseQueryParam = \case
        "dislike" -> Right CSVRDislike
        "like" -> Right CSVRLike
        "none" -> Right CSVRNone
        "unspecified" -> Right CSVRUnspecified
        x -> Left ("Unable to parse CommentSnippetViewerRating from: " <> x)

instance ToHttpApiData CommentSnippetViewerRating where
    toQueryParam = \case
        CSVRDislike -> "dislike"
        CSVRLike -> "like"
        CSVRNone -> "none"
        CSVRUnspecified -> "unspecified"

instance FromJSON CommentSnippetViewerRating where
    parseJSON = parseJSONText "CommentSnippetViewerRating"

instance ToJSON CommentSnippetViewerRating where
    toJSON = toJSONText

-- | The video\'s rating from Malaysia\'s Film Censorship Board.
data ContentRatingFcbmRating
    = FCBM18
      -- ^ @fcbm18@
    | Fcbm18pa
      -- ^ @fcbm18pa@
    | Fcbm18pl
      -- ^ @fcbm18pl@
    | Fcbm18sg
      -- ^ @fcbm18sg@
    | Fcbm18sx
      -- ^ @fcbm18sx@
    | FCBMP13
      -- ^ @fcbmP13@
    | FCBMPG13
      -- ^ @fcbmPg13@
    | FcbmU
      -- ^ @fcbmU@
    | FcbmUnrated
      -- ^ @fcbmUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingFcbmRating

instance FromHttpApiData ContentRatingFcbmRating where
    parseQueryParam = \case
        "fcbm18" -> Right FCBM18
        "fcbm18pa" -> Right Fcbm18pa
        "fcbm18pl" -> Right Fcbm18pl
        "fcbm18sg" -> Right Fcbm18sg
        "fcbm18sx" -> Right Fcbm18sx
        "fcbmP13" -> Right FCBMP13
        "fcbmPg13" -> Right FCBMPG13
        "fcbmU" -> Right FcbmU
        "fcbmUnrated" -> Right FcbmUnrated
        x -> Left ("Unable to parse ContentRatingFcbmRating from: " <> x)

instance ToHttpApiData ContentRatingFcbmRating where
    toQueryParam = \case
        FCBM18 -> "fcbm18"
        Fcbm18pa -> "fcbm18pa"
        Fcbm18pl -> "fcbm18pl"
        Fcbm18sg -> "fcbm18sg"
        Fcbm18sx -> "fcbm18sx"
        FCBMP13 -> "fcbmP13"
        FCBMPG13 -> "fcbmPg13"
        FcbmU -> "fcbmU"
        FcbmUnrated -> "fcbmUnrated"

instance FromJSON ContentRatingFcbmRating where
    parseJSON = parseJSONText "ContentRatingFcbmRating"

instance ToJSON ContentRatingFcbmRating where
    toJSON = toJSONText

-- | The broadcastStatus parameter filters the API response to only include
-- broadcasts with the specified status.
data LiveBroadcastsListBroadcastStatus
    = LBLBSActive
      -- ^ @active@
      -- Return current live broadcasts.
    | LBLBSAll
      -- ^ @all@
      -- Return all broadcasts.
    | LBLBSCompleted
      -- ^ @completed@
      -- Return broadcasts that have already ended.
    | LBLBSUpcoming
      -- ^ @upcoming@
      -- Return broadcasts that have not yet started.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastsListBroadcastStatus

instance FromHttpApiData LiveBroadcastsListBroadcastStatus where
    parseQueryParam = \case
        "active" -> Right LBLBSActive
        "all" -> Right LBLBSAll
        "completed" -> Right LBLBSCompleted
        "upcoming" -> Right LBLBSUpcoming
        x -> Left ("Unable to parse LiveBroadcastsListBroadcastStatus from: " <> x)

instance ToHttpApiData LiveBroadcastsListBroadcastStatus where
    toQueryParam = \case
        LBLBSActive -> "active"
        LBLBSAll -> "all"
        LBLBSCompleted -> "completed"
        LBLBSUpcoming -> "upcoming"

instance FromJSON LiveBroadcastsListBroadcastStatus where
    parseJSON = parseJSONText "LiveBroadcastsListBroadcastStatus"

instance ToJSON LiveBroadcastsListBroadcastStatus where
    toJSON = toJSONText

-- | The video\'s rating from Taiwan\'s Ministry of Culture (文化部).
data ContentRatingMoctwRating
    = MoctwG
      -- ^ @moctwG@
    | MoctwP
      -- ^ @moctwP@
    | MoctwPg
      -- ^ @moctwPg@
    | MoctwR
      -- ^ @moctwR@
    | MOCTWR12
      -- ^ @moctwR12@
    | MOCTWR15
      -- ^ @moctwR15@
    | MoctwUnrated
      -- ^ @moctwUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingMoctwRating

instance FromHttpApiData ContentRatingMoctwRating where
    parseQueryParam = \case
        "moctwG" -> Right MoctwG
        "moctwP" -> Right MoctwP
        "moctwPg" -> Right MoctwPg
        "moctwR" -> Right MoctwR
        "moctwR12" -> Right MOCTWR12
        "moctwR15" -> Right MOCTWR15
        "moctwUnrated" -> Right MoctwUnrated
        x -> Left ("Unable to parse ContentRatingMoctwRating from: " <> x)

instance ToHttpApiData ContentRatingMoctwRating where
    toQueryParam = \case
        MoctwG -> "moctwG"
        MoctwP -> "moctwP"
        MoctwPg -> "moctwPg"
        MoctwR -> "moctwR"
        MOCTWR12 -> "moctwR12"
        MOCTWR15 -> "moctwR15"
        MoctwUnrated -> "moctwUnrated"

instance FromJSON ContentRatingMoctwRating where
    parseJSON = parseJSONText "ContentRatingMoctwRating"

instance ToJSON ContentRatingMoctwRating where
    toJSON = toJSONText

-- | The video\'s rating from the Austrian Board of Media Classification
-- (Bundesministerium für Unterricht, Kunst und Kultur).
data ContentRatingBmukkRating
    = BMUKK10
      -- ^ @bmukk10@
    | BMUKK12
      -- ^ @bmukk12@
    | BMUKK14
      -- ^ @bmukk14@
    | BMUKK16
      -- ^ @bmukk16@
    | BMUKK6
      -- ^ @bmukk6@
    | BMUKK8
      -- ^ @bmukk8@
    | BmukkAa
      -- ^ @bmukkAa@
    | BmukkUnrated
      -- ^ @bmukkUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingBmukkRating

instance FromHttpApiData ContentRatingBmukkRating where
    parseQueryParam = \case
        "bmukk10" -> Right BMUKK10
        "bmukk12" -> Right BMUKK12
        "bmukk14" -> Right BMUKK14
        "bmukk16" -> Right BMUKK16
        "bmukk6" -> Right BMUKK6
        "bmukk8" -> Right BMUKK8
        "bmukkAa" -> Right BmukkAa
        "bmukkUnrated" -> Right BmukkUnrated
        x -> Left ("Unable to parse ContentRatingBmukkRating from: " <> x)

instance ToHttpApiData ContentRatingBmukkRating where
    toQueryParam = \case
        BMUKK10 -> "bmukk10"
        BMUKK12 -> "bmukk12"
        BMUKK14 -> "bmukk14"
        BMUKK16 -> "bmukk16"
        BMUKK6 -> "bmukk6"
        BMUKK8 -> "bmukk8"
        BmukkAa -> "bmukkAa"
        BmukkUnrated -> "bmukkUnrated"

instance FromJSON ContentRatingBmukkRating where
    parseJSON = parseJSONText "ContentRatingBmukkRating"

instance ToJSON ContentRatingBmukkRating where
    toJSON = toJSONText

-- | The video\'s Instituto de la Cinematografía y de las Artes Audiovisuales
-- (ICAA - Spain) rating.
data ContentRatingIcaaRating
    = ICAA12
      -- ^ @icaa12@
    | ICAA13
      -- ^ @icaa13@
    | ICAA16
      -- ^ @icaa16@
    | ICAA18
      -- ^ @icaa18@
    | ICAA7
      -- ^ @icaa7@
    | IcaaApta
      -- ^ @icaaApta@
    | IcaaUnrated
      -- ^ @icaaUnrated@
    | IcaaX
      -- ^ @icaaX@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingIcaaRating

instance FromHttpApiData ContentRatingIcaaRating where
    parseQueryParam = \case
        "icaa12" -> Right ICAA12
        "icaa13" -> Right ICAA13
        "icaa16" -> Right ICAA16
        "icaa18" -> Right ICAA18
        "icaa7" -> Right ICAA7
        "icaaApta" -> Right IcaaApta
        "icaaUnrated" -> Right IcaaUnrated
        "icaaX" -> Right IcaaX
        x -> Left ("Unable to parse ContentRatingIcaaRating from: " <> x)

instance ToHttpApiData ContentRatingIcaaRating where
    toQueryParam = \case
        ICAA12 -> "icaa12"
        ICAA13 -> "icaa13"
        ICAA16 -> "icaa16"
        ICAA18 -> "icaa18"
        ICAA7 -> "icaa7"
        IcaaApta -> "icaaApta"
        IcaaUnrated -> "icaaUnrated"
        IcaaX -> "icaaX"

instance FromJSON ContentRatingIcaaRating where
    parseJSON = parseJSONText "ContentRatingIcaaRating"

instance ToJSON ContentRatingIcaaRating where
    toJSON = toJSONText

-- | This value explains why YouTube rejected an uploaded video. This
-- property is only present if the uploadStatus property indicates that the
-- upload was rejected.
data VideoStatusRejectionReason
    = Claim
      -- ^ @claim@
    | Copyright
      -- ^ @copyright@
    | Duplicate
      -- ^ @duplicate@
    | InAppropriate
      -- ^ @inappropriate@
    | Legal
      -- ^ @legal@
    | Length
      -- ^ @length@
    | TermsOfUse
      -- ^ @termsOfUse@
    | Trademark
      -- ^ @trademark@
    | UploaderAccountClosed
      -- ^ @uploaderAccountClosed@
    | UploaderAccountSuspended
      -- ^ @uploaderAccountSuspended@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoStatusRejectionReason

instance FromHttpApiData VideoStatusRejectionReason where
    parseQueryParam = \case
        "claim" -> Right Claim
        "copyright" -> Right Copyright
        "duplicate" -> Right Duplicate
        "inappropriate" -> Right InAppropriate
        "legal" -> Right Legal
        "length" -> Right Length
        "termsOfUse" -> Right TermsOfUse
        "trademark" -> Right Trademark
        "uploaderAccountClosed" -> Right UploaderAccountClosed
        "uploaderAccountSuspended" -> Right UploaderAccountSuspended
        x -> Left ("Unable to parse VideoStatusRejectionReason from: " <> x)

instance ToHttpApiData VideoStatusRejectionReason where
    toQueryParam = \case
        Claim -> "claim"
        Copyright -> "copyright"
        Duplicate -> "duplicate"
        InAppropriate -> "inappropriate"
        Legal -> "legal"
        Length -> "length"
        TermsOfUse -> "termsOfUse"
        Trademark -> "trademark"
        UploaderAccountClosed -> "uploaderAccountClosed"
        UploaderAccountSuspended -> "uploaderAccountSuspended"

instance FromJSON VideoStatusRejectionReason where
    parseJSON = parseJSONText "VideoStatusRejectionReason"

instance ToJSON VideoStatusRejectionReason where
    toJSON = toJSONText

-- | The video\'s rating in the Czech Republic.
data ContentRatingCzfilmRating
    = CZFILM12
      -- ^ @czfilm12@
    | CZFILM14
      -- ^ @czfilm14@
    | CZFILM18
      -- ^ @czfilm18@
    | CzfilmU
      -- ^ @czfilmU@
    | CzfilmUnrated
      -- ^ @czfilmUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingCzfilmRating

instance FromHttpApiData ContentRatingCzfilmRating where
    parseQueryParam = \case
        "czfilm12" -> Right CZFILM12
        "czfilm14" -> Right CZFILM14
        "czfilm18" -> Right CZFILM18
        "czfilmU" -> Right CzfilmU
        "czfilmUnrated" -> Right CzfilmUnrated
        x -> Left ("Unable to parse ContentRatingCzfilmRating from: " <> x)

instance ToHttpApiData ContentRatingCzfilmRating where
    toQueryParam = \case
        CZFILM12 -> "czfilm12"
        CZFILM14 -> "czfilm14"
        CZFILM18 -> "czfilm18"
        CzfilmU -> "czfilmU"
        CzfilmUnrated -> "czfilmUnrated"

instance FromJSON ContentRatingCzfilmRating where
    parseJSON = parseJSONText "ContentRatingCzfilmRating"

instance ToJSON ContentRatingCzfilmRating where
    toJSON = toJSONText

-- | The video\'s National Film Registry of the Russian Federation (MKRF -
-- Russia) rating.
data ContentRatingRussiaRating
    = RUSSIA0
      -- ^ @russia0@
    | RUSSIA12
      -- ^ @russia12@
    | RUSSIA16
      -- ^ @russia16@
    | RUSSIA18
      -- ^ @russia18@
    | RUSSIA6
      -- ^ @russia6@
    | RussiaUnrated
      -- ^ @russiaUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingRussiaRating

instance FromHttpApiData ContentRatingRussiaRating where
    parseQueryParam = \case
        "russia0" -> Right RUSSIA0
        "russia12" -> Right RUSSIA12
        "russia16" -> Right RUSSIA16
        "russia18" -> Right RUSSIA18
        "russia6" -> Right RUSSIA6
        "russiaUnrated" -> Right RussiaUnrated
        x -> Left ("Unable to parse ContentRatingRussiaRating from: " <> x)

instance ToHttpApiData ContentRatingRussiaRating where
    toQueryParam = \case
        RUSSIA0 -> "russia0"
        RUSSIA12 -> "russia12"
        RUSSIA16 -> "russia16"
        RUSSIA18 -> "russia18"
        RUSSIA6 -> "russia6"
        RussiaUnrated -> "russiaUnrated"

instance FromJSON ContentRatingRussiaRating where
    parseJSON = parseJSONText "ContentRatingRussiaRating"

instance ToJSON ContentRatingRussiaRating where
    toJSON = toJSONText

-- | The video\'s rating from the Commission de Contrôle des Films (Belgium).
data ContentRatingCicfRating
    = CicfE
      -- ^ @cicfE@
    | CicfKntEna
      -- ^ @cicfKntEna@
    | CicfKtEa
      -- ^ @cicfKtEa@
    | CicfUnrated
      -- ^ @cicfUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingCicfRating

instance FromHttpApiData ContentRatingCicfRating where
    parseQueryParam = \case
        "cicfE" -> Right CicfE
        "cicfKntEna" -> Right CicfKntEna
        "cicfKtEa" -> Right CicfKtEa
        "cicfUnrated" -> Right CicfUnrated
        x -> Left ("Unable to parse ContentRatingCicfRating from: " <> x)

instance ToHttpApiData ContentRatingCicfRating where
    toQueryParam = \case
        CicfE -> "cicfE"
        CicfKntEna -> "cicfKntEna"
        CicfKtEa -> "cicfKtEa"
        CicfUnrated -> "cicfUnrated"

instance FromJSON ContentRatingCicfRating where
    parseJSON = parseJSONText "ContentRatingCicfRating"

instance ToJSON ContentRatingCicfRating where
    toJSON = toJSONText

-- | This property has been deprecated. Use the
-- contentDetails.contentRating.cncRating instead.
data ContentRatingFmocRating
    = FMOC10
      -- ^ @fmoc10@
    | FMOC12
      -- ^ @fmoc12@
    | FMOC16
      -- ^ @fmoc16@
    | FMOC18
      -- ^ @fmoc18@
    | FmocE
      -- ^ @fmocE@
    | FmocU
      -- ^ @fmocU@
    | FmocUnrated
      -- ^ @fmocUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingFmocRating

instance FromHttpApiData ContentRatingFmocRating where
    parseQueryParam = \case
        "fmoc10" -> Right FMOC10
        "fmoc12" -> Right FMOC12
        "fmoc16" -> Right FMOC16
        "fmoc18" -> Right FMOC18
        "fmocE" -> Right FmocE
        "fmocU" -> Right FmocU
        "fmocUnrated" -> Right FmocUnrated
        x -> Left ("Unable to parse ContentRatingFmocRating from: " <> x)

instance ToHttpApiData ContentRatingFmocRating where
    toQueryParam = \case
        FMOC10 -> "fmoc10"
        FMOC12 -> "fmoc12"
        FMOC16 -> "fmoc16"
        FMOC18 -> "fmoc18"
        FmocE -> "fmocE"
        FmocU -> "fmocU"
        FmocUnrated -> "fmocUnrated"

instance FromJSON ContentRatingFmocRating where
    parseJSON = parseJSONText "ContentRatingFmocRating"

instance ToJSON ContentRatingFmocRating where
    toJSON = toJSONText

-- | The broadcastStatus parameter identifies the state to which the
-- broadcast is changing. Note that to transition a broadcast to either the
-- testing or live state, the status.streamStatus must be active for the
-- stream that the broadcast is bound to.
data LiveBroadcastsTransitionBroadcastStatus
    = LBTBSComplete
      -- ^ @complete@
      -- The broadcast is over. YouTube stops transmitting video.
    | LBTBSLive
      -- ^ @live@
      -- The broadcast is visible to its audience. YouTube transmits video to the
      -- broadcast\'s monitor stream and its broadcast stream.
    | LBTBSTesting
      -- ^ @testing@
      -- Start testing the broadcast. YouTube transmits video to the broadcast\'s
      -- monitor stream. Note that you can only transition a broadcast to the
      -- testing state if its contentDetails.monitorStream.enableMonitorStream
      -- property is set to true.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastsTransitionBroadcastStatus

instance FromHttpApiData LiveBroadcastsTransitionBroadcastStatus where
    parseQueryParam = \case
        "complete" -> Right LBTBSComplete
        "live" -> Right LBTBSLive
        "testing" -> Right LBTBSTesting
        x -> Left ("Unable to parse LiveBroadcastsTransitionBroadcastStatus from: " <> x)

instance ToHttpApiData LiveBroadcastsTransitionBroadcastStatus where
    toQueryParam = \case
        LBTBSComplete -> "complete"
        LBTBSLive -> "live"
        LBTBSTesting -> "testing"

instance FromJSON LiveBroadcastsTransitionBroadcastStatus where
    parseJSON = parseJSONText "LiveBroadcastsTransitionBroadcastStatus"

instance ToJSON LiveBroadcastsTransitionBroadcastStatus where
    toJSON = toJSONText

-- | The video\'s rating from the Maldives National Bureau of Classification.
data ContentRatingNbcRating
    = Nbc12plus
      -- ^ @nbc12plus@
    | Nbc15plus
      -- ^ @nbc15plus@
    | Nbc18plus
      -- ^ @nbc18plus@
    | Nbc18plusr
      -- ^ @nbc18plusr@
    | NbcG
      -- ^ @nbcG@
    | NbcPg
      -- ^ @nbcPg@
    | NbcPu
      -- ^ @nbcPu@
    | NbcUnrated
      -- ^ @nbcUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingNbcRating

instance FromHttpApiData ContentRatingNbcRating where
    parseQueryParam = \case
        "nbc12plus" -> Right Nbc12plus
        "nbc15plus" -> Right Nbc15plus
        "nbc18plus" -> Right Nbc18plus
        "nbc18plusr" -> Right Nbc18plusr
        "nbcG" -> Right NbcG
        "nbcPg" -> Right NbcPg
        "nbcPu" -> Right NbcPu
        "nbcUnrated" -> Right NbcUnrated
        x -> Left ("Unable to parse ContentRatingNbcRating from: " <> x)

instance ToHttpApiData ContentRatingNbcRating where
    toQueryParam = \case
        Nbc12plus -> "nbc12plus"
        Nbc15plus -> "nbc15plus"
        Nbc18plus -> "nbc18plus"
        Nbc18plusr -> "nbc18plusr"
        NbcG -> "nbcG"
        NbcPg -> "nbcPg"
        NbcPu -> "nbcPu"
        NbcUnrated -> "nbcUnrated"

instance FromJSON ContentRatingNbcRating where
    parseJSON = parseJSONText "ContentRatingNbcRating"

instance ToJSON ContentRatingNbcRating where
    toJSON = toJSONText

-- | Priority of the live broadcast event (internal state).
data LiveBroadcastStatusLiveBroadcastPriority
    = High
      -- ^ @high@
    | Low
      -- ^ @low@
    | Normal
      -- ^ @normal@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastStatusLiveBroadcastPriority

instance FromHttpApiData LiveBroadcastStatusLiveBroadcastPriority where
    parseQueryParam = \case
        "high" -> Right High
        "low" -> Right Low
        "normal" -> Right Normal
        x -> Left ("Unable to parse LiveBroadcastStatusLiveBroadcastPriority from: " <> x)

instance ToHttpApiData LiveBroadcastStatusLiveBroadcastPriority where
    toQueryParam = \case
        High -> "high"
        Low -> "low"
        Normal -> "normal"

instance FromJSON LiveBroadcastStatusLiveBroadcastPriority where
    parseJSON = parseJSONText "LiveBroadcastStatusLiveBroadcastPriority"

instance ToJSON LiveBroadcastStatusLiveBroadcastPriority where
    toJSON = toJSONText

-- | The status code of this stream
data LiveStreamHealthStatusStatus
    = Bad
      -- ^ @bad@
    | Good
      -- ^ @good@
    | NoData
      -- ^ @noData@
    | OK
      -- ^ @ok@
    | Revoked
      -- ^ @revoked@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveStreamHealthStatusStatus

instance FromHttpApiData LiveStreamHealthStatusStatus where
    parseQueryParam = \case
        "bad" -> Right Bad
        "good" -> Right Good
        "noData" -> Right NoData
        "ok" -> Right OK
        "revoked" -> Right Revoked
        x -> Left ("Unable to parse LiveStreamHealthStatusStatus from: " <> x)

instance ToHttpApiData LiveStreamHealthStatusStatus where
    toQueryParam = \case
        Bad -> "bad"
        Good -> "good"
        NoData -> "noData"
        OK -> "ok"
        Revoked -> "revoked"

instance FromJSON LiveStreamHealthStatusStatus where
    parseJSON = parseJSONText "LiveStreamHealthStatusStatus"

instance ToJSON LiveStreamHealthStatusStatus where
    toJSON = toJSONText

-- | 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.
data LiveBroadcastContentDetailsLatencyPreference
    = LBCDLPLow
      -- ^ @low@
    | LBCDLPNormal
      -- ^ @normal@
    | LBCDLPUltraLow
      -- ^ @ultraLow@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastContentDetailsLatencyPreference

instance FromHttpApiData LiveBroadcastContentDetailsLatencyPreference where
    parseQueryParam = \case
        "low" -> Right LBCDLPLow
        "normal" -> Right LBCDLPNormal
        "ultraLow" -> Right LBCDLPUltraLow
        x -> Left ("Unable to parse LiveBroadcastContentDetailsLatencyPreference from: " <> x)

instance ToHttpApiData LiveBroadcastContentDetailsLatencyPreference where
    toQueryParam = \case
        LBCDLPLow -> "low"
        LBCDLPNormal -> "normal"
        LBCDLPUltraLow -> "ultraLow"

instance FromJSON LiveBroadcastContentDetailsLatencyPreference where
    parseJSON = parseJSONText "LiveBroadcastContentDetailsLatencyPreference"

instance ToJSON LiveBroadcastContentDetailsLatencyPreference where
    toJSON = toJSONText

data VideoRatingRating
    = VRRDislike
      -- ^ @dislike@
    | VRRLike
      -- ^ @like@
    | VRRNone
      -- ^ @none@
    | VRRUnspecified
      -- ^ @unspecified@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoRatingRating

instance FromHttpApiData VideoRatingRating where
    parseQueryParam = \case
        "dislike" -> Right VRRDislike
        "like" -> Right VRRLike
        "none" -> Right VRRNone
        "unspecified" -> Right VRRUnspecified
        x -> Left ("Unable to parse VideoRatingRating from: " <> x)

instance ToHttpApiData VideoRatingRating where
    toQueryParam = \case
        VRRDislike -> "dislike"
        VRRLike -> "like"
        VRRNone -> "none"
        VRRUnspecified -> "unspecified"

instance FromJSON VideoRatingRating where
    parseJSON = parseJSONText "VideoRatingRating"

instance ToJSON VideoRatingRating where
    toJSON = toJSONText

data VideoSuggestionsProcessingWarningsItem
    = HasEditList
      -- ^ @hasEditlist@
    | InconsistentResolution
      -- ^ @inconsistentResolution@
    | ProblematicAudioCodec
      -- ^ @problematicAudioCodec@
    | ProblematicHdrLookupTable
      -- ^ @problematicHdrLookupTable@
    | ProblematicVideoCodec
      -- ^ @problematicVideoCodec@
    | UnknownAudioCodec
      -- ^ @unknownAudioCodec@
    | UnknownContainer
      -- ^ @unknownContainer@
    | UnknownVideoCodec
      -- ^ @unknownVideoCodec@
    | UnsupportedHdrColorMetadata
      -- ^ @unsupportedHdrColorMetadata@
    | UnsupportedHdrPixelFormat
      -- ^ @unsupportedHdrPixelFormat@
    | UnsupportedSphericalProjectionType
      -- ^ @unsupportedSphericalProjectionType@
    | UnsupportedVrStereoMode
      -- ^ @unsupportedVrStereoMode@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoSuggestionsProcessingWarningsItem

instance FromHttpApiData VideoSuggestionsProcessingWarningsItem where
    parseQueryParam = \case
        "hasEditlist" -> Right HasEditList
        "inconsistentResolution" -> Right InconsistentResolution
        "problematicAudioCodec" -> Right ProblematicAudioCodec
        "problematicHdrLookupTable" -> Right ProblematicHdrLookupTable
        "problematicVideoCodec" -> Right ProblematicVideoCodec
        "unknownAudioCodec" -> Right UnknownAudioCodec
        "unknownContainer" -> Right UnknownContainer
        "unknownVideoCodec" -> Right UnknownVideoCodec
        "unsupportedHdrColorMetadata" -> Right UnsupportedHdrColorMetadata
        "unsupportedHdrPixelFormat" -> Right UnsupportedHdrPixelFormat
        "unsupportedSphericalProjectionType" -> Right UnsupportedSphericalProjectionType
        "unsupportedVrStereoMode" -> Right UnsupportedVrStereoMode
        x -> Left ("Unable to parse VideoSuggestionsProcessingWarningsItem from: " <> x)

instance ToHttpApiData VideoSuggestionsProcessingWarningsItem where
    toQueryParam = \case
        HasEditList -> "hasEditlist"
        InconsistentResolution -> "inconsistentResolution"
        ProblematicAudioCodec -> "problematicAudioCodec"
        ProblematicHdrLookupTable -> "problematicHdrLookupTable"
        ProblematicVideoCodec -> "problematicVideoCodec"
        UnknownAudioCodec -> "unknownAudioCodec"
        UnknownContainer -> "unknownContainer"
        UnknownVideoCodec -> "unknownVideoCodec"
        UnsupportedHdrColorMetadata -> "unsupportedHdrColorMetadata"
        UnsupportedHdrPixelFormat -> "unsupportedHdrPixelFormat"
        UnsupportedSphericalProjectionType -> "unsupportedSphericalProjectionType"
        UnsupportedVrStereoMode -> "unsupportedVrStereoMode"

instance FromJSON VideoSuggestionsProcessingWarningsItem where
    parseJSON = parseJSONText "VideoSuggestionsProcessingWarningsItem"

instance ToJSON VideoSuggestionsProcessingWarningsItem where
    toJSON = toJSONText

-- | Describes in which corner of the video the visual widget will appear.
data InvideoPositionCornerPosition
    = BottomLeft
      -- ^ @bottomLeft@
    | BottomRight
      -- ^ @bottomRight@
    | TopLeft
      -- ^ @topLeft@
    | TopRight
      -- ^ @topRight@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable InvideoPositionCornerPosition

instance FromHttpApiData InvideoPositionCornerPosition where
    parseQueryParam = \case
        "bottomLeft" -> Right BottomLeft
        "bottomRight" -> Right BottomRight
        "topLeft" -> Right TopLeft
        "topRight" -> Right TopRight
        x -> Left ("Unable to parse InvideoPositionCornerPosition from: " <> x)

instance ToHttpApiData InvideoPositionCornerPosition where
    toQueryParam = \case
        BottomLeft -> "bottomLeft"
        BottomRight -> "bottomRight"
        TopLeft -> "topLeft"
        TopRight -> "topRight"

instance FromJSON InvideoPositionCornerPosition where
    parseJSON = parseJSONText "InvideoPositionCornerPosition"

instance ToJSON InvideoPositionCornerPosition where
    toJSON = toJSONText

-- | The long uploads status of this channel. See
data ChannelStatusLongUploadsStatus
    = Allowed
      -- ^ @allowed@
    | Disallowed
      -- ^ @disallowed@
    | Eligible
      -- ^ @eligible@
    | LongUploadsUnspecified
      -- ^ @longUploadsUnspecified@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ChannelStatusLongUploadsStatus

instance FromHttpApiData ChannelStatusLongUploadsStatus where
    parseQueryParam = \case
        "allowed" -> Right Allowed
        "disallowed" -> Right Disallowed
        "eligible" -> Right Eligible
        "longUploadsUnspecified" -> Right LongUploadsUnspecified
        x -> Left ("Unable to parse ChannelStatusLongUploadsStatus from: " <> x)

instance ToHttpApiData ChannelStatusLongUploadsStatus where
    toQueryParam = \case
        Allowed -> "allowed"
        Disallowed -> "disallowed"
        Eligible -> "eligible"
        LongUploadsUnspecified -> "longUploadsUnspecified"

instance FromJSON ChannelStatusLongUploadsStatus where
    parseJSON = parseJSONText "ChannelStatusLongUploadsStatus"

instance ToJSON ChannelStatusLongUploadsStatus where
    toJSON = toJSONText

-- | The video\'s rating from Luxembourg\'s Commission de surveillance de la
-- classification des films (CSCF).
data ContentRatingCscfRating
    = CSCF12
      -- ^ @cscf12@
    | CSCF16
      -- ^ @cscf16@
    | CSCF18
      -- ^ @cscf18@
    | CSCF6
      -- ^ @cscf6@
    | CSCF9
      -- ^ @cscf9@
    | CscfA
      -- ^ @cscfA@
    | CscfAl
      -- ^ @cscfAl@
    | CscfUnrated
      -- ^ @cscfUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingCscfRating

instance FromHttpApiData ContentRatingCscfRating where
    parseQueryParam = \case
        "cscf12" -> Right CSCF12
        "cscf16" -> Right CSCF16
        "cscf18" -> Right CSCF18
        "cscf6" -> Right CSCF6
        "cscf9" -> Right CSCF9
        "cscfA" -> Right CscfA
        "cscfAl" -> Right CscfAl
        "cscfUnrated" -> Right CscfUnrated
        x -> Left ("Unable to parse ContentRatingCscfRating from: " <> x)

instance ToHttpApiData ContentRatingCscfRating where
    toQueryParam = \case
        CSCF12 -> "cscf12"
        CSCF16 -> "cscf16"
        CSCF18 -> "cscf18"
        CSCF6 -> "cscf6"
        CSCF9 -> "cscf9"
        CscfA -> "cscfA"
        CscfAl -> "cscfAl"
        CscfUnrated -> "cscfUnrated"

instance FromJSON ContentRatingCscfRating where
    parseJSON = parseJSONText "ContentRatingCscfRating"

instance ToJSON ContentRatingCscfRating where
    toJSON = toJSONText

-- | The broadcast\'s recording status.
data LiveBroadcastStatusRecordingStatus
    = NotRecording
      -- ^ @notRecording@
    | Recorded
      -- ^ @recorded@
    | Recording
      -- ^ @recording@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastStatusRecordingStatus

instance FromHttpApiData LiveBroadcastStatusRecordingStatus where
    parseQueryParam = \case
        "notRecording" -> Right NotRecording
        "recorded" -> Right Recorded
        "recording" -> Right Recording
        x -> Left ("Unable to parse LiveBroadcastStatusRecordingStatus from: " <> x)

instance ToHttpApiData LiveBroadcastStatusRecordingStatus where
    toQueryParam = \case
        NotRecording -> "notRecording"
        Recorded -> "recorded"
        Recording -> "recording"

instance FromJSON LiveBroadcastStatusRecordingStatus where
    parseJSON = parseJSONText "LiveBroadcastStatusRecordingStatus"

instance ToJSON LiveBroadcastStatusRecordingStatus where
    toJSON = toJSONText

-- | The amount that YouTube needs to rotate the original source content to
-- properly display the video.
data VideoFileDetailsVideoStreamRotation
    = VFDVSRClockwise
      -- ^ @clockwise@
    | VFDVSRCounterClockwise
      -- ^ @counterClockwise@
    | VFDVSRNone
      -- ^ @none@
    | VFDVSROther
      -- ^ @other@
    | VFDVSRUpsideDown
      -- ^ @upsideDown@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoFileDetailsVideoStreamRotation

instance FromHttpApiData VideoFileDetailsVideoStreamRotation where
    parseQueryParam = \case
        "clockwise" -> Right VFDVSRClockwise
        "counterClockwise" -> Right VFDVSRCounterClockwise
        "none" -> Right VFDVSRNone
        "other" -> Right VFDVSROther
        "upsideDown" -> Right VFDVSRUpsideDown
        x -> Left ("Unable to parse VideoFileDetailsVideoStreamRotation from: " <> x)

instance ToHttpApiData VideoFileDetailsVideoStreamRotation where
    toQueryParam = \case
        VFDVSRClockwise -> "clockwise"
        VFDVSRCounterClockwise -> "counterClockwise"
        VFDVSRNone -> "none"
        VFDVSROther -> "other"
        VFDVSRUpsideDown -> "upsideDown"

instance FromJSON VideoFileDetailsVideoStreamRotation where
    parseJSON = parseJSONText "VideoFileDetailsVideoStreamRotation"

instance ToJSON VideoFileDetailsVideoStreamRotation where
    toJSON = toJSONText

-- | The video\'s General Directorate of Radio, Television and Cinematography
-- (Mexico) rating.
data ContentRatingRtcRating
    = RtcA
      -- ^ @rtcA@
    | RtcAa
      -- ^ @rtcAa@
    | RtcB
      -- ^ @rtcB@
    | RTCB15
      -- ^ @rtcB15@
    | RtcC
      -- ^ @rtcC@
    | RtcD
      -- ^ @rtcD@
    | RtcUnrated
      -- ^ @rtcUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingRtcRating

instance FromHttpApiData ContentRatingRtcRating where
    parseQueryParam = \case
        "rtcA" -> Right RtcA
        "rtcAa" -> Right RtcAa
        "rtcB" -> Right RtcB
        "rtcB15" -> Right RTCB15
        "rtcC" -> Right RtcC
        "rtcD" -> Right RtcD
        "rtcUnrated" -> Right RtcUnrated
        x -> Left ("Unable to parse ContentRatingRtcRating from: " <> x)

instance ToHttpApiData ContentRatingRtcRating where
    toQueryParam = \case
        RtcA -> "rtcA"
        RtcAa -> "rtcAa"
        RtcB -> "rtcB"
        RTCB15 -> "rtcB15"
        RtcC -> "rtcC"
        RtcD -> "rtcD"
        RtcUnrated -> "rtcUnrated"

instance FromJSON ContentRatingRtcRating where
    parseJSON = parseJSONText "ContentRatingRtcRating"

instance ToJSON ContentRatingRtcRating where
    toJSON = toJSONText

-- | Set this parameter to limit the returned comment threads to a particular
-- moderation state. Note: This parameter is not supported for use in
-- conjunction with the id parameter.
data CommentThreadsListModerationStatus
    = HeldForReview
      -- ^ @heldForReview@
      -- Retrieve comment threads that are awaiting review by a moderator. A
      -- comment thread can be included in the response if the top-level comment
      -- or at least one of the replies to that comment are awaiting review.
    | LikelySpam
      -- ^ @likelySpam@
      -- Retrieve comment threads classified as likely to be spam. A comment
      -- thread can be included in the response if the top-level comment or at
      -- least one of the replies to that comment is considered likely to be
      -- spam.
    | Published
      -- ^ @published@
      -- Retrieve threads of published comments. This is the default value. A
      -- comment thread can be included in the response if its top-level comment
      -- has been published.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CommentThreadsListModerationStatus

instance FromHttpApiData CommentThreadsListModerationStatus where
    parseQueryParam = \case
        "heldForReview" -> Right HeldForReview
        "likelySpam" -> Right LikelySpam
        "published" -> Right Published
        x -> Left ("Unable to parse CommentThreadsListModerationStatus from: " <> x)

instance ToHttpApiData CommentThreadsListModerationStatus where
    toQueryParam = \case
        HeldForReview -> "heldForReview"
        LikelySpam -> "likelySpam"
        Published -> "published"

instance FromJSON CommentThreadsListModerationStatus where
    parseJSON = parseJSONText "CommentThreadsListModerationStatus"

instance ToJSON CommentThreadsListModerationStatus where
    toJSON = toJSONText

-- | The video\'s rating in Iceland.
data ContentRatingSmaisRating
    = SMAIS12
      -- ^ @smais12@
    | SMAIS14
      -- ^ @smais14@
    | SMAIS16
      -- ^ @smais16@
    | SMAIS18
      -- ^ @smais18@
    | SMAIS7
      -- ^ @smais7@
    | SmaisL
      -- ^ @smaisL@
    | SmaisUnrated
      -- ^ @smaisUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingSmaisRating

instance FromHttpApiData ContentRatingSmaisRating where
    parseQueryParam = \case
        "smais12" -> Right SMAIS12
        "smais14" -> Right SMAIS14
        "smais16" -> Right SMAIS16
        "smais18" -> Right SMAIS18
        "smais7" -> Right SMAIS7
        "smaisL" -> Right SmaisL
        "smaisUnrated" -> Right SmaisUnrated
        x -> Left ("Unable to parse ContentRatingSmaisRating from: " <> x)

instance ToHttpApiData ContentRatingSmaisRating where
    toQueryParam = \case
        SMAIS12 -> "smais12"
        SMAIS14 -> "smais14"
        SMAIS16 -> "smais16"
        SMAIS18 -> "smais18"
        SMAIS7 -> "smais7"
        SmaisL -> "smaisL"
        SmaisUnrated -> "smaisUnrated"

instance FromJSON ContentRatingSmaisRating where
    parseJSON = parseJSONText "ContentRatingSmaisRating"

instance ToJSON ContentRatingSmaisRating where
    toJSON = toJSONText

-- | A rating that YouTube uses to identify age-restricted content.
data ContentRatingYtRating
    = YtAgeRestricted
      -- ^ @ytAgeRestricted@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingYtRating

instance FromHttpApiData ContentRatingYtRating where
    parseQueryParam = \case
        "ytAgeRestricted" -> Right YtAgeRestricted
        x -> Left ("Unable to parse ContentRatingYtRating from: " <> x)

instance ToHttpApiData ContentRatingYtRating where
    toQueryParam = \case
        YtAgeRestricted -> "ytAgeRestricted"

instance FromJSON ContentRatingYtRating where
    parseJSON = parseJSONText "ContentRatingYtRating"

instance ToJSON ContentRatingYtRating where
    toJSON = toJSONText

-- | The value of captions indicates whether the video has captions or not.
data VideoContentDetailsCaption
    = False'
      -- ^ @false@
    | True'
      -- ^ @true@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoContentDetailsCaption

instance FromHttpApiData VideoContentDetailsCaption where
    parseQueryParam = \case
        "false" -> Right False'
        "true" -> Right True'
        x -> Left ("Unable to parse VideoContentDetailsCaption from: " <> x)

instance ToHttpApiData VideoContentDetailsCaption where
    toQueryParam = \case
        False' -> "false"
        True' -> "true"

instance FromJSON VideoContentDetailsCaption where
    parseJSON = parseJSONText "VideoContentDetailsCaption"

instance ToJSON VideoContentDetailsCaption where
    toJSON = toJSONText

-- | The order parameter specifies the method that will be used to sort
-- resources in the API response.
data SubscriptionsListOrder
    = SLOAlphabetical
      -- ^ @alphabetical@
      -- Sort alphabetically.
    | SLORelevance
      -- ^ @relevance@
      -- Sort by relevance.
    | SLOUnread
      -- ^ @unread@
      -- Sort by order of activity.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable SubscriptionsListOrder

instance FromHttpApiData SubscriptionsListOrder where
    parseQueryParam = \case
        "alphabetical" -> Right SLOAlphabetical
        "relevance" -> Right SLORelevance
        "unread" -> Right SLOUnread
        x -> Left ("Unable to parse SubscriptionsListOrder from: " <> x)

instance ToHttpApiData SubscriptionsListOrder where
    toQueryParam = \case
        SLOAlphabetical -> "alphabetical"
        SLORelevance -> "relevance"
        SLOUnread -> "unread"

instance FromJSON SubscriptionsListOrder where
    parseJSON = parseJSONText "SubscriptionsListOrder"

instance ToJSON SubscriptionsListOrder where
    toJSON = toJSONText

-- | The video\'s British Board of Film Classification (BBFC) rating.
data ContentRatingBbfcRating
    = BBFC12
      -- ^ @bbfc12@
    | Bbfc12a
      -- ^ @bbfc12a@
    | BBFC15
      -- ^ @bbfc15@
    | BBFC18
      -- ^ @bbfc18@
    | BbfcPg
      -- ^ @bbfcPg@
    | BBFCR18
      -- ^ @bbfcR18@
    | BbfcU
      -- ^ @bbfcU@
    | BbfcUnrated
      -- ^ @bbfcUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingBbfcRating

instance FromHttpApiData ContentRatingBbfcRating where
    parseQueryParam = \case
        "bbfc12" -> Right BBFC12
        "bbfc12a" -> Right Bbfc12a
        "bbfc15" -> Right BBFC15
        "bbfc18" -> Right BBFC18
        "bbfcPg" -> Right BbfcPg
        "bbfcR18" -> Right BBFCR18
        "bbfcU" -> Right BbfcU
        "bbfcUnrated" -> Right BbfcUnrated
        x -> Left ("Unable to parse ContentRatingBbfcRating from: " <> x)

instance ToHttpApiData ContentRatingBbfcRating where
    toQueryParam = \case
        BBFC12 -> "bbfc12"
        Bbfc12a -> "bbfc12a"
        BBFC15 -> "bbfc15"
        BBFC18 -> "bbfc18"
        BbfcPg -> "bbfcPg"
        BBFCR18 -> "bbfcR18"
        BbfcU -> "bbfcU"
        BbfcUnrated -> "bbfcUnrated"

instance FromJSON ContentRatingBbfcRating where
    parseJSON = parseJSONText "ContentRatingBbfcRating"

instance ToJSON ContentRatingBbfcRating where
    toJSON = toJSONText

-- | The video\'s TV Parental Guidelines (TVPG) rating.
data ContentRatingTvpgRating
    = PG14
      -- ^ @pg14@
    | TvpgG
      -- ^ @tvpgG@
    | TvpgMa
      -- ^ @tvpgMa@
    | TvpgPg
      -- ^ @tvpgPg@
    | TvpgUnrated
      -- ^ @tvpgUnrated@
    | TvpgY
      -- ^ @tvpgY@
    | TVPGY7
      -- ^ @tvpgY7@
    | TvpgY7Fv
      -- ^ @tvpgY7Fv@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingTvpgRating

instance FromHttpApiData ContentRatingTvpgRating where
    parseQueryParam = \case
        "pg14" -> Right PG14
        "tvpgG" -> Right TvpgG
        "tvpgMa" -> Right TvpgMa
        "tvpgPg" -> Right TvpgPg
        "tvpgUnrated" -> Right TvpgUnrated
        "tvpgY" -> Right TvpgY
        "tvpgY7" -> Right TVPGY7
        "tvpgY7Fv" -> Right TvpgY7Fv
        x -> Left ("Unable to parse ContentRatingTvpgRating from: " <> x)

instance ToHttpApiData ContentRatingTvpgRating where
    toQueryParam = \case
        PG14 -> "pg14"
        TvpgG -> "tvpgG"
        TvpgMa -> "tvpgMa"
        TvpgPg -> "tvpgPg"
        TvpgUnrated -> "tvpgUnrated"
        TvpgY -> "tvpgY"
        TVPGY7 -> "tvpgY7"
        TvpgY7Fv -> "tvpgY7Fv"

instance FromJSON ContentRatingTvpgRating where
    parseJSON = parseJSONText "ContentRatingTvpgRating"

instance ToJSON ContentRatingTvpgRating where
    toJSON = toJSONText

-- | This parameter indicates whether the API should return comments
-- formatted as HTML or as plain text.
data CommentsListTextFormat
    = HTML
      -- ^ @html@
      -- Returns the comments in HTML format. This is the default value.
    | PlainText
      -- ^ @plainText@
      -- Returns the comments in plain text format.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CommentsListTextFormat

instance FromHttpApiData CommentsListTextFormat where
    parseQueryParam = \case
        "html" -> Right HTML
        "plainText" -> Right PlainText
        x -> Left ("Unable to parse CommentsListTextFormat from: " <> x)

instance ToHttpApiData CommentsListTextFormat where
    toQueryParam = \case
        HTML -> "html"
        PlainText -> "plainText"

instance FromJSON CommentsListTextFormat where
    parseJSON = parseJSONText "CommentsListTextFormat"

instance ToJSON CommentsListTextFormat where
    toJSON = toJSONText

-- | Specifies the rating to record.
data VideosRateRating
    = VDislike
      -- ^ @dislike@
      -- Records that the authenticated user disliked the video.
    | VLike
      -- ^ @like@
      -- Records that the authenticated user liked the video.
    | VNone
      -- ^ @none@
      -- Removes any rating that the authenticated user had previously set for
      -- the video.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideosRateRating

instance FromHttpApiData VideosRateRating where
    parseQueryParam = \case
        "dislike" -> Right VDislike
        "like" -> Right VLike
        "none" -> Right VNone
        x -> Left ("Unable to parse VideosRateRating from: " <> x)

instance ToHttpApiData VideosRateRating where
    toQueryParam = \case
        VDislike -> "dislike"
        VLike -> "like"
        VNone -> "none"

instance FromJSON VideosRateRating where
    parseJSON = parseJSONText "VideosRateRating"

instance ToJSON VideosRateRating where
    toJSON = toJSONText

-- | The projection format of this broadcast. This defaults to rectangular.
data LiveBroadcastContentDetailsProjection
    = LBCDP360
      -- ^ @360@
    | LBCDPMesh
      -- ^ @mesh@
    | LBCDPRectangular
      -- ^ @rectangular@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastContentDetailsProjection

instance FromHttpApiData LiveBroadcastContentDetailsProjection where
    parseQueryParam = \case
        "360" -> Right LBCDP360
        "mesh" -> Right LBCDPMesh
        "rectangular" -> Right LBCDPRectangular
        x -> Left ("Unable to parse LiveBroadcastContentDetailsProjection from: " <> x)

instance ToHttpApiData LiveBroadcastContentDetailsProjection where
    toQueryParam = \case
        LBCDP360 -> "360"
        LBCDPMesh -> "mesh"
        LBCDPRectangular -> "rectangular"

instance FromJSON LiveBroadcastContentDetailsProjection where
    parseJSON = parseJSONText "LiveBroadcastContentDetailsProjection"

instance ToJSON LiveBroadcastContentDetailsProjection where
    toJSON = toJSONText

-- | The caption track\'s status.
data CaptionSnippetStatus
    = Failed
      -- ^ @failed@
    | Serving
      -- ^ @serving@
    | Syncing
      -- ^ @syncing@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CaptionSnippetStatus

instance FromHttpApiData CaptionSnippetStatus where
    parseQueryParam = \case
        "failed" -> Right Failed
        "serving" -> Right Serving
        "syncing" -> Right Syncing
        x -> Left ("Unable to parse CaptionSnippetStatus from: " <> x)

instance ToHttpApiData CaptionSnippetStatus where
    toQueryParam = \case
        Failed -> "failed"
        Serving -> "serving"
        Syncing -> "syncing"

instance FromJSON CaptionSnippetStatus where
    parseJSON = parseJSONText "CaptionSnippetStatus"

instance ToJSON CaptionSnippetStatus where
    toJSON = toJSONText

-- | The video\'s rating in Slovakia.
data ContentRatingSkfilmRating
    = SkfilmG
      -- ^ @skfilmG@
    | SKFILMP2
      -- ^ @skfilmP2@
    | SKFILMP5
      -- ^ @skfilmP5@
    | SKFILMP8
      -- ^ @skfilmP8@
    | SkfilmUnrated
      -- ^ @skfilmUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingSkfilmRating

instance FromHttpApiData ContentRatingSkfilmRating where
    parseQueryParam = \case
        "skfilmG" -> Right SkfilmG
        "skfilmP2" -> Right SKFILMP2
        "skfilmP5" -> Right SKFILMP5
        "skfilmP8" -> Right SKFILMP8
        "skfilmUnrated" -> Right SkfilmUnrated
        x -> Left ("Unable to parse ContentRatingSkfilmRating from: " <> x)

instance ToHttpApiData ContentRatingSkfilmRating where
    toQueryParam = \case
        SkfilmG -> "skfilmG"
        SKFILMP2 -> "skfilmP2"
        SKFILMP5 -> "skfilmP5"
        SKFILMP8 -> "skfilmP8"
        SkfilmUnrated -> "skfilmUnrated"

instance FromJSON ContentRatingSkfilmRating where
    parseJSON = parseJSONText "ContentRatingSkfilmRating"

instance ToJSON ContentRatingSkfilmRating where
    toJSON = toJSONText

-- | The type of the channel section.
data ChannelSectionSnippetType
    = AllPlayLists
      -- ^ @allPlaylists@
    | ChannelsectionTypeUndefined
      -- ^ @channelsectionTypeUndefined@
    | CompletedEvents
      -- ^ @completedEvents@
    | LikedPlayLists
      -- ^ @likedPlaylists@
    | Likes
      -- ^ @likes@
    | LiveEvents
      -- ^ @liveEvents@
    | MultipleChannels
      -- ^ @multipleChannels@
    | MultiplePlayLists
      -- ^ @multiplePlaylists@
    | PopularUploads
      -- ^ @popularUploads@
    | PostedPlayLists
      -- ^ @postedPlaylists@
    | PostedVideos
      -- ^ @postedVideos@
    | RecentActivity
      -- ^ @recentActivity@
    | RecentPosts
      -- ^ @recentPosts@
    | RecentUploads
      -- ^ @recentUploads@
    | SinglePlayList
      -- ^ @singlePlaylist@
    | Subscriptions
      -- ^ @subscriptions@
    | UpcomingEvents
      -- ^ @upcomingEvents@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ChannelSectionSnippetType

instance FromHttpApiData ChannelSectionSnippetType where
    parseQueryParam = \case
        "allPlaylists" -> Right AllPlayLists
        "channelsectionTypeUndefined" -> Right ChannelsectionTypeUndefined
        "completedEvents" -> Right CompletedEvents
        "likedPlaylists" -> Right LikedPlayLists
        "likes" -> Right Likes
        "liveEvents" -> Right LiveEvents
        "multipleChannels" -> Right MultipleChannels
        "multiplePlaylists" -> Right MultiplePlayLists
        "popularUploads" -> Right PopularUploads
        "postedPlaylists" -> Right PostedPlayLists
        "postedVideos" -> Right PostedVideos
        "recentActivity" -> Right RecentActivity
        "recentPosts" -> Right RecentPosts
        "recentUploads" -> Right RecentUploads
        "singlePlaylist" -> Right SinglePlayList
        "subscriptions" -> Right Subscriptions
        "upcomingEvents" -> Right UpcomingEvents
        x -> Left ("Unable to parse ChannelSectionSnippetType from: " <> x)

instance ToHttpApiData ChannelSectionSnippetType where
    toQueryParam = \case
        AllPlayLists -> "allPlaylists"
        ChannelsectionTypeUndefined -> "channelsectionTypeUndefined"
        CompletedEvents -> "completedEvents"
        LikedPlayLists -> "likedPlaylists"
        Likes -> "likes"
        LiveEvents -> "liveEvents"
        MultipleChannels -> "multipleChannels"
        MultiplePlayLists -> "multiplePlaylists"
        PopularUploads -> "popularUploads"
        PostedPlayLists -> "postedPlaylists"
        PostedVideos -> "postedVideos"
        RecentActivity -> "recentActivity"
        RecentPosts -> "recentPosts"
        RecentUploads -> "recentUploads"
        SinglePlayList -> "singlePlaylist"
        Subscriptions -> "subscriptions"
        UpcomingEvents -> "upcomingEvents"

instance FromJSON ChannelSectionSnippetType where
    parseJSON = parseJSONText "ChannelSectionSnippetType"

instance ToJSON ChannelSectionSnippetType where
    toJSON = toJSONText

-- | The broadcastType parameter filters the API response to only include
-- broadcasts with the specified type. This is only compatible with the
-- mine filter for now.
data LiveBroadcastsListBroadcastType
    = All
      -- ^ @all@
      -- Return all broadcasts.
    | Event
      -- ^ @event@
      -- Return only scheduled event broadcasts.
    | Persistent
      -- ^ @persistent@
      -- Return only persistent broadcasts.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastsListBroadcastType

instance FromHttpApiData LiveBroadcastsListBroadcastType where
    parseQueryParam = \case
        "all" -> Right All
        "event" -> Right Event
        "persistent" -> Right Persistent
        x -> Left ("Unable to parse LiveBroadcastsListBroadcastType from: " <> x)

instance ToHttpApiData LiveBroadcastsListBroadcastType where
    toQueryParam = \case
        All -> "all"
        Event -> "event"
        Persistent -> "persistent"

instance FromJSON LiveBroadcastsListBroadcastType where
    parseJSON = parseJSONText "LiveBroadcastsListBroadcastType"

instance ToJSON LiveBroadcastsListBroadcastType where
    toJSON = toJSONText

data ContentRatingFpbRatingReasonsItem
    = FpbBlasphemy
      -- ^ @fpbBlasphemy@
    | FpbCriminalTechniques
      -- ^ @fpbCriminalTechniques@
    | FpbDrugs
      -- ^ @fpbDrugs@
    | FpbHorror
      -- ^ @fpbHorror@
    | FpbImitativeActsTechniques
      -- ^ @fpbImitativeActsTechniques@
    | FpbLanguage
      -- ^ @fpbLanguage@
    | FpbNudity
      -- ^ @fpbNudity@
    | FpbPrejudice
      -- ^ @fpbPrejudice@
    | FpbSex
      -- ^ @fpbSex@
    | FpbSexualViolence
      -- ^ @fpbSexualViolence@
    | FpbViolence
      -- ^ @fpbViolence@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingFpbRatingReasonsItem

instance FromHttpApiData ContentRatingFpbRatingReasonsItem where
    parseQueryParam = \case
        "fpbBlasphemy" -> Right FpbBlasphemy
        "fpbCriminalTechniques" -> Right FpbCriminalTechniques
        "fpbDrugs" -> Right FpbDrugs
        "fpbHorror" -> Right FpbHorror
        "fpbImitativeActsTechniques" -> Right FpbImitativeActsTechniques
        "fpbLanguage" -> Right FpbLanguage
        "fpbNudity" -> Right FpbNudity
        "fpbPrejudice" -> Right FpbPrejudice
        "fpbSex" -> Right FpbSex
        "fpbSexualViolence" -> Right FpbSexualViolence
        "fpbViolence" -> Right FpbViolence
        x -> Left ("Unable to parse ContentRatingFpbRatingReasonsItem from: " <> x)

instance ToHttpApiData ContentRatingFpbRatingReasonsItem where
    toQueryParam = \case
        FpbBlasphemy -> "fpbBlasphemy"
        FpbCriminalTechniques -> "fpbCriminalTechniques"
        FpbDrugs -> "fpbDrugs"
        FpbHorror -> "fpbHorror"
        FpbImitativeActsTechniques -> "fpbImitativeActsTechniques"
        FpbLanguage -> "fpbLanguage"
        FpbNudity -> "fpbNudity"
        FpbPrejudice -> "fpbPrejudice"
        FpbSex -> "fpbSex"
        FpbSexualViolence -> "fpbSexualViolence"
        FpbViolence -> "fpbViolence"

instance FromJSON ContentRatingFpbRatingReasonsItem where
    parseJSON = parseJSONText "ContentRatingFpbRatingReasonsItem"

instance ToJSON ContentRatingFpbRatingReasonsItem where
    toJSON = toJSONText

-- | The video\'s processing status. This value indicates whether YouTube was
-- able to process the video or if the video is still being processed.
data VideoProcessingDetailsProcessingStatus
    = VPDPSFailed
      -- ^ @failed@
    | VPDPSProcessing
      -- ^ @processing@
    | VPDPSSucceeded
      -- ^ @succeeded@
    | VPDPSTerminated
      -- ^ @terminated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoProcessingDetailsProcessingStatus

instance FromHttpApiData VideoProcessingDetailsProcessingStatus where
    parseQueryParam = \case
        "failed" -> Right VPDPSFailed
        "processing" -> Right VPDPSProcessing
        "succeeded" -> Right VPDPSSucceeded
        "terminated" -> Right VPDPSTerminated
        x -> Left ("Unable to parse VideoProcessingDetailsProcessingStatus from: " <> x)

instance ToHttpApiData VideoProcessingDetailsProcessingStatus where
    toQueryParam = \case
        VPDPSFailed -> "failed"
        VPDPSProcessing -> "processing"
        VPDPSSucceeded -> "succeeded"
        VPDPSTerminated -> "terminated"

instance FromJSON VideoProcessingDetailsProcessingStatus where
    parseJSON = parseJSONText "VideoProcessingDetailsProcessingStatus"

instance ToJSON VideoProcessingDetailsProcessingStatus where
    toJSON = toJSONText

-- | The type of call-to-action, a message to the user indicating action that
-- can be taken.
data ActivityContentDetailsPromotedItemCtaType
    = Unspecified
      -- ^ @unspecified@
    | VisitAdvertiserSite
      -- ^ @visitAdvertiserSite@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ActivityContentDetailsPromotedItemCtaType

instance FromHttpApiData ActivityContentDetailsPromotedItemCtaType where
    parseQueryParam = \case
        "unspecified" -> Right Unspecified
        "visitAdvertiserSite" -> Right VisitAdvertiserSite
        x -> Left ("Unable to parse ActivityContentDetailsPromotedItemCtaType from: " <> x)

instance ToHttpApiData ActivityContentDetailsPromotedItemCtaType where
    toQueryParam = \case
        Unspecified -> "unspecified"
        VisitAdvertiserSite -> "visitAdvertiserSite"

instance FromJSON ActivityContentDetailsPromotedItemCtaType where
    parseJSON = parseJSONText "ActivityContentDetailsPromotedItemCtaType"

instance ToJSON ActivityContentDetailsPromotedItemCtaType where
    toJSON = toJSONText

-- | The channelType parameter lets you restrict a search to a particular
-- type of channel.
data SearchListChannelType
    = SLCTAny
      -- ^ @any@
      -- Return all channels.
    | SLCTShow
      -- ^ @show@
      -- Only retrieve shows.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable SearchListChannelType

instance FromHttpApiData SearchListChannelType where
    parseQueryParam = \case
        "any" -> Right SLCTAny
        "show" -> Right SLCTShow
        x -> Left ("Unable to parse SearchListChannelType from: " <> x)

instance ToHttpApiData SearchListChannelType where
    toQueryParam = \case
        SLCTAny -> "any"
        SLCTShow -> "show"

instance FromJSON SearchListChannelType where
    parseJSON = parseJSONText "SearchListChannelType"

instance ToJSON SearchListChannelType where
    toJSON = toJSONText

-- | The video\'s Korea Media Rating Board (영상물등급위원회) rating. The
-- KMRB rates videos in South Korea.
data ContentRatingKmrbRating
    = Kmrb12plus
      -- ^ @kmrb12plus@
    | Kmrb15plus
      -- ^ @kmrb15plus@
    | KmrbAll
      -- ^ @kmrbAll@
    | KmrbR
      -- ^ @kmrbR@
    | KmrbTeenr
      -- ^ @kmrbTeenr@
    | KmrbUnrated
      -- ^ @kmrbUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingKmrbRating

instance FromHttpApiData ContentRatingKmrbRating where
    parseQueryParam = \case
        "kmrb12plus" -> Right Kmrb12plus
        "kmrb15plus" -> Right Kmrb15plus
        "kmrbAll" -> Right KmrbAll
        "kmrbR" -> Right KmrbR
        "kmrbTeenr" -> Right KmrbTeenr
        "kmrbUnrated" -> Right KmrbUnrated
        x -> Left ("Unable to parse ContentRatingKmrbRating from: " <> x)

instance ToHttpApiData ContentRatingKmrbRating where
    toQueryParam = \case
        Kmrb12plus -> "kmrb12plus"
        Kmrb15plus -> "kmrb15plus"
        KmrbAll -> "kmrbAll"
        KmrbR -> "kmrbR"
        KmrbTeenr -> "kmrbTeenr"
        KmrbUnrated -> "kmrbUnrated"

instance FromJSON ContentRatingKmrbRating where
    parseJSON = parseJSONText "ContentRatingKmrbRating"

instance ToJSON ContentRatingKmrbRating where
    toJSON = toJSONText

-- | The video\'s Office of Film and Literature Classification (OFLC - New
-- Zealand) rating.
data ContentRatingOflcRating
    = OflcG
      -- ^ @oflcG@
    | OflcM
      -- ^ @oflcM@
    | OflcPg
      -- ^ @oflcPg@
    | OFLCR13
      -- ^ @oflcR13@
    | OFLCR15
      -- ^ @oflcR15@
    | OFLCR16
      -- ^ @oflcR16@
    | OFLCR18
      -- ^ @oflcR18@
    | OFLCRP13
      -- ^ @oflcRp13@
    | OFLCRP16
      -- ^ @oflcRp16@
    | OFLCRP18
      -- ^ @oflcRp18@
    | OflcUnrated
      -- ^ @oflcUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingOflcRating

instance FromHttpApiData ContentRatingOflcRating where
    parseQueryParam = \case
        "oflcG" -> Right OflcG
        "oflcM" -> Right OflcM
        "oflcPg" -> Right OflcPg
        "oflcR13" -> Right OFLCR13
        "oflcR15" -> Right OFLCR15
        "oflcR16" -> Right OFLCR16
        "oflcR18" -> Right OFLCR18
        "oflcRp13" -> Right OFLCRP13
        "oflcRp16" -> Right OFLCRP16
        "oflcRp18" -> Right OFLCRP18
        "oflcUnrated" -> Right OflcUnrated
        x -> Left ("Unable to parse ContentRatingOflcRating from: " <> x)

instance ToHttpApiData ContentRatingOflcRating where
    toQueryParam = \case
        OflcG -> "oflcG"
        OflcM -> "oflcM"
        OflcPg -> "oflcPg"
        OFLCR13 -> "oflcR13"
        OFLCR15 -> "oflcR15"
        OFLCR16 -> "oflcR16"
        OFLCR18 -> "oflcR18"
        OFLCRP13 -> "oflcRp13"
        OFLCRP16 -> "oflcRp16"
        OFLCRP18 -> "oflcRp18"
        OflcUnrated -> "oflcUnrated"

instance FromJSON ContentRatingOflcRating where
    parseJSON = parseJSONText "ContentRatingOflcRating"

instance ToJSON ContentRatingOflcRating where
    toJSON = toJSONText

-- | Rating system in France - Commission de classification cinematographique
data ContentRatingCNCRating
    = CNC10
      -- ^ @cnc10@
    | CNC12
      -- ^ @cnc12@
    | CNC16
      -- ^ @cnc16@
    | CNC18
      -- ^ @cnc18@
    | CNCE
      -- ^ @cncE@
    | CNCInterdiction
      -- ^ @cncInterdiction@
    | CNCT
      -- ^ @cncT@
    | CNCUnrated
      -- ^ @cncUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingCNCRating

instance FromHttpApiData ContentRatingCNCRating where
    parseQueryParam = \case
        "cnc10" -> Right CNC10
        "cnc12" -> Right CNC12
        "cnc16" -> Right CNC16
        "cnc18" -> Right CNC18
        "cncE" -> Right CNCE
        "cncInterdiction" -> Right CNCInterdiction
        "cncT" -> Right CNCT
        "cncUnrated" -> Right CNCUnrated
        x -> Left ("Unable to parse ContentRatingCNCRating from: " <> x)

instance ToHttpApiData ContentRatingCNCRating where
    toQueryParam = \case
        CNC10 -> "cnc10"
        CNC12 -> "cnc12"
        CNC16 -> "cnc16"
        CNC18 -> "cnc18"
        CNCE -> "cncE"
        CNCInterdiction -> "cncInterdiction"
        CNCT -> "cncT"
        CNCUnrated -> "cncUnrated"

instance FromJSON ContentRatingCNCRating where
    parseJSON = parseJSONText "ContentRatingCNCRating"

instance ToJSON ContentRatingCNCRating where
    toJSON = toJSONText

-- | Rating system in Turkey - Evaluation and Classification Board of the
-- Ministry of Culture and Tourism
data ContentRatingEcbmctRating
    = Ecbmct13a
      -- ^ @ecbmct13a@
    | Ecbmct13plus
      -- ^ @ecbmct13plus@
    | Ecbmct15a
      -- ^ @ecbmct15a@
    | Ecbmct15plus
      -- ^ @ecbmct15plus@
    | Ecbmct18plus
      -- ^ @ecbmct18plus@
    | Ecbmct7a
      -- ^ @ecbmct7a@
    | Ecbmct7plus
      -- ^ @ecbmct7plus@
    | EcbmctG
      -- ^ @ecbmctG@
    | EcbmctUnrated
      -- ^ @ecbmctUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingEcbmctRating

instance FromHttpApiData ContentRatingEcbmctRating where
    parseQueryParam = \case
        "ecbmct13a" -> Right Ecbmct13a
        "ecbmct13plus" -> Right Ecbmct13plus
        "ecbmct15a" -> Right Ecbmct15a
        "ecbmct15plus" -> Right Ecbmct15plus
        "ecbmct18plus" -> Right Ecbmct18plus
        "ecbmct7a" -> Right Ecbmct7a
        "ecbmct7plus" -> Right Ecbmct7plus
        "ecbmctG" -> Right EcbmctG
        "ecbmctUnrated" -> Right EcbmctUnrated
        x -> Left ("Unable to parse ContentRatingEcbmctRating from: " <> x)

instance ToHttpApiData ContentRatingEcbmctRating where
    toQueryParam = \case
        Ecbmct13a -> "ecbmct13a"
        Ecbmct13plus -> "ecbmct13plus"
        Ecbmct15a -> "ecbmct15a"
        Ecbmct15plus -> "ecbmct15plus"
        Ecbmct18plus -> "ecbmct18plus"
        Ecbmct7a -> "ecbmct7a"
        Ecbmct7plus -> "ecbmct7plus"
        EcbmctG -> "ecbmctG"
        EcbmctUnrated -> "ecbmctUnrated"

instance FromJSON ContentRatingEcbmctRating where
    parseJSON = parseJSONText "ContentRatingEcbmctRating"

instance ToJSON ContentRatingEcbmctRating where
    toJSON = toJSONText

-- | Specifies the projection format of the video.
data VideoContentDetailsProjection
    = VCDP360
      -- ^ @360@
    | VCDPRectangular
      -- ^ @rectangular@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoContentDetailsProjection

instance FromHttpApiData VideoContentDetailsProjection where
    parseQueryParam = \case
        "360" -> Right VCDP360
        "rectangular" -> Right VCDPRectangular
        x -> Left ("Unable to parse VideoContentDetailsProjection from: " <> x)

instance ToHttpApiData VideoContentDetailsProjection where
    toQueryParam = \case
        VCDP360 -> "360"
        VCDPRectangular -> "rectangular"

instance FromJSON VideoContentDetailsProjection where
    parseJSON = parseJSONText "VideoContentDetailsProjection"

instance ToJSON VideoContentDetailsProjection where
    toJSON = toJSONText

-- | The video\'s rating in Greece.
data ContentRatingGrfilmRating
    = GrfilmE
      -- ^ @grfilmE@
    | GrfilmK
      -- ^ @grfilmK@
    | GRFILMK12
      -- ^ @grfilmK12@
    | GRFILMK13
      -- ^ @grfilmK13@
    | GRFILMK15
      -- ^ @grfilmK15@
    | GRFILMK17
      -- ^ @grfilmK17@
    | GRFILMK18
      -- ^ @grfilmK18@
    | GrfilmUnrated
      -- ^ @grfilmUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingGrfilmRating

instance FromHttpApiData ContentRatingGrfilmRating where
    parseQueryParam = \case
        "grfilmE" -> Right GrfilmE
        "grfilmK" -> Right GrfilmK
        "grfilmK12" -> Right GRFILMK12
        "grfilmK13" -> Right GRFILMK13
        "grfilmK15" -> Right GRFILMK15
        "grfilmK17" -> Right GRFILMK17
        "grfilmK18" -> Right GRFILMK18
        "grfilmUnrated" -> Right GrfilmUnrated
        x -> Left ("Unable to parse ContentRatingGrfilmRating from: " <> x)

instance ToHttpApiData ContentRatingGrfilmRating where
    toQueryParam = \case
        GrfilmE -> "grfilmE"
        GrfilmK -> "grfilmK"
        GRFILMK12 -> "grfilmK12"
        GRFILMK13 -> "grfilmK13"
        GRFILMK15 -> "grfilmK15"
        GRFILMK17 -> "grfilmK17"
        GRFILMK18 -> "grfilmK18"
        GrfilmUnrated -> "grfilmUnrated"

instance FromJSON ContentRatingGrfilmRating where
    parseJSON = parseJSONText "ContentRatingGrfilmRating"

instance ToJSON ContentRatingGrfilmRating where
    toJSON = toJSONText

data LiveBroadcastContentDetailsStereoLayout
    = LeftRight
      -- ^ @left_right@
    | Mono
      -- ^ @mono@
    | TopBottom
      -- ^ @top_bottom@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable LiveBroadcastContentDetailsStereoLayout

instance FromHttpApiData LiveBroadcastContentDetailsStereoLayout where
    parseQueryParam = \case
        "left_right" -> Right LeftRight
        "mono" -> Right Mono
        "top_bottom" -> Right TopBottom
        x -> Left ("Unable to parse LiveBroadcastContentDetailsStereoLayout from: " <> x)

instance ToHttpApiData LiveBroadcastContentDetailsStereoLayout where
    toQueryParam = \case
        LeftRight -> "left_right"
        Mono -> "mono"
        TopBottom -> "top_bottom"

instance FromJSON LiveBroadcastContentDetailsStereoLayout where
    parseJSON = parseJSONText "LiveBroadcastContentDetailsStereoLayout"

instance ToJSON LiveBroadcastContentDetailsStereoLayout where
    toJSON = toJSONText

-- | The order parameter specifies the order in which the API response should
-- list comment threads. Valid values are: - time - Comment threads are
-- ordered by time. This is the default behavior. - relevance - Comment
-- threads are ordered by relevance.Note: This parameter is not supported
-- for use in conjunction with the id parameter.
data CommentThreadsListOrder
    = CTLORelevance
      -- ^ @relevance@
      -- Order by relevance.
    | CTLOTime
      -- ^ @time@
      -- Order by time.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CommentThreadsListOrder

instance FromHttpApiData CommentThreadsListOrder where
    parseQueryParam = \case
        "relevance" -> Right CTLORelevance
        "time" -> Right CTLOTime
        x -> Left ("Unable to parse CommentThreadsListOrder from: " <> x)

instance ToHttpApiData CommentThreadsListOrder where
    toQueryParam = \case
        CTLORelevance -> "relevance"
        CTLOTime -> "time"

instance FromJSON CommentThreadsListOrder where
    parseJSON = parseJSONText "CommentThreadsListOrder"

instance ToJSON CommentThreadsListOrder where
    toJSON = toJSONText

-- | The video\'s rating in Israel.
data ContentRatingIlfilmRating
    = ILFILM12
      -- ^ @ilfilm12@
    | ILFILM14
      -- ^ @ilfilm14@
    | ILFILM16
      -- ^ @ilfilm16@
    | ILFILM18
      -- ^ @ilfilm18@
    | IlfilmAa
      -- ^ @ilfilmAa@
    | IlfilmUnrated
      -- ^ @ilfilmUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingIlfilmRating

instance FromHttpApiData ContentRatingIlfilmRating where
    parseQueryParam = \case
        "ilfilm12" -> Right ILFILM12
        "ilfilm14" -> Right ILFILM14
        "ilfilm16" -> Right ILFILM16
        "ilfilm18" -> Right ILFILM18
        "ilfilmAa" -> Right IlfilmAa
        "ilfilmUnrated" -> Right IlfilmUnrated
        x -> Left ("Unable to parse ContentRatingIlfilmRating from: " <> x)

instance ToHttpApiData ContentRatingIlfilmRating where
    toQueryParam = \case
        ILFILM12 -> "ilfilm12"
        ILFILM14 -> "ilfilm14"
        ILFILM16 -> "ilfilm16"
        ILFILM18 -> "ilfilm18"
        IlfilmAa -> "ilfilmAa"
        IlfilmUnrated -> "ilfilmUnrated"

instance FromJSON ContentRatingIlfilmRating where
    parseJSON = parseJSONText "ContentRatingIlfilmRating"

instance ToJSON ContentRatingIlfilmRating where
    toJSON = toJSONText

-- | The video\'s rating in Poland.
data ContentRatingNbcplRating
    = Nbcpl18plus
      -- ^ @nbcpl18plus@
    | NbcplI
      -- ^ @nbcplI@
    | NbcplIi
      -- ^ @nbcplIi@
    | NbcplIii
      -- ^ @nbcplIii@
    | NbcplIv
      -- ^ @nbcplIv@
    | NbcplUnrated
      -- ^ @nbcplUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingNbcplRating

instance FromHttpApiData ContentRatingNbcplRating where
    parseQueryParam = \case
        "nbcpl18plus" -> Right Nbcpl18plus
        "nbcplI" -> Right NbcplI
        "nbcplIi" -> Right NbcplIi
        "nbcplIii" -> Right NbcplIii
        "nbcplIv" -> Right NbcplIv
        "nbcplUnrated" -> Right NbcplUnrated
        x -> Left ("Unable to parse ContentRatingNbcplRating from: " <> x)

instance ToHttpApiData ContentRatingNbcplRating where
    toQueryParam = \case
        Nbcpl18plus -> "nbcpl18plus"
        NbcplI -> "nbcplI"
        NbcplIi -> "nbcplIi"
        NbcplIii -> "nbcplIii"
        NbcplIv -> "nbcplIv"
        NbcplUnrated -> "nbcplUnrated"

instance FromJSON ContentRatingNbcplRating where
    parseJSON = parseJSONText "ContentRatingNbcplRating"

instance ToJSON ContentRatingNbcplRating where
    toJSON = toJSONText

-- | The status of the uploaded video.
data VideoStatusUploadStatus
    = VSUSDeleted
      -- ^ @deleted@
    | VSUSFailed
      -- ^ @failed@
    | VSUSProcessed
      -- ^ @processed@
    | VSUSRejected
      -- ^ @rejected@
    | VSUSUploaded
      -- ^ @uploaded@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable VideoStatusUploadStatus

instance FromHttpApiData VideoStatusUploadStatus where
    parseQueryParam = \case
        "deleted" -> Right VSUSDeleted
        "failed" -> Right VSUSFailed
        "processed" -> Right VSUSProcessed
        "rejected" -> Right VSUSRejected
        "uploaded" -> Right VSUSUploaded
        x -> Left ("Unable to parse VideoStatusUploadStatus from: " <> x)

instance ToHttpApiData VideoStatusUploadStatus where
    toQueryParam = \case
        VSUSDeleted -> "deleted"
        VSUSFailed -> "failed"
        VSUSProcessed -> "processed"
        VSUSRejected -> "rejected"
        VSUSUploaded -> "uploaded"

instance FromJSON VideoStatusUploadStatus where
    parseJSON = parseJSONText "VideoStatusUploadStatus"

instance ToJSON VideoStatusUploadStatus where
    toJSON = toJSONText

-- | The video\'s rating from Ireland\'s Raidió Teilifís Éireann.
data ContentRatingRteRating
    = RteCh
      -- ^ @rteCh@
    | RteGa
      -- ^ @rteGa@
    | RteMa
      -- ^ @rteMa@
    | RtePs
      -- ^ @rtePs@
    | RteUnrated
      -- ^ @rteUnrated@
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable ContentRatingRteRating

instance FromHttpApiData ContentRatingRteRating where
    parseQueryParam = \case
        "rteCh" -> Right RteCh
        "rteGa" -> Right RteGa
        "rteMa" -> Right RteMa
        "rtePs" -> Right RtePs
        "rteUnrated" -> Right RteUnrated
        x -> Left ("Unable to parse ContentRatingRteRating from: " <> x)

instance ToHttpApiData ContentRatingRteRating where
    toQueryParam = \case
        RteCh -> "rteCh"
        RteGa -> "rteGa"
        RteMa -> "rteMa"
        RtePs -> "rtePs"
        RteUnrated -> "rteUnrated"

instance FromJSON ContentRatingRteRating where
    parseJSON = parseJSONText "ContentRatingRteRating"

instance ToJSON ContentRatingRteRating where
    toJSON = toJSONText

-- | Set this parameter\'s value to html or plainText to instruct the API to
-- return the comments left by users in html formatted or in plain text.
data CommentThreadsListTextFormat
    = CTLTFHTML
      -- ^ @html@
      -- Returns the comments in HTML format. This is the default value.
    | CTLTFPlainText
      -- ^ @plainText@
      -- Returns the comments in plain text format.
      deriving (Eq, Ord, Enum, Read, Show, Data, Typeable, Generic)

instance Hashable CommentThreadsListTextFormat

instance FromHttpApiData CommentThreadsListTextFormat where
    parseQueryParam = \case
        "html" -> Right CTLTFHTML
        "plainText" -> Right CTLTFPlainText
        x -> Left ("Unable to parse CommentThreadsListTextFormat from: " <> x)

instance ToHttpApiData CommentThreadsListTextFormat where
    toQueryParam = \case
        CTLTFHTML -> "html"
        CTLTFPlainText -> "plainText"

instance FromJSON CommentThreadsListTextFormat where
    parseJSON = parseJSONText "CommentThreadsListTextFormat"

instance ToJSON CommentThreadsListTextFormat where
    toJSON = toJSONText

-- | The video\'s Irish Film Classification Office (IFCO - Ireland) rating.
-- See the IFCO website for more information.
data