{-# 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.ResourceInventory where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LicenseManager.Types.ResourceType
import qualified Amazonka.Prelude as Prelude
data ResourceInventory = ResourceInventory'
{
ResourceInventory -> Maybe Text
platform :: Prelude.Maybe Prelude.Text,
ResourceInventory -> Maybe Text
resourceId :: Prelude.Maybe Prelude.Text,
ResourceInventory -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
ResourceInventory -> Maybe Text
platformVersion :: Prelude.Maybe Prelude.Text,
ResourceInventory -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
ResourceInventory -> Maybe Text
resourceOwningAccountId :: Prelude.Maybe Prelude.Text
}
deriving (ResourceInventory -> ResourceInventory -> Bool
(ResourceInventory -> ResourceInventory -> Bool)
-> (ResourceInventory -> ResourceInventory -> Bool)
-> Eq ResourceInventory
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceInventory -> ResourceInventory -> Bool
$c/= :: ResourceInventory -> ResourceInventory -> Bool
== :: ResourceInventory -> ResourceInventory -> Bool
$c== :: ResourceInventory -> ResourceInventory -> Bool
Prelude.Eq, ReadPrec [ResourceInventory]
ReadPrec ResourceInventory
Int -> ReadS ResourceInventory
ReadS [ResourceInventory]
(Int -> ReadS ResourceInventory)
-> ReadS [ResourceInventory]
-> ReadPrec ResourceInventory
-> ReadPrec [ResourceInventory]
-> Read ResourceInventory
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceInventory]
$creadListPrec :: ReadPrec [ResourceInventory]
readPrec :: ReadPrec ResourceInventory
$creadPrec :: ReadPrec ResourceInventory
readList :: ReadS [ResourceInventory]
$creadList :: ReadS [ResourceInventory]
readsPrec :: Int -> ReadS ResourceInventory
$creadsPrec :: Int -> ReadS ResourceInventory
Prelude.Read, Int -> ResourceInventory -> ShowS
[ResourceInventory] -> ShowS
ResourceInventory -> String
(Int -> ResourceInventory -> ShowS)
-> (ResourceInventory -> String)
-> ([ResourceInventory] -> ShowS)
-> Show ResourceInventory
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceInventory] -> ShowS
$cshowList :: [ResourceInventory] -> ShowS
show :: ResourceInventory -> String
$cshow :: ResourceInventory -> String
showsPrec :: Int -> ResourceInventory -> ShowS
$cshowsPrec :: Int -> ResourceInventory -> ShowS
Prelude.Show, (forall x. ResourceInventory -> Rep ResourceInventory x)
-> (forall x. Rep ResourceInventory x -> ResourceInventory)
-> Generic ResourceInventory
forall x. Rep ResourceInventory x -> ResourceInventory
forall x. ResourceInventory -> Rep ResourceInventory x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceInventory x -> ResourceInventory
$cfrom :: forall x. ResourceInventory -> Rep ResourceInventory x
Prelude.Generic)
newResourceInventory ::
ResourceInventory
newResourceInventory :: ResourceInventory
newResourceInventory =
ResourceInventory' :: Maybe Text
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ResourceInventory
ResourceInventory'
{ $sel:platform:ResourceInventory' :: Maybe Text
platform = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceId:ResourceInventory' :: Maybe Text
resourceId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:ResourceInventory' :: Maybe ResourceType
resourceType = Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
$sel:platformVersion:ResourceInventory' :: Maybe Text
platformVersion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:ResourceInventory' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceOwningAccountId:ResourceInventory' :: Maybe Text
resourceOwningAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
resourceInventory_platform :: Lens.Lens' ResourceInventory (Prelude.Maybe Prelude.Text)
resourceInventory_platform :: (Maybe Text -> f (Maybe Text))
-> ResourceInventory -> f ResourceInventory
resourceInventory_platform = (ResourceInventory -> Maybe Text)
-> (ResourceInventory -> Maybe Text -> ResourceInventory)
-> Lens
ResourceInventory ResourceInventory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceInventory' {Maybe Text
platform :: Maybe Text
$sel:platform:ResourceInventory' :: ResourceInventory -> Maybe Text
platform} -> Maybe Text
platform) (\s :: ResourceInventory
s@ResourceInventory' {} Maybe Text
a -> ResourceInventory
s {$sel:platform:ResourceInventory' :: Maybe Text
platform = Maybe Text
a} :: ResourceInventory)
resourceInventory_resourceId :: Lens.Lens' ResourceInventory (Prelude.Maybe Prelude.Text)
resourceInventory_resourceId :: (Maybe Text -> f (Maybe Text))
-> ResourceInventory -> f ResourceInventory
resourceInventory_resourceId = (ResourceInventory -> Maybe Text)
-> (ResourceInventory -> Maybe Text -> ResourceInventory)
-> Lens
ResourceInventory ResourceInventory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceInventory' {Maybe Text
resourceId :: Maybe Text
$sel:resourceId:ResourceInventory' :: ResourceInventory -> Maybe Text
resourceId} -> Maybe Text
resourceId) (\s :: ResourceInventory
s@ResourceInventory' {} Maybe Text
a -> ResourceInventory
s {$sel:resourceId:ResourceInventory' :: Maybe Text
resourceId = Maybe Text
a} :: ResourceInventory)
resourceInventory_resourceType :: Lens.Lens' ResourceInventory (Prelude.Maybe ResourceType)
resourceInventory_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> ResourceInventory -> f ResourceInventory
resourceInventory_resourceType = (ResourceInventory -> Maybe ResourceType)
-> (ResourceInventory -> Maybe ResourceType -> ResourceInventory)
-> Lens
ResourceInventory
ResourceInventory
(Maybe ResourceType)
(Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceInventory' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:ResourceInventory' :: ResourceInventory -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: ResourceInventory
s@ResourceInventory' {} Maybe ResourceType
a -> ResourceInventory
s {$sel:resourceType:ResourceInventory' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: ResourceInventory)
resourceInventory_platformVersion :: Lens.Lens' ResourceInventory (Prelude.Maybe Prelude.Text)
resourceInventory_platformVersion :: (Maybe Text -> f (Maybe Text))
-> ResourceInventory -> f ResourceInventory
resourceInventory_platformVersion = (ResourceInventory -> Maybe Text)
-> (ResourceInventory -> Maybe Text -> ResourceInventory)
-> Lens
ResourceInventory ResourceInventory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceInventory' {Maybe Text
platformVersion :: Maybe Text
$sel:platformVersion:ResourceInventory' :: ResourceInventory -> Maybe Text
platformVersion} -> Maybe Text
platformVersion) (\s :: ResourceInventory
s@ResourceInventory' {} Maybe Text
a -> ResourceInventory
s {$sel:platformVersion:ResourceInventory' :: Maybe Text
platformVersion = Maybe Text
a} :: ResourceInventory)
resourceInventory_resourceArn :: Lens.Lens' ResourceInventory (Prelude.Maybe Prelude.Text)
resourceInventory_resourceArn :: (Maybe Text -> f (Maybe Text))
-> ResourceInventory -> f ResourceInventory
resourceInventory_resourceArn = (ResourceInventory -> Maybe Text)
-> (ResourceInventory -> Maybe Text -> ResourceInventory)
-> Lens
ResourceInventory ResourceInventory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceInventory' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:ResourceInventory' :: ResourceInventory -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: ResourceInventory
s@ResourceInventory' {} Maybe Text
a -> ResourceInventory
s {$sel:resourceArn:ResourceInventory' :: Maybe Text
resourceArn = Maybe Text
a} :: ResourceInventory)
resourceInventory_resourceOwningAccountId :: Lens.Lens' ResourceInventory (Prelude.Maybe Prelude.Text)
resourceInventory_resourceOwningAccountId :: (Maybe Text -> f (Maybe Text))
-> ResourceInventory -> f ResourceInventory
resourceInventory_resourceOwningAccountId = (ResourceInventory -> Maybe Text)
-> (ResourceInventory -> Maybe Text -> ResourceInventory)
-> Lens
ResourceInventory ResourceInventory (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceInventory' {Maybe Text
resourceOwningAccountId :: Maybe Text
$sel:resourceOwningAccountId:ResourceInventory' :: ResourceInventory -> Maybe Text
resourceOwningAccountId} -> Maybe Text
resourceOwningAccountId) (\s :: ResourceInventory
s@ResourceInventory' {} Maybe Text
a -> ResourceInventory
s {$sel:resourceOwningAccountId:ResourceInventory' :: Maybe Text
resourceOwningAccountId = Maybe Text
a} :: ResourceInventory)
instance Core.FromJSON ResourceInventory where
parseJSON :: Value -> Parser ResourceInventory
parseJSON =
String
-> (Object -> Parser ResourceInventory)
-> Value
-> Parser ResourceInventory
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ResourceInventory"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ResourceInventory
ResourceInventory'
(Maybe Text
-> Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ResourceInventory)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ResourceInventory)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Platform")
Parser
(Maybe Text
-> Maybe ResourceType
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ResourceInventory)
-> Parser (Maybe Text)
-> Parser
(Maybe ResourceType
-> Maybe Text -> Maybe Text -> Maybe Text -> ResourceInventory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceId")
Parser
(Maybe ResourceType
-> Maybe Text -> Maybe Text -> Maybe Text -> ResourceInventory)
-> Parser (Maybe ResourceType)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ResourceInventory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ResourceType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceType")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ResourceInventory)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ResourceInventory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PlatformVersion")
Parser (Maybe Text -> Maybe Text -> ResourceInventory)
-> Parser (Maybe Text) -> Parser (Maybe Text -> ResourceInventory)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceArn")
Parser (Maybe Text -> ResourceInventory)
-> Parser (Maybe Text) -> Parser ResourceInventory
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ResourceOwningAccountId")
)
instance Prelude.Hashable ResourceInventory
instance Prelude.NFData ResourceInventory