{-# 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.Glacier.Types.ActionCode
-- 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.Glacier.Types.ActionCode
  ( ActionCode
      ( ..,
        ActionCode_ArchiveRetrieval,
        ActionCode_InventoryRetrieval,
        ActionCode_Select
      ),
  )
where

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

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

pattern ActionCode_ArchiveRetrieval :: ActionCode
pattern $bActionCode_ArchiveRetrieval :: ActionCode
$mActionCode_ArchiveRetrieval :: forall r. ActionCode -> (Void# -> r) -> (Void# -> r) -> r
ActionCode_ArchiveRetrieval = ActionCode' "ArchiveRetrieval"

pattern ActionCode_InventoryRetrieval :: ActionCode
pattern $bActionCode_InventoryRetrieval :: ActionCode
$mActionCode_InventoryRetrieval :: forall r. ActionCode -> (Void# -> r) -> (Void# -> r) -> r
ActionCode_InventoryRetrieval = ActionCode' "InventoryRetrieval"

pattern ActionCode_Select :: ActionCode
pattern $bActionCode_Select :: ActionCode
$mActionCode_Select :: forall r. ActionCode -> (Void# -> r) -> (Void# -> r) -> r
ActionCode_Select = ActionCode' "Select"

{-# COMPLETE
  ActionCode_ArchiveRetrieval,
  ActionCode_InventoryRetrieval,
  ActionCode_Select,
  ActionCode'
  #-}