{-# 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.CloudFront.Types.CertificateSource
-- 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.CloudFront.Types.CertificateSource
  ( CertificateSource
      ( ..,
        CertificateSource_Acm,
        CertificateSource_Cloudfront,
        CertificateSource_Iam
      ),
  )
where

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

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

pattern CertificateSource_Acm :: CertificateSource
pattern $bCertificateSource_Acm :: CertificateSource
$mCertificateSource_Acm :: forall r. CertificateSource -> (Void# -> r) -> (Void# -> r) -> r
CertificateSource_Acm = CertificateSource' "acm"

pattern CertificateSource_Cloudfront :: CertificateSource
pattern $bCertificateSource_Cloudfront :: CertificateSource
$mCertificateSource_Cloudfront :: forall r. CertificateSource -> (Void# -> r) -> (Void# -> r) -> r
CertificateSource_Cloudfront = CertificateSource' "cloudfront"

pattern CertificateSource_Iam :: CertificateSource
pattern $bCertificateSource_Iam :: CertificateSource
$mCertificateSource_Iam :: forall r. CertificateSource -> (Void# -> r) -> (Void# -> r) -> r
CertificateSource_Iam = CertificateSource' "iam"

{-# COMPLETE
  CertificateSource_Acm,
  CertificateSource_Cloudfront,
  CertificateSource_Iam,
  CertificateSource'
  #-}