{-# 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.DurationUnits
-- 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.DurationUnits
  ( DurationUnits
      ( ..,
        DurationUnits_MONTHS
      ),
  )
where

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

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

pattern DurationUnits_MONTHS :: DurationUnits
pattern $bDurationUnits_MONTHS :: DurationUnits
$mDurationUnits_MONTHS :: forall r. DurationUnits -> (Void# -> r) -> (Void# -> r) -> r
DurationUnits_MONTHS = DurationUnits' "MONTHS"

{-# COMPLETE
  DurationUnits_MONTHS,
  DurationUnits'
  #-}