{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.LicenseManager.Types.LicenseConfiguration
-- 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.LicenseConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LicenseManager.Types.AutomatedDiscoveryInformation
import Amazonka.LicenseManager.Types.ConsumedLicenseSummary
import Amazonka.LicenseManager.Types.LicenseCountingType
import Amazonka.LicenseManager.Types.ManagedResourceSummary
import Amazonka.LicenseManager.Types.ProductInformation
import qualified Amazonka.Prelude as Prelude

-- | A license configuration is an abstraction of a customer license
-- agreement that can be consumed and enforced by License Manager.
-- Components include specifications for the license type (licensing by
-- instance, socket, CPU, or vCPU), allowed tenancy (shared tenancy,
-- Dedicated Instance, Dedicated Host, or all of these), host affinity (how
-- long a VM must be associated with a host), and the number of licenses
-- purchased and used.
--
-- /See:/ 'newLicenseConfiguration' smart constructor.
data LicenseConfiguration = LicenseConfiguration'
  { -- | Status of the license configuration.
    LicenseConfiguration -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
    -- | Account ID of the license configuration\'s owner.
    LicenseConfiguration -> Maybe Text
ownerAccountId :: Prelude.Maybe Prelude.Text,
    -- | Summaries for licenses consumed by various resources.
    LicenseConfiguration -> Maybe [ConsumedLicenseSummary]
consumedLicenseSummaryList :: Prelude.Maybe [ConsumedLicenseSummary],
    -- | Number of licenses managed by the license configuration.
    LicenseConfiguration -> Maybe Integer
licenseCount :: Prelude.Maybe Prelude.Integer,
    -- | Summaries for managed resources.
    LicenseConfiguration -> Maybe [ManagedResourceSummary]
managedResourceSummaryList :: Prelude.Maybe [ManagedResourceSummary],
    -- | Name of the license configuration.
    LicenseConfiguration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Number of available licenses as a hard limit.
    LicenseConfiguration -> Maybe Bool
licenseCountHardLimit :: Prelude.Maybe Prelude.Bool,
    -- | When true, disassociates a resource when software is uninstalled.
    LicenseConfiguration -> Maybe Bool
disassociateWhenNotFound :: Prelude.Maybe Prelude.Bool,
    -- | Product information.
    LicenseConfiguration -> Maybe [ProductInformation]
productInformationList :: Prelude.Maybe [ProductInformation],
    -- | Dimension to use to track the license inventory.
    LicenseConfiguration -> Maybe LicenseCountingType
licenseCountingType :: Prelude.Maybe LicenseCountingType,
    -- | Automated discovery information.
    LicenseConfiguration -> Maybe AutomatedDiscoveryInformation
automatedDiscoveryInformation :: Prelude.Maybe AutomatedDiscoveryInformation,
    -- | Number of licenses consumed.
    LicenseConfiguration -> Maybe Integer
consumedLicenses :: Prelude.Maybe Prelude.Integer,
    -- | License rules.
    LicenseConfiguration -> Maybe [Text]
licenseRules :: Prelude.Maybe [Prelude.Text],
    -- | Unique ID of the license configuration.
    LicenseConfiguration -> Maybe Text
licenseConfigurationId :: Prelude.Maybe Prelude.Text,
    -- | Description of the license configuration.
    LicenseConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | Amazon Resource Name (ARN) of the license configuration.
    LicenseConfiguration -> Maybe Text
licenseConfigurationArn :: Prelude.Maybe Prelude.Text
  }
  deriving (LicenseConfiguration -> LicenseConfiguration -> Bool
(LicenseConfiguration -> LicenseConfiguration -> Bool)
-> (LicenseConfiguration -> LicenseConfiguration -> Bool)
-> Eq LicenseConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: LicenseConfiguration -> LicenseConfiguration -> Bool
$c/= :: LicenseConfiguration -> LicenseConfiguration -> Bool
== :: LicenseConfiguration -> LicenseConfiguration -> Bool
$c== :: LicenseConfiguration -> LicenseConfiguration -> Bool
Prelude.Eq, ReadPrec [LicenseConfiguration]
ReadPrec LicenseConfiguration
Int -> ReadS LicenseConfiguration
ReadS [LicenseConfiguration]
(Int -> ReadS LicenseConfiguration)
-> ReadS [LicenseConfiguration]
-> ReadPrec LicenseConfiguration
-> ReadPrec [LicenseConfiguration]
-> Read LicenseConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [LicenseConfiguration]
$creadListPrec :: ReadPrec [LicenseConfiguration]
readPrec :: ReadPrec LicenseConfiguration
$creadPrec :: ReadPrec LicenseConfiguration
readList :: ReadS [LicenseConfiguration]
$creadList :: ReadS [LicenseConfiguration]
readsPrec :: Int -> ReadS LicenseConfiguration
$creadsPrec :: Int -> ReadS LicenseConfiguration
Prelude.Read, Int -> LicenseConfiguration -> ShowS
[LicenseConfiguration] -> ShowS
LicenseConfiguration -> String
(Int -> LicenseConfiguration -> ShowS)
-> (LicenseConfiguration -> String)
-> ([LicenseConfiguration] -> ShowS)
-> Show LicenseConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [LicenseConfiguration] -> ShowS
$cshowList :: [LicenseConfiguration] -> ShowS
show :: LicenseConfiguration -> String
$cshow :: LicenseConfiguration -> String
showsPrec :: Int -> LicenseConfiguration -> ShowS
$cshowsPrec :: Int -> LicenseConfiguration -> ShowS
Prelude.Show, (forall x. LicenseConfiguration -> Rep LicenseConfiguration x)
-> (forall x. Rep LicenseConfiguration x -> LicenseConfiguration)
-> Generic LicenseConfiguration
forall x. Rep LicenseConfiguration x -> LicenseConfiguration
forall x. LicenseConfiguration -> Rep LicenseConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep LicenseConfiguration x -> LicenseConfiguration
$cfrom :: forall x. LicenseConfiguration -> Rep LicenseConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'LicenseConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'status', 'licenseConfiguration_status' - Status of the license configuration.
--
-- 'ownerAccountId', 'licenseConfiguration_ownerAccountId' - Account ID of the license configuration\'s owner.
--
-- 'consumedLicenseSummaryList', 'licenseConfiguration_consumedLicenseSummaryList' - Summaries for licenses consumed by various resources.
--
-- 'licenseCount', 'licenseConfiguration_licenseCount' - Number of licenses managed by the license configuration.
--
-- 'managedResourceSummaryList', 'licenseConfiguration_managedResourceSummaryList' - Summaries for managed resources.
--
-- 'name', 'licenseConfiguration_name' - Name of the license configuration.
--
-- 'licenseCountHardLimit', 'licenseConfiguration_licenseCountHardLimit' - Number of available licenses as a hard limit.
--
-- 'disassociateWhenNotFound', 'licenseConfiguration_disassociateWhenNotFound' - When true, disassociates a resource when software is uninstalled.
--
-- 'productInformationList', 'licenseConfiguration_productInformationList' - Product information.
--
-- 'licenseCountingType', 'licenseConfiguration_licenseCountingType' - Dimension to use to track the license inventory.
--
-- 'automatedDiscoveryInformation', 'licenseConfiguration_automatedDiscoveryInformation' - Automated discovery information.
--
-- 'consumedLicenses', 'licenseConfiguration_consumedLicenses' - Number of licenses consumed.
--
-- 'licenseRules', 'licenseConfiguration_licenseRules' - License rules.
--
-- 'licenseConfigurationId', 'licenseConfiguration_licenseConfigurationId' - Unique ID of the license configuration.
--
-- 'description', 'licenseConfiguration_description' - Description of the license configuration.
--
-- 'licenseConfigurationArn', 'licenseConfiguration_licenseConfigurationArn' - Amazon Resource Name (ARN) of the license configuration.
newLicenseConfiguration ::
  LicenseConfiguration
newLicenseConfiguration :: LicenseConfiguration
newLicenseConfiguration =
  LicenseConfiguration' :: Maybe Text
-> Maybe Text
-> Maybe [ConsumedLicenseSummary]
-> Maybe Integer
-> Maybe [ManagedResourceSummary]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [ProductInformation]
-> Maybe LicenseCountingType
-> Maybe AutomatedDiscoveryInformation
-> Maybe Integer
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LicenseConfiguration
LicenseConfiguration'
    { $sel:status:LicenseConfiguration' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:ownerAccountId:LicenseConfiguration' :: Maybe Text
ownerAccountId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:consumedLicenseSummaryList:LicenseConfiguration' :: Maybe [ConsumedLicenseSummary]
consumedLicenseSummaryList = Maybe [ConsumedLicenseSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseCount:LicenseConfiguration' :: Maybe Integer
licenseCount = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:managedResourceSummaryList:LicenseConfiguration' :: Maybe [ManagedResourceSummary]
managedResourceSummaryList = Maybe [ManagedResourceSummary]
forall a. Maybe a
Prelude.Nothing,
      $sel:name:LicenseConfiguration' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseCountHardLimit:LicenseConfiguration' :: Maybe Bool
licenseCountHardLimit = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:disassociateWhenNotFound:LicenseConfiguration' :: Maybe Bool
disassociateWhenNotFound = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:productInformationList:LicenseConfiguration' :: Maybe [ProductInformation]
productInformationList = Maybe [ProductInformation]
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseCountingType:LicenseConfiguration' :: Maybe LicenseCountingType
licenseCountingType = Maybe LicenseCountingType
forall a. Maybe a
Prelude.Nothing,
      $sel:automatedDiscoveryInformation:LicenseConfiguration' :: Maybe AutomatedDiscoveryInformation
automatedDiscoveryInformation = Maybe AutomatedDiscoveryInformation
forall a. Maybe a
Prelude.Nothing,
      $sel:consumedLicenses:LicenseConfiguration' :: Maybe Integer
consumedLicenses = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseRules:LicenseConfiguration' :: Maybe [Text]
licenseRules = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseConfigurationId:LicenseConfiguration' :: Maybe Text
licenseConfigurationId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:description:LicenseConfiguration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:licenseConfigurationArn:LicenseConfiguration' :: Maybe Text
licenseConfigurationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Status of the license configuration.
licenseConfiguration_status :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Text)
licenseConfiguration_status :: (Maybe Text -> f (Maybe Text))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_status = (LicenseConfiguration -> Maybe Text)
-> (LicenseConfiguration -> Maybe Text -> LicenseConfiguration)
-> Lens
     LicenseConfiguration LicenseConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Text
status :: Maybe Text
$sel:status:LicenseConfiguration' :: LicenseConfiguration -> Maybe Text
status} -> Maybe Text
status) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Text
a -> LicenseConfiguration
s {$sel:status:LicenseConfiguration' :: Maybe Text
status = Maybe Text
a} :: LicenseConfiguration)

