{-# 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.Lightsail.Types.OriginProtocolPolicyEnum
-- 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.Lightsail.Types.OriginProtocolPolicyEnum
  ( OriginProtocolPolicyEnum
      ( ..,
        OriginProtocolPolicyEnum_Http_only,
        OriginProtocolPolicyEnum_Https_only
      ),
  )
where

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

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

pattern OriginProtocolPolicyEnum_Http_only :: OriginProtocolPolicyEnum
pattern $bOriginProtocolPolicyEnum_Http_only :: OriginProtocolPolicyEnum
$mOriginProtocolPolicyEnum_Http_only :: forall r.
OriginProtocolPolicyEnum -> (Void# -> r) -> (Void# -> r) -> r
OriginProtocolPolicyEnum_Http_only = OriginProtocolPolicyEnum' "http-only"

pattern OriginProtocolPolicyEnum_Https_only :: OriginProtocolPolicyEnum
pattern $bOriginProtocolPolicyEnum_Https_only :: OriginProtocolPolicyEnum
$mOriginProtocolPolicyEnum_Https_only :: forall r.
OriginProtocolPolicyEnum -> (Void# -> r) -> (Void# -> r) -> r
OriginProtocolPolicyEnum_Https_only = OriginProtocolPolicyEnum' "https-only"

{-# COMPLETE
  OriginProtocolPolicyEnum_Http_only,
  OriginProtocolPolicyEnum_Https_only,
  OriginProtocolPolicyEnum'
  #-}