{-# 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.IAM.Types.GlobalEndpointTokenVersion
-- 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.IAM.Types.GlobalEndpointTokenVersion
  ( GlobalEndpointTokenVersion
      ( ..,
        GlobalEndpointTokenVersion_V1Token,
        GlobalEndpointTokenVersion_V2Token
      ),
  )
where

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

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

pattern GlobalEndpointTokenVersion_V1Token :: GlobalEndpointTokenVersion
pattern $bGlobalEndpointTokenVersion_V1Token :: GlobalEndpointTokenVersion
$mGlobalEndpointTokenVersion_V1Token :: forall r.
GlobalEndpointTokenVersion -> (Void# -> r) -> (Void# -> r) -> r
GlobalEndpointTokenVersion_V1Token = GlobalEndpointTokenVersion' "v1Token"

pattern GlobalEndpointTokenVersion_V2Token :: GlobalEndpointTokenVersion
pattern $bGlobalEndpointTokenVersion_V2Token :: GlobalEndpointTokenVersion
$mGlobalEndpointTokenVersion_V2Token :: forall r.
GlobalEndpointTokenVersion -> (Void# -> r) -> (Void# -> r) -> r
GlobalEndpointTokenVersion_V2Token = GlobalEndpointTokenVersion' "v2Token"

{-# COMPLETE
  GlobalEndpointTokenVersion_V1Token,
  GlobalEndpointTokenVersion_V2Token,
  GlobalEndpointTokenVersion'
  #-}