{-# 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-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.MetadataDirective
  ( MetadataDirective
      ( ..,
        MetadataDirective_COPY,
        MetadataDirective_REPLACE
      ),
  )
where

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

newtype MetadataDirective = MetadataDirective'
  { MetadataDirective -> Text
fromMetadataDirective ::
      Core.Text
  }
  deriving stock
    ( Int -> MetadataDirective -> ShowS
[MetadataDirective] -> ShowS
MetadataDirective -> String
(Int -> MetadataDirective -> ShowS)
-> (MetadataDirective -> String)
-> ([MetadataDirective] -> ShowS)
-> Show MetadataDirective
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]
(Int -> ReadS MetadataDirective)
-> ReadS [MetadataDirective]
-> ReadPrec MetadataDirective
-> ReadPrec [MetadataDirective]
-> Read 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
(MetadataDirective -> MetadataDirective -> Bool)
-> (MetadataDirective -> MetadataDirective -> Bool)
-> Eq MetadataDirective
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
Eq MetadataDirective
-> (MetadataDirective -> MetadataDirective -> Ordering)
-> (MetadataDirective -> MetadataDirective -> Bool)
-> (MetadataDirective -> MetadataDirective -> Bool)
-> (MetadataDirective -> MetadataDirective -> Bool)
-> (MetadataDirective -> MetadataDirective -> Bool)
-> (MetadataDirective -> MetadataDirective -> MetadataDirective)
-> (MetadataDirective -> MetadataDirective -> MetadataDirective)
-> Ord 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
$cp1Ord :: Eq MetadataDirective
Prelude.Ord,
      (forall x. MetadataDirective -> Rep MetadataDirective x)
-> (forall x. Rep MetadataDirective x -> MetadataDirective)
-> Generic MetadataDirective
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
    ( Int -> MetadataDirective -> Int
MetadataDirective -> Int
(Int -> MetadataDirective -> Int)
-> (MetadataDirective -> Int) -> Hashable MetadataDirective
forall 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 -> ()
(MetadataDirective -> ()) -> NFData MetadataDirective
forall a. (a -> ()) -> NFData a
rnf :: MetadataDirective -> ()
$crnf :: MetadataDirective -> ()
Prelude.NFData,
      Text -> Either String MetadataDirective
(Text -> Either String MetadataDirective)
-> FromText MetadataDirective
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String MetadataDirective
$cfromText :: Text -> Either String MetadataDirective
Core.FromText,
      MetadataDirective -> Text
(MetadataDirective -> Text) -> ToText MetadataDirective
forall a. (a -> Text) -> ToText a
toText :: MetadataDirective -> Text
$ctoText :: MetadataDirective -> Text
Core.ToText,
      MetadataDirective -> ByteString
(MetadataDirective -> ByteString) -> ToByteString MetadataDirective
forall a. (a -> ByteString) -> ToByteString a
toBS :: MetadataDirective -> ByteString
$ctoBS :: MetadataDirective -> ByteString
Core.ToByteString,
      MetadataDirective -> ByteStringBuilder
(MetadataDirective -> ByteStringBuilder) -> ToLog MetadataDirective
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: MetadataDirective -> ByteStringBuilder
$cbuild :: MetadataDirective -> ByteStringBuilder
Core.ToLog,
      HeaderName -> MetadataDirective -> [Header]
(HeaderName -> MetadataDirective -> [Header])
-> ToHeader MetadataDirective
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> MetadataDirective -> [Header]
$ctoHeader :: HeaderName -> MetadataDirective -> [Header]
Core.ToHeader,
      MetadataDirective -> QueryString
(MetadataDirective -> QueryString) -> ToQuery MetadataDirective
forall a. (a -> QueryString) -> ToQuery a
toQuery :: MetadataDirective -> QueryString
$ctoQuery :: MetadataDirective -> QueryString
Core.ToQuery,
      Value -> Parser [MetadataDirective]
Value -> Parser MetadataDirective
(Value -> Parser MetadataDirective)
-> (Value -> Parser [MetadataDirective])
-> FromJSON 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
Core.FromJSON,
      FromJSONKeyFunction [MetadataDirective]
FromJSONKeyFunction MetadataDirective
FromJSONKeyFunction MetadataDirective
-> FromJSONKeyFunction [MetadataDirective]
-> FromJSONKey MetadataDirective
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [MetadataDirective]
$cfromJSONKeyList :: FromJSONKeyFunction [MetadataDirective]
fromJSONKey :: FromJSONKeyFunction MetadataDirective
$cfromJSONKey :: FromJSONKeyFunction MetadataDirective
Core.FromJSONKey,
      [MetadataDirective] -> Encoding
[MetadataDirective] -> Value
MetadataDirective -> Encoding
MetadataDirective -> Value
(MetadataDirective -> Value)
-> (MetadataDirective -> Encoding)
-> ([MetadataDirective] -> Value)
-> ([MetadataDirective] -> Encoding)
-> ToJSON MetadataDirective
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
Core.ToJSON,
      ToJSONKeyFunction [MetadataDirective]
ToJSONKeyFunction MetadataDirective
ToJSONKeyFunction MetadataDirective
-> ToJSONKeyFunction [MetadataDirective]
-> ToJSONKey MetadataDirective
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [MetadataDirective]
$ctoJSONKeyList :: ToJSONKeyFunction [MetadataDirective]
toJSONKey :: ToJSONKeyFunction MetadataDirective
$ctoJSONKey :: ToJSONKeyFunction MetadataDirective
Core.ToJSONKey,
      [Node] -> Either String MetadataDirective
([Node] -> Either String MetadataDirective)
-> FromXML MetadataDirective
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String MetadataDirective
$cparseXML :: [Node] -> Either String MetadataDirective
Core.FromXML,
      MetadataDirective -> XML
(MetadataDirective -> XML) -> ToXML MetadataDirective
forall a. (a -> XML) -> ToXML a
toXML :: MetadataDirective -> XML
$ctoXML :: MetadataDirective -> XML
Core.ToXML
    )

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

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

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