-- | Account ID of the license configuration\'s owner.
licenseConfiguration_ownerAccountId :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Text)
licenseConfiguration_ownerAccountId :: (Maybe Text -> f (Maybe Text))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_ownerAccountId = (LicenseConfiguration -> Maybe Text)
-> (LicenseConfiguration -> Maybe Text -> LicenseConfiguration)
-> Lens
     LicenseConfiguration LicenseConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Text
ownerAccountId :: Maybe Text
$sel:ownerAccountId:LicenseConfiguration' :: LicenseConfiguration -> Maybe Text
ownerAccountId} -> Maybe Text
ownerAccountId) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Text
a -> LicenseConfiguration
s {$sel:ownerAccountId:LicenseConfiguration' :: Maybe Text
ownerAccountId = Maybe Text
a} :: LicenseConfiguration)

-- | Summaries for licenses consumed by various resources.
licenseConfiguration_consumedLicenseSummaryList :: Lens.Lens' LicenseConfiguration (Prelude.Maybe [ConsumedLicenseSummary])
licenseConfiguration_consumedLicenseSummaryList :: (Maybe [ConsumedLicenseSummary]
 -> f (Maybe [ConsumedLicenseSummary]))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_consumedLicenseSummaryList = (LicenseConfiguration -> Maybe [ConsumedLicenseSummary])
