{-# 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.StorageGateway.Types.ObjectACL
-- 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.StorageGateway.Types.ObjectACL
  ( ObjectACL
      ( ..,
        ObjectACL_Authenticated_read,
        ObjectACL_Aws_exec_read,
        ObjectACL_Bucket_owner_full_control,
        ObjectACL_Bucket_owner_read,
        ObjectACL_Private,
        ObjectACL_Public_read,
        ObjectACL_Public_read_write
      ),
  )
where

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

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

pattern ObjectACL_Authenticated_read :: ObjectACL
pattern $bObjectACL_Authenticated_read :: ObjectACL
$mObjectACL_Authenticated_read :: forall r. ObjectACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectACL_Authenticated_read = ObjectACL' "authenticated-read"

pattern ObjectACL_Aws_exec_read :: ObjectACL
pattern $bObjectACL_Aws_exec_read :: ObjectACL
$mObjectACL_Aws_exec_read :: forall r. ObjectACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectACL_Aws_exec_read = ObjectACL' "aws-exec-read"

pattern ObjectACL_Bucket_owner_full_control :: ObjectACL
pattern $bObjectACL_Bucket_owner_full_control :: ObjectACL
$mObjectACL_Bucket_owner_full_control :: forall r. ObjectACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectACL_Bucket_owner_full_control = ObjectACL' "bucket-owner-full-control"

pattern ObjectACL_Bucket_owner_read :: ObjectACL
pattern $bObjectACL_Bucket_owner_read :: ObjectACL
$mObjectACL_Bucket_owner_read :: forall r. ObjectACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectACL_Bucket_owner_read = ObjectACL' "bucket-owner-read"

pattern ObjectACL_Private :: ObjectACL
pattern $bObjectACL_Private :: ObjectACL
$mObjectACL_Private :: forall r. ObjectACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectACL_Private = ObjectACL' "private"

pattern ObjectACL_Public_read :: ObjectACL
pattern $bObjectACL_Public_read :: ObjectACL
$mObjectACL_Public_read :: forall r. ObjectACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectACL_Public_read = ObjectACL' "public-read"

pattern ObjectACL_Public_read_write :: ObjectACL
pattern $bObjectACL_Public_read_write :: ObjectACL
$mObjectACL_Public_read_write :: forall r. ObjectACL -> (Void# -> r) -> (Void# -> r) -> r
ObjectACL_Public_read_write = ObjectACL' "public-read-write"

{-# COMPLETE
  ObjectACL_Authenticated_read,
  ObjectACL_Aws_exec_read,
  ObjectACL_Bucket_owner_full_control,
  ObjectACL_Bucket_owner_read,
  ObjectACL_Private,
  ObjectACL_Public_read,
  ObjectACL_Public_read_write,
  ObjectACL'
  #-}