{-# 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.DnsRecordIpType
-- 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.DnsRecordIpType
  ( DnsRecordIpType
      ( ..,
        DnsRecordIpType_Dualstack,
        DnsRecordIpType_Ipv4,
        DnsRecordIpType_Ipv6,
        DnsRecordIpType_Service_defined
      ),
  )
where

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

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

pattern DnsRecordIpType_Dualstack :: DnsRecordIpType
pattern $bDnsRecordIpType_Dualstack :: DnsRecordIpType
$mDnsRecordIpType_Dualstack :: forall {r}. DnsRecordIpType -> ((# #) -> r) -> ((# #) -> r) -> r
DnsRecordIpType_Dualstack = DnsRecordIpType' "dualstack"

pattern DnsRecordIpType_Ipv4 :: DnsRecordIpType
pattern $bDnsRecordIpType_Ipv4 :: DnsRecordIpType
$mDnsRecordIpType_Ipv4 :: forall {r}. DnsRecordIpType -> ((# #) -> r) -> ((# #) -> r) -> r
DnsRecordIpType_Ipv4 = DnsRecordIpType' "ipv4"

pattern DnsRecordIpType_Ipv6 :: DnsRecordIpType
pattern $bDnsRecordIpType_Ipv6 :: DnsRecordIpType
$mDnsRecordIpType_Ipv6 :: forall {r}. DnsRecordIpType -> ((# #) -> r) -> ((# #) -> r) -> r
DnsRecordIpType_Ipv6 = DnsRecordIpType' "ipv6"

pattern DnsRecordIpType_Service_defined :: DnsRecordIpType
pattern $bDnsRecordIpType_Service_defined :: DnsRecordIpType
$mDnsRecordIpType_Service_defined :: forall {r}. DnsRecordIpType -> ((# #) -> r) -> ((# #) -> r) -> r
DnsRecordIpType_Service_defined = DnsRecordIpType' "service-defined"

{-# COMPLETE
  DnsRecordIpType_Dualstack,
  DnsRecordIpType_Ipv4,
  DnsRecordIpType_Ipv6,
  DnsRecordIpType_Service_defined,
  DnsRecordIpType'
  #-}