{-# 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.ObjectCannedACL
-- 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.ObjectCannedACL
  ( ObjectCannedACL
      ( ..,
        ObjectCannedACL_Authenticated_read,
        ObjectCannedACL_Aws_exec_read,
        ObjectCannedACL_Bucket_owner_full_control,
        ObjectCannedACL_Bucket_owner_read,
        ObjectCannedACL_Private,
        ObjectCannedACL_Public_read,
        ObjectCannedACL_Public_read_write
      ),
  )
where

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

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

pattern ObjectCannedACL_Authenticated_read :: ObjectCannedACL
pattern $bObjectCannedACL_Authenticated_read :: ObjectCannedACL
$mObjectCannedACL_Authenticated_read :: forall r. ObjectCannedACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectCannedACL_Authenticated_read = ObjectCannedACL' "authenticated-read"

pattern ObjectCannedACL_Aws_exec_read :: ObjectCannedACL
pattern $bObjectCannedACL_Aws_exec_read :: ObjectCannedACL
$mObjectCannedACL_Aws_exec_read :: forall r. ObjectCannedACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectCannedACL_Aws_exec_read = ObjectCannedACL' "aws-exec-read"

pattern ObjectCannedACL_Bucket_owner_full_control :: ObjectCannedACL
pattern $bObjectCannedACL_Bucket_owner_full_control :: ObjectCannedACL
$mObjectCannedACL_Bucket_owner_full_control :: forall r. ObjectCannedACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectCannedACL_Bucket_owner_full_control = ObjectCannedACL' "bucket-owner-full-control"

pattern ObjectCannedACL_Bucket_owner_read :: ObjectCannedACL
pattern $bObjectCannedACL_Bucket_owner_read :: ObjectCannedACL
$mObjectCannedACL_Bucket_owner_read :: forall r. ObjectCannedACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectCannedACL_Bucket_owner_read = ObjectCannedACL' "bucket-owner-read"

pattern ObjectCannedACL_Private :: ObjectCannedACL
pattern $bObjectCannedACL_Private :: ObjectCannedACL
$mObjectCannedACL_Private :: forall r. ObjectCannedACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectCannedACL_Private = ObjectCannedACL' "private"

pattern ObjectCannedACL_Public_read :: ObjectCannedACL
pattern $bObjectCannedACL_Public_read :: ObjectCannedACL
$mObjectCannedACL_Public_read :: forall r. ObjectCannedACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectCannedACL_Public_read = ObjectCannedACL' "public-read"

pattern ObjectCannedACL_Public_read_write :: ObjectCannedACL
pattern $bObjectCannedACL_Public_read_write :: ObjectCannedACL
$mObjectCannedACL_Public_read_write :: forall r. ObjectCannedACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectCannedACL_Public_read_write = ObjectCannedACL' "public-read-write"

{-# COMPLETE
  ObjectCannedACL_Authenticated_read,
  ObjectCannedACL_Aws_exec_read,
  ObjectCannedACL_Bucket_owner_full_control,
  ObjectCannedACL_Bucket_owner_read,
  ObjectCannedACL_Private,
  ObjectCannedACL_Public_read,
  ObjectCannedACL_Public_read_write,
  ObjectCannedACL'
  #-}