{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.Lightsail.Types.PortState
( PortState
( ..,
PortState_Closed,
PortState_Open
),
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
newtype PortState = PortState'
{ PortState -> Text
fromPortState ::
Core.Text
}
deriving stock
( Int -> PortState -> ShowS
[PortState] -> ShowS
PortState -> String
(Int -> PortState -> ShowS)
-> (PortState -> String)
-> ([PortState] -> ShowS)
-> Show PortState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PortState] -> ShowS
$cshowList :: [PortState] -> ShowS
show :: PortState -> String
$cshow :: PortState -> String
showsPrec :: Int -> PortState -> ShowS
$cshowsPrec :: Int -> PortState -> ShowS
Prelude.Show,
ReadPrec [PortState]
ReadPrec PortState
Int -> ReadS PortState
ReadS [PortState]
(Int -> ReadS PortState)
-> ReadS [PortState]
-> ReadPrec PortState
-> ReadPrec [PortState]
-> Read PortState
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PortState]
$creadListPrec :: ReadPrec [PortState]
readPrec :: ReadPrec PortState
$creadPrec :: ReadPrec PortState
readList :: ReadS [PortState]
$creadList :: ReadS [PortState]
readsPrec :: Int -> ReadS PortState
$creadsPrec :: Int -> ReadS PortState
Prelude.Read,
PortState -> PortState -> Bool
(PortState -> PortState -> Bool)
-> (PortState -> PortState -> Bool) -> Eq PortState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PortState -> PortState -> Bool
$c/= :: PortState -> PortState -> Bool
== :: PortState -> PortState -> Bool
$c== :: PortState -> PortState -> Bool
Prelude.Eq,
Eq PortState
Eq PortState
-> (PortState -> PortState -> Ordering)
-> (PortState -> PortState -> Bool)
-> (PortState -> PortState -> Bool)
-> (PortState -> PortState -> Bool)
-> (PortState -> PortState -> Bool)
-> (PortState -> PortState -> PortState)
-> (PortState -> PortState -> PortState)
-> Ord PortState
PortState -> PortState -> Bool
PortState -> PortState -> Ordering
PortState -> PortState -> PortState
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 :: PortState -> PortState -> PortState
$cmin :: PortState -> PortState -> PortState
max :: PortState -> PortState -> PortState
$cmax :: PortState -> PortState -> PortState
>= :: PortState -> PortState -> Bool
$c>= :: PortState -> PortState -> Bool
> :: PortState -> PortState -> Bool
$c> :: PortState -> PortState -> Bool
<= :: PortState -> PortState -> Bool
$c<= :: PortState -> PortState -> Bool
< :: PortState -> PortState -> Bool
$c< :: PortState -> PortState -> Bool
compare :: PortState -> PortState -> Ordering
$ccompare :: PortState -> PortState -> Ordering
$cp1Ord :: Eq PortState
Prelude.Ord,
(forall x. PortState -> Rep PortState x)
-> (forall x. Rep PortState x -> PortState) -> Generic PortState
forall x. Rep PortState x -> PortState
forall x. PortState -> Rep PortState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PortState x -> PortState
$cfrom :: forall x. PortState -> Rep PortState x
Prelude.Generic
)
deriving newtype
( Int -> PortState -> Int
PortState -> Int
(Int -> PortState -> Int)
-> (PortState -> Int) -> Hashable PortState
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: PortState -> Int
$chash :: PortState -> Int
hashWithSalt :: Int -> PortState -> Int
$chashWithSalt :: Int -> PortState -> Int
Prelude.Hashable,
PortState -> ()
(PortState -> ()) -> NFData PortState
forall a. (a -> ()) -> NFData a
rnf :: PortState -> ()
$crnf :: PortState -> ()
Prelude.NFData,
Text -> Either String PortState
(Text -> Either String PortState) -> FromText PortState
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String PortState
$cfromText :: Text -> Either String PortState
Core.FromText,
PortState -> Text
(PortState -> Text) -> ToText PortState
forall a. (a -> Text) -> ToText a
toText :: PortState -> Text
$ctoText :: PortState -> Text
Core.ToText,
PortState -> ByteString
(PortState -> ByteString) -> ToByteString PortState
forall a. (a -> ByteString) -> ToByteString a
toBS :: PortState -> ByteString
$ctoBS :: PortState -> ByteString
Core.ToByteString,
PortState -> ByteStringBuilder
(PortState -> ByteStringBuilder) -> ToLog PortState
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: PortState -> ByteStringBuilder
$cbuild :: PortState -> ByteStringBuilder
Core.ToLog,
HeaderName -> PortState -> [Header]
(HeaderName -> PortState -> [Header]) -> ToHeader PortState
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> PortState -> [Header]
$ctoHeader :: HeaderName -> PortState -> [Header]
Core.ToHeader,
PortState -> QueryString
(PortState -> QueryString) -> ToQuery PortState
forall a. (a -> QueryString) -> ToQuery a
toQuery :: PortState -> QueryString
$ctoQuery :: PortState -> QueryString
Core.ToQuery,
Value -> Parser [PortState]
Value -> Parser PortState
(Value -> Parser PortState)
-> (Value -> Parser [PortState]) -> FromJSON PortState
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [PortState]
$cparseJSONList :: Value -> Parser [PortState]
parseJSON :: Value -> Parser PortState
$cparseJSON :: Value -> Parser PortState
Core.FromJSON,
FromJSONKeyFunction [PortState]
FromJSONKeyFunction PortState
FromJSONKeyFunction PortState
-> FromJSONKeyFunction [PortState] -> FromJSONKey PortState
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [PortState]
$cfromJSONKeyList :: FromJSONKeyFunction [PortState]
fromJSONKey :: FromJSONKeyFunction PortState
$cfromJSONKey :: FromJSONKeyFunction PortState
Core.FromJSONKey,
[PortState] -> Encoding
[PortState] -> Value
PortState -> Encoding
PortState -> Value
(PortState -> Value)
-> (PortState -> Encoding)
-> ([PortState] -> Value)
-> ([PortState] -> Encoding)
-> ToJSON PortState
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [PortState] -> Encoding
$ctoEncodingList :: [PortState] -> Encoding
toJSONList :: [PortState] -> Value
$ctoJSONList :: [PortState] -> Value
toEncoding :: PortState -> Encoding
$ctoEncoding :: PortState -> Encoding
toJSON :: PortState -> Value
$ctoJSON :: PortState -> Value
Core.ToJSON,
ToJSONKeyFunction [PortState]
ToJSONKeyFunction PortState
ToJSONKeyFunction PortState
-> ToJSONKeyFunction [PortState] -> ToJSONKey PortState
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [PortState]
$ctoJSONKeyList :: ToJSONKeyFunction [PortState]
toJSONKey :: ToJSONKeyFunction PortState
$ctoJSONKey :: ToJSONKeyFunction PortState
Core.ToJSONKey,
[Node] -> Either String PortState
([Node] -> Either String PortState) -> FromXML PortState
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String PortState
$cparseXML :: [Node] -> Either String PortState
Core.FromXML,
PortState -> XML
(PortState -> XML) -> ToXML PortState
forall a. (a -> XML) -> ToXML a
toXML :: PortState -> XML
$ctoXML :: PortState -> XML
Core.ToXML
)
pattern PortState_Closed :: PortState
pattern $bPortState_Closed :: PortState
$mPortState_Closed :: forall r. PortState -> (Void# -> r) -> (Void# -> r) -> r
PortState_Closed = PortState' "closed"
pattern PortState_Open :: PortState
pattern $bPortState_Open :: PortState
$mPortState_Open :: forall r. PortState -> (Void# -> r) -> (Void# -> r) -> r
PortState_Open = PortState' "open"
{-# COMPLETE
PortState_Closed,
PortState_Open,
PortState'
#-}