{-# 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.LicenseConfigurationAssociation 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 LicenseConfigurationAssociation = LicenseConfigurationAssociation'
{
LicenseConfigurationAssociation -> Maybe ResourceType
resourceType :: Prelude.Maybe ResourceType,
LicenseConfigurationAssociation -> Maybe Text
amiAssociationScope :: Prelude.Maybe Prelude.Text,
LicenseConfigurationAssociation -> Maybe POSIX
associationTime :: Prelude.Maybe Core.POSIX,
LicenseConfigurationAssociation -> Maybe Text
resourceArn :: Prelude.Maybe Prelude.Text,
LicenseConfigurationAssociation -> Maybe Text
resourceOwnerId :: Prelude.Maybe Prelude.Text
}
deriving (LicenseConfigurationAssociation
-> LicenseConfigurationAssociation -> Bool
(LicenseConfigurationAssociation
-> LicenseConfigurationAssociation -> Bool)
-> (LicenseConfigurationAssociation
-> LicenseConfigurationAssociation -> Bool)
-> Eq LicenseConfigurationAssociation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LicenseConfigurationAssociation
-> LicenseConfigurationAssociation -> Bool
$c/= :: LicenseConfigurationAssociation
-> LicenseConfigurationAssociation -> Bool
== :: LicenseConfigurationAssociation
-> LicenseConfigurationAssociation -> Bool
$c== :: LicenseConfigurationAssociation
-> LicenseConfigurationAssociation -> Bool
Prelude.Eq, ReadPrec [LicenseConfigurationAssociation]
ReadPrec LicenseConfigurationAssociation
Int -> ReadS LicenseConfigurationAssociation
ReadS [LicenseConfigurationAssociation]
(Int -> ReadS LicenseConfigurationAssociation)
-> ReadS [LicenseConfigurationAssociation]
-> ReadPrec LicenseConfigurationAssociation
-> ReadPrec [LicenseConfigurationAssociation]
-> Read LicenseConfigurationAssociation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LicenseConfigurationAssociation]
$creadListPrec :: ReadPrec [LicenseConfigurationAssociation]
readPrec :: ReadPrec LicenseConfigurationAssociation
$creadPrec :: ReadPrec LicenseConfigurationAssociation
readList :: ReadS [LicenseConfigurationAssociation]
$creadList :: ReadS [LicenseConfigurationAssociation]
readsPrec :: Int -> ReadS LicenseConfigurationAssociation
$creadsPrec :: Int -> ReadS LicenseConfigurationAssociation
Prelude.Read, Int -> LicenseConfigurationAssociation -> ShowS
[LicenseConfigurationAssociation] -> ShowS
LicenseConfigurationAssociation -> String
(Int -> LicenseConfigurationAssociation -> ShowS)
-> (LicenseConfigurationAssociation -> String)
-> ([LicenseConfigurationAssociation] -> ShowS)
-> Show LicenseConfigurationAssociation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LicenseConfigurationAssociation] -> ShowS
$cshowList :: [LicenseConfigurationAssociation] -> ShowS
show :: LicenseConfigurationAssociation -> String
$cshow :: LicenseConfigurationAssociation -> String
showsPrec :: Int -> LicenseConfigurationAssociation -> ShowS
$cshowsPrec :: Int -> LicenseConfigurationAssociation -> ShowS
Prelude.Show, (forall x.
LicenseConfigurationAssociation
-> Rep LicenseConfigurationAssociation x)
-> (forall x.
Rep LicenseConfigurationAssociation x
-> LicenseConfigurationAssociation)
-> Generic LicenseConfigurationAssociation
forall x.
Rep LicenseConfigurationAssociation x
-> LicenseConfigurationAssociation
forall x.
LicenseConfigurationAssociation
-> Rep LicenseConfigurationAssociation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep LicenseConfigurationAssociation x
-> LicenseConfigurationAssociation
$cfrom :: forall x.
LicenseConfigurationAssociation
-> Rep LicenseConfigurationAssociation x
Prelude.Generic)
newLicenseConfigurationAssociation ::
LicenseConfigurationAssociation
newLicenseConfigurationAssociation :: LicenseConfigurationAssociation
newLicenseConfigurationAssociation =
LicenseConfigurationAssociation' :: Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> LicenseConfigurationAssociation
LicenseConfigurationAssociation'
{ $sel:resourceType:LicenseConfigurationAssociation' :: Maybe ResourceType
resourceType =
Maybe ResourceType
forall a. Maybe a
Prelude.Nothing,
$sel:amiAssociationScope:LicenseConfigurationAssociation' :: Maybe Text
amiAssociationScope = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:associationTime:LicenseConfigurationAssociation' :: Maybe POSIX
associationTime = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:resourceArn:LicenseConfigurationAssociation' :: Maybe Text
resourceArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:resourceOwnerId:LicenseConfigurationAssociation' :: Maybe Text
resourceOwnerId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
licenseConfigurationAssociation_resourceType :: Lens.Lens' LicenseConfigurationAssociation (Prelude.Maybe ResourceType)
licenseConfigurationAssociation_resourceType :: (Maybe ResourceType -> f (Maybe ResourceType))
-> LicenseConfigurationAssociation
-> f LicenseConfigurationAssociation
licenseConfigurationAssociation_resourceType = (LicenseConfigurationAssociation -> Maybe ResourceType)
-> (LicenseConfigurationAssociation
-> Maybe ResourceType -> LicenseConfigurationAssociation)
-> Lens
LicenseConfigurationAssociation
LicenseConfigurationAssociation
(Maybe ResourceType)
(Maybe ResourceType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationAssociation' {Maybe ResourceType
resourceType :: Maybe ResourceType
$sel:resourceType:LicenseConfigurationAssociation' :: LicenseConfigurationAssociation -> Maybe ResourceType
resourceType} -> Maybe ResourceType
resourceType) (\s :: LicenseConfigurationAssociation
s@LicenseConfigurationAssociation' {} Maybe ResourceType
a -> LicenseConfigurationAssociation
s {$sel:resourceType:LicenseConfigurationAssociation' :: Maybe ResourceType
resourceType = Maybe ResourceType
a} :: LicenseConfigurationAssociation)
licenseConfigurationAssociation_amiAssociationScope :: Lens.Lens' LicenseConfigurationAssociation (Prelude.Maybe Prelude.Text)
licenseConfigurationAssociation_amiAssociationScope :: (Maybe Text -> f (Maybe Text))
-> LicenseConfigurationAssociation
-> f LicenseConfigurationAssociation
licenseConfigurationAssociation_amiAssociationScope = (LicenseConfigurationAssociation -> Maybe Text)
-> (LicenseConfigurationAssociation
-> Maybe Text -> LicenseConfigurationAssociation)
-> Lens
LicenseConfigurationAssociation
LicenseConfigurationAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationAssociation' {Maybe Text
amiAssociationScope :: Maybe Text
$sel:amiAssociationScope:LicenseConfigurationAssociation' :: LicenseConfigurationAssociation -> Maybe Text
amiAssociationScope} -> Maybe Text
amiAssociationScope) (\s :: LicenseConfigurationAssociation
s@LicenseConfigurationAssociation' {} Maybe Text
a -> LicenseConfigurationAssociation
s {$sel:amiAssociationScope:LicenseConfigurationAssociation' :: Maybe Text
amiAssociationScope = Maybe Text
a} :: LicenseConfigurationAssociation)
licenseConfigurationAssociation_associationTime :: Lens.Lens' LicenseConfigurationAssociation (Prelude.Maybe Prelude.UTCTime)
licenseConfigurationAssociation_associationTime :: (Maybe UTCTime -> f (Maybe UTCTime))
-> LicenseConfigurationAssociation
-> f LicenseConfigurationAssociation
licenseConfigurationAssociation_associationTime = (LicenseConfigurationAssociation -> Maybe POSIX)
-> (LicenseConfigurationAssociation
-> Maybe POSIX -> LicenseConfigurationAssociation)
-> Lens
LicenseConfigurationAssociation
LicenseConfigurationAssociation
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationAssociation' {Maybe POSIX
associationTime :: Maybe POSIX
$sel:associationTime:LicenseConfigurationAssociation' :: LicenseConfigurationAssociation -> Maybe POSIX
associationTime} -> Maybe POSIX
associationTime) (\s :: LicenseConfigurationAssociation
s@LicenseConfigurationAssociation' {} Maybe POSIX
a -> LicenseConfigurationAssociation
s {$sel:associationTime:LicenseConfigurationAssociation' :: Maybe POSIX
associationTime = Maybe POSIX
a} :: LicenseConfigurationAssociation) ((Maybe POSIX -> f (Maybe POSIX))
-> LicenseConfigurationAssociation
-> f LicenseConfigurationAssociation)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> LicenseConfigurationAssociation
-> f LicenseConfigurationAssociation
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 AnIso POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
licenseConfigurationAssociation_resourceArn :: Lens.Lens' LicenseConfigurationAssociation (Prelude.Maybe Prelude.Text)
licenseConfigurationAssociation_resourceArn :: (Maybe Text -> f (Maybe Text))
-> LicenseConfigurationAssociation
-> f LicenseConfigurationAssociation
licenseConfigurationAssociation_resourceArn = (LicenseConfigurationAssociation -> Maybe Text)
-> (LicenseConfigurationAssociation
-> Maybe Text -> LicenseConfigurationAssociation)
-> Lens
LicenseConfigurationAssociation
LicenseConfigurationAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationAssociation' {Maybe Text
resourceArn :: Maybe Text
$sel:resourceArn:LicenseConfigurationAssociation' :: LicenseConfigurationAssociation -> Maybe Text
resourceArn} -> Maybe Text
resourceArn) (\s :: LicenseConfigurationAssociation
s@LicenseConfigurationAssociation' {} Maybe Text
a -> LicenseConfigurationAssociation
s {$sel:resourceArn:LicenseConfigurationAssociation' :: Maybe Text
resourceArn = Maybe Text
a} :: LicenseConfigurationAssociation)
licenseConfigurationAssociation_resourceOwnerId :: Lens.Lens' LicenseConfigurationAssociation (Prelude.Maybe Prelude.Text)
licenseConfigurationAssociation_resourceOwnerId :: (Maybe Text -> f (Maybe Text))
-> LicenseConfigurationAssociation
-> f LicenseConfigurationAssociation
licenseConfigurationAssociation_resourceOwnerId = (LicenseConfigurationAssociation -> Maybe Text)
-> (LicenseConfigurationAssociation
-> Maybe Text -> LicenseConfigurationAssociation)
-> Lens
LicenseConfigurationAssociation
LicenseConfigurationAssociation
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfigurationAssociation' {Maybe Text
resourceOwnerId :: Maybe Text
$sel:resourceOwnerId:LicenseConfigurationAssociation' :: LicenseConfigurationAssociation -> Maybe Text
resourceOwnerId} -> Maybe Text
resourceOwnerId) (\s :: LicenseConfigurationAssociation
s@LicenseConfigurationAssociation' {} Maybe Text
a -> LicenseConfigurationAssociation
s {$sel:resourceOwnerId:LicenseConfigurationAssociation' :: Maybe Text
resourceOwnerId = Maybe Text
a} :: LicenseConfigurationAssociation)
instance
Core.FromJSON
LicenseConfigurationAssociation
where
parseJSON :: Value -> Parser LicenseConfigurationAssociation
parseJSON =
String
-> (Object -> Parser LicenseConfigurationAssociation)
-> Value
-> Parser LicenseConfigurationAssociation
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"LicenseConfigurationAssociation"
( \Object
x ->
Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> LicenseConfigurationAssociation
LicenseConfigurationAssociation'
(Maybe ResourceType
-> Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> LicenseConfigurationAssociation)
-> Parser (Maybe ResourceType)
-> Parser
(Maybe Text
-> Maybe POSIX
-> Maybe Text
-> Maybe Text
-> LicenseConfigurationAssociation)
forall (f :: * -> *) a b. Functor 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 POSIX
-> Maybe Text
-> Maybe Text
-> LicenseConfigurationAssociation)
-> Parser (Maybe Text)
-> Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> LicenseConfigurationAssociation)
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
"AmiAssociationScope")
Parser
(Maybe POSIX
-> Maybe Text -> Maybe Text -> LicenseConfigurationAssociation)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text -> Maybe Text -> LicenseConfigurationAssociation)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AssociationTime")
Parser
(Maybe Text -> Maybe Text -> LicenseConfigurationAssociation)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> LicenseConfigurationAssociation)
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 -> LicenseConfigurationAssociation)
-> Parser (Maybe Text) -> Parser LicenseConfigurationAssociation
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
"ResourceOwnerId")
)
instance
Prelude.Hashable
LicenseConfigurationAssociation
instance
Prelude.NFData
LicenseConfigurationAssociation