-> (LicenseConfiguration
    -> Maybe [ConsumedLicenseSummary] -> LicenseConfiguration)
-> Lens
     LicenseConfiguration
     LicenseConfiguration
     (Maybe [ConsumedLicenseSummary])
     (Maybe [ConsumedLicenseSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe [ConsumedLicenseSummary]
consumedLicenseSummaryList :: Maybe [ConsumedLicenseSummary]
$sel:consumedLicenseSummaryList:LicenseConfiguration' :: LicenseConfiguration -> Maybe [ConsumedLicenseSummary]
consumedLicenseSummaryList} -> Maybe [ConsumedLicenseSummary]
consumedLicenseSummaryList) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe [ConsumedLicenseSummary]
a -> LicenseConfiguration
s {$sel:consumedLicenseSummaryList:LicenseConfiguration' :: Maybe [ConsumedLicenseSummary]
consumedLicenseSummaryList = Maybe [ConsumedLicenseSummary]
a} :: LicenseConfiguration) ((Maybe [ConsumedLicenseSummary]
  -> f (Maybe [ConsumedLicenseSummary]))
 -> LicenseConfiguration -> f LicenseConfiguration)
-> ((Maybe [ConsumedLicenseSummary]
     -> f (Maybe [ConsumedLicenseSummary]))
    -> Maybe [ConsumedLicenseSummary]
    -> f (Maybe [ConsumedLicenseSummary]))
