{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.MediaConnect.Types.Range
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.MediaConnect.Types.Range
  ( Range
      ( ..,
        Range_FULL,
        Range_FULLPROTECT,
        Range_NARROW
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

newtype Range = Range' {Range -> Text
fromRange :: Core.Text}
  deriving stock
    ( Int -> Range -> ShowS
[Range] -> ShowS
Range -> String
(Int -> Range -> ShowS)
-> (Range -> String) -> ([Range] -> ShowS) -> Show Range
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Range] -> ShowS
$cshowList :: [Range] -> ShowS
show :: Range -> String
$cshow :: Range -> String
showsPrec :: Int -> Range -> ShowS
$cshowsPrec :: Int -> Range -> ShowS
Prelude.Show,
      ReadPrec [Range]
ReadPrec Range
Int -> ReadS Range
ReadS [Range]
(Int -> ReadS Range)
-> ReadS [Range]
-> ReadPrec Range
-> ReadPrec [Range]
-> Read Range
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Range]
$creadListPrec :: ReadPrec [Range]
readPrec :: ReadPrec Range
$creadPrec :: ReadPrec Range
readList :: ReadS [Range]
$creadList :: ReadS [Range]
readsPrec :: Int -> ReadS Range
$creadsPrec :: Int -> ReadS Range
Prelude.Read,
      Range -> Range -> Bool
(Range -> Range -> Bool) -> (Range -> Range -> Bool) -> Eq Range
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Range -> Range -> Bool
$c/= :: Range -> Range -> Bool
== :: Range -> Range -> Bool
$c== :: Range -> Range -> Bool
Prelude.Eq,
      Eq Range
Eq Range
-> (Range -> Range -> Ordering)
-> (Range -> Range -> Bool)
-> (Range -> Range -> Bool)
-> (Range -> Range -> Bool)
-> (Range -> Range -> Bool)
-> (Range -> Range -> Range)
-> (Range -> Range -> Range)
-> Ord Range
Range -> Range -> Bool
Range -> Range -> Ordering
Range -> Range -> Range
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Range -> Range -> Range
$cmin :: Range -> Range -> Range
max :: Range -> Range -> Range
$cmax :: Range -> Range -> Range
>= :: Range -> Range -> Bool
$c>= :: Range -> Range -> Bool
> :: Range -> Range -> Bool
$c> :: Range -> Range -> Bool
<= :: Range -> Range -> Bool
$c<= :: Range -> Range -> Bool
< :: Range -> Range -> Bool
$c< :: Range -> Range -> Bool
compare :: Range -> Range -> Ordering
$ccompare :: Range -> Range -> Ordering
$cp1Ord :: Eq Range
Prelude.Ord,
      (forall x. Range -> Rep Range x)
-> (forall x. Rep Range x -> Range) -> Generic Range
forall x. Rep Range x -> Range
forall x. Range -> Rep Range x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Range x -> Range
$cfrom :: forall x. Range -> Rep Range x
Prelude.Generic
    )
  deriving newtype
    ( Int -> Range -> Int
Range -> Int
(Int -> Range -> Int) -> (Range -> Int) -> Hashable Range
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: Range -> Int
$chash :: Range -> Int
hashWithSalt :: Int -> Range -> Int
$chashWithSalt :: Int -> Range -> Int
Prelude.Hashable,
      Range -> ()
(Range -> ()) -> NFData Range
forall a. (a -> ()) -> NFData a
rnf :: Range -> ()
$crnf :: Range -> ()
Prelude.NFData,
      Text -> Either String Range
(Text -> Either String Range) -> FromText Range
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String Range
$cfromText :: Text -> Either String Range
Core.FromText,
      Range -> Text
(Range -> Text) -> ToText Range
forall a. (a -> Text) -> ToText a
toText :: Range -> Text
$ctoText :: Range -> Text
Core.ToText,
      Range -> ByteString
(Range -> ByteString) -> ToByteString Range
forall a. (a -> ByteString) -> ToByteString a
toBS :: Range -> ByteString
$ctoBS :: Range -> ByteString
Core.ToByteString,
      Range -> ByteStringBuilder
(Range -> ByteStringBuilder) -> ToLog Range
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: Range -> ByteStringBuilder
$cbuild :: Range -> ByteStringBuilder
Core.ToLog,
      HeaderName -> Range -> [Header]
(HeaderName -> Range -> [Header]) -> ToHeader Range
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> Range -> [Header]
$ctoHeader :: HeaderName -> Range -> [Header]
Core.ToHeader,
      Range -> QueryString
(Range -> QueryString) -> ToQuery Range
forall a. (a -> QueryString) -> ToQuery a
toQuery :: Range -> QueryString
$ctoQuery :: Range -> QueryString
Core.ToQuery,
      Value -> Parser [Range]
Value -> Parser Range
(Value -> Parser Range)
-> (Value -> Parser [Range]) -> FromJSON Range
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [Range]
$cparseJSONList :: Value -> Parser [Range]
parseJSON :: Value -> Parser Range
$cparseJSON :: Value -> Parser Range
Core.FromJSON,
      FromJSONKeyFunction [Range]
FromJSONKeyFunction Range
FromJSONKeyFunction Range
-> FromJSONKeyFunction [Range] -> FromJSONKey Range
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [Range]
$cfromJSONKeyList :: FromJSONKeyFunction [Range]
fromJSONKey :: FromJSONKeyFunction Range
$cfromJSONKey :: FromJSONKeyFunction Range
Core.FromJSONKey,
      [Range] -> Encoding
[Range] -> Value
Range -> Encoding
Range -> Value
(Range -> Value)
-> (Range -> Encoding)
-> ([Range] -> Value)
-> ([Range] -> Encoding)
-> ToJSON Range
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [Range] -> Encoding
$ctoEncodingList :: [Range] -> Encoding
toJSONList :: [Range] -> Value
$ctoJSONList :: [Range] -> Value
toEncoding :: Range -> Encoding
$ctoEncoding :: Range -> Encoding
toJSON :: Range -> Value
$ctoJSON :: Range -> Value
Core.ToJSON,
      ToJSONKeyFunction [Range]
ToJSONKeyFunction Range
ToJSONKeyFunction Range
-> ToJSONKeyFunction [Range] -> ToJSONKey Range
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [Range]
$ctoJSONKeyList :: ToJSONKeyFunction [Range]
toJSONKey :: ToJSONKeyFunction Range
$ctoJSONKey :: ToJSONKeyFunction Range
Core.ToJSONKey,
      [Node] -> Either String Range
([Node] -> Either String Range) -> FromXML Range
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String Range
$cparseXML :: [Node] -> Either String Range
Core.FromXML,
      Range -> XML
(Range -> XML) -> ToXML Range
forall a. (a -> XML) -> ToXML a
toXML :: Range -> XML
$ctoXML :: Range -> XML
Core.ToXML
    )

pattern Range_FULL :: Range
pattern $bRange_FULL :: Range
$mRange_FULL :: forall r. Range -> (Void# -> r) -> (Void# -> r) -> r
Range_FULL = Range' "FULL"

pattern Range_FULLPROTECT :: Range
pattern $bRange_FULLPROTECT :: Range
$mRange_FULLPROTECT :: forall r. Range -> (Void# -> r) -> (Void# -> r) -> r
Range_FULLPROTECT = Range' "FULLPROTECT"

pattern Range_NARROW :: Range
pattern $bRange_NARROW :: Range
$mRange_NARROW :: forall r. Range -> (Void# -> r) -> (Void# -> r) -> r
Range_NARROW = Range' "NARROW"

{-# COMPLETE
  Range_FULL,
  Range_FULLPROTECT,
  Range_NARROW,
  Range'
  #-}