{-# 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.ResilienceHub.Types.DataLocationConstraint
-- 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.ResilienceHub.Types.DataLocationConstraint
  ( DataLocationConstraint
      ( ..,
        DataLocationConstraint_AnyLocation,
        DataLocationConstraint_SameContinent,
        DataLocationConstraint_SameCountry
      ),
  )
where

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

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

pattern DataLocationConstraint_AnyLocation :: DataLocationConstraint
pattern $bDataLocationConstraint_AnyLocation :: DataLocationConstraint
$mDataLocationConstraint_AnyLocation :: forall {r}.
DataLocationConstraint -> ((# #) -> r) -> ((# #) -> r) -> r
DataLocationConstraint_AnyLocation = DataLocationConstraint' "AnyLocation"

pattern DataLocationConstraint_SameContinent :: DataLocationConstraint
pattern $bDataLocationConstraint_SameContinent :: DataLocationConstraint
$mDataLocationConstraint_SameContinent :: forall {r}.
DataLocationConstraint -> ((# #) -> r) -> ((# #) -> r) -> r
DataLocationConstraint_SameContinent = DataLocationConstraint' "SameContinent"

pattern DataLocationConstraint_SameCountry :: DataLocationConstraint
pattern $bDataLocationConstraint_SameCountry :: DataLocationConstraint
$mDataLocationConstraint_SameCountry :: forall {r}.
DataLocationConstraint -> ((# #) -> r) -> ((# #) -> r) -> r
DataLocationConstraint_SameCountry = DataLocationConstraint' "SameCountry"

{-# COMPLETE
  DataLocationConstraint_AnyLocation,
  DataLocationConstraint_SameContinent,
  DataLocationConstraint_SameCountry,
  DataLocationConstraint'
  #-}