{-# 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.MinimumProtocolVersion
-- 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.MinimumProtocolVersion
  ( MinimumProtocolVersion
      ( ..,
        MinimumProtocolVersion_SSLv3,
        MinimumProtocolVersion_TLSv1,
        MinimumProtocolVersion_TLSv1_1_2016,
        MinimumProtocolVersion_TLSv1_2016,
        MinimumProtocolVersion_TLSv1_2_2018,
        MinimumProtocolVersion_TLSv1_2_2019,
        MinimumProtocolVersion_TLSv1_2_2021
      ),
  )
where

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

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

pattern MinimumProtocolVersion_SSLv3 :: MinimumProtocolVersion
pattern $bMinimumProtocolVersion_SSLv3 :: MinimumProtocolVersion
$mMinimumProtocolVersion_SSLv3 :: forall r.
MinimumProtocolVersion -> (Void# -> r) -> (Void# -> r) -> r
MinimumProtocolVersion_SSLv3 = MinimumProtocolVersion' "SSLv3"

pattern MinimumProtocolVersion_TLSv1 :: MinimumProtocolVersion
pattern $bMinimumProtocolVersion_TLSv1 :: MinimumProtocolVersion
$mMinimumProtocolVersion_TLSv1 :: forall r.
MinimumProtocolVersion -> (Void# -> r) -> (Void# -> r) -> r
MinimumProtocolVersion_TLSv1 = MinimumProtocolVersion' "TLSv1"

pattern MinimumProtocolVersion_TLSv1_1_2016 :: MinimumProtocolVersion
pattern $bMinimumProtocolVersion_TLSv1_1_2016 :: MinimumProtocolVersion
$mMinimumProtocolVersion_TLSv1_1_2016 :: forall r.
MinimumProtocolVersion -> (Void# -> r) -> (Void# -> r) -> r
MinimumProtocolVersion_TLSv1_1_2016 = MinimumProtocolVersion' "TLSv1.1_2016"

pattern MinimumProtocolVersion_TLSv1_2016 :: MinimumProtocolVersion
pattern $bMinimumProtocolVersion_TLSv1_2016 :: MinimumProtocolVersion
$mMinimumProtocolVersion_TLSv1_2016 :: forall r.
MinimumProtocolVersion -> (Void# -> r) -> (Void# -> r) -> r
MinimumProtocolVersion_TLSv1_2016 = MinimumProtocolVersion' "TLSv1_2016"

pattern MinimumProtocolVersion_TLSv1_2_2018 :: MinimumProtocolVersion
pattern $bMinimumProtocolVersion_TLSv1_2_2018 :: MinimumProtocolVersion
$mMinimumProtocolVersion_TLSv1_2_2018 :: forall r.
MinimumProtocolVersion -> (Void# -> r) -> (Void# -> r) -> r
MinimumProtocolVersion_TLSv1_2_2018 = MinimumProtocolVersion' "TLSv1.2_2018"

pattern MinimumProtocolVersion_TLSv1_2_2019 :: MinimumProtocolVersion
pattern $bMinimumProtocolVersion_TLSv1_2_2019 :: MinimumProtocolVersion
$mMinimumProtocolVersion_TLSv1_2_2019 :: forall r.
MinimumProtocolVersion -> (Void# -> r) -> (Void# -> r) -> r
MinimumProtocolVersion_TLSv1_2_2019 = MinimumProtocolVersion' "TLSv1.2_2019"

pattern MinimumProtocolVersion_TLSv1_2_2021 :: MinimumProtocolVersion
pattern $bMinimumProtocolVersion_TLSv1_2_2021 :: MinimumProtocolVersion
$mMinimumProtocolVersion_TLSv1_2_2021 :: forall r.
MinimumProtocolVersion -> (Void# -> r) -> (Void# -> r) -> r
MinimumProtocolVersion_TLSv1_2_2021 = MinimumProtocolVersion' "TLSv1.2_2021"

{-# COMPLETE
  MinimumProtocolVersion_SSLv3,
  MinimumProtocolVersion_TLSv1,
  MinimumProtocolVersion_TLSv1_1_2016,
  MinimumProtocolVersion_TLSv1_2016,
  MinimumProtocolVersion_TLSv1_2_2018,
  MinimumProtocolVersion_TLSv1_2_2019,
  MinimumProtocolVersion_TLSv1_2_2021,
  MinimumProtocolVersion'
  #-}