{-# 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.EC2.Types.KeyFormat
-- 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.EC2.Types.KeyFormat
  ( KeyFormat
      ( ..,
        KeyFormat_Pem,
        KeyFormat_Ppk
      ),
  )
where

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

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

pattern KeyFormat_Pem :: KeyFormat
pattern $bKeyFormat_Pem :: KeyFormat
$mKeyFormat_Pem :: forall {r}. KeyFormat -> ((# #) -> r) -> ((# #) -> r) -> r
KeyFormat_Pem = KeyFormat' "pem"

pattern KeyFormat_Ppk :: KeyFormat
pattern $bKeyFormat_Ppk :: KeyFormat
$mKeyFormat_Ppk :: forall {r}. KeyFormat -> ((# #) -> r) -> ((# #) -> r) -> r
KeyFormat_Ppk = KeyFormat' "ppk"

{-# COMPLETE
  KeyFormat_Pem,
  KeyFormat_Ppk,
  KeyFormat'
  #-}