module AWS.Secrets.Key
  ( SecretKey (..),
    getSecretKeyText,
  )
where

import Data.String (IsString)
import Data.Text (Text)
import Prelude (Eq, Ord, Show)

-- | A secret can have multiple key/value pairs.
newtype SecretKey = SecretKeyText Text
  deriving newtype (String -> SecretKey
forall a. (String -> a) -> IsString a
fromString :: String -> SecretKey
$cfromString :: String -> SecretKey
IsString, Int -> SecretKey -> ShowS
[SecretKey] -> ShowS
SecretKey -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SecretKey] -> ShowS
$cshowList :: [SecretKey] -> ShowS
show :: SecretKey -> String
$cshow :: SecretKey -> String
showsPrec :: Int -> SecretKey -> ShowS
$cshowsPrec :: Int -> SecretKey -> ShowS
Show, SecretKey -> SecretKey -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SecretKey -> SecretKey -> Bool
$c/= :: SecretKey -> SecretKey -> Bool
== :: SecretKey -> SecretKey -> Bool
$c== :: SecretKey -> SecretKey -> Bool
Eq, Eq SecretKey
SecretKey -> SecretKey -> Bool
SecretKey -> SecretKey -> Ordering
SecretKey -> SecretKey -> SecretKey
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 :: SecretKey -> SecretKey -> SecretKey
$cmin :: SecretKey -> SecretKey -> SecretKey
max :: SecretKey -> SecretKey -> SecretKey
$cmax :: SecretKey -> SecretKey -> SecretKey
>= :: SecretKey -> SecretKey -> Bool
$c>= :: SecretKey -> SecretKey -> Bool
> :: SecretKey -> SecretKey -> Bool
$c> :: SecretKey -> SecretKey -> Bool
<= :: SecretKey -> SecretKey -> Bool
$c<= :: SecretKey -> SecretKey -> Bool
< :: SecretKey -> SecretKey -> Bool
$c< :: SecretKey -> SecretKey -> Bool
compare :: SecretKey -> SecretKey -> Ordering
$ccompare :: SecretKey -> SecretKey -> Ordering
Ord)

getSecretKeyText :: SecretKey -> Text
getSecretKeyText :: SecretKey -> Text
getSecretKeyText (SecretKeyText Text
x) = Text
x