@@ -1,7 +1,10 @@
1{-# LANGUAGE DeriveDataTypeable #-}
1{-# LANGUAGE DeriveDataTypeable #-}
2{-# LANGUAGE DeriveGeneric #-}
2{-# LANGUAGE DeriveGeneric #-}
3+{-# LANGUAGE LambdaCase #-}
3{-# LANGUAGE OverloadedStrings #-}
4{-# LANGUAGE OverloadedStrings #-}
6+{-# OPTIONS_GHC -fno-warn-unused-imports #-}
6-- Module : Network.Google.YouTube.Types.Sum
9-- Module : Network.Google.YouTube.Types.Sum
7-- Copyright : (c) 2015 Brendan Hay
10-- Copyright : (c) 2015 Brendan Hay
@@ -25,6 +28,17 @@ data ActivityContentDetailsPromotedItemCtaType
26instance Hashable ActivityContentDetailsPromotedItemCtaType
29instance Hashable ActivityContentDetailsPromotedItemCtaType
31+instance FromText ActivityContentDetailsPromotedItemCtaType where
33+ "unspecified" -> Just ACDPICTUnspecified
34+ "visitAdvertiserSite" -> Just ACDPICTVisitAdvertiserSite
37+instance ToText ActivityContentDetailsPromotedItemCtaType where
39+ ACDPICTUnspecified -> "unspecified"
40+ ACDPICTVisitAdvertiserSite -> "visitAdvertiserSite"
28-- | The reason that the resource is recommended to the user.
42-- | The reason that the resource is recommended to the user.
29data ActivityContentDetailsRecommendationReason
43data ActivityContentDetailsRecommendationReason
30 = ACDRRUnspecified
44 = ACDRRUnspecified
@@ -39,6 +53,21 @@ data ActivityContentDetailsRecommendationReason
40instance Hashable ActivityContentDetailsRecommendationReason
54instance Hashable ActivityContentDetailsRecommendationReason
56+instance FromText ActivityContentDetailsRecommendationReason where
58+ "unspecified" -> Just ACDRRUnspecified
59+ "videoFavorited" -> Just ACDRRVideoFavorited
60+ "videoLiked" -> Just ACDRRVideoLiked
61+ "videoWatched" -> Just ACDRRVideoWatched
64+instance ToText ActivityContentDetailsRecommendationReason where
66+ ACDRRUnspecified -> "unspecified"
67+ ACDRRVideoFavorited -> "videoFavorited"
68+ ACDRRVideoLiked -> "videoLiked"
69+ ACDRRVideoWatched -> "videoWatched"
42-- | The name of the social network.
71-- | The name of the social network.
43data ActivityContentDetailsSocialType
72data ActivityContentDetailsSocialType
44 = ACDSTFacebook
73 = ACDSTFacebook
@@ -53,6 +82,21 @@ data ActivityContentDetailsSocialType
54instance Hashable ActivityContentDetailsSocialType
83instance Hashable ActivityContentDetailsSocialType
85+instance FromText ActivityContentDetailsSocialType where
87+ "facebook" -> Just ACDSTFacebook
88+ "googlePlus" -> Just ACDSTGooglePlus
89+ "twitter" -> Just ACDSTTwitter
90+ "unspecified" -> Just ACDSTUnspecified
93+instance ToText ActivityContentDetailsSocialType where
95+ ACDSTFacebook -> "facebook"
96+ ACDSTGooglePlus -> "googlePlus"
97+ ACDSTTwitter -> "twitter"
98+ ACDSTUnspecified -> "unspecified"
56-- | The type of activity that the resource describes.
100-- | The type of activity that the resource describes.
57data ActivitySnippetType
101data ActivitySnippetType
58 = ASTBulletin
102 = ASTBulletin
@@ -81,6 +125,35 @@ data ActivitySnippetType
82instance Hashable ActivitySnippetType
126instance Hashable ActivitySnippetType
128+instance FromText ActivitySnippetType where
130+ "bulletin" -> Just ASTBulletin
131+ "channelItem" -> Just ASTChannelItem
132+ "comment" -> Just ASTComment
133+ "favorite" -> Just ASTFavorite
134+ "like" -> Just ASTLike
135+ "playlistItem" -> Just ASTPlaylistItem
136+ "promotedItem" -> Just ASTPromotedItem
137+ "recommendation" -> Just ASTRecommendation
138+ "social" -> Just ASTSocial
139+ "subscription" -> Just ASTSubscription
140+ "upload" -> Just ASTUpload
143+instance ToText ActivitySnippetType where
145+ ASTBulletin -> "bulletin"
146+ ASTChannelItem -> "channelItem"
147+ ASTComment -> "comment"
148+ ASTFavorite -> "favorite"
150+ ASTPlaylistItem -> "playlistItem"
151+ ASTPromotedItem -> "promotedItem"
152+ ASTRecommendation -> "recommendation"
153+ ASTSocial -> "social"
154+ ASTSubscription -> "subscription"
155+ ASTUpload -> "upload"
84-- | The type of audio track associated with the caption track.
157-- | The type of audio track associated with the caption track.
85data CaptionSnippetAudioTrackType
158data CaptionSnippetAudioTrackType
86 = CSATTCommentary
159 = CSATTCommentary
@@ -95,6 +168,21 @@ data CaptionSnippetAudioTrackType
96instance Hashable CaptionSnippetAudioTrackType
169instance Hashable CaptionSnippetAudioTrackType
171+instance FromText CaptionSnippetAudioTrackType where
173+ "commentary" -> Just CSATTCommentary
174+ "descriptive" -> Just CSATTDescriptive
175+ "primary" -> Just CSATTPrimary
176+ "unknown" -> Just CSATTUnknown
179+instance ToText CaptionSnippetAudioTrackType where
181+ CSATTCommentary -> "commentary"
182+ CSATTDescriptive -> "descriptive"
183+ CSATTPrimary -> "primary"
184+ CSATTUnknown -> "unknown"
98-- | The reason that YouTube failed to process the caption track. This
186-- | The reason that YouTube failed to process the caption track. This
99-- property is only present if the state property\'s value is failed.
187-- property is only present if the state property\'s value is failed.
100data CaptionSnippetFailureReason
188data CaptionSnippetFailureReason
@@ -108,6 +196,19 @@ data CaptionSnippetFailureReason
109instance Hashable CaptionSnippetFailureReason
197instance Hashable CaptionSnippetFailureReason
199+instance FromText CaptionSnippetFailureReason where
201+ "processingFailed" -> Just CSFRProcessingFailed
202+ "unknownFormat" -> Just CSFRUnknownFormat
203+ "unsupportedFormat" -> Just CSFRUnsupportedFormat
206+instance ToText CaptionSnippetFailureReason where
208+ CSFRProcessingFailed -> "processingFailed"
209+ CSFRUnknownFormat -> "unknownFormat"
210+ CSFRUnsupportedFormat -> "unsupportedFormat"
111-- | The caption track\'s status.
212-- | The caption track\'s status.
112data CaptionSnippetStatus
213data CaptionSnippetStatus
113 = CSSFailed
214 = CSSFailed
@@ -120,6 +221,19 @@ data CaptionSnippetStatus
121instance Hashable CaptionSnippetStatus
222instance Hashable CaptionSnippetStatus
224+instance FromText CaptionSnippetStatus where
226+ "failed" -> Just CSSFailed
227+ "serving" -> Just CSSServing
228+ "syncing" -> Just CSSSyncing
231+instance ToText CaptionSnippetStatus where
233+ CSSFailed -> "failed"
234+ CSSServing -> "serving"
235+ CSSSyncing -> "syncing"
123-- | The caption track\'s type.
237-- | The caption track\'s type.
124data CaptionSnippetTrackKind
238data CaptionSnippetTrackKind
125 = CSTKAsr
239 = CSTKAsr
@@ -132,6 +246,19 @@ data CaptionSnippetTrackKind
133instance Hashable CaptionSnippetTrackKind
247instance Hashable CaptionSnippetTrackKind
249+instance FromText CaptionSnippetTrackKind where
251+ "ASR" -> Just CSTKAsr
252+ "forced" -> Just CSTKForced
253+ "standard" -> Just CSTKStandard
256+instance ToText CaptionSnippetTrackKind where
259+ CSTKForced -> "forced"
260+ CSTKStandard -> "standard"
135-- | The method or protocol used to transmit the video stream.
262-- | The method or protocol used to transmit the video stream.
136data CdnSettingsIngestionType
263data CdnSettingsIngestionType
137 = CSITDash
264 = CSITDash
@@ -142,6 +269,17 @@ data CdnSettingsIngestionType
143instance Hashable CdnSettingsIngestionType
270instance Hashable CdnSettingsIngestionType
272+instance FromText CdnSettingsIngestionType where
274+ "dash" -> Just CSITDash
275+ "rtmp" -> Just CSITRtmp
278+instance ToText CdnSettingsIngestionType where
145-- | Defines the context of the ping.
283-- | Defines the context of the ping.
146data ChannelConversionPingContext
284data ChannelConversionPingContext
147 = CCPCCview
285 = CCPCCview
@@ -154,6 +292,19 @@ data ChannelConversionPingContext
155instance Hashable ChannelConversionPingContext
293instance Hashable ChannelConversionPingContext
295+instance FromText ChannelConversionPingContext where
297+ "cview" -> Just CCPCCview
298+ "subscribe" -> Just CCPCSubscribe
299+ "unsubscribe" -> Just CCPCUnsubscribe
302+instance ToText ChannelConversionPingContext where
304+ CCPCCview -> "cview"
305+ CCPCSubscribe -> "subscribe"
306+ CCPCUnsubscribe -> "unsubscribe"
157-- | The style of the channel section.
308-- | The style of the channel section.
158data ChannelSectionSnippetStyle
309data ChannelSectionSnippetStyle
159 = CSSSChannelsectionStyleUndefined
310 = CSSSChannelsectionStyleUndefined
@@ -166,6 +317,19 @@ data ChannelSectionSnippetStyle
167instance Hashable ChannelSectionSnippetStyle
318instance Hashable ChannelSectionSnippetStyle
320+instance FromText ChannelSectionSnippetStyle where
322+ "channelsectionStyleUndefined" -> Just CSSSChannelsectionStyleUndefined
323+ "horizontalRow" -> Just CSSSHorizontalRow
324+ "verticalList" -> Just CSSSVerticalList
327+instance ToText ChannelSectionSnippetStyle where
329+ CSSSChannelsectionStyleUndefined -> "channelsectionStyleUndefined"
330+ CSSSHorizontalRow -> "horizontalRow"
331+ CSSSVerticalList -> "verticalList"
169-- | The type of the channel section.
333-- | The type of the channel section.
170data ChannelSectionSnippetType
334data ChannelSectionSnippetType
171 = CSSTAllPlaylists
335 = CSSTAllPlaylists
@@ -206,6 +370,47 @@ data ChannelSectionSnippetType
207instance Hashable ChannelSectionSnippetType
371instance Hashable ChannelSectionSnippetType
373+instance FromText ChannelSectionSnippetType where
375+ "allPlaylists" -> Just CSSTAllPlaylists
376+ "channelsectionTypeUndefined" -> Just CSSTChannelsectionTypeUndefined
377+ "completedEvents" -> Just CSSTCompletedEvents
378+ "likedPlaylists" -> Just CSSTLikedPlaylists
379+ "likes" -> Just CSSTLikes
380+ "liveEvents" -> Just CSSTLiveEvents
381+ "multipleChannels" -> Just CSSTMultipleChannels
382+ "multiplePlaylists" -> Just CSSTMultiplePlaylists
383+ "popularUploads" -> Just CSSTPopularUploads
384+ "postedPlaylists" -> Just CSSTPostedPlaylists
385+ "postedVideos" -> Just CSSTPostedVideos
386+ "recentActivity" -> Just CSSTRecentActivity
387+ "recentPosts" -> Just CSSTRecentPosts
388+ "recentUploads" -> Just CSSTRecentUploads
389+ "singlePlaylist" -> Just CSSTSinglePlaylist
390+ "subscriptions" -> Just CSSTSubscriptions
391+ "upcomingEvents" -> Just CSSTUpcomingEvents
394+instance ToText ChannelSectionSnippetType where
396+ CSSTAllPlaylists -> "allPlaylists"
397+ CSSTChannelsectionTypeUndefined -> "channelsectionTypeUndefined"
398+ CSSTCompletedEvents -> "completedEvents"
399+ CSSTLikedPlaylists -> "likedPlaylists"
400+ CSSTLikes -> "likes"
401+ CSSTLiveEvents -> "liveEvents"
402+ CSSTMultipleChannels -> "multipleChannels"
403+ CSSTMultiplePlaylists -> "multiplePlaylists"
404+ CSSTPopularUploads -> "popularUploads"
405+ CSSTPostedPlaylists -> "postedPlaylists"
406+ CSSTPostedVideos -> "postedVideos"
407+ CSSTRecentActivity -> "recentActivity"
408+ CSSTRecentPosts -> "recentPosts"
409+ CSSTRecentUploads -> "recentUploads"
410+ CSSTSinglePlaylist -> "singlePlaylist"
411+ CSSTSubscriptions -> "subscriptions"
412+ CSSTUpcomingEvents -> "upcomingEvents"
209-- | The long uploads status of this channel. See
414-- | The long uploads status of this channel. See
210data ChannelStatusLongUploadsStatus
415data ChannelStatusLongUploadsStatus
211 = CSLUSAllowed
416 = CSLUSAllowed
@@ -220,6 +425,21 @@ data ChannelStatusLongUploadsStatus
221instance Hashable ChannelStatusLongUploadsStatus
426instance Hashable ChannelStatusLongUploadsStatus
428+instance FromText ChannelStatusLongUploadsStatus where
430+ "allowed" -> Just CSLUSAllowed
431+ "disallowed" -> Just CSLUSDisallowed
432+ "eligible" -> Just CSLUSEligible
433+ "longUploadsUnspecified" -> Just CSLUSLongUploadsUnspecified
436+instance ToText ChannelStatusLongUploadsStatus where
438+ CSLUSAllowed -> "allowed"
439+ CSLUSDisallowed -> "disallowed"
440+ CSLUSEligible -> "eligible"
441+ CSLUSLongUploadsUnspecified -> "longUploadsUnspecified"
223-- | Privacy status of the channel.
443-- | Privacy status of the channel.
224data ChannelStatusPrivacyStatus
444data ChannelStatusPrivacyStatus
225 = CSPSPrivate
445 = CSPSPrivate
@@ -232,6 +452,19 @@ data ChannelStatusPrivacyStatus
233instance Hashable ChannelStatusPrivacyStatus
453instance Hashable ChannelStatusPrivacyStatus
455+instance FromText ChannelStatusPrivacyStatus where
457+ "private" -> Just CSPSPrivate
458+ "public" -> Just CSPSPublic
459+ "unlisted" -> Just CSPSUnlisted
462+instance ToText ChannelStatusPrivacyStatus where
464+ CSPSPrivate -> "private"
465+ CSPSPublic -> "public"
466+ CSPSUnlisted -> "unlisted"
235-- | The comment\'s moderation status. Will not be set if the comments were
468-- | The comment\'s moderation status. Will not be set if the comments were
236-- requested through the id filter.
469-- requested through the id filter.
237data CommentSnippetModerationStatus
470data CommentSnippetModerationStatus
@@ -247,6 +480,21 @@ data CommentSnippetModerationStatus
248instance Hashable CommentSnippetModerationStatus
481instance Hashable CommentSnippetModerationStatus
483+instance FromText CommentSnippetModerationStatus where
485+ "heldForReview" -> Just CSMSHeldForReview
486+ "likelySpam" -> Just CSMSLikelySpam
487+ "published" -> Just CSMSPublished
488+ "rejected" -> Just CSMSRejected
491+instance ToText CommentSnippetModerationStatus where
493+ CSMSHeldForReview -> "heldForReview"
494+ CSMSLikelySpam -> "likelySpam"
495+ CSMSPublished -> "published"
496+ CSMSRejected -> "rejected"
250-- | The rating the viewer has given to this comment. For the time being this
498-- | The rating the viewer has given to this comment. For the time being this
251-- will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE.
499-- will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE.
252-- This may change in the future.
500-- This may change in the future.
@@ -263,6 +511,21 @@ data CommentSnippetViewerRating
264instance Hashable CommentSnippetViewerRating
512instance Hashable CommentSnippetViewerRating
514+instance FromText CommentSnippetViewerRating where
516+ "dislike" -> Just CSVRDislike
517+ "like" -> Just CSVRLike
518+ "none" -> Just CSVRNone
519+ "unspecified" -> Just CSVRUnspecified
522+instance ToText CommentSnippetViewerRating where
524+ CSVRDislike -> "dislike"
527+ CSVRUnspecified -> "unspecified"
266-- | The video\'s Australian Classification Board (ACB) or Australian
529-- | The video\'s Australian Classification Board (ACB) or Australian
267-- Communications and Media Authority (ACMA) rating. ACMA ratings are used
530-- Communications and Media Authority (ACMA) rating. ACMA ratings are used
268-- to classify children\'s television programming.
531-- to classify children\'s television programming.
@@ -289,6 +552,31 @@ data ContentRatingAcbRating
290instance Hashable ContentRatingAcbRating
553instance Hashable ContentRatingAcbRating
555+instance FromText ContentRatingAcbRating where
557+ "acbC" -> Just CRARAcbC
558+ "acbE" -> Just CRARAcbE
559+ "acbG" -> Just CRARAcbG
560+ "acbM" -> Just CRARAcbM
561+ "acbMa15plus" -> Just CRARAcbMa15plus
562+ "acbP" -> Just CRARAcbP
563+ "acbPg" -> Just CRARAcbPg
564+ "acbR18plus" -> Just CRARAcbR18plus
565+ "acbUnrated" -> Just CRARAcbUnrated
568+instance ToText ContentRatingAcbRating where
574+ CRARAcbMa15plus -> "acbMa15plus"
576+ CRARAcbPg -> "acbPg"
577+ CRARAcbR18plus -> "acbR18plus"
578+ CRARAcbUnrated -> "acbUnrated"
292-- | The video\'s rating from Italy\'s Autorità per le Garanzie nelle
580-- | The video\'s rating from Italy\'s Autorità per le Garanzie nelle
293-- Comunicazioni (AGCOM).
581-- Comunicazioni (AGCOM).
294data ContentRatingAgcomRating
582data ContentRatingAgcomRating
@@ -304,6 +592,21 @@ data ContentRatingAgcomRating
305instance Hashable ContentRatingAgcomRating
593instance Hashable ContentRatingAgcomRating
595+instance FromText ContentRatingAgcomRating where
597+ "agcomT" -> Just CRARAgcomT
598+ "agcomUnrated" -> Just CRARAgcomUnrated
599+ "agcomVm14" -> Just CRARAGCOMVM14
600+ "agcomVm18" -> Just CRARAGCOMVM18
603+instance ToText ContentRatingAgcomRating where
605+ CRARAgcomT -> "agcomT"
606+ CRARAgcomUnrated -> "agcomUnrated"
607+ CRARAGCOMVM14 -> "agcomVm14"
608+ CRARAGCOMVM18 -> "agcomVm18"
307-- | The video\'s Anatel (Asociación Nacional de Televisión) rating for
610-- | The video\'s Anatel (Asociación Nacional de Televisión) rating for
308-- Chilean television.
611-- Chilean television.
309data ContentRatingAnatelRating
612data ContentRatingAnatelRating
@@ -327,6 +630,29 @@ data ContentRatingAnatelRating
328instance Hashable ContentRatingAnatelRating
631instance Hashable ContentRatingAnatelRating
633+instance FromText ContentRatingAnatelRating where
635+ "anatelA" -> Just CRARAnatelA
636+ "anatelF" -> Just CRARAnatelF
637+ "anatelI" -> Just CRARAnatelI
638+ "anatelI10" -> Just CRARANATELI10
639+ "anatelI12" -> Just CRARANATELI12
640+ "anatelI7" -> Just CRARANATELI7
641+ "anatelR" -> Just CRARAnatelR
642+ "anatelUnrated" -> Just CRARAnatelUnrated
645+instance ToText ContentRatingAnatelRating where
647+ CRARAnatelA -> "anatelA"
648+ CRARAnatelF -> "anatelF"
649+ CRARAnatelI -> "anatelI"
650+ CRARANATELI10 -> "anatelI10"
651+ CRARANATELI12 -> "anatelI12"
652+ CRARANATELI7 -> "anatelI7"
653+ CRARAnatelR -> "anatelR"
654+ CRARAnatelUnrated -> "anatelUnrated"
330-- | The video\'s British Board of Film Classification (BBFC) rating.
656-- | The video\'s British Board of Film Classification (BBFC) rating.
331data ContentRatingBbfcRating
657data ContentRatingBbfcRating
332 = CRBRBBFC12
658 = CRBRBBFC12
@@ -349,6 +675,29 @@ data ContentRatingBbfcRating
350instance Hashable ContentRatingBbfcRating
676instance Hashable ContentRatingBbfcRating
678+instance FromText ContentRatingBbfcRating where
680+ "bbfc12" -> Just CRBRBBFC12
681+ "bbfc12a" -> Just CRBRBbfc12a
682+ "bbfc15" -> Just CRBRBBFC15
683+ "bbfc18" -> Just CRBRBBFC18
684+ "bbfcPg" -> Just CRBRBbfcPg
685+ "bbfcR18" -> Just CRBRBBFCR18
686+ "bbfcU" -> Just CRBRBbfcU
687+ "bbfcUnrated" -> Just CRBRBbfcUnrated
690+instance ToText ContentRatingBbfcRating where
692+ CRBRBBFC12 -> "bbfc12"
693+ CRBRBbfc12a -> "bbfc12a"
694+ CRBRBBFC15 -> "bbfc15"
695+ CRBRBBFC18 -> "bbfc18"
696+ CRBRBbfcPg -> "bbfcPg"
697+ CRBRBBFCR18 -> "bbfcR18"
698+ CRBRBbfcU -> "bbfcU"
699+ CRBRBbfcUnrated -> "bbfcUnrated"
352-- | The video\'s rating from Thailand\'s Board of Film and Video Censors.
701-- | The video\'s rating from Thailand\'s Board of Film and Video Censors.
353data ContentRatingBfvcRating
702data ContentRatingBfvcRating
354 = CRBRBFVC13
703 = CRBRBFVC13
@@ -371,6 +720,29 @@ data ContentRatingBfvcRating
372instance Hashable ContentRatingBfvcRating
721instance Hashable ContentRatingBfvcRating
723+instance FromText ContentRatingBfvcRating where
725+ "bfvc13" -> Just CRBRBFVC13
726+ "bfvc15" -> Just CRBRBFVC15
727+ "bfvc18" -> Just CRBRBFVC18
728+ "bfvc20" -> Just CRBRBFVC20
729+ "bfvcB" -> Just CRBRBfvcB
730+ "bfvcE" -> Just CRBRBfvcE
731+ "bfvcG" -> Just CRBRBfvcG
732+ "bfvcUnrated" -> Just CRBRBfvcUnrated
735+instance ToText ContentRatingBfvcRating where
737+ CRBRBFVC13 -> "bfvc13"
738+ CRBRBFVC15 -> "bfvc15"
739+ CRBRBFVC18 -> "bfvc18"
740+ CRBRBFVC20 -> "bfvc20"
741+ CRBRBfvcB -> "bfvcB"
742+ CRBRBfvcE -> "bfvcE"
743+ CRBRBfvcG -> "bfvcG"
744+ CRBRBfvcUnrated -> "bfvcUnrated"
374-- | The video\'s rating from the Austrian Board of Media Classification
746-- | The video\'s rating from the Austrian Board of Media Classification
375-- (Bundesministerium für Unterricht, Kunst und Kultur).
747-- (Bundesministerium für Unterricht, Kunst und Kultur).
376data ContentRatingBmukkRating
748data ContentRatingBmukkRating
@@ -394,6 +766,29 @@ data ContentRatingBmukkRating
395instance Hashable ContentRatingBmukkRating
767instance Hashable ContentRatingBmukkRating
769+instance FromText ContentRatingBmukkRating where
771+ "bmukk10" -> Just CRBRBMUKK10
772+ "bmukk12" -> Just CRBRBMUKK12
773+ "bmukk14" -> Just CRBRBMUKK14
774+ "bmukk16" -> Just CRBRBMUKK16
775+ "bmukk6" -> Just CRBRBMUKK6
776+ "bmukk8" -> Just CRBRBMUKK8
777+ "bmukkAa" -> Just CRBRBmukkAa
778+ "bmukkUnrated" -> Just CRBRBmukkUnrated
781+instance ToText ContentRatingBmukkRating where
783+ CRBRBMUKK10 -> "bmukk10"
784+ CRBRBMUKK12 -> "bmukk12"
785+ CRBRBMUKK14 -> "bmukk14"
786+ CRBRBMUKK16 -> "bmukk16"
787+ CRBRBMUKK6 -> "bmukk6"
788+ CRBRBMUKK8 -> "bmukk8"
789+ CRBRBmukkAa -> "bmukkAa"
790+ CRBRBmukkUnrated -> "bmukkUnrated"
397-- | Rating system for Canadian TV - Canadian TV Classification System The
792-- | Rating system for Canadian TV - Canadian TV Classification System The
398-- video\'s rating from the Canadian Radio-Television and
793-- video\'s rating from the Canadian Radio-Television and
399-- Telecommunications Commission (CRTC) for Canadian English-language
794-- Telecommunications Commission (CRTC) for Canadian English-language
@@ -418,6 +813,27 @@ data ContentRatingCatvRating
419instance Hashable ContentRatingCatvRating
814instance Hashable ContentRatingCatvRating
816+instance FromText ContentRatingCatvRating where
818+ "catv14plus" -> Just CRCRCatv14plus
819+ "catv18plus" -> Just CRCRCatv18plus
820+ "catvC" -> Just CRCRCatvC
821+ "catvC8" -> Just CRCRCATVC8
822+ "catvG" -> Just CRCRCatvG
823+ "catvPg" -> Just CRCRCatvPg
824+ "catvUnrated" -> Just CRCRCatvUnrated
827+instance ToText ContentRatingCatvRating where
829+ CRCRCatv14plus -> "catv14plus"
830+ CRCRCatv18plus -> "catv18plus"
831+ CRCRCatvC -> "catvC"
832+ CRCRCATVC8 -> "catvC8"
833+ CRCRCatvG -> "catvG"
834+ CRCRCatvPg -> "catvPg"
835+ CRCRCatvUnrated -> "catvUnrated"
421-- | The video\'s rating from the Canadian Radio-Television and
837-- | The video\'s rating from the Canadian Radio-Television and
422-- Telecommunications Commission (CRTC) for Canadian French-language
838-- Telecommunications Commission (CRTC) for Canadian French-language
423-- broadcasts. For more information, see the Canadian Broadcast Standards
839-- broadcasts. For more information, see the Canadian Broadcast Standards
@@ -439,6 +855,25 @@ data ContentRatingCatvfrRating
440instance Hashable ContentRatingCatvfrRating
856instance Hashable ContentRatingCatvfrRating
858+instance FromText ContentRatingCatvfrRating where
860+ "catvfr13plus" -> Just CRCRCatvfr13plus
861+ "catvfr16plus" -> Just CRCRCatvfr16plus
862+ "catvfr18plus" -> Just CRCRCatvfr18plus
863+ "catvfr8plus" -> Just CRCRCatvfr8plus
864+ "catvfrG" -> Just CRCRCatvfrG
865+ "catvfrUnrated" -> Just CRCRCatvfrUnrated
868+instance ToText ContentRatingCatvfrRating where
870+ CRCRCatvfr13plus -> "catvfr13plus"
871+ CRCRCatvfr16plus -> "catvfr16plus"
872+ CRCRCatvfr18plus -> "catvfr18plus"
873+ CRCRCatvfr8plus -> "catvfr8plus"
874+ CRCRCatvfrG -> "catvfrG"
875+ CRCRCatvfrUnrated -> "catvfrUnrated"
442-- | The video\'s Central Board of Film Certification (CBFC - India) rating.
877-- | The video\'s Central Board of Film Certification (CBFC - India) rating.
443data ContentRatingCbfcRating
878data ContentRatingCbfcRating
444 = CRCRCbfcA
879 = CRCRCbfcA
@@ -455,6 +890,23 @@ data ContentRatingCbfcRating
456instance Hashable ContentRatingCbfcRating
891instance Hashable ContentRatingCbfcRating
893+instance FromText ContentRatingCbfcRating where
895+ "cbfcA" -> Just CRCRCbfcA
896+ "cbfcS" -> Just CRCRCbfcS
897+ "cbfcU" -> Just CRCRCbfcU
898+ "cbfcUA" -> Just CRCRCbfcUA
899+ "cbfcUnrated" -> Just CRCRCbfcUnrated
902+instance ToText ContentRatingCbfcRating where
904+ CRCRCbfcA -> "cbfcA"
905+ CRCRCbfcS -> "cbfcS"
906+ CRCRCbfcU -> "cbfcU"
907+ CRCRCbfcUA -> "cbfcUA"
908+ CRCRCbfcUnrated -> "cbfcUnrated"
458-- | The video\'s Consejo de Calificación Cinematográfica (Chile) rating.
910-- | The video\'s Consejo de Calificación Cinematográfica (Chile) rating.
459data ContentRatingCccRating
911data ContentRatingCccRating
460 = CRCRCCC14
912 = CRCRCCC14
@@ -475,6 +927,27 @@ data ContentRatingCccRating
476instance Hashable ContentRatingCccRating
928instance Hashable ContentRatingCccRating
930+instance FromText ContentRatingCccRating where
932+ "ccc14" -> Just CRCRCCC14
933+ "ccc18" -> Just CRCRCCC18
934+ "ccc18s" -> Just CRCRCcc18s
935+ "ccc18v" -> Just CRCRCcc18v
936+ "ccc6" -> Just CRCRCCC6
937+ "cccTe" -> Just CRCRCccTe
938+ "cccUnrated" -> Just CRCRCccUnrated
941+instance ToText ContentRatingCccRating where
943+ CRCRCCC14 -> "ccc14"
944+ CRCRCCC18 -> "ccc18"
945+ CRCRCcc18s -> "ccc18s"
946+ CRCRCcc18v -> "ccc18v"
948+ CRCRCccTe -> "cccTe"
949+ CRCRCccUnrated -> "cccUnrated"
478-- | The video\'s rating from Portugal\'s Comissão de Classificação de
951-- | The video\'s rating from Portugal\'s Comissão de Classificação de
479-- Espect´culos.
952-- Espect´culos.
480data ContentRatingCceRating
953data ContentRatingCceRating
@@ -494,6 +967,25 @@ data ContentRatingCceRating
495instance Hashable ContentRatingCceRating
968instance Hashable ContentRatingCceRating
970+instance FromText ContentRatingCceRating where
972+ "cceM12" -> Just CRCRCCEM12
973+ "cceM16" -> Just CRCRCCEM16
974+ "cceM18" -> Just CRCRCCEM18
975+ "cceM4" -> Just CRCRCCEM4
976+ "cceM6" -> Just CRCRCCEM6
977+ "cceUnrated" -> Just CRCRCceUnrated
980+instance ToText ContentRatingCceRating where
982+ CRCRCCEM12 -> "cceM12"
983+ CRCRCCEM16 -> "cceM16"
984+ CRCRCCEM18 -> "cceM18"
985+ CRCRCCEM4 -> "cceM4"
986+ CRCRCCEM6 -> "cceM6"
987+ CRCRCceUnrated -> "cceUnrated"
497-- | The video\'s rating in Switzerland.
989-- | The video\'s rating in Switzerland.
498data ContentRatingChfilmRating
990data ContentRatingChfilmRating
499 = CRCRCHFILM0
991 = CRCRCHFILM0
@@ -512,6 +1004,25 @@ data ContentRatingChfilmRating
513instance Hashable ContentRatingChfilmRating
1005instance Hashable ContentRatingChfilmRating
1007+instance FromText ContentRatingChfilmRating where
1009+ "chfilm0" -> Just CRCRCHFILM0
1010+ "chfilm12" -> Just CRCRCHFILM12
1011+ "chfilm16" -> Just CRCRCHFILM16
1012+ "chfilm18" -> Just CRCRCHFILM18
1013+ "chfilm6" -> Just CRCRCHFILM6
1014+ "chfilmUnrated" -> Just CRCRChfilmUnrated
1017+instance ToText ContentRatingChfilmRating where
1019+ CRCRCHFILM0 -> "chfilm0"
1020+ CRCRCHFILM12 -> "chfilm12"
1021+ CRCRCHFILM16 -> "chfilm16"
1022+ CRCRCHFILM18 -> "chfilm18"
1023+ CRCRCHFILM6 -> "chfilm6"
1024+ CRCRChfilmUnrated -> "chfilmUnrated"
515-- | The video\'s Canadian Home Video Rating System (CHVRS) rating.
1026-- | The video\'s Canadian Home Video Rating System (CHVRS) rating.
516data ContentRatingChvrsRating
1027data ContentRatingChvrsRating
517 = CRCRChvrs14a
1028 = CRCRChvrs14a
@@ -532,6 +1043,27 @@ data ContentRatingChvrsRating
533instance Hashable ContentRatingChvrsRating
1044instance Hashable ContentRatingChvrsRating
1046+instance FromText ContentRatingChvrsRating where
1048+ "chvrs14a" -> Just CRCRChvrs14a
1049+ "chvrs18a" -> Just CRCRChvrs18a
1050+ "chvrsE" -> Just CRCRChvrsE
1051+ "chvrsG" -> Just CRCRChvrsG
1052+ "chvrsPg" -> Just CRCRChvrsPg
1053+ "chvrsR" -> Just CRCRChvrsR
1054+ "chvrsUnrated" -> Just CRCRChvrsUnrated
1057+instance ToText ContentRatingChvrsRating where
1059+ CRCRChvrs14a -> "chvrs14a"
1060+ CRCRChvrs18a -> "chvrs18a"
1061+ CRCRChvrsE -> "chvrsE"
1062+ CRCRChvrsG -> "chvrsG"
1063+ CRCRChvrsPg -> "chvrsPg"
1064+ CRCRChvrsR -> "chvrsR"
1065+ CRCRChvrsUnrated -> "chvrsUnrated"
535-- | The video\'s rating from the Commission de Contrôle des Films (Belgium).
1067-- | The video\'s rating from the Commission de Contrôle des Films (Belgium).
536data ContentRatingCicfRating
1068data ContentRatingCicfRating
537 = CRCRCicfE
1069 = CRCRCicfE
@@ -546,6 +1078,21 @@ data ContentRatingCicfRating
547instance Hashable ContentRatingCicfRating
1079instance Hashable ContentRatingCicfRating
1081+instance FromText ContentRatingCicfRating where
1083+ "cicfE" -> Just CRCRCicfE
1084+ "cicfKntEna" -> Just CRCRCicfKntEna
1085+ "cicfKtEa" -> Just CRCRCicfKtEa
1086+ "cicfUnrated" -> Just CRCRCicfUnrated
1089+instance ToText ContentRatingCicfRating where
1091+ CRCRCicfE -> "cicfE"
1092+ CRCRCicfKntEna -> "cicfKntEna"
1093+ CRCRCicfKtEa -> "cicfKtEa"
1094+ CRCRCicfUnrated -> "cicfUnrated"
549-- | The video\'s rating from Romania\'s CONSILIUL NATIONAL AL
1096-- | The video\'s rating from Romania\'s CONSILIUL NATIONAL AL
550-- AUDIOVIZUALULUI (CNA).
1097-- AUDIOVIZUALULUI (CNA).
551data ContentRatingCnaRating
1098data ContentRatingCnaRating
@@ -565,6 +1112,25 @@ data ContentRatingCnaRating
566instance Hashable ContentRatingCnaRating
1113instance Hashable ContentRatingCnaRating
1115+instance FromText ContentRatingCnaRating where
1117+ "cna12" -> Just CRCRCNA12
1118+ "cna15" -> Just CRCRCNA15
1119+ "cna18" -> Just CRCRCNA18
1120+ "cna18plus" -> Just CRCRCna18plus
1121+ "cnaAp" -> Just CRCRCnaAp
1122+ "cnaUnrated" -> Just CRCRCnaUnrated
1125+instance ToText ContentRatingCnaRating where
1127+ CRCRCNA12 -> "cna12"
1128+ CRCRCNA15 -> "cna15"
1129+ CRCRCNA18 -> "cna18"
1130+ CRCRCna18plus -> "cna18plus"
1131+ CRCRCnaAp -> "cnaAp"
1132+ CRCRCnaUnrated -> "cnaUnrated"
568-- | Rating system in France - Commission de classification cinematographique
1134-- | Rating system in France - Commission de classification cinematographique
569data ContentRatingCncRating
1135data ContentRatingCncRating
570 = CRCRCNC10
1136 = CRCRCNC10
@@ -585,6 +1151,27 @@ data ContentRatingCncRating
586instance Hashable ContentRatingCncRating
1152instance Hashable ContentRatingCncRating
1154+instance FromText ContentRatingCncRating where
1156+ "cnc10" -> Just CRCRCNC10
1157+ "cnc12" -> Just CRCRCNC12
1158+ "cnc16" -> Just CRCRCNC16
1159+ "cnc18" -> Just CRCRCNC18
1160+ "cncE" -> Just CRCRCncE
1161+ "cncT" -> Just CRCRCncT
1162+ "cncUnrated" -> Just CRCRCncUnrated
1165+instance ToText ContentRatingCncRating where
1167+ CRCRCNC10 -> "cnc10"
1168+ CRCRCNC12 -> "cnc12"
1169+ CRCRCNC16 -> "cnc16"
1170+ CRCRCNC18 -> "cnc18"
1173+ CRCRCncUnrated -> "cncUnrated"
588-- | The video\'s rating from France\'s Conseil supérieur de l?audiovisuel,
1175-- | The video\'s rating from France\'s Conseil supérieur de l?audiovisuel,
589-- which rates broadcast content.
1176-- which rates broadcast content.
590data ContentRatingCsaRating
1177data ContentRatingCsaRating
@@ -606,6 +1193,27 @@ data ContentRatingCsaRating
607instance Hashable ContentRatingCsaRating
1194instance Hashable ContentRatingCsaRating
1196+instance FromText ContentRatingCsaRating where
1198+ "csa10" -> Just CRCRCSA10
1199+ "csa12" -> Just CRCRCSA12
1200+ "csa16" -> Just CRCRCSA16
1201+ "csa18" -> Just CRCRCSA18
1202+ "csaInterdiction" -> Just CRCRCsaInterdiction
1203+ "csaT" -> Just CRCRCsaT
1204+ "csaUnrated" -> Just CRCRCsaUnrated
1207+instance ToText ContentRatingCsaRating where
1209+ CRCRCSA10 -> "csa10"
1210+ CRCRCSA12 -> "csa12"
1211+ CRCRCSA16 -> "csa16"
1212+ CRCRCSA18 -> "csa18"
1213+ CRCRCsaInterdiction -> "csaInterdiction"
1215+ CRCRCsaUnrated -> "csaUnrated"
609-- | The video\'s rating from Luxembourg\'s Commission de surveillance de la
1217-- | The video\'s rating from Luxembourg\'s Commission de surveillance de la
610-- classification des films (CSCF).
1218-- classification des films (CSCF).
611data ContentRatingCscfRating
1219data ContentRatingCscfRating
@@ -629,6 +1237,29 @@ data ContentRatingCscfRating
630instance Hashable ContentRatingCscfRating
1238instance Hashable ContentRatingCscfRating
1240+instance FromText ContentRatingCscfRating where
1242+ "cscf12" -> Just CRCRCSCF12
1243+ "cscf16" -> Just CRCRCSCF16
1244+ "cscf18" -> Just CRCRCSCF18
1245+ "cscf6" -> Just CRCRCSCF6
1246+ "cscf9" -> Just CRCRCSCF9
1247+ "cscfA" -> Just CRCRCscfA
1248+ "cscfAl" -> Just CRCRCscfAl
1249+ "cscfUnrated" -> Just CRCRCscfUnrated
1252+instance ToText ContentRatingCscfRating where
1254+ CRCRCSCF12 -> "cscf12"
1255+ CRCRCSCF16 -> "cscf16"
1256+ CRCRCSCF18 -> "cscf18"
1257+ CRCRCSCF6 -> "cscf6"
1258+ CRCRCSCF9 -> "cscf9"
1259+ CRCRCscfA -> "cscfA"
1260+ CRCRCscfAl -> "cscfAl"
1261+ CRCRCscfUnrated -> "cscfUnrated"
632-- | The video\'s rating in the Czech Republic.
1263-- | The video\'s rating in the Czech Republic.
633data ContentRatingCzfilmRating
1264data ContentRatingCzfilmRating
634 = CRCRCZFILM12
1265 = CRCRCZFILM12
@@ -645,6 +1276,23 @@ data ContentRatingCzfilmRating
646instance Hashable ContentRatingCzfilmRating
1277instance Hashable ContentRatingCzfilmRating
1279+instance FromText ContentRatingCzfilmRating where
1281+ "czfilm12" -> Just CRCRCZFILM12
1282+ "czfilm14" -> Just CRCRCZFILM14
1283+ "czfilm18" -> Just CRCRCZFILM18
1284+ "czfilmU" -> Just CRCRCzfilmU
1285+ "czfilmUnrated" -> Just CRCRCzfilmUnrated
1288+instance ToText ContentRatingCzfilmRating where
1290+ CRCRCZFILM12 -> "czfilm12"
1291+ CRCRCZFILM14 -> "czfilm14"
1292+ CRCRCZFILM18 -> "czfilm18"
1293+ CRCRCzfilmU -> "czfilmU"
1294+ CRCRCzfilmUnrated -> "czfilmUnrated"
648-- | The video\'s Departamento de Justiça, Classificação, Qualificação e
1296-- | The video\'s Departamento de Justiça, Classificação, Qualificação e
649-- Títulos (DJCQT - Brazil) rating.
1297-- Títulos (DJCQT - Brazil) rating.
650data ContentRatingDjctqRating
1298data ContentRatingDjctqRating
@@ -666,6 +1314,27 @@ data ContentRatingDjctqRating
667instance Hashable ContentRatingDjctqRating
1315instance Hashable ContentRatingDjctqRating
1317+instance FromText ContentRatingDjctqRating where
1319+ "djctq10" -> Just CRDRDJCTQ10
1320+ "djctq12" -> Just CRDRDJCTQ12
1321+ "djctq14" -> Just CRDRDJCTQ14
1322+ "djctq16" -> Just CRDRDJCTQ16
1323+ "djctq18" -> Just CRDRDJCTQ18
1324+ "djctqL" -> Just CRDRDjctqL
1325+ "djctqUnrated" -> Just CRDRDjctqUnrated
1328+instance ToText ContentRatingDjctqRating where
1330+ CRDRDJCTQ10 -> "djctq10"
1331+ CRDRDJCTQ12 -> "djctq12"
1332+ CRDRDJCTQ14 -> "djctq14"
1333+ CRDRDJCTQ16 -> "djctq16"
1334+ CRDRDJCTQ18 -> "djctq18"
1335+ CRDRDjctqL -> "djctqL"
1336+ CRDRDjctqUnrated -> "djctqUnrated"
669-- | The video\'s rating in Estonia.
1338-- | The video\'s rating in Estonia.
670data ContentRatingEefilmRating
1339data ContentRatingEefilmRating
671 = CREREEFILMK12
1340 = CREREEFILMK12
@@ -690,6 +1359,31 @@ data ContentRatingEefilmRating
691instance Hashable ContentRatingEefilmRating
1360instance Hashable ContentRatingEefilmRating
1362+instance FromText ContentRatingEefilmRating where
1364+ "eefilmK12" -> Just CREREEFILMK12
1365+ "eefilmK14" -> Just CREREEFILMK14
1366+ "eefilmK16" -> Just CREREEFILMK16
1367+ "eefilmK6" -> Just CREREEFILMK6
1368+ "eefilmL" -> Just CREREefilmL
1369+ "eefilmMs12" -> Just CREREEFILMMS12
1370+ "eefilmMs6" -> Just CREREEFILMMS6
1371+ "eefilmPere" -> Just CREREefilmPere
1372+ "eefilmUnrated" -> Just CREREefilmUnrated
1375+instance ToText ContentRatingEefilmRating where
1377+ CREREEFILMK12 -> "eefilmK12"
1378+ CREREEFILMK14 -> "eefilmK14"
1379+ CREREEFILMK16 -> "eefilmK16"
1380+ CREREEFILMK6 -> "eefilmK6"
1381+ CREREefilmL -> "eefilmL"
1382+ CREREEFILMMS12 -> "eefilmMs12"
1383+ CREREEFILMMS6 -> "eefilmMs6"
1384+ CREREefilmPere -> "eefilmPere"
1385+ CREREefilmUnrated -> "eefilmUnrated"
693-- | The video\'s rating in Egypt.
1387-- | The video\'s rating in Egypt.
694data ContentRatingEgfilmRating
1388data ContentRatingEgfilmRating
695 = CREREGFILM18
1389 = CREREGFILM18
@@ -704,6 +1398,21 @@ data ContentRatingEgfilmRating
705instance Hashable ContentRatingEgfilmRating
1399instance Hashable ContentRatingEgfilmRating
1401+instance FromText ContentRatingEgfilmRating where
1403+ "egfilm18" -> Just CREREGFILM18
1404+ "egfilmBn" -> Just CREREgfilmBn
1405+ "egfilmGn" -> Just CREREgfilmGn
1406+ "egfilmUnrated" -> Just CREREgfilmUnrated
1409+instance ToText ContentRatingEgfilmRating where
1411+ CREREGFILM18 -> "egfilm18"
1412+ CREREgfilmBn -> "egfilmBn"
1413+ CREREgfilmGn -> "egfilmGn"
1414+ CREREgfilmUnrated -> "egfilmUnrated"
707-- | The video\'s Eirin (映倫) rating. Eirin is the Japanese rating system.
1416-- | The video\'s Eirin (映倫) rating. Eirin is the Japanese rating system.
708data ContentRatingEirinRating
1417data ContentRatingEirinRating
709 = CREREirinG
1418 = CREREirinG
@@ -720,6 +1429,23 @@ data ContentRatingEirinRating
721instance Hashable ContentRatingEirinRating
1430instance Hashable ContentRatingEirinRating
1432+instance FromText ContentRatingEirinRating where
1434+ "eirinG" -> Just CREREirinG
1435+ "eirinPg12" -> Just CREREIRINPG12
1436+ "eirinR15plus" -> Just CREREirinR15plus
1437+ "eirinR18plus" -> Just CREREirinR18plus
1438+ "eirinUnrated" -> Just CREREirinUnrated
1441+instance ToText ContentRatingEirinRating where
1443+ CREREirinG -> "eirinG"
1444+ CREREIRINPG12 -> "eirinPg12"
1445+ CREREirinR15plus -> "eirinR15plus"
1446+ CREREirinR18plus -> "eirinR18plus"
1447+ CREREirinUnrated -> "eirinUnrated"
723-- | The video\'s rating from Malaysia\'s Film Censorship Board.
1449-- | The video\'s rating from Malaysia\'s Film Censorship Board.
724data ContentRatingFcbmRating
1450data ContentRatingFcbmRating
725 = CRFRFCBM18
1451 = CRFRFCBM18
@@ -744,6 +1470,31 @@ data ContentRatingFcbmRating
745instance Hashable ContentRatingFcbmRating
1471instance Hashable ContentRatingFcbmRating
1473+instance FromText ContentRatingFcbmRating where
1475+ "fcbm18" -> Just CRFRFCBM18
1476+ "fcbm18pa" -> Just CRFRFcbm18pa
1477+ "fcbm18pl" -> Just CRFRFcbm18pl
1478+ "fcbm18sg" -> Just CRFRFcbm18sg
1479+ "fcbm18sx" -> Just CRFRFcbm18sx
1480+ "fcbmP13" -> Just CRFRFCBMP13
1481+ "fcbmPg13" -> Just CRFRFCBMPG13
1482+ "fcbmU" -> Just CRFRFcbmU
1483+ "fcbmUnrated" -> Just CRFRFcbmUnrated
1486+instance ToText ContentRatingFcbmRating where
1488+ CRFRFCBM18 -> "fcbm18"
1489+ CRFRFcbm18pa -> "fcbm18pa"
1490+ CRFRFcbm18pl -> "fcbm18pl"
1491+ CRFRFcbm18sg -> "fcbm18sg"
1492+ CRFRFcbm18sx -> "fcbm18sx"
1493+ CRFRFCBMP13 -> "fcbmP13"
1494+ CRFRFCBMPG13 -> "fcbmPg13"
1495+ CRFRFcbmU -> "fcbmU"
1496+ CRFRFcbmUnrated -> "fcbmUnrated"
747-- | The video\'s rating from Hong Kong\'s Office for Film, Newspaper and
1498-- | The video\'s rating from Hong Kong\'s Office for Film, Newspaper and
748-- Article Administration.
1499-- Article Administration.
749data ContentRatingFcoRating
1500data ContentRatingFcoRating
@@ -763,6 +1514,25 @@ data ContentRatingFcoRating
764instance Hashable ContentRatingFcoRating
1515instance Hashable ContentRatingFcoRating
1517+instance FromText ContentRatingFcoRating where
1519+ "fcoI" -> Just CRFRFcoI
1520+ "fcoIi" -> Just CRFRFcoIi
1521+ "fcoIia" -> Just CRFRFcoIia
1522+ "fcoIib" -> Just CRFRFcoIib
1523+ "fcoIii" -> Just CRFRFcoIii
1524+ "fcoUnrated" -> Just CRFRFcoUnrated
1527+instance ToText ContentRatingFcoRating where
1530+ CRFRFcoIi -> "fcoIi"
1531+ CRFRFcoIia -> "fcoIia"
1532+ CRFRFcoIib -> "fcoIib"
1533+ CRFRFcoIii -> "fcoIii"
1534+ CRFRFcoUnrated -> "fcoUnrated"
766-- | This property has been deprecated. Use the
1536-- | This property has been deprecated. Use the
767-- contentDetails.contentRating.cncRating instead.
1537-- contentDetails.contentRating.cncRating instead.
768data ContentRatingFmocRating
1538data ContentRatingFmocRating
@@ -784,6 +1554,27 @@ data ContentRatingFmocRating
785instance Hashable ContentRatingFmocRating
1555instance Hashable ContentRatingFmocRating
1557+instance FromText ContentRatingFmocRating where
1559+ "fmoc10" -> Just CRFRFMOC10
1560+ "fmoc12" -> Just CRFRFMOC12
1561+ "fmoc16" -> Just CRFRFMOC16
1562+ "fmoc18" -> Just CRFRFMOC18
1563+ "fmocE" -> Just CRFRFmocE
1564+ "fmocU" -> Just CRFRFmocU
1565+ "fmocUnrated" -> Just CRFRFmocUnrated
1568+instance ToText ContentRatingFmocRating where
1570+ CRFRFMOC10 -> "fmoc10"
1571+ CRFRFMOC12 -> "fmoc12"
1572+ CRFRFMOC16 -> "fmoc16"
1573+ CRFRFMOC18 -> "fmoc18"
1574+ CRFRFmocE -> "fmocE"
1575+ CRFRFmocU -> "fmocU"
1576+ CRFRFmocUnrated -> "fmocUnrated"
787-- | The video\'s rating from South Africa\'s Film and Publication Board.
1578-- | The video\'s rating from South Africa\'s Film and Publication Board.
788data ContentRatingFpbRating
1579data ContentRatingFpbRating
789 = CRFRFpb1012Pg
1580 = CRFRFpb1012Pg
@@ -810,6 +1601,33 @@ data ContentRatingFpbRating
811instance Hashable ContentRatingFpbRating
1602instance Hashable ContentRatingFpbRating
1604+instance FromText ContentRatingFpbRating where
1606+ "fpb1012Pg" -> Just CRFRFpb1012Pg
1607+ "fpb13" -> Just CRFRFPB13
1608+ "fpb16" -> Just CRFRFPB16
1609+ "fpb18" -> Just CRFRFPB18
1610+ "fpb79Pg" -> Just CRFRFpb79Pg
1611+ "fpbA" -> Just CRFRFpbA
1612+ "fpbPg" -> Just CRFRFpbPg
1613+ "fpbUnrated" -> Just CRFRFpbUnrated
1614+ "fpbX18" -> Just CRFRFPBX18
1615+ "fpbXx" -> Just CRFRFpbXx
1618+instance ToText ContentRatingFpbRating where
1620+ CRFRFpb1012Pg -> "fpb1012Pg"
1621+ CRFRFPB13 -> "fpb13"
1622+ CRFRFPB16 -> "fpb16"
1623+ CRFRFPB18 -> "fpb18"
1624+ CRFRFpb79Pg -> "fpb79Pg"
1626+ CRFRFpbPg -> "fpbPg"
1627+ CRFRFpbUnrated -> "fpbUnrated"
1628+ CRFRFPBX18 -> "fpbX18"
1629+ CRFRFpbXx -> "fpbXx"
813-- | The video\'s Freiwillige Selbstkontrolle der Filmwirtschaft (FSK -
1631-- | The video\'s Freiwillige Selbstkontrolle der Filmwirtschaft (FSK -
814-- Germany) rating.
1632-- Germany) rating.
815data ContentRatingFskRating
1633data ContentRatingFskRating
@@ -829,6 +1647,25 @@ data ContentRatingFskRating
830instance Hashable ContentRatingFskRating
1648instance Hashable ContentRatingFskRating
1650+instance FromText ContentRatingFskRating where
1652+ "fsk0" -> Just CRFRFSK0
1653+ "fsk12" -> Just CRFRFSK12
1654+ "fsk16" -> Just CRFRFSK16
1655+ "fsk18" -> Just CRFRFSK18
1656+ "fsk6" -> Just CRFRFSK6
1657+ "fskUnrated" -> Just CRFRFskUnrated
1660+instance ToText ContentRatingFskRating where
1663+ CRFRFSK12 -> "fsk12"
1664+ CRFRFSK16 -> "fsk16"
1665+ CRFRFSK18 -> "fsk18"
1667+ CRFRFskUnrated -> "fskUnrated"
832-- | The video\'s rating in Greece.
1669-- | The video\'s rating in Greece.
833data ContentRatingGrfilmRating
1670data ContentRatingGrfilmRating
834 = CRGRGrfilmE
1671 = CRGRGrfilmE
@@ -845,6 +1682,23 @@ data ContentRatingGrfilmRating
846instance Hashable ContentRatingGrfilmRating
1683instance Hashable ContentRatingGrfilmRating
1685+instance FromText ContentRatingGrfilmRating where
1687+ "grfilmE" -> Just CRGRGrfilmE
1688+ "grfilmK" -> Just CRGRGrfilmK
1689+ "grfilmK13" -> Just CRGRGRFILMK13
1690+ "grfilmK17" -> Just CRGRGRFILMK17
1691+ "grfilmUnrated" -> Just CRGRGrfilmUnrated
1694+instance ToText ContentRatingGrfilmRating where
1696+ CRGRGrfilmE -> "grfilmE"
1697+ CRGRGrfilmK -> "grfilmK"
1698+ CRGRGRFILMK13 -> "grfilmK13"
1699+ CRGRGRFILMK17 -> "grfilmK17"
1700+ CRGRGrfilmUnrated -> "grfilmUnrated"
848-- | The video\'s Instituto de la Cinematografía y de las Artes Audiovisuales
1702-- | The video\'s Instituto de la Cinematografía y de las Artes Audiovisuales
849-- (ICAA - Spain) rating.
1703-- (ICAA - Spain) rating.
850data ContentRatingIcaaRating
1704data ContentRatingIcaaRating
@@ -868,6 +1722,29 @@ data ContentRatingIcaaRating
869instance Hashable ContentRatingIcaaRating
1723instance Hashable ContentRatingIcaaRating
1725+instance FromText ContentRatingIcaaRating where
1727+ "icaa12" -> Just CRIRICAA12
1728+ "icaa13" -> Just CRIRICAA13
1729+ "icaa16" -> Just CRIRICAA16
1730+ "icaa18" -> Just CRIRICAA18
1731+ "icaa7" -> Just CRIRICAA7
1732+ "icaaApta" -> Just CRIRIcaaApta
1733+ "icaaUnrated" -> Just CRIRIcaaUnrated
1734+ "icaaX" -> Just CRIRIcaaX
1737+instance ToText ContentRatingIcaaRating where
1739+ CRIRICAA12 -> "icaa12"
1740+ CRIRICAA13 -> "icaa13"
1741+ CRIRICAA16 -> "icaa16"
1742+ CRIRICAA18 -> "icaa18"
1743+ CRIRICAA7 -> "icaa7"
1744+ CRIRIcaaApta -> "icaaApta"
1745+ CRIRIcaaUnrated -> "icaaUnrated"
1746+ CRIRIcaaX -> "icaaX"
871-- | The video\'s Irish Film Classification Office (IFCO - Ireland) rating.
1748-- | The video\'s Irish Film Classification Office (IFCO - Ireland) rating.
872-- See the IFCO website for more information.
1749-- See the IFCO website for more information.
873data ContentRatingIfcoRating
1750data ContentRatingIfcoRating
@@ -893,6 +1770,31 @@ data ContentRatingIfcoRating
894instance Hashable ContentRatingIfcoRating
1771instance Hashable ContentRatingIfcoRating
1773+instance FromText ContentRatingIfcoRating where
1775+ "ifco12" -> Just CRIRIFCO12
1776+ "ifco12a" -> Just CRIRIfco12a
1777+ "ifco15" -> Just CRIRIFCO15
1778+ "ifco15a" -> Just CRIRIfco15a
1779+ "ifco16" -> Just CRIRIFCO16
1780+ "ifco18" -> Just CRIRIFCO18
1781+ "ifcoG" -> Just CRIRIfcoG
1782+ "ifcoPg" -> Just CRIRIfcoPg
1783+ "ifcoUnrated" -> Just CRIRIfcoUnrated
1786+instance ToText ContentRatingIfcoRating where
1788+ CRIRIFCO12 -> "ifco12"
1789+ CRIRIfco12a -> "ifco12a"
1790+ CRIRIFCO15 -> "ifco15"
1791+ CRIRIfco15a -> "ifco15a"
1792+ CRIRIFCO16 -> "ifco16"
1793+ CRIRIFCO18 -> "ifco18"
1794+ CRIRIfcoG -> "ifcoG"
1795+ CRIRIfcoPg -> "ifcoPg"
1796+ CRIRIfcoUnrated -> "ifcoUnrated"
896-- | The video\'s rating in Israel.
1798-- | The video\'s rating in Israel.
897data ContentRatingIlfilmRating
1799data ContentRatingIlfilmRating
898 = CRIRILFILM12
1800 = CRIRILFILM12
@@ -909,6 +1811,23 @@ data ContentRatingIlfilmRating
910instance Hashable ContentRatingIlfilmRating
1812instance Hashable ContentRatingIlfilmRating
1814+instance FromText ContentRatingIlfilmRating where
1816+ "ilfilm12" -> Just CRIRILFILM12
1817+ "ilfilm16" -> Just CRIRILFILM16
1818+ "ilfilm18" -> Just CRIRILFILM18
1819+ "ilfilmAa" -> Just CRIRIlfilmAa
1820+ "ilfilmUnrated" -> Just CRIRIlfilmUnrated
1823+instance ToText ContentRatingIlfilmRating where
1825+ CRIRILFILM12 -> "ilfilm12"
1826+ CRIRILFILM16 -> "ilfilm16"
1827+ CRIRILFILM18 -> "ilfilm18"
1828+ CRIRIlfilmAa -> "ilfilmAa"
1829+ CRIRIlfilmUnrated -> "ilfilmUnrated"
912-- | The video\'s INCAA (Instituto Nacional de Cine y Artes Audiovisuales -
1831-- | The video\'s INCAA (Instituto Nacional de Cine y Artes Audiovisuales -
913-- Argentina) rating.
1832-- Argentina) rating.
914data ContentRatingIncaaRating
1833data ContentRatingIncaaRating
@@ -928,6 +1847,25 @@ data ContentRatingIncaaRating
929instance Hashable ContentRatingIncaaRating
1848instance Hashable ContentRatingIncaaRating
1850+instance FromText ContentRatingIncaaRating where
1852+ "incaaAtp" -> Just CRIRIncaaAtp
1853+ "incaaC" -> Just CRIRIncaaC
1854+ "incaaSam13" -> Just CRIRINCAASAM13
1855+ "incaaSam16" -> Just CRIRINCAASAM16
1856+ "incaaSam18" -> Just CRIRINCAASAM18
1857+ "incaaUnrated" -> Just CRIRIncaaUnrated
1860+instance ToText ContentRatingIncaaRating where
1862+ CRIRIncaaAtp -> "incaaAtp"
1863+ CRIRIncaaC -> "incaaC"
1864+ CRIRINCAASAM13 -> "incaaSam13"
1865+ CRIRINCAASAM16 -> "incaaSam16"
1866+ CRIRINCAASAM18 -> "incaaSam18"
1867+ CRIRIncaaUnrated -> "incaaUnrated"
931data ContentRatingItemDjctqRatingReasons
1869data ContentRatingItemDjctqRatingReasons
932 = CRIDRRDjctqCriminalActs
1870 = CRIDRRDjctqCriminalActs
933 -- ^ @djctqCriminalActs@
1871 -- ^ @djctqCriminalActs@
@@ -957,6 +1895,37 @@ data ContentRatingItemDjctqRatingReasons
958instance Hashable ContentRatingItemDjctqRatingReasons
1896instance Hashable ContentRatingItemDjctqRatingReasons
1898+instance FromText ContentRatingItemDjctqRatingReasons where
1900+ "djctqCriminalActs" -> Just CRIDRRDjctqCriminalActs
1901+ "djctqDrugs" -> Just CRIDRRDjctqDrugs
1902+ "djctqExplicitSex" -> Just CRIDRRDjctqExplicitSex
1903+ "djctqExtremeViolence" -> Just CRIDRRDjctqExtremeViolence
1904+ "djctqIllegalDrugs" -> Just CRIDRRDjctqIllegalDrugs
1905+ "djctqImpactingContent" -> Just CRIDRRDjctqImpactingContent
1906+ "djctqInappropriateLanguage" -> Just CRIDRRDjctqInappropriateLanguage
1907+ "djctqLegalDrugs" -> Just CRIDRRDjctqLegalDrugs
1908+ "djctqNudity" -> Just CRIDRRDjctqNudity
1909+ "djctqSex" -> Just CRIDRRDjctqSex
1910+ "djctqSexualContent" -> Just CRIDRRDjctqSexualContent
1911+ "djctqViolence" -> Just CRIDRRDjctqViolence
1914+instance ToText ContentRatingItemDjctqRatingReasons where
1916+ CRIDRRDjctqCriminalActs -> "djctqCriminalActs"
1917+ CRIDRRDjctqDrugs -> "djctqDrugs"
1918+ CRIDRRDjctqExplicitSex -> "djctqExplicitSex"
1919+ CRIDRRDjctqExtremeViolence -> "djctqExtremeViolence"
1920+ CRIDRRDjctqIllegalDrugs -> "djctqIllegalDrugs"
1921+ CRIDRRDjctqImpactingContent -> "djctqImpactingContent"
1922+ CRIDRRDjctqInappropriateLanguage -> "djctqInappropriateLanguage"
1923+ CRIDRRDjctqLegalDrugs -> "djctqLegalDrugs"
1924+ CRIDRRDjctqNudity -> "djctqNudity"
1925+ CRIDRRDjctqSex -> "djctqSex"
1926+ CRIDRRDjctqSexualContent -> "djctqSexualContent"
1927+ CRIDRRDjctqViolence -> "djctqViolence"
960-- | The video\'s rating from the Kenya Film Classification Board.
1929-- | The video\'s rating from the Kenya Film Classification Board.
961data ContentRatingKfcbRating
1930data ContentRatingKfcbRating
962 = CRKRKfcb16plus
1931 = CRKRKfcb16plus
@@ -973,6 +1942,23 @@ data ContentRatingKfcbRating
974instance Hashable ContentRatingKfcbRating
1943instance Hashable ContentRatingKfcbRating
1945+instance FromText ContentRatingKfcbRating where
1947+ "kfcb16plus" -> Just CRKRKfcb16plus
1948+ "kfcbG" -> Just CRKRKfcbG
1949+ "kfcbPg" -> Just CRKRKfcbPg
1950+ "kfcbR" -> Just CRKRKfcbR
1951+ "kfcbUnrated" -> Just CRKRKfcbUnrated
1954+instance ToText ContentRatingKfcbRating where
1956+ CRKRKfcb16plus -> "kfcb16plus"
1957+ CRKRKfcbG -> "kfcbG"
1958+ CRKRKfcbPg -> "kfcbPg"
1959+ CRKRKfcbR -> "kfcbR"
1960+ CRKRKfcbUnrated -> "kfcbUnrated"
976-- | voor de Classificatie van Audiovisuele Media (Netherlands).
1962-- | voor de Classificatie van Audiovisuele Media (Netherlands).
977data ContentRatingKijkwijzerRating
1963data ContentRatingKijkwijzerRating
978 = CRKRKIJKWIJZER12
1964 = CRKRKIJKWIJZER12
@@ -993,6 +1979,27 @@ data ContentRatingKijkwijzerRating
994instance Hashable ContentRatingKijkwijzerRating
1980instance Hashable ContentRatingKijkwijzerRating
1982+instance FromText ContentRatingKijkwijzerRating where
1984+ "kijkwijzer12" -> Just CRKRKIJKWIJZER12
1985+ "kijkwijzer16" -> Just CRKRKIJKWIJZER16
1986+ "kijkwijzer18" -> Just CRKRKIJKWIJZER18
1987+ "kijkwijzer6" -> Just CRKRKIJKWIJZER6
1988+ "kijkwijzer9" -> Just CRKRKIJKWIJZER9
1989+ "kijkwijzerAl" -> Just CRKRKijkwijzerAl
1990+ "kijkwijzerUnrated" -> Just CRKRKijkwijzerUnrated
1993+instance ToText ContentRatingKijkwijzerRating where
1995+ CRKRKIJKWIJZER12 -> "kijkwijzer12"
1996+ CRKRKIJKWIJZER16 -> "kijkwijzer16"
1997+ CRKRKIJKWIJZER18 -> "kijkwijzer18"
1998+ CRKRKIJKWIJZER6 -> "kijkwijzer6"
1999+ CRKRKIJKWIJZER9 -> "kijkwijzer9"
2000+ CRKRKijkwijzerAl -> "kijkwijzerAl"
2001+ CRKRKijkwijzerUnrated -> "kijkwijzerUnrated"
996-- | The video\'s Korea Media Rating Board (영상물등급위원회) rating. The
2003-- | The video\'s Korea Media Rating Board (영상물등급위원회) rating. The
997-- KMRB rates videos in South Korea.
2004-- KMRB rates videos in South Korea.
998data ContentRatingKmrbRating
2005data ContentRatingKmrbRating
@@ -1012,6 +2019,25 @@ data ContentRatingKmrbRating
1013instance Hashable ContentRatingKmrbRating
2020instance Hashable ContentRatingKmrbRating
2022+instance FromText ContentRatingKmrbRating where
2024+ "kmrb12plus" -> Just CRKRKmrb12plus
2025+ "kmrb15plus" -> Just CRKRKmrb15plus
2026+ "kmrbAll" -> Just CRKRKmrbAll
2027+ "kmrbR" -> Just CRKRKmrbR
2028+ "kmrbTeenr" -> Just CRKRKmrbTeenr
2029+ "kmrbUnrated" -> Just CRKRKmrbUnrated
2032+instance ToText ContentRatingKmrbRating where
2034+ CRKRKmrb12plus -> "kmrb12plus"
2035+ CRKRKmrb15plus -> "kmrb15plus"
2036+ CRKRKmrbAll -> "kmrbAll"
2037+ CRKRKmrbR -> "kmrbR"
2038+ CRKRKmrbTeenr -> "kmrbTeenr"
2039+ CRKRKmrbUnrated -> "kmrbUnrated"
1015-- | The video\'s rating from Indonesia\'s Lembaga Sensor Film.
2041-- | The video\'s rating from Indonesia\'s Lembaga Sensor Film.
1016data ContentRatingLsfRating
2042data ContentRatingLsfRating
1017 = CRLRLSF13
2043 = CRLRLSF13
@@ -1036,6 +2062,31 @@ data ContentRatingLsfRating
1037instance Hashable ContentRatingLsfRating
2063instance Hashable ContentRatingLsfRating
2065+instance FromText ContentRatingLsfRating where
2067+ "lsf13" -> Just CRLRLSF13
2068+ "lsf17" -> Just CRLRLSF17
2069+ "lsf21" -> Just CRLRLSF21
2070+ "lsfA" -> Just CRLRLsfA
2071+ "lsfBo" -> Just CRLRLsfBo
2072+ "lsfD" -> Just CRLRLsfD
2073+ "lsfR" -> Just CRLRLsfR
2074+ "lsfSu" -> Just CRLRLsfSu
2075+ "lsfUnrated" -> Just CRLRLsfUnrated
2078+instance ToText ContentRatingLsfRating where
2080+ CRLRLSF13 -> "lsf13"
2081+ CRLRLSF17 -> "lsf17"
2082+ CRLRLSF21 -> "lsf21"
2084+ CRLRLsfBo -> "lsfBo"
2087+ CRLRLsfSu -> "lsfSu"
2088+ CRLRLsfUnrated -> "lsfUnrated"
1039-- | The video\'s rating from Malta\'s Film Age-Classification Board.
2090-- | The video\'s rating from Malta\'s Film Age-Classification Board.
1040data ContentRatingMccaaRating
2091data ContentRatingMccaaRating
1041 = CRMRMCCAA12
2092 = CRMRMCCAA12
@@ -1060,6 +2111,31 @@ data ContentRatingMccaaRating
1061instance Hashable ContentRatingMccaaRating
2112instance Hashable ContentRatingMccaaRating
2114+instance FromText ContentRatingMccaaRating where
2116+ "mccaa12" -> Just CRMRMCCAA12
2117+ "mccaa12a" -> Just CRMRMccaa12a
2118+ "mccaa14" -> Just CRMRMCCAA14
2119+ "mccaa15" -> Just CRMRMCCAA15
2120+ "mccaa16" -> Just CRMRMCCAA16
2121+ "mccaa18" -> Just CRMRMCCAA18
2122+ "mccaaPg" -> Just CRMRMccaaPg
2123+ "mccaaU" -> Just CRMRMccaaU
2124+ "mccaaUnrated" -> Just CRMRMccaaUnrated
2127+instance ToText ContentRatingMccaaRating where
2129+ CRMRMCCAA12 -> "mccaa12"
2130+ CRMRMccaa12a -> "mccaa12a"
2131+ CRMRMCCAA14 -> "mccaa14"
2132+ CRMRMCCAA15 -> "mccaa15"
2133+ CRMRMCCAA16 -> "mccaa16"
2134+ CRMRMCCAA18 -> "mccaa18"
2135+ CRMRMccaaPg -> "mccaaPg"
2136+ CRMRMccaaU -> "mccaaU"
2137+ CRMRMccaaUnrated -> "mccaaUnrated"
1063-- | The video\'s rating from the Danish Film Institute\'s (Det Danske
2139-- | The video\'s rating from the Danish Film Institute\'s (Det Danske
1064-- Filminstitut) Media Council for Children and Young People.
2140-- Filminstitut) Media Council for Children and Young People.
1065data ContentRatingMccypRating
2141data ContentRatingMccypRating
@@ -1077,6 +2153,23 @@ data ContentRatingMccypRating
1078instance Hashable ContentRatingMccypRating
2154instance Hashable ContentRatingMccypRating
2156+instance FromText ContentRatingMccypRating where
2158+ "mccyp11" -> Just CRMRMCCYP11
2159+ "mccyp15" -> Just CRMRMCCYP15
2160+ "mccyp7" -> Just CRMRMCCYP7
2161+ "mccypA" -> Just CRMRMccypA
2162+ "mccypUnrated" -> Just CRMRMccypUnrated
2165+instance ToText ContentRatingMccypRating where
2167+ CRMRMCCYP11 -> "mccyp11"
2168+ CRMRMCCYP15 -> "mccyp15"
2169+ CRMRMCCYP7 -> "mccyp7"
2170+ CRMRMccypA -> "mccypA"
2171+ CRMRMccypUnrated -> "mccypUnrated"
1080-- | The video\'s rating from Singapore\'s Media Development Authority (MDA)
2173-- | The video\'s rating from Singapore\'s Media Development Authority (MDA)
1081-- and, specifically, it\'s Board of Film Censors (BFC).
2174-- and, specifically, it\'s Board of Film Censors (BFC).
1082data ContentRatingMdaRating
2175data ContentRatingMdaRating
@@ -1098,6 +2191,27 @@ data ContentRatingMdaRating
1099instance Hashable ContentRatingMdaRating
2192instance Hashable ContentRatingMdaRating
2194+instance FromText ContentRatingMdaRating where
2196+ "mdaG" -> Just CRMRMdaG
2197+ "mdaM18" -> Just CRMRMDAM18
2198+ "mdaNc16" -> Just CRMRMDANC16
2199+ "mdaPg" -> Just CRMRMdaPg
2200+ "mdaPg13" -> Just CRMRMDAPG13
2201+ "mdaR21" -> Just CRMRMDAR21
2202+ "mdaUnrated" -> Just CRMRMdaUnrated
2205+instance ToText ContentRatingMdaRating where
2208+ CRMRMDAM18 -> "mdaM18"
2209+ CRMRMDANC16 -> "mdaNc16"
2210+ CRMRMdaPg -> "mdaPg"
2211+ CRMRMDAPG13 -> "mdaPg13"
2212+ CRMRMDAR21 -> "mdaR21"
2213+ CRMRMdaUnrated -> "mdaUnrated"
1101-- | The video\'s rating from Medietilsynet, the Norwegian Media Authority.
2215-- | The video\'s rating from Medietilsynet, the Norwegian Media Authority.
1102data ContentRatingMedietilsynetRating
2216data ContentRatingMedietilsynetRating
1103 = CRMRMEDIETILSYNET11
2217 = CRMRMEDIETILSYNET11
@@ -1122,6 +2236,31 @@ data ContentRatingMedietilsynetRating
1123instance Hashable ContentRatingMedietilsynetRating
2237instance Hashable ContentRatingMedietilsynetRating
2239+instance FromText ContentRatingMedietilsynetRating where
2241+ "medietilsynet11" -> Just CRMRMEDIETILSYNET11
2242+ "medietilsynet12" -> Just CRMRMEDIETILSYNET12
2243+ "medietilsynet15" -> Just CRMRMEDIETILSYNET15
2244+ "medietilsynet18" -> Just CRMRMEDIETILSYNET18
2245+ "medietilsynet6" -> Just CRMRMEDIETILSYNET6
2246+ "medietilsynet7" -> Just CRMRMEDIETILSYNET7
2247+ "medietilsynet9" -> Just CRMRMEDIETILSYNET9
2248+ "medietilsynetA" -> Just CRMRMedietilsynetA
2249+ "medietilsynetUnrated" -> Just CRMRMedietilsynetUnrated
2252+instance ToText ContentRatingMedietilsynetRating where
2254+ CRMRMEDIETILSYNET11 -> "medietilsynet11"
2255+ CRMRMEDIETILSYNET12 -> "medietilsynet12"
2256+ CRMRMEDIETILSYNET15 -> "medietilsynet15"
2257+ CRMRMEDIETILSYNET18 -> "medietilsynet18"
2258+ CRMRMEDIETILSYNET6 -> "medietilsynet6"
2259+ CRMRMEDIETILSYNET7 -> "medietilsynet7"
2260+ CRMRMEDIETILSYNET9 -> "medietilsynet9"
2261+ CRMRMedietilsynetA -> "medietilsynetA"
2262+ CRMRMedietilsynetUnrated -> "medietilsynetUnrated"
1125-- | The video\'s rating from Finland\'s Kansallinen Audiovisuaalinen
2264-- | The video\'s rating from Finland\'s Kansallinen Audiovisuaalinen
1126-- Instituutti (National Audiovisual Institute).
2265-- Instituutti (National Audiovisual Institute).
1127data ContentRatingMekuRating
2266data ContentRatingMekuRating
@@ -1141,6 +2280,25 @@ data ContentRatingMekuRating
1142instance Hashable ContentRatingMekuRating
2281instance Hashable ContentRatingMekuRating
2283+instance FromText ContentRatingMekuRating where
2285+ "meku12" -> Just CRMRMEKU12
2286+ "meku16" -> Just CRMRMEKU16
2287+ "meku18" -> Just CRMRMEKU18
2288+ "meku7" -> Just CRMRMEKU7
2289+ "mekuS" -> Just CRMRMekuS
2290+ "mekuUnrated" -> Just CRMRMekuUnrated
2293+instance ToText ContentRatingMekuRating where
2295+ CRMRMEKU12 -> "meku12"
2296+ CRMRMEKU16 -> "meku16"
2297+ CRMRMEKU18 -> "meku18"
2298+ CRMRMEKU7 -> "meku7"
2299+ CRMRMekuS -> "mekuS"
2300+ CRMRMekuUnrated -> "mekuUnrated"
1144-- | The video\'s rating from the Ministero dei Beni e delle Attività
2302-- | The video\'s rating from the Ministero dei Beni e delle Attività
1145-- Culturali e del Turismo (Italy).
2303-- Culturali e del Turismo (Italy).
1146data ContentRatingMibacRating
2304data ContentRatingMibacRating
@@ -1160,6 +2318,25 @@ data ContentRatingMibacRating
1161instance Hashable ContentRatingMibacRating
2319instance Hashable ContentRatingMibacRating
2321+instance FromText ContentRatingMibacRating where
2323+ "mibacT" -> Just CRMRMibacT
2324+ "mibacUnrated" -> Just CRMRMibacUnrated
2325+ "mibacVap" -> Just CRMRMibacVap
2326+ "mibacVm12" -> Just CRMRMIBACVM12
2327+ "mibacVm14" -> Just CRMRMIBACVM14
2328+ "mibacVm18" -> Just CRMRMIBACVM18
2331+instance ToText ContentRatingMibacRating where
2333+ CRMRMibacT -> "mibacT"
2334+ CRMRMibacUnrated -> "mibacUnrated"
2335+ CRMRMibacVap -> "mibacVap"
2336+ CRMRMIBACVM12 -> "mibacVm12"
2337+ CRMRMIBACVM14 -> "mibacVm14"
2338+ CRMRMIBACVM18 -> "mibacVm18"
1163-- | The video\'s Ministerio de Cultura (Colombia) rating.
2340-- | The video\'s Ministerio de Cultura (Colombia) rating.
1164data ContentRatingMocRating
2341data ContentRatingMocRating
1165 = CRMRMOC12
2342 = CRMRMOC12
@@ -1184,6 +2361,31 @@ data ContentRatingMocRating
1185instance Hashable ContentRatingMocRating
2362instance Hashable ContentRatingMocRating
2364+instance FromText ContentRatingMocRating where
2366+ "moc12" -> Just CRMRMOC12
2367+ "moc15" -> Just CRMRMOC15
2368+ "moc18" -> Just CRMRMOC18
2369+ "moc7" -> Just CRMRMOC7
2370+ "mocBanned" -> Just CRMRMocBanned
2371+ "mocE" -> Just CRMRMocE
2372+ "mocT" -> Just CRMRMocT
2373+ "mocUnrated" -> Just CRMRMocUnrated
2374+ "mocX" -> Just CRMRMocX
2377+instance ToText ContentRatingMocRating where
2379+ CRMRMOC12 -> "moc12"
2380+ CRMRMOC15 -> "moc15"
2381+ CRMRMOC18 -> "moc18"
2383+ CRMRMocBanned -> "mocBanned"
2386+ CRMRMocUnrated -> "mocUnrated"
1187-- | The video\'s rating from Taiwan\'s Ministry of Culture (文化部).
2389-- | The video\'s rating from Taiwan\'s Ministry of Culture (文化部).
1188data ContentRatingMoctwRating
2390data ContentRatingMoctwRating
1189 = CRMRMoctwG
2391 = CRMRMoctwG
@@ -1200,6 +2402,23 @@ data ContentRatingMoctwRating
1201instance Hashable ContentRatingMoctwRating
2403instance Hashable ContentRatingMoctwRating
2405+instance FromText ContentRatingMoctwRating where
2407+ "moctwG" -> Just CRMRMoctwG
2408+ "moctwP" -> Just CRMRMoctwP
2409+ "moctwPg" -> Just CRMRMoctwPg
2410+ "moctwR" -> Just CRMRMoctwR
2411+ "moctwUnrated" -> Just CRMRMoctwUnrated
2414+instance ToText ContentRatingMoctwRating where
2416+ CRMRMoctwG -> "moctwG"
2417+ CRMRMoctwP -> "moctwP"
2418+ CRMRMoctwPg -> "moctwPg"
2419+ CRMRMoctwR -> "moctwR"
2420+ CRMRMoctwUnrated -> "moctwUnrated"
1203-- | The video\'s Motion Picture Association of America (MPAA) rating.
2422-- | The video\'s Motion Picture Association of America (MPAA) rating.
1204data ContentRatingMpaaRating
2423data ContentRatingMpaaRating
1205 = CRMRMpaaG
2424 = CRMRMpaaG
@@ -1218,6 +2437,25 @@ data ContentRatingMpaaRating
1219instance Hashable ContentRatingMpaaRating
2438instance Hashable ContentRatingMpaaRating
2440+instance FromText ContentRatingMpaaRating where
2442+ "mpaaG" -> Just CRMRMpaaG
2443+ "mpaaNc17" -> Just CRMRMPAANC17
2444+ "mpaaPg" -> Just CRMRMpaaPg
2445+ "mpaaPg13" -> Just CRMRMPAAPG13
2446+ "mpaaR" -> Just CRMRMpaaR
2447+ "mpaaUnrated" -> Just CRMRMpaaUnrated
2450+instance ToText ContentRatingMpaaRating where
2452+ CRMRMpaaG -> "mpaaG"
2453+ CRMRMPAANC17 -> "mpaaNc17"
2454+ CRMRMpaaPg -> "mpaaPg"
2455+ CRMRMPAAPG13 -> "mpaaPg13"
2456+ CRMRMpaaR -> "mpaaR"
2457+ CRMRMpaaUnrated -> "mpaaUnrated"
1221-- | The video\'s rating from the Movie and Television Review and
2459-- | The video\'s rating from the Movie and Television Review and
1222-- Classification Board (Philippines).
2460-- Classification Board (Philippines).
1223data ContentRatingMtrcbRating
2461data ContentRatingMtrcbRating
@@ -1239,6 +2477,27 @@ data ContentRatingMtrcbRating
1240instance Hashable ContentRatingMtrcbRating
2478instance Hashable ContentRatingMtrcbRating
2480+instance FromText ContentRatingMtrcbRating where
2482+ "mtrcbG" -> Just CRMRMtrcbG
2483+ "mtrcbPg" -> Just CRMRMtrcbPg
2484+ "mtrcbR13" -> Just CRMRMTRCBR13
2485+ "mtrcbR16" -> Just CRMRMTRCBR16
2486+ "mtrcbR18" -> Just CRMRMTRCBR18
2487+ "mtrcbUnrated" -> Just CRMRMtrcbUnrated
2488+ "mtrcbX" -> Just CRMRMtrcbX
2491+instance ToText ContentRatingMtrcbRating where
2493+ CRMRMtrcbG -> "mtrcbG"
2494+ CRMRMtrcbPg -> "mtrcbPg"
2495+ CRMRMTRCBR13 -> "mtrcbR13"
2496+ CRMRMTRCBR16 -> "mtrcbR16"
2497+ CRMRMTRCBR18 -> "mtrcbR18"
2498+ CRMRMtrcbUnrated -> "mtrcbUnrated"
2499+ CRMRMtrcbX -> "mtrcbX"
1242-- | The video\'s rating from the Maldives National Bureau of Classification.
2501-- | The video\'s rating from the Maldives National Bureau of Classification.
1243data ContentRatingNbcRating
2502data ContentRatingNbcRating
1244 = CRNRNbc12plus
2503 = CRNRNbc12plus
@@ -1261,6 +2520,29 @@ data ContentRatingNbcRating
1262instance Hashable ContentRatingNbcRating
2521instance Hashable ContentRatingNbcRating
2523+instance FromText ContentRatingNbcRating where
2525+ "nbc12plus" -> Just CRNRNbc12plus
2526+ "nbc15plus" -> Just CRNRNbc15plus
2527+ "nbc18plus" -> Just CRNRNbc18plus
2528+ "nbc18plusr" -> Just CRNRNbc18plusr
2529+ "nbcG" -> Just CRNRNbcG
2530+ "nbcPg" -> Just CRNRNbcPg
2531+ "nbcPu" -> Just CRNRNbcPu
2532+ "nbcUnrated" -> Just CRNRNbcUnrated
2535+instance ToText ContentRatingNbcRating where
2537+ CRNRNbc12plus -> "nbc12plus"
2538+ CRNRNbc15plus -> "nbc15plus"
2539+ CRNRNbc18plus -> "nbc18plus"
2540+ CRNRNbc18plusr -> "nbc18plusr"
2542+ CRNRNbcPg -> "nbcPg"
2543+ CRNRNbcPu -> "nbcPu"
2544+ CRNRNbcUnrated -> "nbcUnrated"
1264-- | The video\'s rating in Poland.
2546-- | The video\'s rating in Poland.
1265data ContentRatingNbcplRating
2547data ContentRatingNbcplRating
1266 = CRNRNbcpl18plus
2548 = CRNRNbcpl18plus
@@ -1279,6 +2561,25 @@ data ContentRatingNbcplRating
1280instance Hashable ContentRatingNbcplRating
2562instance Hashable ContentRatingNbcplRating
2564+instance FromText ContentRatingNbcplRating where
2566+ "nbcpl18plus" -> Just CRNRNbcpl18plus
2567+ "nbcplI" -> Just CRNRNbcplI
2568+ "nbcplIi" -> Just CRNRNbcplIi
2569+ "nbcplIii" -> Just CRNRNbcplIii
2570+ "nbcplIv" -> Just CRNRNbcplIv
2571+ "nbcplUnrated" -> Just CRNRNbcplUnrated
2574+instance ToText ContentRatingNbcplRating where
2576+ CRNRNbcpl18plus -> "nbcpl18plus"
2577+ CRNRNbcplI -> "nbcplI"
2578+ CRNRNbcplIi -> "nbcplIi"
2579+ CRNRNbcplIii -> "nbcplIii"
2580+ CRNRNbcplIv -> "nbcplIv"
2581+ CRNRNbcplUnrated -> "nbcplUnrated"
1282-- | The video\'s rating from the Bulgarian National Film Center.
2583-- | The video\'s rating from the Bulgarian National Film Center.
1283data ContentRatingNfrcRating
2584data ContentRatingNfrcRating
1284 = CRNRNfrcA
2585 = CRNRNfrcA
@@ -1297,6 +2598,25 @@ data ContentRatingNfrcRating
1298instance Hashable ContentRatingNfrcRating
2599instance Hashable ContentRatingNfrcRating
2601+instance FromText ContentRatingNfrcRating where
2603+ "nfrcA" -> Just CRNRNfrcA
2604+ "nfrcB" -> Just CRNRNfrcB
2605+ "nfrcC" -> Just CRNRNfrcC
2606+ "nfrcD" -> Just CRNRNfrcD
2607+ "nfrcUnrated" -> Just CRNRNfrcUnrated
2608+ "nfrcX" -> Just CRNRNfrcX
2611+instance ToText ContentRatingNfrcRating where
2613+ CRNRNfrcA -> "nfrcA"
2614+ CRNRNfrcB -> "nfrcB"
2615+ CRNRNfrcC -> "nfrcC"
2616+ CRNRNfrcD -> "nfrcD"
2617+ CRNRNfrcUnrated -> "nfrcUnrated"
2618+ CRNRNfrcX -> "nfrcX"
1300-- | The video\'s rating from Nigeria\'s National Film and Video Censors
2620-- | The video\'s rating from Nigeria\'s National Film and Video Censors
1301-- Board.
2621-- Board.
1302data ContentRatingNfvcbRating
2622data ContentRatingNfvcbRating
@@ -1320,6 +2640,29 @@ data ContentRatingNfvcbRating
1321instance Hashable ContentRatingNfvcbRating
2641instance Hashable ContentRatingNfvcbRating
2643+instance FromText ContentRatingNfvcbRating where
2645+ "nfvcb12" -> Just CRNRNFVCB12
2646+ "nfvcb12a" -> Just CRNRNfvcb12a
2647+ "nfvcb15" -> Just CRNRNFVCB15
2648+ "nfvcb18" -> Just CRNRNFVCB18
2649+ "nfvcbG" -> Just CRNRNfvcbG
2650+ "nfvcbPg" -> Just CRNRNfvcbPg
2651+ "nfvcbRe" -> Just CRNRNfvcbRe
2652+ "nfvcbUnrated" -> Just CRNRNfvcbUnrated
2655+instance ToText ContentRatingNfvcbRating where
2657+ CRNRNFVCB12 -> "nfvcb12"
2658+ CRNRNfvcb12a -> "nfvcb12a"
2659+ CRNRNFVCB15 -> "nfvcb15"
2660+ CRNRNFVCB18 -> "nfvcb18"
2661+ CRNRNfvcbG -> "nfvcbG"
2662+ CRNRNfvcbPg -> "nfvcbPg"
2663+ CRNRNfvcbRe -> "nfvcbRe"
2664+ CRNRNfvcbUnrated -> "nfvcbUnrated"
1323-- | The video\'s rating from the Nacionãlais Kino centrs (National Film
2666-- | The video\'s rating from the Nacionãlais Kino centrs (National Film
1324-- Centre of Latvia).
2667-- Centre of Latvia).
1325data ContentRatingNkclvRating
2668data ContentRatingNkclvRating
@@ -1337,6 +2680,23 @@ data ContentRatingNkclvRating
1338instance Hashable ContentRatingNkclvRating
2681instance Hashable ContentRatingNkclvRating
2683+instance FromText ContentRatingNkclvRating where
2685+ "nkclv12plus" -> Just CRNRNkclv12plus
2686+ "nkclv18plus" -> Just CRNRNkclv18plus
2687+ "nkclv7plus" -> Just CRNRNkclv7plus
2688+ "nkclvU" -> Just CRNRNkclvU
2689+ "nkclvUnrated" -> Just CRNRNkclvUnrated
2692+instance ToText ContentRatingNkclvRating where
2694+ CRNRNkclv12plus -> "nkclv12plus"
2695+ CRNRNkclv18plus -> "nkclv18plus"
2696+ CRNRNkclv7plus -> "nkclv7plus"
2697+ CRNRNkclvU -> "nkclvU"
2698+ CRNRNkclvUnrated -> "nkclvUnrated"
1340-- | The video\'s Office of Film and Literature Classification (OFLC - New
2700-- | The video\'s Office of Film and Literature Classification (OFLC - New
1341-- Zealand) rating.
2701-- Zealand) rating.
1342data ContentRatingOflcRating
2702data ContentRatingOflcRating
@@ -1364,6 +2724,33 @@ data ContentRatingOflcRating
1365instance Hashable ContentRatingOflcRating
2725instance Hashable ContentRatingOflcRating
2727+instance FromText ContentRatingOflcRating where
2729+ "oflcG" -> Just CROROflcG
2730+ "oflcM" -> Just CROROflcM
2731+ "oflcPg" -> Just CROROflcPg
2732+ "oflcR13" -> Just CROROFLCR13
2733+ "oflcR15" -> Just CROROFLCR15
2734+ "oflcR16" -> Just CROROFLCR16
2735+ "oflcR18" -> Just CROROFLCR18
2736+ "oflcRp13" -> Just CROROFLCRP13
2737+ "oflcRp16" -> Just CROROFLCRP16
2738+ "oflcUnrated" -> Just CROROflcUnrated
2741+instance ToText ContentRatingOflcRating where
2743+ CROROflcG -> "oflcG"
2744+ CROROflcM -> "oflcM"
2745+ CROROflcPg -> "oflcPg"
2746+ CROROFLCR13 -> "oflcR13"
2747+ CROROFLCR15 -> "oflcR15"
2748+ CROROFLCR16 -> "oflcR16"
2749+ CROROFLCR18 -> "oflcR18"
2750+ CROROFLCRP13 -> "oflcRp13"
2751+ CROROFLCRP16 -> "oflcRp16"
2752+ CROROflcUnrated -> "oflcUnrated"
1367-- | The video\'s rating in Peru.
2754-- | The video\'s rating in Peru.
1368data ContentRatingPefilmRating
2755data ContentRatingPefilmRating
1369 = CRPRPEFILM14
2756 = CRPRPEFILM14
@@ -1380,6 +2767,23 @@ data ContentRatingPefilmRating
1381instance Hashable ContentRatingPefilmRating
2768instance Hashable ContentRatingPefilmRating
2770+instance FromText ContentRatingPefilmRating where
2772+ "pefilm14" -> Just CRPRPEFILM14
2773+ "pefilm18" -> Just CRPRPEFILM18
2774+ "pefilmPg" -> Just CRPRPefilmPg
2775+ "pefilmPt" -> Just CRPRPefilmPt
2776+ "pefilmUnrated" -> Just CRPRPefilmUnrated
2779+instance ToText ContentRatingPefilmRating where
2781+ CRPRPEFILM14 -> "pefilm14"
2782+ CRPRPEFILM18 -> "pefilm18"
2783+ CRPRPefilmPg -> "pefilmPg"
2784+ CRPRPefilmPt -> "pefilmPt"
2785+ CRPRPefilmUnrated -> "pefilmUnrated"
1383-- | The video\'s rating from the Hungarian Nemzeti Filmiroda, the Rating
2787-- | The video\'s rating from the Hungarian Nemzeti Filmiroda, the Rating
1384-- Committee of the National Office of Film.
2788-- Committee of the National Office of Film.
1385data ContentRatingRcnofRating
2789data ContentRatingRcnofRating
@@ -1401,6 +2805,27 @@ data ContentRatingRcnofRating
1402instance Hashable ContentRatingRcnofRating
2806instance Hashable ContentRatingRcnofRating
2808+instance FromText ContentRatingRcnofRating where
2810+ "rcnofI" -> Just CRRRRcnofI
2811+ "rcnofIi" -> Just CRRRRcnofIi
2812+ "rcnofIii" -> Just CRRRRcnofIii
2813+ "rcnofIv" -> Just CRRRRcnofIv
2814+ "rcnofUnrated" -> Just CRRRRcnofUnrated
2815+ "rcnofV" -> Just CRRRRcnofV
2816+ "rcnofVi" -> Just CRRRRcnofVi
2819+instance ToText ContentRatingRcnofRating where
2821+ CRRRRcnofI -> "rcnofI"
2822+ CRRRRcnofIi -> "rcnofIi"
2823+ CRRRRcnofIii -> "rcnofIii"
2824+ CRRRRcnofIv -> "rcnofIv"
2825+ CRRRRcnofUnrated -> "rcnofUnrated"
2826+ CRRRRcnofV -> "rcnofV"
2827+ CRRRRcnofVi -> "rcnofVi"
1404-- | The video\'s rating in Venezuela.
2829-- | The video\'s rating in Venezuela.
1405data ContentRatingResorteviolenciaRating
2830data ContentRatingResorteviolenciaRating
1406 = CRRRResorteviolenciaA
2831 = CRRRResorteviolenciaA
@@ -1419,6 +2844,25 @@ data ContentRatingResorteviolenciaRating
1420instance Hashable ContentRatingResorteviolenciaRating
2845instance Hashable ContentRatingResorteviolenciaRating
2847+instance FromText ContentRatingResorteviolenciaRating where
2849+ "resorteviolenciaA" -> Just CRRRResorteviolenciaA
2850+ "resorteviolenciaB" -> Just CRRRResorteviolenciaB
2851+ "resorteviolenciaC" -> Just CRRRResorteviolenciaC
2852+ "resorteviolenciaD" -> Just CRRRResorteviolenciaD
2853+ "resorteviolenciaE" -> Just CRRRResorteviolenciaE
2854+ "resorteviolenciaUnrated" -> Just CRRRResorteviolenciaUnrated
2857+instance ToText ContentRatingResorteviolenciaRating where
2859+ CRRRResorteviolenciaA -> "resorteviolenciaA"
2860+ CRRRResorteviolenciaB -> "resorteviolenciaB"
2861+ CRRRResorteviolenciaC -> "resorteviolenciaC"
2862+ CRRRResorteviolenciaD -> "resorteviolenciaD"
2863+ CRRRResorteviolenciaE -> "resorteviolenciaE"
2864+ CRRRResorteviolenciaUnrated -> "resorteviolenciaUnrated"
1422-- | The video\'s General Directorate of Radio, Television and Cinematography
2866-- | The video\'s General Directorate of Radio, Television and Cinematography
1423-- (Mexico) rating.
2867-- (Mexico) rating.
1424data ContentRatingRtcRating
2868data ContentRatingRtcRating
@@ -1440,6 +2884,27 @@ data ContentRatingRtcRating
1441instance Hashable ContentRatingRtcRating
2885instance Hashable ContentRatingRtcRating
2887+instance FromText ContentRatingRtcRating where
2889+ "rtcA" -> Just CRRRRtcA
2890+ "rtcAa" -> Just CRRRRtcAa
2891+ "rtcB" -> Just CRRRRtcB
2892+ "rtcB15" -> Just CRRRRTCB15
2893+ "rtcC" -> Just CRRRRtcC
2894+ "rtcD" -> Just CRRRRtcD
2895+ "rtcUnrated" -> Just CRRRRtcUnrated
2898+instance ToText ContentRatingRtcRating where
2901+ CRRRRtcAa -> "rtcAa"
2903+ CRRRRTCB15 -> "rtcB15"
2906+ CRRRRtcUnrated -> "rtcUnrated"
1443-- | The video\'s rating from Ireland\'s Raidió Teilifís Éireann.
2908-- | The video\'s rating from Ireland\'s Raidió Teilifís Éireann.
1444data ContentRatingRteRating
2909data ContentRatingRteRating
1445 = CRRRRteCh
2910 = CRRRRteCh
@@ -1456,6 +2921,23 @@ data ContentRatingRteRating
1457instance Hashable ContentRatingRteRating
2922instance Hashable ContentRatingRteRating
2924+instance FromText ContentRatingRteRating where
2926+ "rteCh" -> Just CRRRRteCh
2927+ "rteGa" -> Just CRRRRteGa
2928+ "rteMa" -> Just CRRRRteMa
2929+ "rtePs" -> Just CRRRRtePs
2930+ "rteUnrated" -> Just CRRRRteUnrated
2933+instance ToText ContentRatingRteRating where
2935+ CRRRRteCh -> "rteCh"
2936+ CRRRRteGa -> "rteGa"
2937+ CRRRRteMa -> "rteMa"
2938+ CRRRRtePs -> "rtePs"
2939+ CRRRRteUnrated -> "rteUnrated"
1459-- | The video\'s National Film Registry of the Russian Federation (MKRF -
2941-- | The video\'s National Film Registry of the Russian Federation (MKRF -
1460-- Russia) rating.
2942-- Russia) rating.
1461data ContentRatingRussiaRating
2943data ContentRatingRussiaRating
@@ -1475,6 +2957,25 @@ data ContentRatingRussiaRating
1476instance Hashable ContentRatingRussiaRating
2958instance Hashable ContentRatingRussiaRating
2960+instance FromText ContentRatingRussiaRating where
2962+ "russia0" -> Just CRRRRUSSIA0
2963+ "russia12" -> Just CRRRRUSSIA12
2964+ "russia16" -> Just CRRRRUSSIA16
2965+ "russia18" -> Just CRRRRUSSIA18
2966+ "russia6" -> Just CRRRRUSSIA6
2967+ "russiaUnrated" -> Just CRRRRussiaUnrated
2970+instance ToText ContentRatingRussiaRating where
2972+ CRRRRUSSIA0 -> "russia0"
2973+ CRRRRUSSIA12 -> "russia12"
2974+ CRRRRUSSIA16 -> "russia16"
2975+ CRRRRUSSIA18 -> "russia18"
2976+ CRRRRUSSIA6 -> "russia6"
2977+ CRRRRussiaUnrated -> "russiaUnrated"
1478-- | The video\'s rating in Slovakia.
2979-- | The video\'s rating in Slovakia.
1479data ContentRatingSkfilmRating
2980data ContentRatingSkfilmRating
1480 = CRSRSkfilmG
2981 = CRSRSkfilmG
@@ -1491,6 +2992,23 @@ data ContentRatingSkfilmRating
1492instance Hashable ContentRatingSkfilmRating
2993instance Hashable ContentRatingSkfilmRating
2995+instance FromText ContentRatingSkfilmRating where
2997+ "skfilmG" -> Just CRSRSkfilmG
2998+ "skfilmP2" -> Just CRSRSKFILMP2
2999+ "skfilmP5" -> Just CRSRSKFILMP5
3000+ "skfilmP8" -> Just CRSRSKFILMP8
3001+ "skfilmUnrated" -> Just CRSRSkfilmUnrated
3004+instance ToText ContentRatingSkfilmRating where
3006+ CRSRSkfilmG -> "skfilmG"
3007+ CRSRSKFILMP2 -> "skfilmP2"
3008+ CRSRSKFILMP5 -> "skfilmP5"
3009+ CRSRSKFILMP8 -> "skfilmP8"
3010+ CRSRSkfilmUnrated -> "skfilmUnrated"
1494-- | The video\'s rating in Iceland.
3012-- | The video\'s rating in Iceland.
1495data ContentRatingSmaisRating
3013data ContentRatingSmaisRating
1496 = CRSRSMAIS12
3014 = CRSRSMAIS12
@@ -1511,6 +3029,27 @@ data ContentRatingSmaisRating
1512instance Hashable ContentRatingSmaisRating
3030instance Hashable ContentRatingSmaisRating
3032+instance FromText ContentRatingSmaisRating where
3034+ "smais12" -> Just CRSRSMAIS12
3035+ "smais14" -> Just CRSRSMAIS14
3036+ "smais16" -> Just CRSRSMAIS16
3037+ "smais18" -> Just CRSRSMAIS18
3038+ "smais7" -> Just CRSRSMAIS7
3039+ "smaisL" -> Just CRSRSmaisL
3040+ "smaisUnrated" -> Just CRSRSmaisUnrated
3043+instance ToText ContentRatingSmaisRating where
3045+ CRSRSMAIS12 -> "smais12"
3046+ CRSRSMAIS14 -> "smais14"
3047+ CRSRSMAIS16 -> "smais16"
3048+ CRSRSMAIS18 -> "smais18"
3049+ CRSRSMAIS7 -> "smais7"
3050+ CRSRSmaisL -> "smaisL"
3051+ CRSRSmaisUnrated -> "smaisUnrated"
1514-- | The video\'s rating from Statens medieråd (Sweden\'s National Media
3053-- | The video\'s rating from Statens medieråd (Sweden\'s National Media
1515-- Council).
3054-- Council).
1516data ContentRatingSmsaRating
3055data ContentRatingSmsaRating
@@ -1528,6 +3067,23 @@ data ContentRatingSmsaRating
1529instance Hashable ContentRatingSmsaRating
3068instance Hashable ContentRatingSmsaRating
3070+instance FromText ContentRatingSmsaRating where
3072+ "smsa11" -> Just CRSRSMSA11
3073+ "smsa15" -> Just CRSRSMSA15
3074+ "smsa7" -> Just CRSRSMSA7
3075+ "smsaA" -> Just CRSRSmsaA
3076+ "smsaUnrated" -> Just CRSRSmsaUnrated
3079+instance ToText ContentRatingSmsaRating where
3081+ CRSRSMSA11 -> "smsa11"
3082+ CRSRSMSA15 -> "smsa15"
3083+ CRSRSMSA7 -> "smsa7"
3084+ CRSRSmsaA -> "smsaA"
3085+ CRSRSmsaUnrated -> "smsaUnrated"
1531-- | The video\'s TV Parental Guidelines (TVPG) rating.
3087-- | The video\'s TV Parental Guidelines (TVPG) rating.
1532data ContentRatingTvpgRating
3088data ContentRatingTvpgRating
1533 = CRTRPG14
3089 = CRTRPG14
@@ -1550,6 +3106,29 @@ data ContentRatingTvpgRating
1551instance Hashable ContentRatingTvpgRating
3107instance Hashable ContentRatingTvpgRating
3109+instance FromText ContentRatingTvpgRating where
3111+ "pg14" -> Just CRTRPG14
3112+ "tvpgG" -> Just CRTRTvpgG
3113+ "tvpgMa" -> Just CRTRTvpgMa
3114+ "tvpgPg" -> Just CRTRTvpgPg
3115+ "tvpgUnrated" -> Just CRTRTvpgUnrated
3116+ "tvpgY" -> Just CRTRTvpgY
3117+ "tvpgY7" -> Just CRTRTVPGY7
3118+ "tvpgY7Fv" -> Just CRTRTvpgY7Fv
3121+instance ToText ContentRatingTvpgRating where
3124+ CRTRTvpgG -> "tvpgG"
3125+ CRTRTvpgMa -> "tvpgMa"
3126+ CRTRTvpgPg -> "tvpgPg"
3127+ CRTRTvpgUnrated -> "tvpgUnrated"
3128+ CRTRTvpgY -> "tvpgY"
3129+ CRTRTVPGY7 -> "tvpgY7"
3130+ CRTRTvpgY7Fv -> "tvpgY7Fv"
1553-- | A rating that YouTube uses to identify age-restricted content.
3132-- | A rating that YouTube uses to identify age-restricted content.
1554data ContentRatingYtRating
3133data ContentRatingYtRating
1555 = CRYRYtAgeRestricted
3134 = CRYRYtAgeRestricted
@@ -1558,6 +3137,15 @@ data ContentRatingYtRating
1559instance Hashable ContentRatingYtRating
3138instance Hashable ContentRatingYtRating
3140+instance FromText ContentRatingYtRating where
3142+ "ytAgeRestricted" -> Just CRYRYtAgeRestricted
3145+instance ToText ContentRatingYtRating where
3147+ CRYRYtAgeRestricted -> "ytAgeRestricted"
1561-- | Describes in which corner of the video the visual widget will appear.
3149-- | Describes in which corner of the video the visual widget will appear.
1562data InvideoPositionCornerPosition
3150data InvideoPositionCornerPosition
1563 = IPCPBottomLeft
3151 = IPCPBottomLeft
@@ -1572,6 +3160,21 @@ data InvideoPositionCornerPosition
1573instance Hashable InvideoPositionCornerPosition
3161instance Hashable InvideoPositionCornerPosition
3163+instance FromText InvideoPositionCornerPosition where
3165+ "bottomLeft" -> Just IPCPBottomLeft
3166+ "bottomRight" -> Just IPCPBottomRight
3167+ "topLeft" -> Just IPCPTopLeft
3168+ "topRight" -> Just IPCPTopRight
3171+instance ToText InvideoPositionCornerPosition where
3173+ IPCPBottomLeft -> "bottomLeft"
3174+ IPCPBottomRight -> "bottomRight"
3175+ IPCPTopLeft -> "topLeft"
3176+ IPCPTopRight -> "topRight"
1575-- | Defines the position type.
3178-- | Defines the position type.
1576data InvideoPositionType
3179data InvideoPositionType
1577 = IPTCorner
3180 = IPTCorner
@@ -1580,6 +3183,15 @@ data InvideoPositionType
1581instance Hashable InvideoPositionType
3184instance Hashable InvideoPositionType
3186+instance FromText InvideoPositionType where
3188+ "corner" -> Just IPTCorner
3191+instance ToText InvideoPositionType where
3193+ IPTCorner -> "corner"
1583-- | Describes a timing type. If the value is offsetFromStart, then the
3195-- | Describes a timing type. If the value is offsetFromStart, then the
1584-- offsetMs field represents an offset from the start of the video. If the
3196-- offsetMs field represents an offset from the start of the video. If the
1585-- value is offsetFromEnd, then the offsetMs field represents an offset
3197-- value is offsetFromEnd, then the offsetMs field represents an offset
@@ -1593,6 +3205,17 @@ data InvideoTimingType
1594instance Hashable InvideoTimingType
3206instance Hashable InvideoTimingType
3208+instance FromText InvideoTimingType where
3210+ "offsetFromEnd" -> Just ITTOffsetFromEnd
3211+ "offsetFromStart" -> Just ITTOffsetFromStart
3214+instance ToText InvideoTimingType where
3216+ ITTOffsetFromEnd -> "offsetFromEnd"
3217+ ITTOffsetFromStart -> "offsetFromStart"
1596-- | The broadcast\'s status. The status can be updated using the API\'s
3219-- | The broadcast\'s status. The status can be updated using the API\'s
1597-- liveBroadcasts.transition method.
3220-- liveBroadcasts.transition method.
1598data LiveBroadcastStatusLifeCycleStatus
3221data LiveBroadcastStatusLifeCycleStatus
@@ -1622,6 +3245,35 @@ data LiveBroadcastStatusLifeCycleStatus
1623instance Hashable LiveBroadcastStatusLifeCycleStatus
3246instance Hashable LiveBroadcastStatusLifeCycleStatus
3248+instance FromText LiveBroadcastStatusLifeCycleStatus where
3250+ "abandoned" -> Just LBSLCSAbandoned
3251+ "complete" -> Just LBSLCSComplete
3252+ "completeStarting" -> Just LBSLCSCompleteStarting
3253+ "created" -> Just LBSLCSCreated
3254+ "live" -> Just LBSLCSLive
3255+ "liveStarting" -> Just LBSLCSLiveStarting
3256+ "ready" -> Just LBSLCSReady
3257+ "reclaimed" -> Just LBSLCSReclaimed
3258+ "revoked" -> Just LBSLCSRevoked
3259+ "testStarting" -> Just LBSLCSTestStarting
3260+ "testing" -> Just LBSLCSTesting
3263+instance ToText LiveBroadcastStatusLifeCycleStatus where
3265+ LBSLCSAbandoned -> "abandoned"
3266+ LBSLCSComplete -> "complete"
3267+ LBSLCSCompleteStarting -> "completeStarting"
3268+ LBSLCSCreated -> "created"
3269+ LBSLCSLive -> "live"
3270+ LBSLCSLiveStarting -> "liveStarting"
3271+ LBSLCSReady -> "ready"
3272+ LBSLCSReclaimed -> "reclaimed"
3273+ LBSLCSRevoked -> "revoked"
3274+ LBSLCSTestStarting -> "testStarting"
3275+ LBSLCSTesting -> "testing"
1625-- | Priority of the live broadcast event (internal state).
3277-- | Priority of the live broadcast event (internal state).
1626data LiveBroadcastStatusLiveBroadcastPriority
3278data LiveBroadcastStatusLiveBroadcastPriority
1627 = LBSLBPHigh
3279 = LBSLBPHigh
@@ -1634,6 +3286,19 @@ data LiveBroadcastStatusLiveBroadcastPriority
1635instance Hashable LiveBroadcastStatusLiveBroadcastPriority
3287instance Hashable LiveBroadcastStatusLiveBroadcastPriority
3289+instance FromText LiveBroadcastStatusLiveBroadcastPriority where
3291+ "high" -> Just LBSLBPHigh
3292+ "low" -> Just LBSLBPLow
3293+ "normal" -> Just LBSLBPNormal
3296+instance ToText LiveBroadcastStatusLiveBroadcastPriority where
3298+ LBSLBPHigh -> "high"
3300+ LBSLBPNormal -> "normal"
1637-- | The broadcast\'s privacy status. Note that the broadcast represents
3302-- | The broadcast\'s privacy status. Note that the broadcast represents
1638-- exactly one YouTube video, so the privacy settings are identical to
3303-- exactly one YouTube video, so the privacy settings are identical to
1639-- those supported for videos. In addition, you can set this field by
3304-- those supported for videos. In addition, you can set this field by
@@ -1650,6 +3315,19 @@ data LiveBroadcastStatusPrivacyStatus
1651instance Hashable LiveBroadcastStatusPrivacyStatus
3316instance Hashable LiveBroadcastStatusPrivacyStatus
3318+instance FromText LiveBroadcastStatusPrivacyStatus where
3320+ "private" -> Just LBSPSPrivate
3321+ "public" -> Just LBSPSPublic
3322+ "unlisted" -> Just LBSPSUnlisted
3325+instance ToText LiveBroadcastStatusPrivacyStatus where
3327+ LBSPSPrivate -> "private"
3328+ LBSPSPublic -> "public"
3329+ LBSPSUnlisted -> "unlisted"
1653-- | The broadcast\'s recording status.
3331-- | The broadcast\'s recording status.
1654data LiveBroadcastStatusRecordingStatus
3332data LiveBroadcastStatusRecordingStatus
1655 = LBSRSNotRecording
3333 = LBSRSNotRecording
@@ -1662,6 +3340,19 @@ data LiveBroadcastStatusRecordingStatus
1663instance Hashable LiveBroadcastStatusRecordingStatus
3341instance Hashable LiveBroadcastStatusRecordingStatus
3343+instance FromText LiveBroadcastStatusRecordingStatus where
3345+ "notRecording" -> Just LBSRSNotRecording
3346+ "recorded" -> Just LBSRSRecorded
3347+ "recording" -> Just LBSRSRecording
3350+instance ToText LiveBroadcastStatusRecordingStatus where
3352+ LBSRSNotRecording -> "notRecording"
3353+ LBSRSRecorded -> "recorded"
3354+ LBSRSRecording -> "recording"
1665-- | The type of the topic.
3356-- | The type of the topic.
1666data LiveBroadcastTopicType
3357data LiveBroadcastTopicType
1667 = LBTTVideoGame
3358 = LBTTVideoGame
@@ -1670,6 +3361,15 @@ data LiveBroadcastTopicType
1671instance Hashable LiveBroadcastTopicType
3362instance Hashable LiveBroadcastTopicType
3364+instance FromText LiveBroadcastTopicType where
3366+ "videoGame" -> Just LBTTVideoGame
3369+instance ToText LiveBroadcastTopicType where
3371+ LBTTVideoGame -> "videoGame"
1673-- | How severe this issue is to the stream.
3373-- | How severe this issue is to the stream.
1674data LiveStreamConfigurationIssueSeverity
3374data LiveStreamConfigurationIssueSeverity
1675 = LSCISError
3375 = LSCISError
@@ -1682,6 +3382,19 @@ data LiveStreamConfigurationIssueSeverity
1683instance Hashable LiveStreamConfigurationIssueSeverity
3383instance Hashable LiveStreamConfigurationIssueSeverity
3385+instance FromText LiveStreamConfigurationIssueSeverity where
3387+ "error" -> Just LSCISError
3388+ "info" -> Just LSCISInfo
3389+ "warning" -> Just LSCISWarning
3392+instance ToText LiveStreamConfigurationIssueSeverity where
3394+ LSCISError -> "error"
3395+ LSCISInfo -> "info"
3396+ LSCISWarning -> "warning"
1685-- | The kind of error happening.
3398-- | The kind of error happening.
1686data LiveStreamConfigurationIssueType
3399data LiveStreamConfigurationIssueType
1687 = LSCITAudioBitrateHigh
3400 = LSCITAudioBitrateHigh
@@ -1754,6 +3467,79 @@ data LiveStreamConfigurationIssueType
1755instance Hashable LiveStreamConfigurationIssueType
3468instance Hashable LiveStreamConfigurationIssueType
3470+instance FromText LiveStreamConfigurationIssueType where
3472+ "audioBitrateHigh" -> Just LSCITAudioBitrateHigh
3473+ "audioBitrateLow" -> Just LSCITAudioBitrateLow
3474+ "audioBitrateMismatch" -> Just LSCITAudioBitrateMismatch
3475+ "audioCodec" -> Just LSCITAudioCodec
3476+ "audioCodecMismatch" -> Just LSCITAudioCodecMismatch
3477+ "audioSampleRate" -> Just LSCITAudioSampleRate
3478+ "audioSampleRateMismatch" -> Just LSCITAudioSampleRateMismatch
3479+ "audioStereoMismatch" -> Just LSCITAudioStereoMismatch
3480+ "audioTooManyChannels" -> Just LSCITAudioTooManyChannels
3481+ "badContainer" -> Just LSCITBadContainer
3482+ "bitrateHigh" -> Just LSCITBitrateHigh
3483+ "bitrateLow" -> Just LSCITBitrateLow
3484+ "frameRateHigh" -> Just LSCITFrameRateHigh
3485+ "framerateMismatch" -> Just LSCITFramerateMismatch
3486+ "gopMismatch" -> Just LSCITGopMismatch
3487+ "gopSizeLong" -> Just LSCITGopSizeLong
3488+ "gopSizeOver" -> Just LSCITGopSizeOver
3489+ "gopSizeShort" -> Just LSCITGopSizeShort
3490+ "interlacedVideo" -> Just LSCITInterlacedVideo
3491+ "multipleAudioStreams" -> Just LSCITMultipleAudioStreams
3492+ "multipleVideoStreams" -> Just LSCITMultipleVideoStreams
3493+ "noAudioStream" -> Just LSCITNoAudioStream
3494+ "noVideoStream" -> Just LSCITNoVideoStream
3495+ "openGop" -> Just LSCITOpenGop
3496+ "resolutionMismatch" -> Just LSCITResolutionMismatch
3497+ "videoBitrateMismatch" -> Just LSCITVideoBitrateMismatch
3498+ "videoCodec" -> Just LSCITVideoCodec
3499+ "videoCodecMismatch" -> Just LSCITVideoCodecMismatch
3500+ "videoIngestionStarved" -> Just LSCITVideoIngestionStarved
3501+ "videoInterlaceMismatch" -> Just LSCITVideoInterlaceMismatch
3502+ "videoProfileMismatch" -> Just LSCITVideoProfileMismatch
3503+ "videoResolutionSuboptimal" -> Just LSCITVideoResolutionSuboptimal
3504+ "videoResolutionUnsupported" -> Just LSCITVideoResolutionUnsupported
3507+instance ToText LiveStreamConfigurationIssueType where
3509+ LSCITAudioBitrateHigh -> "audioBitrateHigh"
3510+ LSCITAudioBitrateLow -> "audioBitrateLow"
3511+ LSCITAudioBitrateMismatch -> "audioBitrateMismatch"
3512+ LSCITAudioCodec -> "audioCodec"
3513+ LSCITAudioCodecMismatch -> "audioCodecMismatch"
3514+ LSCITAudioSampleRate -> "audioSampleRate"
3515+ LSCITAudioSampleRateMismatch -> "audioSampleRateMismatch"
3516+ LSCITAudioStereoMismatch -> "audioStereoMismatch"
3517+ LSCITAudioTooManyChannels -> "audioTooManyChannels"
3518+ LSCITBadContainer -> "badContainer"
3519+ LSCITBitrateHigh -> "bitrateHigh"
3520+ LSCITBitrateLow -> "bitrateLow"
3521+ LSCITFrameRateHigh -> "frameRateHigh"
3522+ LSCITFramerateMismatch -> "framerateMismatch"
3523+ LSCITGopMismatch -> "gopMismatch"
3524+ LSCITGopSizeLong -> "gopSizeLong"
3525+ LSCITGopSizeOver -> "gopSizeOver"
3526+ LSCITGopSizeShort -> "gopSizeShort"
3527+ LSCITInterlacedVideo -> "interlacedVideo"
3528+ LSCITMultipleAudioStreams -> "multipleAudioStreams"
3529+ LSCITMultipleVideoStreams -> "multipleVideoStreams"
3530+ LSCITNoAudioStream -> "noAudioStream"
3531+ LSCITNoVideoStream -> "noVideoStream"
3532+ LSCITOpenGop -> "openGop"
3533+ LSCITResolutionMismatch -> "resolutionMismatch"
3534+ LSCITVideoBitrateMismatch -> "videoBitrateMismatch"
3535+ LSCITVideoCodec -> "videoCodec"
3536+ LSCITVideoCodecMismatch -> "videoCodecMismatch"
3537+ LSCITVideoIngestionStarved -> "videoIngestionStarved"
3538+ LSCITVideoInterlaceMismatch -> "videoInterlaceMismatch"
3539+ LSCITVideoProfileMismatch -> "videoProfileMismatch"
3540+ LSCITVideoResolutionSuboptimal -> "videoResolutionSuboptimal"
3541+ LSCITVideoResolutionUnsupported -> "videoResolutionUnsupported"
1757-- | The status code of this stream
3543-- | The status code of this stream
1758data LiveStreamHealthStatusStatus
3544data LiveStreamHealthStatusStatus
1759 = LSHSSBad
3545 = LSHSSBad
@@ -1770,6 +3556,23 @@ data LiveStreamHealthStatusStatus
1771instance Hashable LiveStreamHealthStatusStatus
3557instance Hashable LiveStreamHealthStatusStatus
3559+instance FromText LiveStreamHealthStatusStatus where
3561+ "bad" -> Just LSHSSBad
3562+ "good" -> Just LSHSSGood
3563+ "noData" -> Just LSHSSNoData
3564+ "ok" -> Just LSHSSOK
3565+ "revoked" -> Just LSHSSRevoked
3568+instance ToText LiveStreamHealthStatusStatus where
3571+ LSHSSGood -> "good"
3572+ LSHSSNoData -> "noData"
3574+ LSHSSRevoked -> "revoked"
1773data LiveStreamStatusStreamStatus
3576data LiveStreamStatusStreamStatus
1774 = LSSSSActive
3577 = LSSSSActive
1775 -- ^ @active@
3578 -- ^ @active@
@@ -1785,6 +3588,23 @@ data LiveStreamStatusStreamStatus
1786instance Hashable LiveStreamStatusStreamStatus
3589instance Hashable LiveStreamStatusStreamStatus
3591+instance FromText LiveStreamStatusStreamStatus where
3593+ "active" -> Just LSSSSActive
3594+ "created" -> Just LSSSSCreated
3595+ "error" -> Just LSSSSError
3596+ "inactive" -> Just LSSSSInactive
3597+ "ready" -> Just LSSSSReady
3600+instance ToText LiveStreamStatusStreamStatus where
3602+ LSSSSActive -> "active"
3603+ LSSSSCreated -> "created"
3604+ LSSSSError -> "error"
3605+ LSSSSInactive -> "inactive"
3606+ LSSSSReady -> "ready"
1788-- | This resource\'s privacy status.
3608-- | This resource\'s privacy status.
1789data PlaylistItemStatusPrivacyStatus
3609data PlaylistItemStatusPrivacyStatus
1790 = PISPSPrivate
3610 = PISPSPrivate
@@ -1797,6 +3617,19 @@ data PlaylistItemStatusPrivacyStatus
1798instance Hashable PlaylistItemStatusPrivacyStatus
3618instance Hashable PlaylistItemStatusPrivacyStatus
3620+instance FromText PlaylistItemStatusPrivacyStatus where
3622+ "private" -> Just PISPSPrivate
3623+ "public" -> Just PISPSPublic
3624+ "unlisted" -> Just PISPSUnlisted
3627+instance ToText PlaylistItemStatusPrivacyStatus where
3629+ PISPSPrivate -> "private"
3630+ PISPSPublic -> "public"
3631+ PISPSUnlisted -> "unlisted"
1800-- | The playlist\'s privacy status.
3633-- | The playlist\'s privacy status.
1801data PlaylistStatusPrivacyStatus
3634data PlaylistStatusPrivacyStatus
1802 = PSPSPrivate
3635 = PSPSPrivate
@@ -1809,6 +3642,19 @@ data PlaylistStatusPrivacyStatus
1810instance Hashable PlaylistStatusPrivacyStatus
3643instance Hashable PlaylistStatusPrivacyStatus
3645+instance FromText PlaylistStatusPrivacyStatus where
3647+ "private" -> Just PSPSPrivate
3648+ "public" -> Just PSPSPublic
3649+ "unlisted" -> Just PSPSUnlisted
3652+instance ToText PlaylistStatusPrivacyStatus where
3654+ PSPSPrivate -> "private"
3655+ PSPSPublic -> "public"
3656+ PSPSUnlisted -> "unlisted"
1812-- | Describes the type of the promoted item.
3658-- | Describes the type of the promoted item.
1813data PromotedItemIdType
3659data PromotedItemIdType
1814 = PIITRecentUpload
3660 = PIITRecentUpload
@@ -1821,6 +3667,19 @@ data PromotedItemIdType
1822instance Hashable PromotedItemIdType
3668instance Hashable PromotedItemIdType
3670+instance FromText PromotedItemIdType where
3672+ "recentUpload" -> Just PIITRecentUpload
3673+ "video" -> Just PIITVideo
3674+ "website" -> Just PIITWebsite
3677+instance ToText PromotedItemIdType where
3679+ PIITRecentUpload -> "recentUpload"
3680+ PIITVideo -> "video"
3681+ PIITWebsite -> "website"
1824-- | It indicates if the resource (video or channel) has upcoming\/active
3683-- | It indicates if the resource (video or channel) has upcoming\/active
1825-- live broadcast content. Or it\'s \"none\" if there is not any
3684-- live broadcast content. Or it\'s \"none\" if there is not any
1826-- upcoming\/active live broadcasts.
3685-- upcoming\/active live broadcasts.
@@ -1835,6 +3694,19 @@ data SearchResultSnippetLiveBroadcastContent
1836instance Hashable SearchResultSnippetLiveBroadcastContent
3695instance Hashable SearchResultSnippetLiveBroadcastContent
3697+instance FromText SearchResultSnippetLiveBroadcastContent where
3699+ "live" -> Just SRSLBCLive
3700+ "none" -> Just SRSLBCNone
3701+ "upcoming" -> Just SRSLBCUpcoming
3704+instance ToText SearchResultSnippetLiveBroadcastContent where
3706+ SRSLBCLive -> "live"
3707+ SRSLBCNone -> "none"
3708+ SRSLBCUpcoming -> "upcoming"
1838-- | The type of activity this subscription is for (only uploads,
3710-- | The type of activity this subscription is for (only uploads,
1839-- everything).
3711-- everything).
1840data SubscriptionContentDetailsActivityType
3712data SubscriptionContentDetailsActivityType
@@ -1846,6 +3718,17 @@ data SubscriptionContentDetailsActivityType
1847instance Hashable SubscriptionContentDetailsActivityType
3719instance Hashable SubscriptionContentDetailsActivityType
3721+instance FromText SubscriptionContentDetailsActivityType where
3723+ "all" -> Just SCDATAll
3724+ "uploads" -> Just SCDATUploads
3727+instance ToText SubscriptionContentDetailsActivityType where
3730+ SCDATUploads -> "uploads"
1849-- | Video game rating, if any.
3732-- | Video game rating, if any.
1850data VideoAgeGatingVideoGameRating
3733data VideoAgeGatingVideoGameRating
1851 = VAGVGRAnyone
3734 = VAGVGRAnyone
@@ -1860,6 +3743,21 @@ data VideoAgeGatingVideoGameRating
1861instance Hashable VideoAgeGatingVideoGameRating
3744instance Hashable VideoAgeGatingVideoGameRating
3746+instance FromText VideoAgeGatingVideoGameRating where
3748+ "anyone" -> Just VAGVGRAnyone
3749+ "m15Plus" -> Just VAGVGRM15Plus
3750+ "m16Plus" -> Just VAGVGRM16Plus
3751+ "m17Plus" -> Just VAGVGRM17Plus
3754+instance ToText VideoAgeGatingVideoGameRating where
3756+ VAGVGRAnyone -> "anyone"
3757+ VAGVGRM15Plus -> "m15Plus"
3758+ VAGVGRM16Plus -> "m16Plus"
3759+ VAGVGRM17Plus -> "m17Plus"
1863-- | The value of captions indicates whether the video has captions or not.
3761-- | The value of captions indicates whether the video has captions or not.
1864data VideoContentDetailsCaption
3762data VideoContentDetailsCaption
1865 = VCDCFalse
3763 = VCDCFalse
@@ -1870,6 +3768,17 @@ data VideoContentDetailsCaption
1871instance Hashable VideoContentDetailsCaption
3769instance Hashable VideoContentDetailsCaption
3771+instance FromText VideoContentDetailsCaption where
3773+ "false" -> Just VCDCFalse
3774+ "true" -> Just VCDCTrue
3777+instance ToText VideoContentDetailsCaption where
3779+ VCDCFalse -> "false"
1873-- | The value of definition indicates whether the video is available in high
3782-- | The value of definition indicates whether the video is available in high
1874-- definition or only in standard definition.
3783-- definition or only in standard definition.
1875data VideoContentDetailsDefinition
3784data VideoContentDetailsDefinition
@@ -1881,6 +3790,17 @@ data VideoContentDetailsDefinition
1882instance Hashable VideoContentDetailsDefinition
3791instance Hashable VideoContentDetailsDefinition
3793+instance FromText VideoContentDetailsDefinition where
3795+ "hd" -> Just VCDDHD
3796+ "sd" -> Just VCDDSD
3799+instance ToText VideoContentDetailsDefinition where
1884-- | Defines the context of the ping.
3804-- | Defines the context of the ping.
1885data VideoConversionPingContext
3805data VideoConversionPingContext
1886 = VCPCComment
3806 = VCPCComment
@@ -1895,6 +3815,21 @@ data VideoConversionPingContext
1896instance Hashable VideoConversionPingContext
3816instance Hashable VideoConversionPingContext
3818+instance FromText VideoConversionPingContext where
3820+ "comment" -> Just VCPCComment
3821+ "dislike" -> Just VCPCDislike
3822+ "like" -> Just VCPCLike
3823+ "share" -> Just VCPCShare
3826+instance ToText VideoConversionPingContext where
3828+ VCPCComment -> "comment"
3829+ VCPCDislike -> "dislike"
3831+ VCPCShare -> "share"
1898-- | The uploaded file\'s type as detected by YouTube\'s video processing
3833-- | The uploaded file\'s type as detected by YouTube\'s video processing
1899-- engine. Currently, YouTube only processes video files, but this field is
3834-- engine. Currently, YouTube only processes video files, but this field is
1900-- present whether a video file or another type of file was uploaded.
3835-- present whether a video file or another type of file was uploaded.
@@ -1917,6 +3852,27 @@ data VideoFileDetailsFileType
1918instance Hashable VideoFileDetailsFileType
3853instance Hashable VideoFileDetailsFileType
3855+instance FromText VideoFileDetailsFileType where
3857+ "archive" -> Just VFDFTArchive
3858+ "audio" -> Just VFDFTAudio
3859+ "document" -> Just VFDFTDocument
3860+ "image" -> Just VFDFTImage
3861+ "other" -> Just VFDFTOther
3862+ "project" -> Just VFDFTProject
3863+ "video" -> Just VFDFTVideo
3866+instance ToText VideoFileDetailsFileType where
3868+ VFDFTArchive -> "archive"
3869+ VFDFTAudio -> "audio"
3870+ VFDFTDocument -> "document"
3871+ VFDFTImage -> "image"
3872+ VFDFTOther -> "other"
3873+ VFDFTProject -> "project"
3874+ VFDFTVideo -> "video"
1920-- | The amount that YouTube needs to rotate the original source content to
3876-- | The amount that YouTube needs to rotate the original source content to
1921-- properly display the video.
3877-- properly display the video.
1922data VideoFileDetailsVideoStreamRotation
3878data VideoFileDetailsVideoStreamRotation
@@ -1934,6 +3890,23 @@ data VideoFileDetailsVideoStreamRotation
1935instance Hashable VideoFileDetailsVideoStreamRotation
3891instance Hashable VideoFileDetailsVideoStreamRotation
3893+instance FromText VideoFileDetailsVideoStreamRotation where
3895+ "clockwise" -> Just VFDVSRClockwise
3896+ "counterClockwise" -> Just VFDVSRCounterClockwise
3897+ "none" -> Just VFDVSRNone
3898+ "other" -> Just VFDVSROther
3899+ "upsideDown" -> Just VFDVSRUpsideDown
3902+instance ToText VideoFileDetailsVideoStreamRotation where
3904+ VFDVSRClockwise -> "clockwise"
3905+ VFDVSRCounterClockwise -> "counterClockwise"
3906+ VFDVSRNone -> "none"
3907+ VFDVSROther -> "other"
3908+ VFDVSRUpsideDown -> "upsideDown"
1937-- | The reason that YouTube failed to process the video. This property will
3910-- | The reason that YouTube failed to process the video. This property will
1938-- only have a value if the processingStatus property\'s value is failed.
3911-- only have a value if the processingStatus property\'s value is failed.
1939data VideoProcessingDetailsProcessingFailureReason
3912data VideoProcessingDetailsProcessingFailureReason
@@ -1949,6 +3922,21 @@ data VideoProcessingDetailsProcessingFailureReason
1950instance Hashable VideoProcessingDetailsProcessingFailureReason
3923instance Hashable VideoProcessingDetailsProcessingFailureReason
3925+instance FromText VideoProcessingDetailsProcessingFailureReason where
3927+ "other" -> Just VPDPFROther
3928+ "streamingFailed" -> Just VPDPFRStreamingFailed
3929+ "transcodeFailed" -> Just VPDPFRTranscodeFailed
3930+ "uploadFailed" -> Just VPDPFRUploadFailed
3933+instance ToText VideoProcessingDetailsProcessingFailureReason where
3935+ VPDPFROther -> "other"
3936+ VPDPFRStreamingFailed -> "streamingFailed"
3937+ VPDPFRTranscodeFailed -> "transcodeFailed"
3938+ VPDPFRUploadFailed -> "uploadFailed"
1952-- | The video\'s processing status. This value indicates whether YouTube was
3940-- | The video\'s processing status. This value indicates whether YouTube was
1953-- able to process the video or if the video is still being processed.
3941-- able to process the video or if the video is still being processed.
1954data VideoProcessingDetailsProcessingStatus
3942data VideoProcessingDetailsProcessingStatus
@@ -1964,6 +3952,21 @@ data VideoProcessingDetailsProcessingStatus
1965instance Hashable VideoProcessingDetailsProcessingStatus
3953instance Hashable VideoProcessingDetailsProcessingStatus
3955+instance FromText VideoProcessingDetailsProcessingStatus where
3957+ "failed" -> Just VPDPSFailed
3958+ "processing" -> Just VPDPSProcessing
3959+ "succeeded" -> Just VPDPSSucceeded
3960+ "terminated" -> Just VPDPSTerminated
3963+instance ToText VideoProcessingDetailsProcessingStatus where
3965+ VPDPSFailed -> "failed"
3966+ VPDPSProcessing -> "processing"
3967+ VPDPSSucceeded -> "succeeded"
3968+ VPDPSTerminated -> "terminated"
1967data VideoRatingRating
3970data VideoRatingRating
1968 = VRRDislike
3971 = VRRDislike
1969 -- ^ @dislike@
3972 -- ^ @dislike@
@@ -1977,6 +3980,21 @@ data VideoRatingRating
1978instance Hashable VideoRatingRating
3981instance Hashable VideoRatingRating
3983+instance FromText VideoRatingRating where
3985+ "dislike" -> Just VRRDislike
3986+ "like" -> Just VRRLike
3987+ "none" -> Just VRRNone
3988+ "unspecified" -> Just VRRUnspecified
3991+instance ToText VideoRatingRating where
3993+ VRRDislike -> "dislike"
3996+ VRRUnspecified -> "unspecified"
1980-- | Indicates if the video is an upcoming\/active live broadcast. Or it\'s
3998-- | Indicates if the video is an upcoming\/active live broadcast. Or it\'s
1981-- \"none\" if the video is not an upcoming\/active live broadcast.
3999-- \"none\" if the video is not an upcoming\/active live broadcast.
1982data VideoSnippetLiveBroadcastContent
4000data VideoSnippetLiveBroadcastContent
@@ -1990,6 +4008,19 @@ data VideoSnippetLiveBroadcastContent
1991instance Hashable VideoSnippetLiveBroadcastContent
4009instance Hashable VideoSnippetLiveBroadcastContent
4011+instance FromText VideoSnippetLiveBroadcastContent where
4013+ "live" -> Just VSLBCLive
4014+ "none" -> Just VSLBCNone
4015+ "upcoming" -> Just VSLBCUpcoming
4018+instance ToText VideoSnippetLiveBroadcastContent where
4020+ VSLBCLive -> "live"
4021+ VSLBCNone -> "none"
4022+ VSLBCUpcoming -> "upcoming"
1993-- | This value explains why a video failed to upload. This property is only
4024-- | This value explains why a video failed to upload. This property is only
1994-- present if the uploadStatus property indicates that the upload failed.
4025-- present if the uploadStatus property indicates that the upload failed.
1995data VideoStatusFailureReason
4026data VideoStatusFailureReason
@@ -2009,6 +4040,25 @@ data VideoStatusFailureReason
2010instance Hashable VideoStatusFailureReason
4041instance Hashable VideoStatusFailureReason
4043+instance FromText VideoStatusFailureReason where
4045+ "codec" -> Just VSFRCodec
4046+ "conversion" -> Just VSFRConversion
4047+ "emptyFile" -> Just VSFREmptyFile
4048+ "invalidFile" -> Just VSFRInvalidFile
4049+ "tooSmall" -> Just VSFRTooSmall
4050+ "uploadAborted" -> Just VSFRUploadAborted
4053+instance ToText VideoStatusFailureReason where
4055+ VSFRCodec -> "codec"
4056+ VSFRConversion -> "conversion"
4057+ VSFREmptyFile -> "emptyFile"
4058+ VSFRInvalidFile -> "invalidFile"
4059+ VSFRTooSmall -> "tooSmall"
4060+ VSFRUploadAborted -> "uploadAborted"
2012-- | The video\'s license.
4062-- | The video\'s license.
2013data VideoStatusLicense
4063data VideoStatusLicense
2014 = VSLCreativeCommon
4064 = VSLCreativeCommon
@@ -2019,6 +4069,17 @@ data VideoStatusLicense
2020instance Hashable VideoStatusLicense
4070instance Hashable VideoStatusLicense
4072+instance FromText VideoStatusLicense where
4074+ "creativeCommon" -> Just VSLCreativeCommon
4075+ "youtube" -> Just VSLYoutube
4078+instance ToText VideoStatusLicense where
4080+ VSLCreativeCommon -> "creativeCommon"
4081+ VSLYoutube -> "youtube"
2022-- | The video\'s privacy status.
4083-- | The video\'s privacy status.
2023data VideoStatusPrivacyStatus
4084data VideoStatusPrivacyStatus
2024 = VSPSPrivate
4085 = VSPSPrivate
@@ -2031,6 +4092,19 @@ data VideoStatusPrivacyStatus
2032instance Hashable VideoStatusPrivacyStatus
4093instance Hashable VideoStatusPrivacyStatus
4095+instance FromText VideoStatusPrivacyStatus where
4097+ "private" -> Just VSPSPrivate
4098+ "public" -> Just VSPSPublic
4099+ "unlisted" -> Just VSPSUnlisted
4102+instance ToText VideoStatusPrivacyStatus where
4104+ VSPSPrivate -> "private"
4105+ VSPSPublic -> "public"
4106+ VSPSUnlisted -> "unlisted"
2034-- | This value explains why YouTube rejected an uploaded video. This
4108-- | This value explains why YouTube rejected an uploaded video. This
2035-- property is only present if the uploadStatus property indicates that the
4109-- property is only present if the uploadStatus property indicates that the
2036-- upload was rejected.
4110-- upload was rejected.
@@ -2057,6 +4131,31 @@ data VideoStatusRejectionReason
2058instance Hashable VideoStatusRejectionReason
4132instance Hashable VideoStatusRejectionReason
4134+instance FromText VideoStatusRejectionReason where
4136+ "claim" -> Just VSRRClaim
4137+ "copyright" -> Just VSRRCopyright
4138+ "duplicate" -> Just VSRRDuplicate
4139+ "inappropriate" -> Just VSRRInappropriate
4140+ "length" -> Just VSRRLength
4141+ "termsOfUse" -> Just VSRRTermsOfUse
4142+ "trademark" -> Just VSRRTrademark
4143+ "uploaderAccountClosed" -> Just VSRRUploaderAccountClosed
4144+ "uploaderAccountSuspended" -> Just VSRRUploaderAccountSuspended
4147+instance ToText VideoStatusRejectionReason where
4149+ VSRRClaim -> "claim"
4150+ VSRRCopyright -> "copyright"
4151+ VSRRDuplicate -> "duplicate"
4152+ VSRRInappropriate -> "inappropriate"
4153+ VSRRLength -> "length"
4154+ VSRRTermsOfUse -> "termsOfUse"
4155+ VSRRTrademark -> "trademark"
4156+ VSRRUploaderAccountClosed -> "uploaderAccountClosed"
4157+ VSRRUploaderAccountSuspended -> "uploaderAccountSuspended"
2060-- | The status of the uploaded video.
4159-- | The status of the uploaded video.
2061data VideoStatusUploadStatus
4160data VideoStatusUploadStatus
2062 = VSUSDeleted
4161 = VSUSDeleted
@@ -2073,6 +4172,23 @@ data VideoStatusUploadStatus
2074instance Hashable VideoStatusUploadStatus
4173instance Hashable VideoStatusUploadStatus
4175+instance FromText VideoStatusUploadStatus where
4177+ "deleted" -> Just VSUSDeleted
4178+ "failed" -> Just VSUSFailed
4179+ "processed" -> Just VSUSProcessed
4180+ "rejected" -> Just VSUSRejected
4181+ "uploaded" -> Just VSUSUploaded
4184+instance ToText VideoStatusUploadStatus where
4186+ VSUSDeleted -> "deleted"
4187+ VSUSFailed -> "failed"
4188+ VSUSProcessed -> "processed"
4189+ VSUSRejected -> "rejected"
4190+ VSUSUploaded -> "uploaded"
2076data VideoSuggestionsItemEditorSuggestions
4192data VideoSuggestionsItemEditorSuggestions
2077 = VSIESAudioQuietAudioSwap
4193 = VSIESAudioQuietAudioSwap
2078 -- ^ @audioQuietAudioSwap@
4194 -- ^ @audioQuietAudioSwap@
@@ -2086,6 +4202,21 @@ data VideoSuggestionsItemEditorSuggestions
2087instance Hashable VideoSuggestionsItemEditorSuggestions
4203instance Hashable VideoSuggestionsItemEditorSuggestions
4205+instance FromText VideoSuggestionsItemEditorSuggestions where
4207+ "audioQuietAudioSwap" -> Just VSIESAudioQuietAudioSwap
4208+ "videoAutoLevels" -> Just VSIESVideoAutoLevels
4209+ "videoCrop" -> Just VSIESVideoCrop
4210+ "videoStabilize" -> Just VSIESVideoStabilize
4213+instance ToText VideoSuggestionsItemEditorSuggestions where
4215+ VSIESAudioQuietAudioSwap -> "audioQuietAudioSwap"
4216+ VSIESVideoAutoLevels -> "videoAutoLevels"
4217+ VSIESVideoCrop -> "videoCrop"
4218+ VSIESVideoStabilize -> "videoStabilize"
2089data VideoSuggestionsItemProcessingErrors
4220data VideoSuggestionsItemProcessingErrors
2090 = VSIPEArchiveFile
4221 = VSIPEArchiveFile
2091 -- ^ @archiveFile@
4222 -- ^ @archiveFile@
@@ -2103,6 +4234,25 @@ data VideoSuggestionsItemProcessingErrors
2104instance Hashable VideoSuggestionsItemProcessingErrors
4235instance Hashable VideoSuggestionsItemProcessingErrors
4237+instance FromText VideoSuggestionsItemProcessingErrors where
4239+ "archiveFile" -> Just VSIPEArchiveFile
4240+ "audioFile" -> Just VSIPEAudioFile
4241+ "docFile" -> Just VSIPEDocFile
4242+ "imageFile" -> Just VSIPEImageFile
4243+ "notAVideoFile" -> Just VSIPENotAVideoFile
4244+ "projectFile" -> Just VSIPEProjectFile
4247+instance ToText VideoSuggestionsItemProcessingErrors where
4249+ VSIPEArchiveFile -> "archiveFile"
4250+ VSIPEAudioFile -> "audioFile"
4251+ VSIPEDocFile -> "docFile"
4252+ VSIPEImageFile -> "imageFile"
4253+ VSIPENotAVideoFile -> "notAVideoFile"
4254+ VSIPEProjectFile -> "projectFile"
2106data VideoSuggestionsItemProcessingHints
4256data VideoSuggestionsItemProcessingHints
2107 = VSIPHNonStreamableMov
4257 = VSIPHNonStreamableMov
2108 -- ^ @nonStreamableMov@
4258 -- ^ @nonStreamableMov@
@@ -2112,6 +4262,17 @@ data VideoSuggestionsItemProcessingHints
2113instance Hashable VideoSuggestionsItemProcessingHints
4263instance Hashable VideoSuggestionsItemProcessingHints
4265+instance FromText VideoSuggestionsItemProcessingHints where
4267+ "nonStreamableMov" -> Just VSIPHNonStreamableMov
4268+ "sendBestQualityVideo" -> Just VSIPHSendBestQualityVideo
4271+instance ToText VideoSuggestionsItemProcessingHints where
4273+ VSIPHNonStreamableMov -> "nonStreamableMov"
4274+ VSIPHSendBestQualityVideo -> "sendBestQualityVideo"
2115data VideoSuggestionsItemProcessingWarnings
4276data VideoSuggestionsItemProcessingWarnings
2116 = VSIPWHasEditlist
4277 = VSIPWHasEditlist
2117 -- ^ @hasEditlist@
4278 -- ^ @hasEditlist@
@@ -2130,3 +4291,24 @@ data VideoSuggestionsItemProcessingWarnings
2130 deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
4291 deriving (Eq,Ord,Enum,Read,Show,Data,Typeable,Generic)
2132instance Hashable VideoSuggestionsItemProcessingWarnings
4293instance Hashable VideoSuggestionsItemProcessingWarnings
4295+instance FromText VideoSuggestionsItemProcessingWarnings where
4297+ "hasEditlist" -> Just VSIPWHasEditlist
4298+ "inconsistentResolution" -> Just VSIPWInconsistentResolution
4299+ "problematicAudioCodec" -> Just VSIPWProblematicAudioCodec
4300+ "problematicVideoCodec" -> Just VSIPWProblematicVideoCodec
4301+ "unknownAudioCodec" -> Just VSIPWUnknownAudioCodec
4302+ "unknownContainer" -> Just VSIPWUnknownContainer
4303+ "unknownVideoCodec" -> Just VSIPWUnknownVideoCodec
4306+instance ToText VideoSuggestionsItemProcessingWarnings where
4308+ VSIPWHasEditlist -> "hasEditlist"
4309+ VSIPWInconsistentResolution -> "inconsistentResolution"
4310+ VSIPWProblematicAudioCodec -> "problematicAudioCodec"
4311+ VSIPWProblematicVideoCodec -> "problematicVideoCodec"
4312+ VSIPWUnknownAudioCodec -> "unknownAudioCodec"
4313+ VSIPWUnknownContainer -> "unknownContainer"
4314+ VSIPWUnknownVideoCodec -> "unknownVideoCodec"