{-# 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.InstanceAccessProtocol
-- 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.InstanceAccessProtocol
  ( InstanceAccessProtocol
      ( ..,
        InstanceAccessProtocol_Rdp,
        InstanceAccessProtocol_Ssh
      ),
  )
where

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

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

pattern InstanceAccessProtocol_Rdp :: InstanceAccessProtocol
pattern $bInstanceAccessProtocol_Rdp :: InstanceAccessProtocol
$mInstanceAccessProtocol_Rdp :: forall r.
InstanceAccessProtocol -> (Void# -> r) -> (Void# -> r) -> r
InstanceAccessProtocol_Rdp = InstanceAccessProtocol' "rdp"

pattern InstanceAccessProtocol_Ssh :: InstanceAccessProtocol
pattern $bInstanceAccessProtocol_Ssh :: InstanceAccessProtocol
$mInstanceAccessProtocol_Ssh :: forall r.
InstanceAccessProtocol -> (Void# -> r) -> (Void# -> r) -> r
InstanceAccessProtocol_Ssh = InstanceAccessProtocol' "ssh"

{-# COMPLETE
  InstanceAccessProtocol_Rdp,
  InstanceAccessProtocol_Ssh,
  InstanceAccessProtocol'
  #-}