{-# 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.MetadataDirective
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.S3.Types.MetadataDirective
  ( MetadataDirective
      ( ..,
        MetadataDirective_COPY,
        MetadataDirective_REPLACE
      ),
  )
where

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

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

pattern MetadataDirective_COPY :: MetadataDirective
pattern $bMetadataDirective_COPY :: MetadataDirective
$mMetadataDirective_COPY :: forall {r}. MetadataDirective -> ((# #) -> r) -> ((# #) -> r) -> r
MetadataDirective_COPY = MetadataDirective' "COPY"

pattern MetadataDirective_REPLACE :: MetadataDirective
pattern $bMetadataDirective_REPLACE :: MetadataDirective
$mMetadataDirective_REPLACE :: forall {r}. MetadataDirective -> ((# #) -> r) -> ((# #) -> r) -> r
MetadataDirective_REPLACE = MetadataDirective' "REPLACE"

{-# COMPLETE
  MetadataDirective_COPY,
  MetadataDirective_REPLACE,
  MetadataDirective'
  #-}