{-# 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.EC2.Types.IpamPoolAllocationResourceType
-- 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.EC2.Types.IpamPoolAllocationResourceType
  ( IpamPoolAllocationResourceType
      ( ..,
        IpamPoolAllocationResourceType_Custom,
        IpamPoolAllocationResourceType_Ec2_public_ipv4_pool,
        IpamPoolAllocationResourceType_Ipam_pool,
        IpamPoolAllocationResourceType_Vpc
      ),
  )
where

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

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

pattern IpamPoolAllocationResourceType_Custom :: IpamPoolAllocationResourceType
pattern $bIpamPoolAllocationResourceType_Custom :: IpamPoolAllocationResourceType
$mIpamPoolAllocationResourceType_Custom :: forall {r}.
IpamPoolAllocationResourceType -> ((# #) -> r) -> ((# #) -> r) -> r
IpamPoolAllocationResourceType_Custom = IpamPoolAllocationResourceType' "custom"

pattern IpamPoolAllocationResourceType_Ec2_public_ipv4_pool :: IpamPoolAllocationResourceType
pattern $bIpamPoolAllocationResourceType_Ec2_public_ipv4_pool :: IpamPoolAllocationResourceType
$mIpamPoolAllocationResourceType_Ec2_public_ipv4_pool :: forall {r}.
IpamPoolAllocationResourceType -> ((# #) -> r) -> ((# #) -> r) -> r
IpamPoolAllocationResourceType_Ec2_public_ipv4_pool = IpamPoolAllocationResourceType' "ec2-public-ipv4-pool"

pattern IpamPoolAllocationResourceType_Ipam_pool :: IpamPoolAllocationResourceType
pattern $bIpamPoolAllocationResourceType_Ipam_pool :: IpamPoolAllocationResourceType
$mIpamPoolAllocationResourceType_Ipam_pool :: forall {r}.
IpamPoolAllocationResourceType -> ((# #) -> r) -> ((# #) -> r) -> r
IpamPoolAllocationResourceType_Ipam_pool = IpamPoolAllocationResourceType' "ipam-pool"

pattern IpamPoolAllocationResourceType_Vpc :: IpamPoolAllocationResourceType
pattern $bIpamPoolAllocationResourceType_Vpc :: IpamPoolAllocationResourceType
$mIpamPoolAllocationResourceType_Vpc :: forall {r}.
IpamPoolAllocationResourceType -> ((# #) -> r) -> ((# #) -> r) -> r
IpamPoolAllocationResourceType_Vpc = IpamPoolAllocationResourceType' "vpc"

{-# COMPLETE
  IpamPoolAllocationResourceType_Custom,
  IpamPoolAllocationResourceType_Ec2_public_ipv4_pool,
  IpamPoolAllocationResourceType_Ipam_pool,
  IpamPoolAllocationResourceType_Vpc,
  IpamPoolAllocationResourceType'
  #-}