{-# 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.ECR.Types.EncryptionType
-- 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.ECR.Types.EncryptionType
  ( EncryptionType
      ( ..,
        EncryptionType_AES256,
        EncryptionType_KMS
      ),
  )
where

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

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

pattern EncryptionType_AES256 :: EncryptionType
pattern $bEncryptionType_AES256 :: EncryptionType
$mEncryptionType_AES256 :: forall r. EncryptionType -> (Void# -> r) -> (Void# -> r) -> r
EncryptionType_AES256 = EncryptionType' "AES256"

pattern EncryptionType_KMS :: EncryptionType
pattern $bEncryptionType_KMS :: EncryptionType
$mEncryptionType_KMS :: forall r. EncryptionType -> (Void# -> r) -> (Void# -> r) -> r
EncryptionType_KMS = EncryptionType' "KMS"

{-# COMPLETE
  EncryptionType_AES256,
  EncryptionType_KMS,
  EncryptionType'
  #-}