-> (Maybe [ConsumedLicenseSummary]
    -> f (Maybe [ConsumedLicenseSummary]))
-> LicenseConfiguration
-> f LicenseConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ConsumedLicenseSummary]
  [ConsumedLicenseSummary]
  [ConsumedLicenseSummary]
  [ConsumedLicenseSummary]
-> Iso
     (Maybe [ConsumedLicenseSummary])
     (Maybe [ConsumedLicenseSummary])
     (Maybe [ConsumedLicenseSummary])
     (Maybe [ConsumedLicenseSummary])
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
  [ConsumedLicenseSummary]
  [ConsumedLicenseSummary]
  [ConsumedLicenseSummary]
  [ConsumedLicenseSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Number of licenses managed by the license configuration.
licenseConfiguration_licenseCount :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Integer)
licenseConfiguration_licenseCount :: (Maybe Integer -> f (Maybe Integer))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_licenseCount = (LicenseConfiguration -> Maybe Integer)
-> (LicenseConfiguration -> Maybe Integer -> LicenseConfiguration)
-> Lens
     LicenseConfiguration
     LicenseConfiguration
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Integer
licenseCount :: Maybe Integer
$sel:licenseCount:LicenseConfiguration' :: LicenseConfiguration -> Maybe Integer
licenseCount} -> Maybe Integer
licenseCount) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Integer
a -> LicenseConfiguration
s {$sel:licenseCount:LicenseConfiguration' :: Maybe Integer
licenseCount = Maybe Integer
a} :: LicenseConfiguration)

-- | Summaries for managed resources.
licenseConfiguration_managedResourceSummaryList :: Lens.Lens' LicenseConfiguration (Prelude.Maybe [ManagedResourceSummary])
licenseConfiguration_managedResourceSummaryList :: (Maybe [ManagedResourceSummary]
 -> f (Maybe [ManagedResourceSummary]))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_managedResourceSummaryList = (LicenseConfiguration -> Maybe [ManagedResourceSummary])
-> (LicenseConfiguration
    -> Maybe [ManagedResourceSummary] -> LicenseConfiguration)
-> Lens
     LicenseConfiguration
     LicenseConfiguration
     (Maybe [ManagedResourceSummary])
     (Maybe [ManagedResourceSummary])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe [ManagedResourceSummary]
managedResourceSummaryList :: Maybe [ManagedResourceSummary]
$sel:managedResourceSummaryList:LicenseConfiguration' :: LicenseConfiguration -> Maybe [ManagedResourceSummary]
managedResourceSummaryList} -> Maybe [ManagedResourceSummary]
managedResourceSummaryList) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe [ManagedResourceSummary]
a -> LicenseConfiguration
s {$sel:managedResourceSummaryList:LicenseConfiguration' :: Maybe [ManagedResourceSummary]
managedResourceSummaryList = Maybe [ManagedResourceSummary]
a} :: LicenseConfiguration) ((Maybe [ManagedResourceSummary]
  -> f (Maybe [ManagedResourceSummary]))
 -> LicenseConfiguration -> f LicenseConfiguration)
-> ((Maybe [ManagedResourceSummary]
     -> f (Maybe [ManagedResourceSummary]))
    -> Maybe [ManagedResourceSummary]
    -> f (Maybe [ManagedResourceSummary]))
-> (Maybe [ManagedResourceSummary]
    -> f (Maybe [ManagedResourceSummary]))
-> LicenseConfiguration
-> f LicenseConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ManagedResourceSummary]
  [ManagedResourceSummary]
  [ManagedResourceSummary]
  [ManagedResourceSummary]
-> Iso
     (Maybe [ManagedResourceSummary])
     (Maybe [ManagedResourceSummary])
     (Maybe [ManagedResourceSummary])
     (Maybe [ManagedResourceSummary])
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
  [ManagedResourceSummary]
  [ManagedResourceSummary]
  [ManagedResourceSummary]
  [ManagedResourceSummary]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Name of the license configuration.
licenseConfiguration_name :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Text)
licenseConfiguration_name :: (Maybe Text -> f (Maybe Text))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_name = (LicenseConfiguration -> Maybe Text)
-> (LicenseConfiguration -> Maybe Text -> LicenseConfiguration)
-> Lens
     LicenseConfiguration LicenseConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Text
