{-# 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.SslProtocol
-- 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.SslProtocol
  ( SslProtocol
      ( ..,
        SslProtocol_SSLv3,
        SslProtocol_TLSv1,
        SslProtocol_TLSv1_1,
        SslProtocol_TLSv1_2
      ),
  )
where

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

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

pattern SslProtocol_SSLv3 :: SslProtocol
pattern $bSslProtocol_SSLv3 :: SslProtocol
$mSslProtocol_SSLv3 :: forall r. SslProtocol -> (Void# -> r) -> (Void# -> r) -> r
SslProtocol_SSLv3 = SslProtocol' "SSLv3"

pattern SslProtocol_TLSv1 :: SslProtocol
pattern $bSslProtocol_TLSv1 :: SslProtocol
$mSslProtocol_TLSv1 :: forall r. SslProtocol -> (Void# -> r) -> (Void# -> r) -> r
SslProtocol_TLSv1 = SslProtocol' "TLSv1"

pattern SslProtocol_TLSv1_1 :: SslProtocol
pattern $bSslProtocol_TLSv1_1 :: SslProtocol
$mSslProtocol_TLSv1_1 :: forall r. SslProtocol -> (Void# -> r) -> (Void# -> r) -> r
SslProtocol_TLSv1_1 = SslProtocol' "TLSv1.1"

pattern SslProtocol_TLSv1_2 :: SslProtocol
pattern $bSslProtocol_TLSv1_2 :: SslProtocol
$mSslProtocol_TLSv1_2 :: forall r. SslProtocol -> (Void# -> r) -> (Void# -> r) -> r
SslProtocol_TLSv1_2 = SslProtocol' "TLSv1.2"

{-# COMPLETE
  SslProtocol_SSLv3,
  SslProtocol_TLSv1,
  SslProtocol_TLSv1_1,
  SslProtocol_TLSv1_2,
  SslProtocol'
  #-}