{-# 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.MediaLive.Types.InputDeviceState
-- 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.MediaLive.Types.InputDeviceState
  ( InputDeviceState
      ( ..,
        InputDeviceState_IDLE,
        InputDeviceState_STREAMING
      ),
  )
where

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

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

pattern InputDeviceState_IDLE :: InputDeviceState
pattern $bInputDeviceState_IDLE :: InputDeviceState
$mInputDeviceState_IDLE :: forall r. InputDeviceState -> (Void# -> r) -> (Void# -> r) -> r
InputDeviceState_IDLE = InputDeviceState' "IDLE"

pattern InputDeviceState_STREAMING :: InputDeviceState
pattern $bInputDeviceState_STREAMING :: InputDeviceState
$mInputDeviceState_STREAMING :: forall r. InputDeviceState -> (Void# -> r) -> (Void# -> r) -> r
InputDeviceState_STREAMING = InputDeviceState' "STREAMING"

{-# COMPLETE
  InputDeviceState_IDLE,
  InputDeviceState_STREAMING,
  InputDeviceState'
  #-}