{-# 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.TaggingDirective
-- 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.TaggingDirective
  ( TaggingDirective
      ( ..,
        TaggingDirective_COPY,
        TaggingDirective_REPLACE
      ),
  )
where

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

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

pattern TaggingDirective_COPY :: TaggingDirective
pattern $bTaggingDirective_COPY :: TaggingDirective
$mTaggingDirective_COPY :: forall r. TaggingDirective -> (Void# -> r) -> (Void# -> r) -> r
TaggingDirective_COPY = TaggingDirective' "COPY"

pattern TaggingDirective_REPLACE :: TaggingDirective
pattern $bTaggingDirective_REPLACE :: TaggingDirective
$mTaggingDirective_REPLACE :: forall r. TaggingDirective -> (Void# -> r) -> (Void# -> r) -> r
TaggingDirective_REPLACE = TaggingDirective' "REPLACE"

{-# COMPLETE
  TaggingDirective_COPY,
  TaggingDirective_REPLACE,
  TaggingDirective'
  #-}