{-# 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.EFS.Types.ResourceIdType
-- 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.EFS.Types.ResourceIdType
  ( ResourceIdType
      ( ..,
        ResourceIdType_LONG_ID,
        ResourceIdType_SHORT_ID
      ),
  )
where

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

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

pattern ResourceIdType_LONG_ID :: ResourceIdType
pattern $bResourceIdType_LONG_ID :: ResourceIdType
$mResourceIdType_LONG_ID :: forall r. ResourceIdType -> (Void# -> r) -> (Void# -> r) -> r
ResourceIdType_LONG_ID = ResourceIdType' "LONG_ID"

pattern ResourceIdType_SHORT_ID :: ResourceIdType
pattern $bResourceIdType_SHORT_ID :: ResourceIdType
$mResourceIdType_SHORT_ID :: forall r. ResourceIdType -> (Void# -> r) -> (Void# -> r) -> r
ResourceIdType_SHORT_ID = ResourceIdType' "SHORT_ID"

{-# COMPLETE
  ResourceIdType_LONG_ID,
  ResourceIdType_SHORT_ID,
  ResourceIdType'
  #-}