name :: Maybe Text
$sel:name:LicenseConfiguration' :: LicenseConfiguration -> Maybe Text
name} -> Maybe Text
name) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Text
a -> LicenseConfiguration
s {$sel:name:LicenseConfiguration' :: Maybe Text
name = Maybe Text
a} :: LicenseConfiguration)

-- | Number of available licenses as a hard limit.
licenseConfiguration_licenseCountHardLimit :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Bool)
licenseConfiguration_licenseCountHardLimit :: (Maybe Bool -> f (Maybe Bool))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_licenseCountHardLimit = (LicenseConfiguration -> Maybe Bool)
-> (LicenseConfiguration -> Maybe Bool -> LicenseConfiguration)
-> Lens
     LicenseConfiguration LicenseConfiguration (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Bool
licenseCountHardLimit :: Maybe Bool
$sel:licenseCountHardLimit:LicenseConfiguration' :: LicenseConfiguration -> Maybe Bool
licenseCountHardLimit} -> Maybe Bool
licenseCountHardLimit) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Bool
a -> LicenseConfiguration
s {$sel:licenseCountHardLimit:LicenseConfiguration' :: Maybe Bool
licenseCountHardLimit = Maybe Bool
a} :: LicenseConfiguration)

-- | When true, disassociates a resource when software is uninstalled.
licenseConfiguration_disassociateWhenNotFound :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Bool)
licenseConfiguration_disassociateWhenNotFound :: (Maybe Bool -> f (Maybe Bool))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_disassociateWhenNotFound = (LicenseConfiguration -> Maybe Bool)
-> (LicenseConfiguration -> Maybe Bool -> LicenseConfiguration)
-> Lens
     LicenseConfiguration LicenseConfiguration (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Bool
disassociateWhenNotFound :: Maybe Bool
$sel:disassociateWhenNotFound:LicenseConfiguration' :: LicenseConfiguration -> Maybe Bool
disassociateWhenNotFound} -> Maybe Bool
disassociateWhenNotFound) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Bool
a -> LicenseConfiguration
s {$sel:disassociateWhenNotFound:LicenseConfiguration' :: Maybe Bool
disassociateWhenNotFound = Maybe Bool
a} :: LicenseConfiguration)

-- | Product information.
licenseConfiguration_productInformationList :: Lens.Lens' LicenseConfiguration (Prelude.Maybe [ProductInformation])
licenseConfiguration_productInformationList :: (Maybe [ProductInformation] -> f (Maybe [ProductInformation]))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_productInformationList = (LicenseConfiguration -> Maybe [ProductInformation])
-> (LicenseConfiguration
    -> Maybe [ProductInformation] -> LicenseConfiguration)
-> Lens
     LicenseConfiguration
     LicenseConfiguration
     (Maybe [ProductInformation])
     (Maybe [ProductInformation])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe [ProductInformation]
productInformationList :: Maybe [ProductInformation]
$sel:productInformationList:LicenseConfiguration' :: LicenseConfiguration -> Maybe [ProductInformation]
productInformationList} -> Maybe [ProductInformation]
productInformationList) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe [ProductInformation]
a -> LicenseConfiguration
s {$sel:productInformationList:LicenseConfiguration' :: Maybe [ProductInformation]
productInformationList = Maybe [ProductInformation]
a} :: LicenseConfiguration) ((Maybe [ProductInformation] -> f (Maybe [ProductInformation]))
 -> LicenseConfiguration -> f LicenseConfiguration)
-> ((Maybe [ProductInformation] -> f (Maybe [ProductInformation]))
    -> Maybe [ProductInformation] -> f (Maybe [ProductInformation]))
-> (Maybe [ProductInformation] -> f (Maybe [ProductInformation]))
-> LicenseConfiguration
-> f LicenseConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ProductInformation]
  [ProductInformation]
  [ProductInformation]
  [ProductInformation]
-> Iso
     (Maybe [ProductInformation])
     (Maybe [ProductInformation])
     (Maybe [ProductInformation])
     (Maybe [ProductInformation])
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
  [ProductInformation]
  [ProductInformation]
  [ProductInformation]
  [ProductInformation]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Dimension to use to track the license inventory.
licenseConfiguration_licenseCountingType :: Lens.Lens' LicenseConfiguration (Prelude.Maybe LicenseCountingType)
licenseConfiguration_licenseCountingType :: (Maybe LicenseCountingType -> f (Maybe LicenseCountingType))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_licenseCountingType = (LicenseConfiguration -> Maybe LicenseCountingType)
-> (LicenseConfiguration
    -> Maybe LicenseCountingType -> LicenseConfiguration)
