{-# 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.HostnameType
-- 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.HostnameType
  ( HostnameType
      ( ..,
        HostnameType_Ip_name,
        HostnameType_Resource_name
      ),
  )
where

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

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

pattern HostnameType_Ip_name :: HostnameType
pattern $bHostnameType_Ip_name :: HostnameType
$mHostnameType_Ip_name :: forall {r}. HostnameType -> ((# #) -> r) -> ((# #) -> r) -> r
HostnameType_Ip_name = HostnameType' "ip-name"

pattern HostnameType_Resource_name :: HostnameType
pattern $bHostnameType_Resource_name :: HostnameType
$mHostnameType_Resource_name :: forall {r}. HostnameType -> ((# #) -> r) -> ((# #) -> r) -> r
HostnameType_Resource_name = HostnameType' "resource-name"

{-# COMPLETE
  HostnameType_Ip_name,
  HostnameType_Resource_name,
  HostnameType'
  #-}