{-# 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.Kendra.Types.KeyLocation
-- 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.Kendra.Types.KeyLocation
  ( KeyLocation
      ( ..,
        KeyLocation_SECRET_MANAGER,
        KeyLocation_URL
      ),
  )
where

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

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

pattern KeyLocation_SECRET_MANAGER :: KeyLocation
pattern $bKeyLocation_SECRET_MANAGER :: KeyLocation
$mKeyLocation_SECRET_MANAGER :: forall {r}. KeyLocation -> ((# #) -> r) -> ((# #) -> r) -> r
KeyLocation_SECRET_MANAGER = KeyLocation' "SECRET_MANAGER"

pattern KeyLocation_URL :: KeyLocation
pattern $bKeyLocation_URL :: KeyLocation
$mKeyLocation_URL :: forall {r}. KeyLocation -> ((# #) -> r) -> ((# #) -> r) -> r
KeyLocation_URL = KeyLocation' "URL"

{-# COMPLETE
  KeyLocation_SECRET_MANAGER,
  KeyLocation_URL,
  KeyLocation'
  #-}