-> Lens
     LicenseConfiguration
     LicenseConfiguration
     (Maybe LicenseCountingType)
     (Maybe LicenseCountingType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe LicenseCountingType
licenseCountingType :: Maybe LicenseCountingType
$sel:licenseCountingType:LicenseConfiguration' :: LicenseConfiguration -> Maybe LicenseCountingType
licenseCountingType} -> Maybe LicenseCountingType
licenseCountingType) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe LicenseCountingType
a -> LicenseConfiguration
s {$sel:licenseCountingType:LicenseConfiguration' :: Maybe LicenseCountingType
licenseCountingType = Maybe LicenseCountingType
a} :: LicenseConfiguration)

-- | Automated discovery information.
licenseConfiguration_automatedDiscoveryInformation :: Lens.Lens' LicenseConfiguration (Prelude.Maybe AutomatedDiscoveryInformation)
licenseConfiguration_automatedDiscoveryInformation :: (Maybe AutomatedDiscoveryInformation
 -> f (Maybe AutomatedDiscoveryInformation))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_automatedDiscoveryInformation = (LicenseConfiguration -> Maybe AutomatedDiscoveryInformation)
-> (LicenseConfiguration
    -> Maybe AutomatedDiscoveryInformation -> LicenseConfiguration)
-> Lens
     LicenseConfiguration
     LicenseConfiguration
     (Maybe AutomatedDiscoveryInformation)
     (Maybe AutomatedDiscoveryInformation)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe AutomatedDiscoveryInformation
automatedDiscoveryInformation :: Maybe AutomatedDiscoveryInformation
$sel:automatedDiscoveryInformation:LicenseConfiguration' :: LicenseConfiguration -> Maybe AutomatedDiscoveryInformation
automatedDiscoveryInformation} -> Maybe AutomatedDiscoveryInformation
automatedDiscoveryInformation) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe AutomatedDiscoveryInformation
a -> LicenseConfiguration
s {$sel:automatedDiscoveryInformation:LicenseConfiguration' :: Maybe AutomatedDiscoveryInformation
automatedDiscoveryInformation = Maybe AutomatedDiscoveryInformation
a} :: LicenseConfiguration)

-- | Number of licenses consumed.
licenseConfiguration_consumedLicenses :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Integer)
licenseConfiguration_consumedLicenses :: (Maybe Integer -> f (Maybe Integer))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_consumedLicenses = (LicenseConfiguration -> Maybe Integer)
-> (LicenseConfiguration -> Maybe Integer -> LicenseConfiguration)
-> Lens
     LicenseConfiguration
     LicenseConfiguration
     (Maybe Integer)
     (Maybe Integer)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Integer
consumedLicenses :: Maybe Integer
$sel:consumedLicenses:LicenseConfiguration' :: LicenseConfiguration -> Maybe Integer
consumedLicenses} -> Maybe Integer
consumedLicenses) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Integer
a -> LicenseConfiguration
s {$sel:consumedLicenses:LicenseConfiguration' :: Maybe Integer
consumedLicenses = Maybe Integer
a} :: LicenseConfiguration)

-- | License rules.
licenseConfiguration_licenseRules :: Lens.Lens' LicenseConfiguration (Prelude.Maybe [Prelude.Text])
licenseConfiguration_licenseRules :: (Maybe [Text] -> f (Maybe [Text]))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_licenseRules = (LicenseConfiguration -> Maybe [Text])
-> (LicenseConfiguration -> Maybe [Text] -> LicenseConfiguration)
-> Lens
     LicenseConfiguration
     LicenseConfiguration
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe [Text]
licenseRules :: Maybe [Text]
$sel:licenseRules:LicenseConfiguration' :: LicenseConfiguration -> Maybe [Text]
licenseRules} -> Maybe [Text]
licenseRules) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe [Text]
a -> LicenseConfiguration
s {$sel:licenseRules:LicenseConfiguration' :: Maybe [Text]
licenseRules = Maybe [Text]
a} :: LicenseConfiguration) ((Maybe [Text] -> f (Maybe [Text]))
 -> LicenseConfiguration -> f LicenseConfiguration)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> LicenseConfiguration
-> f LicenseConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Unique ID of the license configuration.
licenseConfiguration_licenseConfigurationId :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Text)
licenseConfiguration_licenseConfigurationId :: (Maybe Text -> f (Maybe Text))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_licenseConfigurationId = (LicenseConfiguration -> Maybe Text)
-> (LicenseConfiguration -> Maybe Text -> LicenseConfiguration)
-> Lens
     LicenseConfiguration LicenseConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Text
