{-# 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.LicenseManager.Types.AllowedOperation
-- 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.LicenseManager.Types.AllowedOperation
  ( AllowedOperation
      ( ..,
        AllowedOperation_CheckInLicense,
        AllowedOperation_CheckoutBorrowLicense,
        AllowedOperation_CheckoutLicense,
        AllowedOperation_CreateGrant,
        AllowedOperation_CreateToken,
        AllowedOperation_ExtendConsumptionLicense,
        AllowedOperation_ListPurchasedLicenses
      ),
  )
where

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

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

pattern AllowedOperation_CheckInLicense :: AllowedOperation
pattern $bAllowedOperation_CheckInLicense :: AllowedOperation
$mAllowedOperation_CheckInLicense :: forall r. AllowedOperation -> (Void# -> r) -> (Void# -> r) -> r
AllowedOperation_CheckInLicense = AllowedOperation' "CheckInLicense"

pattern AllowedOperation_CheckoutBorrowLicense :: AllowedOperation
pattern $bAllowedOperation_CheckoutBorrowLicense :: AllowedOperation
$mAllowedOperation_CheckoutBorrowLicense :: forall r. AllowedOperation -> (Void# -> r) -> (Void# -> r) -> r
AllowedOperation_CheckoutBorrowLicense = AllowedOperation' "CheckoutBorrowLicense"

pattern AllowedOperation_CheckoutLicense :: AllowedOperation
pattern $bAllowedOperation_CheckoutLicense :: AllowedOperation
$mAllowedOperation_CheckoutLicense :: forall r. AllowedOperation -> (Void# -> r) -> (Void# -> r) -> r
AllowedOperation_CheckoutLicense = AllowedOperation' "CheckoutLicense"

pattern AllowedOperation_CreateGrant :: AllowedOperation
pattern $bAllowedOperation_CreateGrant :: AllowedOperation
$mAllowedOperation_CreateGrant :: forall r. AllowedOperation -> (Void# -> r) -> (Void# -> r) -> r
AllowedOperation_CreateGrant = AllowedOperation' "CreateGrant"

pattern AllowedOperation_CreateToken :: AllowedOperation
pattern $bAllowedOperation_CreateToken :: AllowedOperation
$mAllowedOperation_CreateToken :: forall r. AllowedOperation -> (Void# -> r) -> (Void# -> r) -> r
AllowedOperation_CreateToken = AllowedOperation' "CreateToken"

pattern AllowedOperation_ExtendConsumptionLicense :: AllowedOperation
pattern $bAllowedOperation_ExtendConsumptionLicense :: AllowedOperation
$mAllowedOperation_ExtendConsumptionLicense :: forall r. AllowedOperation -> (Void# -> r) -> (Void# -> r) -> r
AllowedOperation_ExtendConsumptionLicense = AllowedOperation' "ExtendConsumptionLicense"

pattern AllowedOperation_ListPurchasedLicenses :: AllowedOperation
pattern $bAllowedOperation_ListPurchasedLicenses :: AllowedOperation
$mAllowedOperation_ListPurchasedLicenses :: forall r. AllowedOperation -> (Void# -> r) -> (Void# -> r) -> r
AllowedOperation_ListPurchasedLicenses = AllowedOperation' "ListPurchasedLicenses"

{-# COMPLETE
  AllowedOperation_CheckInLicense,
  AllowedOperation_CheckoutBorrowLicense,
  AllowedOperation_CheckoutLicense,
  AllowedOperation_CreateGrant,
  AllowedOperation_CreateToken,
  AllowedOperation_ExtendConsumptionLicense,
  AllowedOperation_ListPurchasedLicenses,
  AllowedOperation'
  #-}