{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- 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.Data as Data
import qualified Amazonka.Prelude as Prelude

newtype ContactProtocol = ContactProtocol'
  { ContactProtocol -> Text
fromContactProtocol ::
      Data.Text
  }
  deriving stock
    ( Int -> ContactProtocol -> ShowS
[ContactProtocol] -> ShowS
ContactProtocol -> String
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]
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
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
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
Prelude.Ord,
      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
    ( Eq ContactProtocol
Int -> ContactProtocol -> Int
ContactProtocol -> Int
forall a. Eq 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 -> ()
forall a. (a -> ()) -> NFData a
rnf :: ContactProtocol -> ()
$crnf :: ContactProtocol -> ()
Prelude.NFData,
      Text -> Either String ContactProtocol
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String ContactProtocol
$cfromText :: Text -> Either String ContactProtocol
Data.FromText,
      ContactProtocol -> Text
forall a. (a -> Text) -> ToText a
toText :: ContactProtocol -> Text
$ctoText :: ContactProtocol -> Text
Data.ToText,
      ContactProtocol -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: ContactProtocol -> ByteString
$ctoBS :: ContactProtocol -> ByteString
Data.ToByteString,
      ContactProtocol -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: ContactProtocol -> ByteStringBuilder
$cbuild :: ContactProtocol -> ByteStringBuilder
Data.ToLog,
      HeaderName -> ContactProtocol -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> ContactProtocol -> [Header]
$ctoHeader :: HeaderName -> ContactProtocol -> [Header]
Data.ToHeader,
      ContactProtocol -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: ContactProtocol -> QueryString
$ctoQuery :: ContactProtocol -> QueryString
Data.ToQuery,
      Value -> Parser [ContactProtocol]
Value -> Parser 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
Data.FromJSON,
      FromJSONKeyFunction [ContactProtocol]
FromJSONKeyFunction ContactProtocol
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [ContactProtocol]
$cfromJSONKeyList :: FromJSONKeyFunction [ContactProtocol]
fromJSONKey :: FromJSONKeyFunction ContactProtocol
$cfromJSONKey :: FromJSONKeyFunction ContactProtocol
Data.FromJSONKey,
      [ContactProtocol] -> Encoding
[ContactProtocol] -> Value
ContactProtocol -> Encoding
ContactProtocol -> Value
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
Data.ToJSON,
      ToJSONKeyFunction [ContactProtocol]
ToJSONKeyFunction ContactProtocol
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [ContactProtocol]
$ctoJSONKeyList :: ToJSONKeyFunction [ContactProtocol]
toJSONKey :: ToJSONKeyFunction ContactProtocol
$ctoJSONKey :: ToJSONKeyFunction ContactProtocol
Data.ToJSONKey,
      [Node] -> Either String ContactProtocol
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String ContactProtocol
$cparseXML :: [Node] -> Either String ContactProtocol
Data.FromXML,
      ContactProtocol -> XML
forall a. (a -> XML) -> ToXML a
toXML :: ContactProtocol -> XML
$ctoXML :: ContactProtocol -> XML
Data.ToXML
    )

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

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

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