{-# 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.InputDeviceConnectionState
-- 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.InputDeviceConnectionState
  ( InputDeviceConnectionState
      ( ..,
        InputDeviceConnectionState_CONNECTED,
        InputDeviceConnectionState_DISCONNECTED
      ),
  )
where

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

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

pattern InputDeviceConnectionState_CONNECTED :: InputDeviceConnectionState
pattern $bInputDeviceConnectionState_CONNECTED :: InputDeviceConnectionState
$mInputDeviceConnectionState_CONNECTED :: forall r.
InputDeviceConnectionState -> (Void# -> r) -> (Void# -> r) -> r
InputDeviceConnectionState_CONNECTED = InputDeviceConnectionState' "CONNECTED"

pattern InputDeviceConnectionState_DISCONNECTED :: InputDeviceConnectionState
pattern $bInputDeviceConnectionState_DISCONNECTED :: InputDeviceConnectionState
$mInputDeviceConnectionState_DISCONNECTED :: forall r.
InputDeviceConnectionState -> (Void# -> r) -> (Void# -> r) -> r
InputDeviceConnectionState_DISCONNECTED = InputDeviceConnectionState' "DISCONNECTED"

{-# COMPLETE
  InputDeviceConnectionState_CONNECTED,
  InputDeviceConnectionState_DISCONNECTED,
  InputDeviceConnectionState'
  #-}