{-# 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.APIGateway.Types.SecurityPolicy
-- 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.APIGateway.Types.SecurityPolicy
  ( SecurityPolicy
      ( ..,
        SecurityPolicy_TLS_1_0,
        SecurityPolicy_TLS_1_2
      ),
  )
where

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

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

pattern SecurityPolicy_TLS_1_0 :: SecurityPolicy
pattern $bSecurityPolicy_TLS_1_0 :: SecurityPolicy
$mSecurityPolicy_TLS_1_0 :: forall r. SecurityPolicy -> (Void# -> r) -> (Void# -> r) -> r
SecurityPolicy_TLS_1_0 = SecurityPolicy' "TLS_1_0"

pattern SecurityPolicy_TLS_1_2 :: SecurityPolicy
pattern $bSecurityPolicy_TLS_1_2 :: SecurityPolicy
$mSecurityPolicy_TLS_1_2 :: forall r. SecurityPolicy -> (Void# -> r) -> (Void# -> r) -> r
SecurityPolicy_TLS_1_2 = SecurityPolicy' "TLS_1_2"

{-# COMPLETE
  SecurityPolicy_TLS_1_0,
  SecurityPolicy_TLS_1_2,
  SecurityPolicy'
  #-}