licenseConfigurationId :: Maybe Text
$sel:licenseConfigurationId:LicenseConfiguration' :: LicenseConfiguration -> Maybe Text
licenseConfigurationId} -> Maybe Text
licenseConfigurationId) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Text
a -> LicenseConfiguration
s {$sel:licenseConfigurationId:LicenseConfiguration' :: Maybe Text
licenseConfigurationId = Maybe Text
a} :: LicenseConfiguration)

-- | Description of the license configuration.
licenseConfiguration_description :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Text)
licenseConfiguration_description :: (Maybe Text -> f (Maybe Text))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_description = (LicenseConfiguration -> Maybe Text)
-> (LicenseConfiguration -> Maybe Text -> LicenseConfiguration)
-> Lens
     LicenseConfiguration LicenseConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:LicenseConfiguration' :: LicenseConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Text
a -> LicenseConfiguration
s {$sel:description:LicenseConfiguration' :: Maybe Text
description = Maybe Text
a} :: LicenseConfiguration)

-- | Amazon Resource Name (ARN) of the license configuration.
licenseConfiguration_licenseConfigurationArn :: Lens.Lens' LicenseConfiguration (Prelude.Maybe Prelude.Text)
licenseConfiguration_licenseConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> LicenseConfiguration -> f LicenseConfiguration
licenseConfiguration_licenseConfigurationArn = (LicenseConfiguration -> Maybe Text)
-> (LicenseConfiguration -> Maybe Text -> LicenseConfiguration)
-> Lens
     LicenseConfiguration LicenseConfiguration (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\LicenseConfiguration' {Maybe Text
licenseConfigurationArn :: Maybe Text
$sel:licenseConfigurationArn:LicenseConfiguration' :: LicenseConfiguration -> Maybe Text
licenseConfigurationArn} -> Maybe Text
licenseConfigurationArn) (\s :: LicenseConfiguration
s@LicenseConfiguration' {} Maybe Text
a -> LicenseConfiguration
s {$sel:licenseConfigurationArn:LicenseConfiguration' :: Maybe Text
licenseConfigurationArn = Maybe Text
a} :: LicenseConfiguration)

instance Core.FromJSON LicenseConfiguration where
  parseJSON :: Value -> Parser LicenseConfiguration
parseJSON =
    String
-> (Object -> Parser LicenseConfiguration)
-> Value
-> Parser LicenseConfiguration
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"LicenseConfiguration"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe [ConsumedLicenseSummary]
-> Maybe Integer
-> Maybe [ManagedResourceSummary]
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe [ProductInformation]
-> Maybe LicenseCountingType
-> Maybe AutomatedDiscoveryInformation
-> Maybe Integer
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> LicenseConfiguration
LicenseConfiguration'
            (Maybe Text
 -> Maybe Text
 -> Maybe [ConsumedLicenseSummary]
 -> Maybe Integer
 -> Maybe [ManagedResourceSummary]
 -> Maybe Text
 -> Maybe Bool
 -> Maybe Bool
 -> Maybe [ProductInformation]
 -> Maybe LicenseCountingType
 -> Maybe AutomatedDiscoveryInformation
 -> Maybe Integer
 -> Maybe [Text]
 -> Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> LicenseConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe [ConsumedLicenseSummary]
      -> Maybe Integer
      -> Maybe [ManagedResourceSummary]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [ProductInformation]
      -> Maybe LicenseCountingType
      -> Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
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
"Status")
            Parser
  (Maybe Text
   -> Maybe [ConsumedLicenseSummary]
   -> Maybe Integer
   -> Maybe [ManagedResourceSummary]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [ProductInformation]
   -> Maybe LicenseCountingType
   -> Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe [ConsumedLicenseSummary]
      -> Maybe Integer
      -> Maybe [ManagedResourceSummary]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [ProductInformation]
      -> Maybe LicenseCountingType
      -> Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
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
"OwnerAccountId")
            Parser
  (Maybe [ConsumedLicenseSummary]
   -> Maybe Integer
   -> Maybe [ManagedResourceSummary]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [ProductInformation]
   -> Maybe LicenseCountingType
   -> Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe [ConsumedLicenseSummary])
