{-# 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.Lightsail.Types.RelationalDatabasePasswordVersion
-- 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.Lightsail.Types.RelationalDatabasePasswordVersion
  ( RelationalDatabasePasswordVersion
      ( ..,
        RelationalDatabasePasswordVersion_CURRENT,
        RelationalDatabasePasswordVersion_PENDING,
        RelationalDatabasePasswordVersion_PREVIOUS
      ),
  )
where

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

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

pattern RelationalDatabasePasswordVersion_CURRENT :: RelationalDatabasePasswordVersion
pattern $bRelationalDatabasePasswordVersion_CURRENT :: RelationalDatabasePasswordVersion
$mRelationalDatabasePasswordVersion_CURRENT :: forall r.
RelationalDatabasePasswordVersion
-> (Void# -> r) -> (Void# -> r) -> r
RelationalDatabasePasswordVersion_CURRENT = RelationalDatabasePasswordVersion' "CURRENT"

pattern RelationalDatabasePasswordVersion_PENDING :: RelationalDatabasePasswordVersion
pattern $bRelationalDatabasePasswordVersion_PENDING :: RelationalDatabasePasswordVersion
$mRelationalDatabasePasswordVersion_PENDING :: forall r.
RelationalDatabasePasswordVersion
-> (Void# -> r) -> (Void# -> r) -> r
RelationalDatabasePasswordVersion_PENDING = RelationalDatabasePasswordVersion' "PENDING"

pattern RelationalDatabasePasswordVersion_PREVIOUS :: RelationalDatabasePasswordVersion
pattern $bRelationalDatabasePasswordVersion_PREVIOUS :: RelationalDatabasePasswordVersion
$mRelationalDatabasePasswordVersion_PREVIOUS :: forall r.
RelationalDatabasePasswordVersion
-> (Void# -> r) -> (Void# -> r) -> r
RelationalDatabasePasswordVersion_PREVIOUS = RelationalDatabasePasswordVersion' "PREVIOUS"

{-# COMPLETE
  RelationalDatabasePasswordVersion_CURRENT,
  RelationalDatabasePasswordVersion_PENDING,
  RelationalDatabasePasswordVersion_PREVIOUS,
  RelationalDatabasePasswordVersion'
  #-}