{-# 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.PortInfoSourceType
-- 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.Lightsail.Types.PortInfoSourceType
  ( PortInfoSourceType
      ( ..,
        PortInfoSourceType_CLOSED,
        PortInfoSourceType_DEFAULT,
        PortInfoSourceType_INSTANCE,
        PortInfoSourceType_NONE
      ),
  )
where

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

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

pattern PortInfoSourceType_CLOSED :: PortInfoSourceType
pattern $bPortInfoSourceType_CLOSED :: PortInfoSourceType
$mPortInfoSourceType_CLOSED :: forall r. PortInfoSourceType -> (Void# -> r) -> (Void# -> r) -> r
PortInfoSourceType_CLOSED = PortInfoSourceType' "CLOSED"

pattern PortInfoSourceType_DEFAULT :: PortInfoSourceType
pattern $bPortInfoSourceType_DEFAULT :: PortInfoSourceType
$mPortInfoSourceType_DEFAULT :: forall r. PortInfoSourceType -> (Void# -> r) -> (Void# -> r) -> r
PortInfoSourceType_DEFAULT = PortInfoSourceType' "DEFAULT"

pattern PortInfoSourceType_INSTANCE :: PortInfoSourceType
pattern $bPortInfoSourceType_INSTANCE :: PortInfoSourceType
$mPortInfoSourceType_INSTANCE :: forall r. PortInfoSourceType -> (Void# -> r) -> (Void# -> r) -> r
PortInfoSourceType_INSTANCE = PortInfoSourceType' "INSTANCE"

pattern PortInfoSourceType_NONE :: PortInfoSourceType
pattern $bPortInfoSourceType_NONE :: PortInfoSourceType
$mPortInfoSourceType_NONE :: forall r. PortInfoSourceType -> (Void# -> r) -> (Void# -> r) -> r
PortInfoSourceType_NONE = PortInfoSourceType' "NONE"

{-# COMPLETE
  PortInfoSourceType_CLOSED,
  PortInfoSourceType_DEFAULT,
  PortInfoSourceType_INSTANCE,
  PortInfoSourceType_NONE,
  PortInfoSourceType'
  #-}