{-# 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.Route53AutoNaming.Types.RoutingPolicy
-- 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.Route53AutoNaming.Types.RoutingPolicy
  ( RoutingPolicy
      ( ..,
        RoutingPolicy_MULTIVALUE,
        RoutingPolicy_WEIGHTED
      ),
  )
where

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

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

pattern RoutingPolicy_MULTIVALUE :: RoutingPolicy
pattern $bRoutingPolicy_MULTIVALUE :: RoutingPolicy
$mRoutingPolicy_MULTIVALUE :: forall r. RoutingPolicy -> (Void# -> r) -> (Void# -> r) -> r
RoutingPolicy_MULTIVALUE = RoutingPolicy' "MULTIVALUE"

pattern RoutingPolicy_WEIGHTED :: RoutingPolicy
pattern $bRoutingPolicy_WEIGHTED :: RoutingPolicy
$mRoutingPolicy_WEIGHTED :: forall r. RoutingPolicy -> (Void# -> r) -> (Void# -> r) -> r
RoutingPolicy_WEIGHTED = RoutingPolicy' "WEIGHTED"

{-# COMPLETE
  RoutingPolicy_MULTIVALUE,
  RoutingPolicy_WEIGHTED,
  RoutingPolicy'
  #-}