{-# 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.Lightsail.Types.PortState
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Lightsail.Types.PortState
  ( PortState
      ( ..,
        PortState_Closed,
        PortState_Open
      ),
  )
where

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

newtype PortState = PortState'
  { PortState -> Text
fromPortState ::
      Data.Text
  }
  deriving stock
    ( Int -> PortState -> ShowS
[PortState] -> ShowS
PortState -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq PortState
Int -> PortState -> Int
PortState -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: PortState -> ()
$crnf :: PortState -> ()
Prelude.NFData,
      Text -> Either String PortState
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String PortState
$cfromText :: Text -> Either String PortState
Data.FromText,
      PortState -> Text
forall a. (a -> Text) -> ToText a
toText :: PortState -> Text
$ctoText :: PortState -> Text
Data.ToText,
      PortState -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: PortState -> ByteString
$ctoBS :: PortState -> ByteString
Data.ToByteString,
      PortState -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: PortState -> ByteStringBuilder
$cbuild :: PortState -> ByteStringBuilder
Data.ToLog,
      HeaderName -> PortState -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> PortState -> [Header]
$ctoHeader :: HeaderName -> PortState -> [Header]
Data.ToHeader,
      PortState -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: PortState -> QueryString
$ctoQuery :: PortState -> QueryString
Data.ToQuery,
      Value -> Parser [PortState]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [PortState]
FromJSONKeyFunction PortState
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [PortState]
$cfromJSONKeyList :: FromJSONKeyFunction [PortState]
fromJSONKey :: FromJSONKeyFunction PortState
$cfromJSONKey :: FromJSONKeyFunction PortState
Data.FromJSONKey,
      [PortState] -> Encoding
[PortState] -> Value
PortState -> Encoding
PortState -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [PortState]
ToJSONKeyFunction PortState
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [PortState]
$ctoJSONKeyList :: ToJSONKeyFunction [PortState]
toJSONKey :: ToJSONKeyFunction PortState
$ctoJSONKey :: ToJSONKeyFunction PortState
Data.ToJSONKey,
      [Node] -> Either String PortState
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String PortState
$cparseXML :: [Node] -> Either String PortState
Data.FromXML,
      PortState -> XML
forall a. (a -> XML) -> ToXML a
toXML :: PortState -> XML
$ctoXML :: PortState -> XML
Data.ToXML
    )

pattern PortState_Closed :: PortState
pattern $bPortState_Closed :: PortState
$mPortState_Closed :: forall {r}. PortState -> ((# #) -> r) -> ((# #) -> r) -> r
PortState_Closed = PortState' "closed"

pattern PortState_Open :: PortState
pattern $bPortState_Open :: PortState
$mPortState_Open :: forall {r}. PortState -> ((# #) -> r) -> ((# #) -> r) -> r
PortState_Open = PortState' "open"

{-# COMPLETE
  PortState_Closed,
  PortState_Open,
  PortState'
  #-}