{-# 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.AppMesh.Types.HttpScheme
-- 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.AppMesh.Types.HttpScheme
  ( HttpScheme
      ( ..,
        HttpScheme_Http,
        HttpScheme_Https
      ),
  )
where

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

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

pattern HttpScheme_Http :: HttpScheme
pattern $bHttpScheme_Http :: HttpScheme
$mHttpScheme_Http :: forall r. HttpScheme -> (Void# -> r) -> (Void# -> r) -> r
HttpScheme_Http = HttpScheme' "http"

pattern HttpScheme_Https :: HttpScheme
pattern $bHttpScheme_Https :: HttpScheme
$mHttpScheme_Https :: forall r. HttpScheme -> (Void# -> r) -> (Void# -> r) -> r
HttpScheme_Https = HttpScheme' "https"

{-# COMPLETE
  HttpScheme_Http,
  HttpScheme_Https,
  HttpScheme'
  #-}