{-# 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.Snowball.Types.StorageUnit
-- 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.Snowball.Types.StorageUnit
  ( StorageUnit
      ( ..,
        StorageUnit_TB
      ),
  )
where

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

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

pattern StorageUnit_TB :: StorageUnit
pattern $bStorageUnit_TB :: StorageUnit
$mStorageUnit_TB :: forall r. StorageUnit -> (Void# -> r) -> (Void# -> r) -> r
StorageUnit_TB = StorageUnit' "TB"

{-# COMPLETE
  StorageUnit_TB,
  StorageUnit'
  #-}