{-# 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.SubnetCidrReservationType
-- 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.SubnetCidrReservationType
  ( SubnetCidrReservationType
      ( ..,
        SubnetCidrReservationType_Explicit,
        SubnetCidrReservationType_Prefix
      ),
  )
where

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

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

pattern SubnetCidrReservationType_Explicit :: SubnetCidrReservationType
pattern $bSubnetCidrReservationType_Explicit :: SubnetCidrReservationType
$mSubnetCidrReservationType_Explicit :: forall {r}.
SubnetCidrReservationType -> ((# #) -> r) -> ((# #) -> r) -> r
SubnetCidrReservationType_Explicit = SubnetCidrReservationType' "explicit"

pattern SubnetCidrReservationType_Prefix :: SubnetCidrReservationType
pattern $bSubnetCidrReservationType_Prefix :: SubnetCidrReservationType
$mSubnetCidrReservationType_Prefix :: forall {r}.
SubnetCidrReservationType -> ((# #) -> r) -> ((# #) -> r) -> r
SubnetCidrReservationType_Prefix = SubnetCidrReservationType' "prefix"

{-# COMPLETE
  SubnetCidrReservationType_Explicit,
  SubnetCidrReservationType_Prefix,
  SubnetCidrReservationType'
  #-}