{-# 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.ResourceBucketAccess
-- 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.ResourceBucketAccess
  ( ResourceBucketAccess
      ( ..,
        ResourceBucketAccess_Allow,
        ResourceBucketAccess_Deny
      ),
  )
where

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

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

pattern ResourceBucketAccess_Allow :: ResourceBucketAccess
pattern $bResourceBucketAccess_Allow :: ResourceBucketAccess
$mResourceBucketAccess_Allow :: forall r. ResourceBucketAccess -> (Void# -> r) -> (Void# -> r) -> r
ResourceBucketAccess_Allow = ResourceBucketAccess' "allow"

pattern ResourceBucketAccess_Deny :: ResourceBucketAccess
pattern $bResourceBucketAccess_Deny :: ResourceBucketAccess
$mResourceBucketAccess_Deny :: forall r. ResourceBucketAccess -> (Void# -> r) -> (Void# -> r) -> r
ResourceBucketAccess_Deny = ResourceBucketAccess' "deny"

{-# COMPLETE
  ResourceBucketAccess_Allow,
  ResourceBucketAccess_Deny,
  ResourceBucketAccess'
  #-}