{-# 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.ProductInformation -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.LicenseManager.Types.ProductInformation where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import Amazonka.LicenseManager.Types.ProductInformationFilter import qualified Amazonka.Prelude as Prelude -- | Describes product information for a license configuration. -- -- /See:/ 'newProductInformation' smart constructor. data ProductInformation = ProductInformation' { -- | Resource type. The possible values are @SSM_MANAGED@ | @RDS@. ProductInformation -> Text resourceType :: Prelude.Text, -- | A Product information filter consists of a -- @ProductInformationFilterComparator@ which is a logical operator, a -- @ProductInformationFilterName@ which specifies the type of filter being -- declared, and a @ProductInformationFilterValue@ that specifies the value -- to filter on. -- -- Accepted values for @ProductInformationFilterName@ are listed here along -- with descriptions and valid options for -- @ProductInformationFilterComparator@. -- -- The following filters and are supported when the resource type is -- @SSM_MANAGED@: -- -- - @Application Name@ - The name of the application. Logical operator -- is @EQUALS@. -- -- - @Application Publisher@ - The publisher of the application. Logical -- operator is @EQUALS@. -- -- - @Application Version@ - The version of the application. Logical -- operator is @EQUALS@. -- -- - @Platform Name@ - The name of the platform. Logical operator is -- @EQUALS@. -- -- - @Platform Type@ - The platform type. Logical operator is @EQUALS@. -- -- - @Tag:key@ - The key of a tag attached to an Amazon Web Services -- resource you wish to exclude from automated discovery. Logical -- operator is @NOT_EQUALS@. The key for your tag must be appended to -- @Tag:@ following the example: @Tag:name-of-your-key@. -- @ProductInformationFilterValue@ is optional if you are not using -- values for the key. -- -- - @AccountId@ - The 12-digit ID of an Amazon Web Services account you -- wish to exclude from automated discovery. Logical operator is -- @NOT_EQUALS@. -- -- - @License Included@ - The type of license included. Logical operators -- are @EQUALS@ and @NOT_EQUALS@. Possible values are: -- @sql-server-enterprise@ | @sql-server-standard@ | @sql-server-web@ | -- @windows-server-datacenter@. -- -- The following filters and logical operators are supported when the -- resource type is @RDS@: -- -- - @Engine Edition@ - The edition of the database engine. Logical -- operator is @EQUALS@. Possible values are: @oracle-ee@ | @oracle-se@ -- | @oracle-se1@ | @oracle-se2@. -- -- - @License Pack@ - The license pack. Logical operator is @EQUALS@. -- Possible values are: @data guard@ | @diagnostic pack sqlt@ | -- @tuning pack sqlt@ | @ols@ | @olap@. ProductInformation -> [ProductInformationFilter] productInformationFilterList :: [ProductInformationFilter] } deriving (ProductInformation -> ProductInformation -> Bool forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a /= :: ProductInformation -> ProductInformation -> Bool $c/= :: ProductInformation -> ProductInformation -> Bool == :: ProductInformation -> ProductInformation -> Bool $c== :: ProductInformation -> ProductInformation -> Bool Prelude.Eq, ReadPrec [ProductInformation] ReadPrec ProductInformation Int -> ReadS ProductInformation ReadS [ProductInformation] forall a. (Int -> ReadS a) -> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a readListPrec :: ReadPrec [ProductInformation] $creadListPrec :: ReadPrec [ProductInformation] readPrec :: ReadPrec ProductInformation $creadPrec :: ReadPrec ProductInformation readList :: ReadS [ProductInformation] $creadList :: ReadS [ProductInformation] readsPrec :: Int -> ReadS ProductInformation $creadsPrec :: Int -> ReadS ProductInformation Prelude.Read, Int -> ProductInformation -> ShowS [ProductInformation] -> ShowS ProductInformation -> String forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a showList :: [ProductInformation] -> ShowS $cshowList :: [ProductInformation] -> ShowS show :: ProductInformation -> String $cshow :: ProductInformation -> String showsPrec :: Int -> ProductInformation -> ShowS $cshowsPrec :: Int -> ProductInformation -> ShowS Prelude.Show, forall x. Rep ProductInformation x -> ProductInformation forall x. ProductInformation -> Rep ProductInformation x forall a. (forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a $cto :: forall x. Rep ProductInformation x -> ProductInformation $cfrom :: forall x. ProductInformation -> Rep ProductInformation x Prelude.Generic) -- | -- Create a value of 'ProductInformation' 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: -- -- 'resourceType', 'productInformation_resourceType' - Resource type. The possible values are @SSM_MANAGED@ | @RDS@. -- -- 'productInformationFilterList', 'productInformation_productInformationFilterList' - A Product information filter consists of a -- @ProductInformationFilterComparator@ which is a logical operator, a -- @ProductInformationFilterName@ which specifies the type of filter being -- declared, and a @ProductInformationFilterValue@ that specifies the value -- to filter on. -- -- Accepted values for @ProductInformationFilterName@ are listed here along -- with descriptions and valid options for -- @ProductInformationFilterComparator@. -- -- The following filters and are supported when the resource type is -- @SSM_MANAGED@: -- -- - @Application Name@ - The name of the application. Logical operator -- is @EQUALS@. -- -- - @Application Publisher@ - The publisher of the application. Logical -- operator is @EQUALS@. -- -- - @Application Version@ - The version of the application. Logical -- operator is @EQUALS@. -- -- - @Platform Name@ - The name of the platform. Logical operator is -- @EQUALS@. -- -- - @Platform Type@ - The platform type. Logical operator is @EQUALS@. -- -- - @Tag:key@ - The key of a tag attached to an Amazon Web Services -- resource you wish to exclude from automated discovery. Logical -- operator is @NOT_EQUALS@. The key for your tag must be appended to -- @Tag:@ following the example: @Tag:name-of-your-key@. -- @ProductInformationFilterValue@ is optional if you are not using -- values for the key. -- -- - @AccountId@ - The 12-digit ID of an Amazon Web Services account you -- wish to exclude from automated discovery. Logical operator is -- @NOT_EQUALS@. -- -- - @License Included@ - The type of license included. Logical operators -- are @EQUALS@ and @NOT_EQUALS@. Possible values are: -- @sql-server-enterprise@ | @sql-server-standard@ | @sql-server-web@ | -- @windows-server-datacenter@. -- -- The following filters and logical operators are supported when the -- resource type is @RDS@: -- -- - @Engine Edition@ - The edition of the database engine. Logical -- operator is @EQUALS@. Possible values are: @oracle-ee@ | @oracle-se@ -- | @oracle-se1@ | @oracle-se2@. -- -- - @License Pack@ - The license pack. Logical operator is @EQUALS@. -- Possible values are: @data guard@ | @diagnostic pack sqlt@ | -- @tuning pack sqlt@ | @ols@ | @olap@. newProductInformation :: -- | 'resourceType' Prelude.Text -> ProductInformation newProductInformation :: Text -> ProductInformation newProductInformation Text pResourceType_ = ProductInformation' { $sel:resourceType:ProductInformation' :: Text resourceType = Text pResourceType_, $sel:productInformationFilterList:ProductInformation' :: [ProductInformationFilter] productInformationFilterList = forall a. Monoid a => a Prelude.mempty } -- | Resource type. The possible values are @SSM_MANAGED@ | @RDS@. productInformation_resourceType :: Lens.Lens' ProductInformation Prelude.Text productInformation_resourceType :: Lens' ProductInformation Text productInformation_resourceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\ProductInformation' {Text resourceType :: Text $sel:resourceType:ProductInformation' :: ProductInformation -> Text resourceType} -> Text resourceType) (\s :: ProductInformation s@ProductInformation' {} Text a -> ProductInformation s {$sel:resourceType:ProductInformation' :: Text resourceType = Text a} :: ProductInformation) -- | A Product information filter consists of a -- @ProductInformationFilterComparator@ which is a logical operator, a -- @ProductInformationFilterName@ which specifies the type of filter being -- declared, and a @ProductInformationFilterValue@ that specifies the value -- to filter on. -- -- Accepted values for @ProductInformationFilterName@ are listed here along -- with descriptions and valid options for -- @ProductInformationFilterComparator@. -- -- The following filters and are supported when the resource type is -- @SSM_MANAGED@: -- -- - @Application Name@ - The name of the application. Logical operator -- is @EQUALS@. -- -- - @Application Publisher@ - The publisher of the application. Logical -- operator is @EQUALS@. -- -- - @Application Version@ - The version of the application. Logical -- operator is @EQUALS@. -- -- - @Platform Name@ - The name of the platform. Logical operator is -- @EQUALS@. -- -- - @Platform Type@ - The platform type. Logical operator is @EQUALS@. -- -- - @Tag:key@ - The key of a tag attached to an Amazon Web Services -- resource you wish to exclude from automated discovery. Logical -- operator is @NOT_EQUALS@. The key for your tag must be appended to -- @Tag:@ following the example: @Tag:name-of-your-key@. -- @ProductInformationFilterValue@ is optional if you are not using -- values for the key. -- -- - @AccountId@ - The 12-digit ID of an Amazon Web Services account you -- wish to exclude from automated discovery. Logical operator is -- @NOT_EQUALS@. -- -- - @License Included@ - The type of license included. Logical operators -- are @EQUALS@ and @NOT_EQUALS@. Possible values are: -- @sql-server-enterprise@ | @sql-server-standard@ | @sql-server-web@ | -- @windows-server-datacenter@. -- -- The following filters and logical operators are supported when the -- resource type is @RDS@: -- -- - @Engine Edition@ - The edition of the database engine. Logical -- operator is @EQUALS@. Possible values are: @oracle-ee@ | @oracle-se@ -- | @oracle-se1@ | @oracle-se2@. -- -- - @License Pack@ - The license pack. Logical operator is @EQUALS@. -- Possible values are: @data guard@ | @diagnostic pack sqlt@ | -- @tuning pack sqlt@ | @ols@ | @olap@. productInformation_productInformationFilterList :: Lens.Lens' ProductInformation [ProductInformationFilter] productInformation_productInformationFilterList :: Lens' ProductInformation [ProductInformationFilter] productInformation_productInformationFilterList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b Lens.lens (\ProductInformation' {[ProductInformationFilter] productInformationFilterList :: [ProductInformationFilter] $sel:productInformationFilterList:ProductInformation' :: ProductInformation -> [ProductInformationFilter] productInformationFilterList} -> [ProductInformationFilter] productInformationFilterList) (\s :: ProductInformation s@ProductInformation' {} [ProductInformationFilter] a -> ProductInformation s {$sel:productInformationFilterList:ProductInformation' :: [ProductInformationFilter] productInformationFilterList = [ProductInformationFilter] a} :: ProductInformation) forall b c a. (b -> c) -> (a -> b) -> a -> c Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b Lens.coerced instance Data.FromJSON ProductInformation where parseJSON :: Value -> Parser ProductInformation parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a Data.withObject String "ProductInformation" ( \Object x -> Text -> [ProductInformationFilter] -> ProductInformation ProductInformation' forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b Prelude.<$> (Object x forall a. FromJSON a => Object -> Key -> Parser a Data..: Key "ResourceType") forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b Prelude.<*> ( Object x forall a. FromJSON a => Object -> Key -> Parser (Maybe a) Data..:? Key "ProductInformationFilterList" forall a. Parser (Maybe a) -> a -> Parser a Data..!= forall a. Monoid a => a Prelude.mempty ) ) instance Prelude.Hashable ProductInformation where hashWithSalt :: Int -> ProductInformation -> Int hashWithSalt Int _salt ProductInformation' {[ProductInformationFilter] Text productInformationFilterList :: [ProductInformationFilter] resourceType :: Text $sel:productInformationFilterList:ProductInformation' :: ProductInformation -> [ProductInformationFilter] $sel:resourceType:ProductInformation' :: ProductInformation -> Text ..} = Int _salt forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` Text resourceType forall a. Hashable a => Int -> a -> Int `Prelude.hashWithSalt` [ProductInformationFilter] productInformationFilterList instance Prelude.NFData ProductInformation where rnf :: ProductInformation -> () rnf ProductInformation' {[ProductInformationFilter] Text productInformationFilterList :: [ProductInformationFilter] resourceType :: Text $sel:productInformationFilterList:ProductInformation' :: ProductInformation -> [ProductInformationFilter] $sel:resourceType:ProductInformation' :: ProductInformation -> Text ..} = forall a. NFData a => a -> () Prelude.rnf Text resourceType seq :: forall a b. a -> b -> b `Prelude.seq` forall a. NFData a => a -> () Prelude.rnf [ProductInformationFilter] productInformationFilterList instance Data.ToJSON ProductInformation where toJSON :: ProductInformation -> Value toJSON ProductInformation' {[ProductInformationFilter] Text productInformationFilterList :: [ProductInformationFilter] resourceType :: Text $sel:productInformationFilterList:ProductInformation' :: ProductInformation -> [ProductInformationFilter] $sel:resourceType:ProductInformation' :: ProductInformation -> Text ..} = [Pair] -> Value Data.object ( forall a. [Maybe a] -> [a] Prelude.catMaybes [ forall a. a -> Maybe a Prelude.Just (Key "ResourceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv Data..= Text resourceType), forall a. a -> Maybe a Prelude.Just ( Key "ProductInformationFilterList" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv Data..= [ProductInformationFilter] productInformationFilterList ) ] )