{-# 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.ContactProtocol
-- 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.ContactProtocol
  ( ContactProtocol
      ( ..,
        ContactProtocol_Email,
        ContactProtocol_SMS
      ),
  )
where

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

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

pattern ContactProtocol_Email :: ContactProtocol
pattern $bContactProtocol_Email :: ContactProtocol
$mContactProtocol_Email :: forall r. ContactProtocol -> (Void# -> r) -> (Void# -> r) -> r
ContactProtocol_Email = ContactProtocol' "Email"

pattern ContactProtocol_SMS :: ContactProtocol
pattern $bContactProtocol_SMS :: ContactProtocol
$mContactProtocol_SMS :: forall r. ContactProtocol -> (Void# -> r) -> (Void# -> r) -> r
ContactProtocol_SMS = ContactProtocol' "SMS"

{-# COMPLETE
  ContactProtocol_Email,
  ContactProtocol_SMS,
  ContactProtocol'
  #-}