{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.LicenseManager.Types.LicenseConfigurationUsage where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.LicenseManager.Types.ResourceType
import qualified Amazonka.Prelude as Prelude
data LicenseConfigurationUsage = LicenseConfigurationUsage'
{
LicenseConfigurationUsage -> Maybe POSIX
associationTime :: Prelude.Maybe Data.POSIX,
LicenseConfigurationUsage -> Maybe Integer
consumedLicenses :: Prelude.Maybe Prelude.Integer,
LicenseConfigurationUsage -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
LicenseConfigurationUsage -> Maybe Text
resourceOwnerId :: Prelude.Maybe Prelude.Text,
LicenseConfigurationUsage -> Maybe Text
resourceStatus :: Prelude.Maybe Prelude.Text,
LicenseConfigurationUsage -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType
}
deriving (LicenseConfigurationUsage -> LicenseConfigurationUsage -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LicenseConfigurationUsage -> LicenseConfigurationUsage -> Bool
$c/= :: LicenseConfigurationUsage -> LicenseConfigurationUsage -> Bool
== :: LicenseConfigurationUsage -> LicenseConfigurationUsage -> Bool
$c== :: LicenseConfigurationUsage -> LicenseConfigurationUsage -> Bool
Prelude.Eq, ReadPrec [LicenseConfigurationUsage]
ReadPrec LicenseConfigurationUsage
Int -> ReadS LicenseConfigurationUsage
ReadS [LicenseConfigurationUsage]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LicenseConfigurationUsage]
$creadListPrec :: ReadPrec [LicenseConfigurationUsage]
readPrec :: ReadPrec LicenseConfigurationUsage
$creadPrec :: ReadPrec LicenseConfigurationUsage
readList :: ReadS [LicenseConfigurationUsage]
$creadList :: ReadS [LicenseConfigurationUsage]
readsPrec :: Int -> ReadS LicenseConfigurationUsage
$creadsPrec :: Int -> ReadS LicenseConfigurationUsage
Prelude.Read, Int -> LicenseConfigurationUsage -> ShowS
[LicenseConfigurationUsage] -> ShowS
LicenseConfigurationUsage -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LicenseConfigurationUsage] -> ShowS
$cshowList :: [LicenseConfigurationUsage] -> ShowS
show :: LicenseConfigurationUsage -> String
$cshow :: LicenseConfigurationUsage -> String
showsPrec :: Int -> LicenseConfigurationUsage -> ShowS
$cshowsPrec :: Int -> LicenseConfigurationUsage -> ShowS
Prelude.Show, forall x.
Rep LicenseConfigurationUsage x -> LicenseConfigurationUsage
forall x.
LicenseConfigurationUsage -> Rep LicenseConfigurationUsage x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LicenseConfigurationUsage x -> LicenseConfigurationUsage
$cfrom :: forall x.
LicenseConfigurationUsage -> Rep LicenseConfigurationUsage x
Prelude.Generic)
newLicenseConfigurationUsage ::
LicenseConfigurationUsage
newLicenseConfigurationUsage :: LicenseConfigurationUsage
newLicenseConfigurationUsage =
LicenseConfigurationUsage'
{ $sel:associationTime:LicenseConfigurationUsage' :: Maybe POSIX
associationTime =
forall a. Maybe a
Prelude.Nothing,
$sel:consumedLicenses:LicenseConfigurationUsage' :: Maybe Integer
consumedLicenses = forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:LicenseConfigurationUsage' :: Maybe Text
resourceArn = forall a. Maybe a
Prelude.Nothing,
$sel:resourceOwnerId:LicenseConfigurationUsage' :: Maybe Text
resourceOwnerId = forall a. Maybe a
Prelude.Nothing,
$sel:resourceStatus:LicenseConfigurationUsage' :: Maybe Text
resourceStatus = forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:LicenseConfigurationUsage' :: Maybe ResourceType
resourceType = forall a. Maybe a
Prelude.Nothing
}
licenseConfigurationUsage_associationTime :: Lens.Lens' LicenseConfigurationUsage (Prelude.Maybe Prelude.UTCTime)
licenseConfigurationUsage_associationTime :: Lens' LicenseConfigurationUsage (Maybe UTCTime)
licenseConfigurationUsage_associationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationUsage' {Maybe POSIX
associationTime :: Maybe POSIX
$sel:associationTime:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe POSIX
associationTime} -> Maybe POSIX
associationTime) (\s :: LicenseConfigurationUsage
s@LicenseConfigurationUsage' {} Maybe POSIX
a -> LicenseConfigurationUsage
s {$sel:associationTime:LicenseConfigurationUsage' :: Maybe POSIX
associationTime = Maybe POSIX
a} :: LicenseConfigurationUsage) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall (a :: Format). Iso' (Time a) UTCTime
Data._Time
licenseConfigurationUsage_consumedLicenses :: Lens.Lens' LicenseConfigurationUsage (Prelude.Maybe Prelude.Integer)
licenseConfigurationUsage_consumedLicenses :: Lens' LicenseConfigurationUsage (Maybe Integer)
licenseConfigurationUsage_consumedLicenses = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationUsage' {Maybe Integer
consumedLicenses :: Maybe Integer
$sel:consumedLicenses:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Integer
consumedLicenses} -> Maybe Integer
consumedLicenses) (\s :: LicenseConfigurationUsage
s@LicenseConfigurationUsage' {} Maybe Integer
a -> LicenseConfigurationUsage
s {$sel:consumedLicenses:LicenseConfigurationUsage' :: Maybe Integer
consumedLicenses = Maybe Integer
a} :: LicenseConfigurationUsage)
licenseConfigurationUsage_resourceArn :: Lens.Lens' LicenseConfigurationUsage (Prelude.Maybe Prelude.Text)
licenseConfigurationUsage_resourceArn :: Lens' LicenseConfigurationUsage (Maybe Text)
licenseConfigurationUsage_resourceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationUsage' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: LicenseConfigurationUsage
s@LicenseConfigurationUsage' {} Maybe Text
a -> LicenseConfigurationUsage
s {$sel:resourceArn:LicenseConfigurationUsage' :: Maybe Text
resourceArn = Maybe Text
a} :: LicenseConfigurationUsage)
licenseConfigurationUsage_resourceOwnerId :: Lens.Lens' LicenseConfigurationUsage (Prelude.Maybe Prelude.Text)
licenseConfigurationUsage_resourceOwnerId :: Lens' LicenseConfigurationUsage (Maybe Text)
licenseConfigurationUsage_resourceOwnerId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationUsage' {Maybe Text
resourceOwnerId :: Maybe Text
$sel:resourceOwnerId:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Text
resourceOwnerId} -> Maybe Text
resourceOwnerId) (\s :: LicenseConfigurationUsage
s@LicenseConfigurationUsage' {} Maybe Text
a -> LicenseConfigurationUsage
s {$sel:resourceOwnerId:LicenseConfigurationUsage' :: Maybe Text
resourceOwnerId = Maybe Text
a} :: LicenseConfigurationUsage)
licenseConfigurationUsage_resourceStatus :: Lens.Lens' LicenseConfigurationUsage (Prelude.Maybe Prelude.Text)
licenseConfigurationUsage_resourceStatus :: Lens' LicenseConfigurationUsage (Maybe Text)
licenseConfigurationUsage_resourceStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationUsage' {Maybe Text
resourceStatus :: Maybe Text
$sel:resourceStatus:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Text
resourceStatus} -> Maybe Text
resourceStatus) (\s :: LicenseConfigurationUsage
s@LicenseConfigurationUsage' {} Maybe Text
a -> LicenseConfigurationUsage
s {$sel:resourceStatus:LicenseConfigurationUsage' :: Maybe Text
resourceStatus = Maybe Text
a} :: LicenseConfigurationUsage)
licenseConfigurationUsage_resourceType :: Lens.Lens' LicenseConfigurationUsage (Prelude.Maybe ResourceType)
licenseConfigurationUsage_resourceType :: Lens' LicenseConfigurationUsage (Maybe ResourceType)
licenseConfigurationUsage_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationUsage' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: LicenseConfigurationUsage
s@LicenseConfigurationUsage' {} Maybe ResourceType
a -> LicenseConfigurationUsage
s {$sel:resourceType:LicenseConfigurationUsage' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: LicenseConfigurationUsage)
instance Data.FromJSON LicenseConfigurationUsage where
parseJSON :: Value -> Parser LicenseConfigurationUsage
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"LicenseConfigurationUsage"
( \Object
x ->
Maybe POSIX
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe ResourceType
-> LicenseConfigurationUsage
LicenseConfigurationUsage'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"AssociationTime")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ConsumedLicenses")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResourceArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResourceOwnerId")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResourceStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"ResourceType")
)
instance Prelude.Hashable LicenseConfigurationUsage where
hashWithSalt :: Int -> LicenseConfigurationUsage -> Int
hashWithSalt Int
_salt LicenseConfigurationUsage' {Maybe Integer
Maybe Text
Maybe POSIX
Maybe ResourceType
resourceType :: Maybe ResourceType
resourceStatus :: Maybe Text
resourceOwnerId :: Maybe Text
resourceArn :: Maybe Text
consumedLicenses :: Maybe Integer
associationTime :: Maybe POSIX
$sel:resourceType:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe ResourceType
$sel:resourceStatus:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Text
$sel:resourceOwnerId:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Text
$sel:resourceArn:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Text
$sel:consumedLicenses:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Integer
$sel:associationTime:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe POSIX
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe POSIX
associationTime
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
consumedLicenses
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceOwnerId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceType
resourceType
instance Prelude.NFData LicenseConfigurationUsage where
rnf :: LicenseConfigurationUsage -> ()
rnf LicenseConfigurationUsage' {Maybe Integer
Maybe Text
Maybe POSIX
Maybe ResourceType
resourceType :: Maybe ResourceType
resourceStatus :: Maybe Text
resourceOwnerId :: Maybe Text
resourceArn :: Maybe Text
consumedLicenses :: Maybe Integer
associationTime :: Maybe POSIX
$sel:resourceType:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe ResourceType
$sel:resourceStatus:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Text
$sel:resourceOwnerId:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Text
$sel:resourceArn:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Text
$sel:consumedLicenses:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe Integer
$sel:associationTime:LicenseConfigurationUsage' :: LicenseConfigurationUsage -> Maybe POSIX
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe POSIX
associationTime
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
consumedLicenses
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceOwnerId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceType
resourceType