{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Amazonka.CloudFront.Types.ViewerProtocolPolicy
( ViewerProtocolPolicy
( ..,
ViewerProtocolPolicy_Allow_all,
ViewerProtocolPolicy_Https_only,
ViewerProtocolPolicy_Redirect_to_https
),
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
newtype ViewerProtocolPolicy = ViewerProtocolPolicy'
{ ViewerProtocolPolicy -> Text
fromViewerProtocolPolicy ::
Core.Text
}
deriving stock
( Int -> ViewerProtocolPolicy -> ShowS
[ViewerProtocolPolicy] -> ShowS
ViewerProtocolPolicy -> String
(Int -> ViewerProtocolPolicy -> ShowS)
-> (ViewerProtocolPolicy -> String)
-> ([ViewerProtocolPolicy] -> ShowS)
-> Show ViewerProtocolPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ViewerProtocolPolicy] -> ShowS
$cshowList :: [ViewerProtocolPolicy] -> ShowS
show :: ViewerProtocolPolicy -> String
$cshow :: ViewerProtocolPolicy -> String
showsPrec :: Int -> ViewerProtocolPolicy -> ShowS
$cshowsPrec :: Int -> ViewerProtocolPolicy -> ShowS
Prelude.Show,
ReadPrec [ViewerProtocolPolicy]
ReadPrec ViewerProtocolPolicy
Int -> ReadS ViewerProtocolPolicy
ReadS [ViewerProtocolPolicy]
(Int -> ReadS ViewerProtocolPolicy)
-> ReadS [ViewerProtocolPolicy]
-> ReadPrec ViewerProtocolPolicy
-> ReadPrec [ViewerProtocolPolicy]
-> Read ViewerProtocolPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ViewerProtocolPolicy]
$creadListPrec :: ReadPrec [ViewerProtocolPolicy]
readPrec :: ReadPrec ViewerProtocolPolicy
$creadPrec :: ReadPrec ViewerProtocolPolicy
readList :: ReadS [ViewerProtocolPolicy]
$creadList :: ReadS [ViewerProtocolPolicy]
readsPrec :: Int -> ReadS ViewerProtocolPolicy
$creadsPrec :: Int -> ReadS ViewerProtocolPolicy
Prelude.Read,
ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
(ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool)
-> (ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool)
-> Eq ViewerProtocolPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
$c/= :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
== :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
$c== :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
Prelude.Eq,
Eq ViewerProtocolPolicy
Eq ViewerProtocolPolicy
-> (ViewerProtocolPolicy -> ViewerProtocolPolicy -> Ordering)
-> (ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool)
-> (ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool)
-> (ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool)
-> (ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool)
-> (ViewerProtocolPolicy
-> ViewerProtocolPolicy -> ViewerProtocolPolicy)
-> (ViewerProtocolPolicy
-> ViewerProtocolPolicy -> ViewerProtocolPolicy)
-> Ord ViewerProtocolPolicy
ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
ViewerProtocolPolicy -> ViewerProtocolPolicy -> Ordering
ViewerProtocolPolicy
-> ViewerProtocolPolicy -> ViewerProtocolPolicy
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 :: ViewerProtocolPolicy
-> ViewerProtocolPolicy -> ViewerProtocolPolicy
$cmin :: ViewerProtocolPolicy
-> ViewerProtocolPolicy -> ViewerProtocolPolicy
max :: ViewerProtocolPolicy
-> ViewerProtocolPolicy -> ViewerProtocolPolicy
$cmax :: ViewerProtocolPolicy
-> ViewerProtocolPolicy -> ViewerProtocolPolicy
>= :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
$c>= :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
> :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
$c> :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
<= :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
$c<= :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
< :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
$c< :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Bool
compare :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Ordering
$ccompare :: ViewerProtocolPolicy -> ViewerProtocolPolicy -> Ordering
$cp1Ord :: Eq ViewerProtocolPolicy
Prelude.Ord,
(forall x. ViewerProtocolPolicy -> Rep ViewerProtocolPolicy x)
-> (forall x. Rep ViewerProtocolPolicy x -> ViewerProtocolPolicy)
-> Generic ViewerProtocolPolicy
forall x. Rep ViewerProtocolPolicy x -> ViewerProtocolPolicy
forall x. ViewerProtocolPolicy -> Rep ViewerProtocolPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ViewerProtocolPolicy x -> ViewerProtocolPolicy
$cfrom :: forall x. ViewerProtocolPolicy -> Rep ViewerProtocolPolicy x
Prelude.Generic
)
deriving newtype
( Int -> ViewerProtocolPolicy -> Int
ViewerProtocolPolicy -> Int
(Int -> ViewerProtocolPolicy -> Int)
-> (ViewerProtocolPolicy -> Int) -> Hashable ViewerProtocolPolicy
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: ViewerProtocolPolicy -> Int
$chash :: ViewerProtocolPolicy -> Int
hashWithSalt :: Int -> ViewerProtocolPolicy -> Int
$chashWithSalt :: Int -> ViewerProtocolPolicy -> Int
Prelude.Hashable,
ViewerProtocolPolicy -> ()
(ViewerProtocolPolicy -> ()) -> NFData ViewerProtocolPolicy
forall a. (a -> ()) -> NFData a
rnf :: ViewerProtocolPolicy -> ()
$crnf :: ViewerProtocolPolicy -> ()
Prelude.NFData,
Text -> Either String ViewerProtocolPolicy
(Text -> Either String ViewerProtocolPolicy)
-> FromText ViewerProtocolPolicy
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String ViewerProtocolPolicy
$cfromText :: Text -> Either String ViewerProtocolPolicy
Core.FromText,
ViewerProtocolPolicy -> Text
(ViewerProtocolPolicy -> Text) -> ToText ViewerProtocolPolicy
forall a. (a -> Text) -> ToText a
toText :: ViewerProtocolPolicy -> Text
$ctoText :: ViewerProtocolPolicy -> Text
Core.ToText,
ViewerProtocolPolicy -> ByteString
(ViewerProtocolPolicy -> ByteString)
-> ToByteString ViewerProtocolPolicy
forall a. (a -> ByteString) -> ToByteString a
toBS :: ViewerProtocolPolicy -> ByteString
$ctoBS :: ViewerProtocolPolicy -> ByteString
Core.ToByteString,
ViewerProtocolPolicy -> ByteStringBuilder
(ViewerProtocolPolicy -> ByteStringBuilder)
-> ToLog ViewerProtocolPolicy
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: ViewerProtocolPolicy -> ByteStringBuilder
$cbuild :: ViewerProtocolPolicy -> ByteStringBuilder
Core.ToLog,
HeaderName -> ViewerProtocolPolicy -> [Header]
(HeaderName -> ViewerProtocolPolicy -> [Header])
-> ToHeader ViewerProtocolPolicy
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> ViewerProtocolPolicy -> [Header]
$ctoHeader :: HeaderName -> ViewerProtocolPolicy -> [Header]
Core.ToHeader,
ViewerProtocolPolicy -> QueryString
(ViewerProtocolPolicy -> QueryString)
-> ToQuery ViewerProtocolPolicy
forall a. (a -> QueryString) -> ToQuery a
toQuery :: ViewerProtocolPolicy -> QueryString
$ctoQuery :: ViewerProtocolPolicy -> QueryString
Core.ToQuery,
Value -> Parser [ViewerProtocolPolicy]
Value -> Parser ViewerProtocolPolicy
(Value -> Parser ViewerProtocolPolicy)
-> (Value -> Parser [ViewerProtocolPolicy])
-> FromJSON ViewerProtocolPolicy
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [ViewerProtocolPolicy]
$cparseJSONList :: Value -> Parser [ViewerProtocolPolicy]
parseJSON :: Value -> Parser ViewerProtocolPolicy
$cparseJSON :: Value -> Parser ViewerProtocolPolicy
Core.FromJSON,
FromJSONKeyFunction [ViewerProtocolPolicy]
FromJSONKeyFunction ViewerProtocolPolicy
FromJSONKeyFunction ViewerProtocolPolicy
-> FromJSONKeyFunction [ViewerProtocolPolicy]
-> FromJSONKey ViewerProtocolPolicy
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [ViewerProtocolPolicy]
$cfromJSONKeyList :: FromJSONKeyFunction [ViewerProtocolPolicy]
fromJSONKey :: FromJSONKeyFunction ViewerProtocolPolicy
$cfromJSONKey :: FromJSONKeyFunction ViewerProtocolPolicy
Core.FromJSONKey,
[ViewerProtocolPolicy] -> Encoding
[ViewerProtocolPolicy] -> Value
ViewerProtocolPolicy -> Encoding
ViewerProtocolPolicy -> Value
(ViewerProtocolPolicy -> Value)
-> (ViewerProtocolPolicy -> Encoding)
-> ([ViewerProtocolPolicy] -> Value)
-> ([ViewerProtocolPolicy] -> Encoding)
-> ToJSON ViewerProtocolPolicy
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [ViewerProtocolPolicy] -> Encoding
$ctoEncodingList :: [ViewerProtocolPolicy] -> Encoding
toJSONList :: [ViewerProtocolPolicy] -> Value
$ctoJSONList :: [ViewerProtocolPolicy] -> Value
toEncoding :: ViewerProtocolPolicy -> Encoding
$ctoEncoding :: ViewerProtocolPolicy -> Encoding
toJSON :: ViewerProtocolPolicy -> Value
$ctoJSON :: ViewerProtocolPolicy -> Value
Core.ToJSON,
ToJSONKeyFunction [ViewerProtocolPolicy]
ToJSONKeyFunction ViewerProtocolPolicy
ToJSONKeyFunction ViewerProtocolPolicy
-> ToJSONKeyFunction [ViewerProtocolPolicy]
-> ToJSONKey ViewerProtocolPolicy
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [ViewerProtocolPolicy]
$ctoJSONKeyList :: ToJSONKeyFunction [ViewerProtocolPolicy]
toJSONKey :: ToJSONKeyFunction ViewerProtocolPolicy
$ctoJSONKey :: ToJSONKeyFunction ViewerProtocolPolicy
Core.ToJSONKey,
[Node] -> Either String ViewerProtocolPolicy
([Node] -> Either String ViewerProtocolPolicy)
-> FromXML ViewerProtocolPolicy
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String ViewerProtocolPolicy
$cparseXML :: [Node] -> Either String ViewerProtocolPolicy
Core.FromXML,
ViewerProtocolPolicy -> XML
(ViewerProtocolPolicy -> XML) -> ToXML ViewerProtocolPolicy
forall a. (a -> XML) -> ToXML a
toXML :: ViewerProtocolPolicy -> XML
$ctoXML :: ViewerProtocolPolicy -> XML
Core.ToXML
)
pattern ViewerProtocolPolicy_Allow_all :: ViewerProtocolPolicy
pattern $bViewerProtocolPolicy_Allow_all :: ViewerProtocolPolicy
$mViewerProtocolPolicy_Allow_all :: forall r. ViewerProtocolPolicy -> (Void# -> r) -> (Void# -> r) -> r
ViewerProtocolPolicy_Allow_all = ViewerProtocolPolicy' "allow-all"
pattern ViewerProtocolPolicy_Https_only :: ViewerProtocolPolicy
pattern $bViewerProtocolPolicy_Https_only :: ViewerProtocolPolicy
$mViewerProtocolPolicy_Https_only :: forall r. ViewerProtocolPolicy -> (Void# -> r) -> (Void# -> r) -> r
ViewerProtocolPolicy_Https_only = ViewerProtocolPolicy' "https-only"
pattern ViewerProtocolPolicy_Redirect_to_https :: ViewerProtocolPolicy
pattern $bViewerProtocolPolicy_Redirect_to_https :: ViewerProtocolPolicy
$mViewerProtocolPolicy_Redirect_to_https :: forall r. ViewerProtocolPolicy -> (Void# -> r) -> (Void# -> r) -> r
ViewerProtocolPolicy_Redirect_to_https = ViewerProtocolPolicy' "redirect-to-https"
{-# COMPLETE
ViewerProtocolPolicy_Allow_all,
ViewerProtocolPolicy_Https_only,
ViewerProtocolPolicy_Redirect_to_https,
ViewerProtocolPolicy'
#-}