{-# 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.License where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.LicenseManager.Types.ConsumptionConfiguration
import Amazonka.LicenseManager.Types.DatetimeRange
import Amazonka.LicenseManager.Types.Entitlement
import Amazonka.LicenseManager.Types.IssuerDetails
import Amazonka.LicenseManager.Types.LicenseStatus
import Amazonka.LicenseManager.Types.Metadata
import qualified Amazonka.Prelude as Prelude
data License = License'
{
License -> Maybe LicenseStatus
status :: Prelude.Maybe LicenseStatus,
License -> Maybe Text
productName :: Prelude.Maybe Prelude.Text,
License -> Maybe Text
licenseName :: Prelude.Maybe Prelude.Text,
License -> Maybe Text
productSKU :: Prelude.Maybe Prelude.Text,
License -> Maybe Text
homeRegion :: Prelude.Maybe Prelude.Text,
License -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
License -> Maybe [Entitlement]
entitlements :: Prelude.Maybe [Entitlement],
License -> Maybe DatetimeRange
validity :: Prelude.Maybe DatetimeRange,
License -> Maybe ConsumptionConfiguration
consumptionConfiguration :: Prelude.Maybe ConsumptionConfiguration,
License -> Maybe Text
beneficiary :: Prelude.Maybe Prelude.Text,
License -> Maybe IssuerDetails
issuer :: Prelude.Maybe IssuerDetails,
License -> Maybe Text
licenseArn :: Prelude.Maybe Prelude.Text,
License -> Maybe [Metadata]
licenseMetadata :: Prelude.Maybe [Metadata],
License -> Maybe Text
createTime :: Prelude.Maybe Prelude.Text
}
deriving (License -> License -> Bool
(License -> License -> Bool)
-> (License -> License -> Bool) -> Eq License
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: License -> License -> Bool
$c/= :: License -> License -> Bool
== :: License -> License -> Bool
$c== :: License -> License -> Bool
Prelude.Eq, ReadPrec [License]
ReadPrec License
Int -> ReadS License
ReadS [License]
(Int -> ReadS License)
-> ReadS [License]
-> ReadPrec License
-> ReadPrec [License]
-> Read License
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [License]
$creadListPrec :: ReadPrec [License]
readPrec :: ReadPrec License
$creadPrec :: ReadPrec License
readList :: ReadS [License]
$creadList :: ReadS [License]
readsPrec :: Int -> ReadS License
$creadsPrec :: Int -> ReadS License
Prelude.Read, Int -> License -> ShowS
[License] -> ShowS
License -> String
(Int -> License -> ShowS)
-> (License -> String) -> ([License] -> ShowS) -> Show License
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [License] -> ShowS
$cshowList :: [License] -> ShowS
show :: License -> String
$cshow :: License -> String
showsPrec :: Int -> License -> ShowS
$cshowsPrec :: Int -> License -> ShowS
Prelude.Show, (forall x. License -> Rep License x)
-> (forall x. Rep License x -> License) -> Generic License
forall x. Rep License x -> License
forall x. License -> Rep License x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep License x -> License
$cfrom :: forall x. License -> Rep License x
Prelude.Generic)
newLicense ::
License
newLicense :: License
newLicense =
License' :: Maybe LicenseStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License
License'
{ $sel:status:License' :: Maybe LicenseStatus
status = Maybe LicenseStatus
forall a. Maybe a
Prelude.Nothing,
$sel:productName:License' :: Maybe Text
productName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:licenseName:License' :: Maybe Text
licenseName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:productSKU:License' :: Maybe Text
productSKU = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:homeRegion:License' :: Maybe Text
homeRegion = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:version:License' :: Maybe Text
version = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:entitlements:License' :: Maybe [Entitlement]
entitlements = Maybe [Entitlement]
forall a. Maybe a
Prelude.Nothing,
$sel:validity:License' :: Maybe DatetimeRange
validity = Maybe DatetimeRange
forall a. Maybe a
Prelude.Nothing,
$sel:consumptionConfiguration:License' :: Maybe ConsumptionConfiguration
consumptionConfiguration = Maybe ConsumptionConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:beneficiary:License' :: Maybe Text
beneficiary = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:issuer:License' :: Maybe IssuerDetails
issuer = Maybe IssuerDetails
forall a. Maybe a
Prelude.Nothing,
$sel:licenseArn:License' :: Maybe Text
licenseArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:licenseMetadata:License' :: Maybe [Metadata]
licenseMetadata = Maybe [Metadata]
forall a. Maybe a
Prelude.Nothing,
$sel:createTime:License' :: Maybe Text
createTime = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
license_status :: Lens.Lens' License (Prelude.Maybe LicenseStatus)
license_status :: (Maybe LicenseStatus -> f (Maybe LicenseStatus))
-> License -> f License
license_status = (License -> Maybe LicenseStatus)
-> (License -> Maybe LicenseStatus -> License)
-> Lens License License (Maybe LicenseStatus) (Maybe LicenseStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe LicenseStatus
status :: Maybe LicenseStatus
$sel:status:License' :: License -> Maybe LicenseStatus
status} -> Maybe LicenseStatus
status) (\s :: License
s@License' {} Maybe LicenseStatus
a -> License
s {$sel:status:License' :: Maybe LicenseStatus
status = Maybe LicenseStatus
a} :: License)
license_productName :: Lens.Lens' License (Prelude.Maybe Prelude.Text)
license_productName :: (Maybe Text -> f (Maybe Text)) -> License -> f License
license_productName = (License -> Maybe Text)
-> (License -> Maybe Text -> License)
-> Lens License License (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe Text
productName :: Maybe Text
$sel:productName:License' :: License -> Maybe Text
productName} -> Maybe Text
productName) (\s :: License
s@License' {} Maybe Text
a -> License
s {$sel:productName:License' :: Maybe Text
productName = Maybe Text
a} :: License)
license_licenseName :: Lens.Lens' License (Prelude.Maybe Prelude.Text)
license_licenseName :: (Maybe Text -> f (Maybe Text)) -> License -> f License
license_licenseName = (License -> Maybe Text)
-> (License -> Maybe Text -> License)
-> Lens License License (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe Text
licenseName :: Maybe Text
$sel:licenseName:License' :: License -> Maybe Text
licenseName} -> Maybe Text
licenseName) (\s :: License
s@License' {} Maybe Text
a -> License
s {$sel:licenseName:License' :: Maybe Text
licenseName = Maybe Text
a} :: License)
license_productSKU :: Lens.Lens' License (Prelude.Maybe Prelude.Text)
license_productSKU :: (Maybe Text -> f (Maybe Text)) -> License -> f License
license_productSKU = (License -> Maybe Text)
-> (License -> Maybe Text -> License)
-> Lens License License (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe Text
productSKU :: Maybe Text
$sel:productSKU:License' :: License -> Maybe Text
productSKU} -> Maybe Text
productSKU) (\s :: License
s@License' {} Maybe Text
a -> License
s {$sel:productSKU:License' :: Maybe Text
productSKU = Maybe Text
a} :: License)
license_homeRegion :: Lens.Lens' License (Prelude.Maybe Prelude.Text)
license_homeRegion :: (Maybe Text -> f (Maybe Text)) -> License -> f License
license_homeRegion = (License -> Maybe Text)
-> (License -> Maybe Text -> License)
-> Lens License License (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe Text
homeRegion :: Maybe Text
$sel:homeRegion:License' :: License -> Maybe Text
homeRegion} -> Maybe Text
homeRegion) (\s :: License
s@License' {} Maybe Text
a -> License
s {$sel:homeRegion:License' :: Maybe Text
homeRegion = Maybe Text
a} :: License)
license_version :: Lens.Lens' License (Prelude.Maybe Prelude.Text)
license_version :: (Maybe Text -> f (Maybe Text)) -> License -> f License
license_version = (License -> Maybe Text)
-> (License -> Maybe Text -> License)
-> Lens License License (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe Text
version :: Maybe Text
$sel:version:License' :: License -> Maybe Text
version} -> Maybe Text
version) (\s :: License
s@License' {} Maybe Text
a -> License
s {$sel:version:License' :: Maybe Text
version = Maybe Text
a} :: License)
license_entitlements :: Lens.Lens' License (Prelude.Maybe [Entitlement])
license_entitlements :: (Maybe [Entitlement] -> f (Maybe [Entitlement]))
-> License -> f License
license_entitlements = (License -> Maybe [Entitlement])
-> (License -> Maybe [Entitlement] -> License)
-> Lens License License (Maybe [Entitlement]) (Maybe [Entitlement])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe [Entitlement]
entitlements :: Maybe [Entitlement]
$sel:entitlements:License' :: License -> Maybe [Entitlement]
entitlements} -> Maybe [Entitlement]
entitlements) (\s :: License
s@License' {} Maybe [Entitlement]
a -> License
s {$sel:entitlements:License' :: Maybe [Entitlement]
entitlements = Maybe [Entitlement]
a} :: License) ((Maybe [Entitlement] -> f (Maybe [Entitlement]))
-> License -> f License)
-> ((Maybe [Entitlement] -> f (Maybe [Entitlement]))
-> Maybe [Entitlement] -> f (Maybe [Entitlement]))
-> (Maybe [Entitlement] -> f (Maybe [Entitlement]))
-> License
-> f License
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Entitlement] [Entitlement] [Entitlement] [Entitlement]
-> Iso
(Maybe [Entitlement])
(Maybe [Entitlement])
(Maybe [Entitlement])
(Maybe [Entitlement])
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 [Entitlement] [Entitlement] [Entitlement] [Entitlement]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
license_validity :: Lens.Lens' License (Prelude.Maybe DatetimeRange)
license_validity :: (Maybe DatetimeRange -> f (Maybe DatetimeRange))
-> License -> f License
license_validity = (License -> Maybe DatetimeRange)
-> (License -> Maybe DatetimeRange -> License)
-> Lens License License (Maybe DatetimeRange) (Maybe DatetimeRange)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe DatetimeRange
validity :: Maybe DatetimeRange
$sel:validity:License' :: License -> Maybe DatetimeRange
validity} -> Maybe DatetimeRange
validity) (\s :: License
s@License' {} Maybe DatetimeRange
a -> License
s {$sel:validity:License' :: Maybe DatetimeRange
validity = Maybe DatetimeRange
a} :: License)
license_consumptionConfiguration :: Lens.Lens' License (Prelude.Maybe ConsumptionConfiguration)
license_consumptionConfiguration :: (Maybe ConsumptionConfiguration
-> f (Maybe ConsumptionConfiguration))
-> License -> f License
license_consumptionConfiguration = (License -> Maybe ConsumptionConfiguration)
-> (License -> Maybe ConsumptionConfiguration -> License)
-> Lens
License
License
(Maybe ConsumptionConfiguration)
(Maybe ConsumptionConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe ConsumptionConfiguration
consumptionConfiguration :: Maybe ConsumptionConfiguration
$sel:consumptionConfiguration:License' :: License -> Maybe ConsumptionConfiguration
consumptionConfiguration} -> Maybe ConsumptionConfiguration
consumptionConfiguration) (\s :: License
s@License' {} Maybe ConsumptionConfiguration
a -> License
s {$sel:consumptionConfiguration:License' :: Maybe ConsumptionConfiguration
consumptionConfiguration = Maybe ConsumptionConfiguration
a} :: License)
license_beneficiary :: Lens.Lens' License (Prelude.Maybe Prelude.Text)
license_beneficiary :: (Maybe Text -> f (Maybe Text)) -> License -> f License
license_beneficiary = (License -> Maybe Text)
-> (License -> Maybe Text -> License)
-> Lens License License (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe Text
beneficiary :: Maybe Text
$sel:beneficiary:License' :: License -> Maybe Text
beneficiary} -> Maybe Text
beneficiary) (\s :: License
s@License' {} Maybe Text
a -> License
s {$sel:beneficiary:License' :: Maybe Text
beneficiary = Maybe Text
a} :: License)
license_issuer :: Lens.Lens' License (Prelude.Maybe IssuerDetails)
license_issuer :: (Maybe IssuerDetails -> f (Maybe IssuerDetails))
-> License -> f License
license_issuer = (License -> Maybe IssuerDetails)
-> (License -> Maybe IssuerDetails -> License)
-> Lens License License (Maybe IssuerDetails) (Maybe IssuerDetails)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe IssuerDetails
issuer :: Maybe IssuerDetails
$sel:issuer:License' :: License -> Maybe IssuerDetails
issuer} -> Maybe IssuerDetails
issuer) (\s :: License
s@License' {} Maybe IssuerDetails
a -> License
s {$sel:issuer:License' :: Maybe IssuerDetails
issuer = Maybe IssuerDetails
a} :: License)
license_licenseArn :: Lens.Lens' License (Prelude.Maybe Prelude.Text)
license_licenseArn :: (Maybe Text -> f (Maybe Text)) -> License -> f License
license_licenseArn = (License -> Maybe Text)
-> (License -> Maybe Text -> License)
-> Lens License License (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe Text
licenseArn :: Maybe Text
$sel:licenseArn:License' :: License -> Maybe Text
licenseArn} -> Maybe Text
licenseArn) (\s :: License
s@License' {} Maybe Text
a -> License
s {$sel:licenseArn:License' :: Maybe Text
licenseArn = Maybe Text
a} :: License)
license_licenseMetadata :: Lens.Lens' License (Prelude.Maybe [Metadata])
license_licenseMetadata :: (Maybe [Metadata] -> f (Maybe [Metadata])) -> License -> f License
license_licenseMetadata = (License -> Maybe [Metadata])
-> (License -> Maybe [Metadata] -> License)
-> Lens License License (Maybe [Metadata]) (Maybe [Metadata])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe [Metadata]
licenseMetadata :: Maybe [Metadata]
$sel:licenseMetadata:License' :: License -> Maybe [Metadata]
licenseMetadata} -> Maybe [Metadata]
licenseMetadata) (\s :: License
s@License' {} Maybe [Metadata]
a -> License
s {$sel:licenseMetadata:License' :: Maybe [Metadata]
licenseMetadata = Maybe [Metadata]
a} :: License) ((Maybe [Metadata] -> f (Maybe [Metadata]))
-> License -> f License)
-> ((Maybe [Metadata] -> f (Maybe [Metadata]))
-> Maybe [Metadata] -> f (Maybe [Metadata]))
-> (Maybe [Metadata] -> f (Maybe [Metadata]))
-> License
-> f License
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Metadata] [Metadata] [Metadata] [Metadata]
-> Iso
(Maybe [Metadata])
(Maybe [Metadata])
(Maybe [Metadata])
(Maybe [Metadata])
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 [Metadata] [Metadata] [Metadata] [Metadata]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
license_createTime :: Lens.Lens' License (Prelude.Maybe Prelude.Text)
license_createTime :: (Maybe Text -> f (Maybe Text)) -> License -> f License
license_createTime = (License -> Maybe Text)
-> (License -> Maybe Text -> License)
-> Lens License License (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\License' {Maybe Text
createTime :: Maybe Text
$sel:createTime:License' :: License -> Maybe Text
createTime} -> Maybe Text
createTime) (\s :: License
s@License' {} Maybe Text
a -> License
s {$sel:createTime:License' :: Maybe Text
createTime = Maybe Text
a} :: License)
instance Core.FromJSON License where
parseJSON :: Value -> Parser License
parseJSON =
String -> (Object -> Parser License) -> Value -> Parser License
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"License"
( \Object
x ->
Maybe LicenseStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License
License'
(Maybe LicenseStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe LicenseStatus)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe LicenseStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Status")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
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
"ProductName")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
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
"LicenseName")
Parser
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
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
"ProductSKU")
Parser
(Maybe Text
-> Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
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
"HomeRegion")
Parser
(Maybe Text
-> Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe Text)
-> Parser
(Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
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
"Version")
Parser
(Maybe [Entitlement]
-> Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe [Entitlement])
-> Parser
(Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe [Entitlement]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Entitlements" Parser (Maybe (Maybe [Entitlement]))
-> Maybe [Entitlement] -> Parser (Maybe [Entitlement])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Entitlement]
forall a. Monoid a => a
Prelude.mempty)
Parser
(Maybe DatetimeRange
-> Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe DatetimeRange)
-> Parser
(Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe DatetimeRange)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Validity")
Parser
(Maybe ConsumptionConfiguration
-> Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe ConsumptionConfiguration)
-> Parser
(Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ConsumptionConfiguration)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ConsumptionConfiguration")
Parser
(Maybe Text
-> Maybe IssuerDetails
-> Maybe Text
-> Maybe [Metadata]
-> Maybe Text
-> License)
-> Parser (Maybe Text)
-> Parser
(Maybe IssuerDetails
-> Maybe Text -> Maybe [Metadata] -> Maybe Text -> License)
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
"Beneficiary")
Parser
(Maybe IssuerDetails
-> Maybe Text -> Maybe [Metadata] -> Maybe Text -> License)
-> Parser (Maybe IssuerDetails)
-> Parser (Maybe Text -> Maybe [Metadata] -> Maybe Text -> License)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe IssuerDetails)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Issuer")
Parser (Maybe Text -> Maybe [Metadata] -> Maybe Text -> License)
-> Parser (Maybe Text)
-> Parser (Maybe [Metadata] -> Maybe Text -> License)
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
"LicenseArn")
Parser (Maybe [Metadata] -> Maybe Text -> License)
-> Parser (Maybe [Metadata]) -> Parser (Maybe Text -> License)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Metadata]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LicenseMetadata"
Parser (Maybe (Maybe [Metadata]))
-> Maybe [Metadata] -> Parser (Maybe [Metadata])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Metadata]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Text -> License)
-> Parser (Maybe Text) -> Parser License
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
"CreateTime")
)
instance Prelude.Hashable License
instance Prelude.NFData License