{-# 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.S3.Types.BucketCannedACL
-- 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.S3.Types.BucketCannedACL
  ( BucketCannedACL
      ( ..,
        BucketCannedACL_Authenticated_read,
        BucketCannedACL_Private,
        BucketCannedACL_Public_read,
        BucketCannedACL_Public_read_write
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude
import Amazonka.S3.Internal

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

pattern BucketCannedACL_Authenticated_read :: BucketCannedACL
pattern $bBucketCannedACL_Authenticated_read :: BucketCannedACL
$mBucketCannedACL_Authenticated_read :: forall r. BucketCannedACL -> (Void# -> r) -> (Void# -> r) -> r
BucketCannedACL_Authenticated_read = BucketCannedACL' "authenticated-read"

pattern BucketCannedACL_Private :: BucketCannedACL
pattern $bBucketCannedACL_Private :: BucketCannedACL
$mBucketCannedACL_Private :: forall r. BucketCannedACL -> (Void# -> r) -> (Void# -> r) -> r
BucketCannedACL_Private = BucketCannedACL' "private"

pattern BucketCannedACL_Public_read :: BucketCannedACL
pattern $bBucketCannedACL_Public_read :: BucketCannedACL
$mBucketCannedACL_Public_read :: forall r. BucketCannedACL -> (Void# -> r) -> (Void# -> r) -> r
BucketCannedACL_Public_read = BucketCannedACL' "public-read"

pattern BucketCannedACL_Public_read_write :: BucketCannedACL
pattern $bBucketCannedACL_Public_read_write :: BucketCannedACL
$mBucketCannedACL_Public_read_write :: forall r. BucketCannedACL -> (Void# -> r) -> (Void# -> r) -> r
BucketCannedACL_Public_read_write = BucketCannedACL' "public-read-write"

{-# COMPLETE
  BucketCannedACL_Authenticated_read,
  BucketCannedACL_Private,
  BucketCannedACL_Public_read,
  BucketCannedACL_Public_read_write,
  BucketCannedACL'
  #-}