-> Parser
     (Maybe Integer
      -> Maybe [ManagedResourceSummary]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [ProductInformation]
      -> Maybe LicenseCountingType
      -> Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ConsumedLicenseSummary]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConsumedLicenseSummaryList"
                            Parser (Maybe (Maybe [ConsumedLicenseSummary]))
-> Maybe [ConsumedLicenseSummary]
-> Parser (Maybe [ConsumedLicenseSummary])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ConsumedLicenseSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Integer
   -> Maybe [ManagedResourceSummary]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [ProductInformation]
   -> Maybe LicenseCountingType
   -> Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe Integer)
-> Parser
     (Maybe [ManagedResourceSummary]
      -> Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [ProductInformation]
      -> Maybe LicenseCountingType
      -> Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LicenseCount")
            Parser
  (Maybe [ManagedResourceSummary]
   -> Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [ProductInformation]
   -> Maybe LicenseCountingType
   -> Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe [ManagedResourceSummary])
-> Parser
     (Maybe Text
      -> Maybe Bool
      -> Maybe Bool
      -> Maybe [ProductInformation]
      -> Maybe LicenseCountingType
      -> Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ManagedResourceSummary]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ManagedResourceSummaryList"
                            Parser (Maybe (Maybe [ManagedResourceSummary]))
-> Maybe [ManagedResourceSummary]
-> Parser (Maybe [ManagedResourceSummary])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ManagedResourceSummary]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe Text
   -> Maybe Bool
   -> Maybe Bool
   -> Maybe [ProductInformation]
   -> Maybe LicenseCountingType
   -> Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe Text)
-> Parser
     (Maybe Bool
      -> Maybe Bool
      -> Maybe [ProductInformation]
      -> Maybe LicenseCountingType
      -> Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
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
"Name")
            Parser
  (Maybe Bool
   -> Maybe Bool
   -> Maybe [ProductInformation]
   -> Maybe LicenseCountingType
   -> Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe Bool)
-> Parser
     (Maybe Bool
      -> Maybe [ProductInformation]
      -> Maybe LicenseCountingType
      -> Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LicenseCountHardLimit")
            Parser
  (Maybe Bool
   -> Maybe [ProductInformation]
   -> Maybe LicenseCountingType
   -> Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe Bool)
-> Parser
     (Maybe [ProductInformation]
      -> Maybe LicenseCountingType
      -> Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Bool)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DisassociateWhenNotFound")
            Parser
  (Maybe [ProductInformation]
   -> Maybe LicenseCountingType
   -> Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe [ProductInformation])
-> Parser
     (Maybe LicenseCountingType
      -> Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [ProductInformation]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ProductInformationList"
                            Parser (Maybe (Maybe [ProductInformation]))
-> Maybe [ProductInformation]
-> Parser (Maybe [ProductInformation])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [ProductInformation]
forall a. Monoid a => a
Prelude.mempty
                        )
            Parser
  (Maybe LicenseCountingType
   -> Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe LicenseCountingType)
-> Parser
     (Maybe AutomatedDiscoveryInformation
      -> Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe LicenseCountingType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LicenseCountingType")
            Parser
  (Maybe AutomatedDiscoveryInformation
   -> Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe AutomatedDiscoveryInformation)
-> Parser
     (Maybe Integer
      -> Maybe [Text]
      -> Maybe Text
      -> Maybe Text
      -> Maybe Text
      -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AutomatedDiscoveryInformation)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"AutomatedDiscoveryInformation")
            Parser
  (Maybe Integer
   -> Maybe [Text]
   -> Maybe Text
   -> Maybe Text
   -> Maybe Text
   -> LicenseConfiguration)
-> Parser (Maybe Integer)
-> Parser
     (Maybe [Text]
      -> Maybe Text -> Maybe Text -> Maybe Text -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Integer)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConsumedLicenses")
            Parser
  (Maybe [Text]
   -> Maybe Text -> Maybe Text -> Maybe Text -> LicenseConfiguration)
-> Parser (Maybe [Text])
-> Parser
     (Maybe Text -> Maybe Text -> Maybe Text -> LicenseConfiguration)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LicenseRules" Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text -> Maybe Text -> Maybe Text -> LicenseConfiguration)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> LicenseConfiguration)
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
"LicenseConfigurationId")
            Parser (Maybe Text -> Maybe Text -> LicenseConfiguration)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> LicenseConfiguration)
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
"Description")
            Parser (Maybe Text -> LicenseConfiguration)
-> Parser (Maybe Text) -> Parser LicenseConfiguration
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
"LicenseConfigurationArn")
      )

instance Prelude.Hashable LicenseConfiguration

instance Prelude.NFData LicenseConfiguration