{-# 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.Inspector2.Types.UsageType
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Inspector2.Types.UsageType
  ( UsageType
      ( ..,
        UsageType_EC2_INSTANCE_HOURS,
        UsageType_ECR_INITIAL_SCAN,
        UsageType_ECR_RESCAN,
        UsageType_LAMBDA_FUNCTION_HOURS
      ),
  )
where

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

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

pattern UsageType_EC2_INSTANCE_HOURS :: UsageType
pattern $bUsageType_EC2_INSTANCE_HOURS :: UsageType
$mUsageType_EC2_INSTANCE_HOURS :: forall {r}. UsageType -> ((# #) -> r) -> ((# #) -> r) -> r
UsageType_EC2_INSTANCE_HOURS = UsageType' "EC2_INSTANCE_HOURS"

pattern UsageType_ECR_INITIAL_SCAN :: UsageType
pattern $bUsageType_ECR_INITIAL_SCAN :: UsageType
$mUsageType_ECR_INITIAL_SCAN :: forall {r}. UsageType -> ((# #) -> r) -> ((# #) -> r) -> r
UsageType_ECR_INITIAL_SCAN = UsageType' "ECR_INITIAL_SCAN"

pattern UsageType_ECR_RESCAN :: UsageType
pattern $bUsageType_ECR_RESCAN :: UsageType
$mUsageType_ECR_RESCAN :: forall {r}. UsageType -> ((# #) -> r) -> ((# #) -> r) -> r
UsageType_ECR_RESCAN = UsageType' "ECR_RESCAN"

pattern UsageType_LAMBDA_FUNCTION_HOURS :: UsageType
pattern $bUsageType_LAMBDA_FUNCTION_HOURS :: UsageType
$mUsageType_LAMBDA_FUNCTION_HOURS :: forall {r}. UsageType -> ((# #) -> r) -> ((# #) -> r) -> r
UsageType_LAMBDA_FUNCTION_HOURS = UsageType' "LAMBDA_FUNCTION_HOURS"

{-# COMPLETE
  UsageType_EC2_INSTANCE_HOURS,
  UsageType_ECR_INITIAL_SCAN,
  UsageType_ECR_RESCAN,
  UsageType_LAMBDA_FUNCTION_HOURS,
  UsageType'
  #-}