{-# 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.SecurityHub.Types.Product where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.IntegrationType
data Product = Product'
{
Product -> Maybe Text
productName :: Prelude.Maybe Prelude.Text,
Product -> Maybe Text
productSubscriptionResourcePolicy :: Prelude.Maybe Prelude.Text,
Product -> Maybe Text
companyName :: Prelude.Maybe Prelude.Text,
Product -> Maybe [Text]
categories :: Prelude.Maybe [Prelude.Text],
Product -> Maybe Text
marketplaceUrl :: Prelude.Maybe Prelude.Text,
Product -> Maybe Text
activationUrl :: Prelude.Maybe Prelude.Text,
Product -> Maybe [IntegrationType]
integrationTypes :: Prelude.Maybe [IntegrationType],
Product -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
Product -> Text
productArn :: Prelude.Text
}
deriving (Product -> Product -> Bool
(Product -> Product -> Bool)
-> (Product -> Product -> Bool) -> Eq Product
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Product -> Product -> Bool
$c/= :: Product -> Product -> Bool
== :: Product -> Product -> Bool
$c== :: Product -> Product -> Bool
Prelude.Eq, ReadPrec [Product]
ReadPrec Product
Int -> ReadS Product
ReadS [Product]
(Int -> ReadS Product)
-> ReadS [Product]
-> ReadPrec Product
-> ReadPrec [Product]
-> Read Product
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Product]
$creadListPrec :: ReadPrec [Product]
readPrec :: ReadPrec Product
$creadPrec :: ReadPrec Product
readList :: ReadS [Product]
$creadList :: ReadS [Product]
readsPrec :: Int -> ReadS Product
$creadsPrec :: Int -> ReadS Product
Prelude.Read, Int -> Product -> ShowS
[Product] -> ShowS
Product -> String
(Int -> Product -> ShowS)
-> (Product -> String) -> ([Product] -> ShowS) -> Show Product
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Product] -> ShowS
$cshowList :: [Product] -> ShowS
show :: Product -> String
$cshow :: Product -> String
showsPrec :: Int -> Product -> ShowS
$cshowsPrec :: Int -> Product -> ShowS
Prelude.Show, (forall x. Product -> Rep Product x)
-> (forall x. Rep Product x -> Product) -> Generic Product
forall x. Rep Product x -> Product
forall x. Product -> Rep Product x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Product x -> Product
$cfrom :: forall x. Product -> Rep Product x
Prelude.Generic)
newProduct ::
Prelude.Text ->
Product
newProduct :: Text -> Product
newProduct Text
pProductArn_ =
Product' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product
Product'
{ $sel:productName:Product' :: Maybe Text
productName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:productSubscriptionResourcePolicy:Product' :: Maybe Text
productSubscriptionResourcePolicy = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:companyName:Product' :: Maybe Text
companyName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:categories:Product' :: Maybe [Text]
categories = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:marketplaceUrl:Product' :: Maybe Text
marketplaceUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:activationUrl:Product' :: Maybe Text
activationUrl = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:integrationTypes:Product' :: Maybe [IntegrationType]
integrationTypes = Maybe [IntegrationType]
forall a. Maybe a
Prelude.Nothing,
$sel:description:Product' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:productArn:Product' :: Text
productArn = Text
pProductArn_
}
product_productName :: Lens.Lens' Product (Prelude.Maybe Prelude.Text)
product_productName :: (Maybe Text -> f (Maybe Text)) -> Product -> f Product
product_productName = (Product -> Maybe Text)
-> (Product -> Maybe Text -> Product)
-> Lens Product Product (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Product' {Maybe Text
productName :: Maybe Text
$sel:productName:Product' :: Product -> Maybe Text
productName} -> Maybe Text
productName) (\s :: Product
s@Product' {} Maybe Text
a -> Product
s {$sel:productName:Product' :: Maybe Text
productName = Maybe Text
a} :: Product)
product_productSubscriptionResourcePolicy :: Lens.Lens' Product (Prelude.Maybe Prelude.Text)
product_productSubscriptionResourcePolicy :: (Maybe Text -> f (Maybe Text)) -> Product -> f Product
product_productSubscriptionResourcePolicy = (Product -> Maybe Text)
-> (Product -> Maybe Text -> Product)
-> Lens Product Product (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Product' {Maybe Text
productSubscriptionResourcePolicy :: Maybe Text
$sel:productSubscriptionResourcePolicy:Product' :: Product -> Maybe Text
productSubscriptionResourcePolicy} -> Maybe Text
productSubscriptionResourcePolicy) (\s :: Product
s@Product' {} Maybe Text
a -> Product
s {$sel:productSubscriptionResourcePolicy:Product' :: Maybe Text
productSubscriptionResourcePolicy = Maybe Text
a} :: Product)
product_companyName :: Lens.Lens' Product (Prelude.Maybe Prelude.Text)
product_companyName :: (Maybe Text -> f (Maybe Text)) -> Product -> f Product
product_companyName = (Product -> Maybe Text)
-> (Product -> Maybe Text -> Product)
-> Lens Product Product (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Product' {Maybe Text
companyName :: Maybe Text
$sel:companyName:Product' :: Product -> Maybe Text
companyName} -> Maybe Text
companyName) (\s :: Product
s@Product' {} Maybe Text
a -> Product
s {$sel:companyName:Product' :: Maybe Text
companyName = Maybe Text
a} :: Product)
product_categories :: Lens.Lens' Product (Prelude.Maybe [Prelude.Text])
product_categories :: (Maybe [Text] -> f (Maybe [Text])) -> Product -> f Product
product_categories = (Product -> Maybe [Text])
-> (Product -> Maybe [Text] -> Product)
-> Lens Product Product (Maybe [Text]) (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Product' {Maybe [Text]
categories :: Maybe [Text]
$sel:categories:Product' :: Product -> Maybe [Text]
categories} -> Maybe [Text]
categories) (\s :: Product
s@Product' {} Maybe [Text]
a -> Product
s {$sel:categories:Product' :: Maybe [Text]
categories = Maybe [Text]
a} :: Product) ((Maybe [Text] -> f (Maybe [Text])) -> Product -> f Product)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> Product
-> f Product
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
product_marketplaceUrl :: Lens.Lens' Product (Prelude.Maybe Prelude.Text)
product_marketplaceUrl :: (Maybe Text -> f (Maybe Text)) -> Product -> f Product
product_marketplaceUrl = (Product -> Maybe Text)
-> (Product -> Maybe Text -> Product)
-> Lens Product Product (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Product' {Maybe Text
marketplaceUrl :: Maybe Text
$sel:marketplaceUrl:Product' :: Product -> Maybe Text
marketplaceUrl} -> Maybe Text
marketplaceUrl) (\s :: Product
s@Product' {} Maybe Text
a -> Product
s {$sel:marketplaceUrl:Product' :: Maybe Text
marketplaceUrl = Maybe Text
a} :: Product)
product_activationUrl :: Lens.Lens' Product (Prelude.Maybe Prelude.Text)
product_activationUrl :: (Maybe Text -> f (Maybe Text)) -> Product -> f Product
product_activationUrl = (Product -> Maybe Text)
-> (Product -> Maybe Text -> Product)
-> Lens Product Product (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Product' {Maybe Text
activationUrl :: Maybe Text
$sel:activationUrl:Product' :: Product -> Maybe Text
activationUrl} -> Maybe Text
activationUrl) (\s :: Product
s@Product' {} Maybe Text
a -> Product
s {$sel:activationUrl:Product' :: Maybe Text
activationUrl = Maybe Text
a} :: Product)
product_integrationTypes :: Lens.Lens' Product (Prelude.Maybe [IntegrationType])
product_integrationTypes :: (Maybe [IntegrationType] -> f (Maybe [IntegrationType]))
-> Product -> f Product
product_integrationTypes = (Product -> Maybe [IntegrationType])
-> (Product -> Maybe [IntegrationType] -> Product)
-> Lens
Product Product (Maybe [IntegrationType]) (Maybe [IntegrationType])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Product' {Maybe [IntegrationType]
integrationTypes :: Maybe [IntegrationType]
$sel:integrationTypes:Product' :: Product -> Maybe [IntegrationType]
integrationTypes} -> Maybe [IntegrationType]
integrationTypes) (\s :: Product
s@Product' {} Maybe [IntegrationType]
a -> Product
s {$sel:integrationTypes:Product' :: Maybe [IntegrationType]
integrationTypes = Maybe [IntegrationType]
a} :: Product) ((Maybe [IntegrationType] -> f (Maybe [IntegrationType]))
-> Product -> f Product)
-> ((Maybe [IntegrationType] -> f (Maybe [IntegrationType]))
-> Maybe [IntegrationType] -> f (Maybe [IntegrationType]))
-> (Maybe [IntegrationType] -> f (Maybe [IntegrationType]))
-> Product
-> f Product
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[IntegrationType]
[IntegrationType]
[IntegrationType]
[IntegrationType]
-> Iso
(Maybe [IntegrationType])
(Maybe [IntegrationType])
(Maybe [IntegrationType])
(Maybe [IntegrationType])
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
[IntegrationType]
[IntegrationType]
[IntegrationType]
[IntegrationType]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
product_description :: Lens.Lens' Product (Prelude.Maybe Prelude.Text)
product_description :: (Maybe Text -> f (Maybe Text)) -> Product -> f Product
product_description = (Product -> Maybe Text)
-> (Product -> Maybe Text -> Product)
-> Lens Product Product (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Product' {Maybe Text
description :: Maybe Text
$sel:description:Product' :: Product -> Maybe Text
description} -> Maybe Text
description) (\s :: Product
s@Product' {} Maybe Text
a -> Product
s {$sel:description:Product' :: Maybe Text
description = Maybe Text
a} :: Product)
product_productArn :: Lens.Lens' Product Prelude.Text
product_productArn :: (Text -> f Text) -> Product -> f Product
product_productArn = (Product -> Text)
-> (Product -> Text -> Product) -> Lens Product Product Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Product' {Text
productArn :: Text
$sel:productArn:Product' :: Product -> Text
productArn} -> Text
productArn) (\s :: Product
s@Product' {} Text
a -> Product
s {$sel:productArn:Product' :: Text
productArn = Text
a} :: Product)
instance Core.FromJSON Product where
parseJSON :: Value -> Parser Product
parseJSON =
String -> (Object -> Parser Product) -> Value -> Parser Product
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"Product"
( \Object
x ->
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product
Product'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product)
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
"ProductName")
Parser
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product)
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
"ProductSubscriptionResourcePolicy")
Parser
(Maybe Text
-> Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product)
-> Parser (Maybe Text)
-> Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product)
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
"CompanyName")
Parser
(Maybe [Text]
-> Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product)
-> Parser (Maybe [Text])
-> Parser
(Maybe Text
-> Maybe Text
-> Maybe [IntegrationType]
-> Maybe Text
-> Text
-> Product)
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
"Categories" 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 [IntegrationType]
-> Maybe Text
-> Text
-> Product)
-> Parser (Maybe Text)
-> Parser
(Maybe Text
-> Maybe [IntegrationType] -> Maybe Text -> Text -> Product)
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
"MarketplaceUrl")
Parser
(Maybe Text
-> Maybe [IntegrationType] -> Maybe Text -> Text -> Product)
-> Parser (Maybe Text)
-> Parser
(Maybe [IntegrationType] -> Maybe Text -> Text -> Product)
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
"ActivationUrl")
Parser (Maybe [IntegrationType] -> Maybe Text -> Text -> Product)
-> Parser (Maybe [IntegrationType])
-> Parser (Maybe Text -> Text -> Product)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Parser (Maybe (Maybe [IntegrationType]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"IntegrationTypes"
Parser (Maybe (Maybe [IntegrationType]))
-> Maybe [IntegrationType] -> Parser (Maybe [IntegrationType])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [IntegrationType]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe Text -> Text -> Product)
-> Parser (Maybe Text) -> Parser (Text -> Product)
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 (Text -> Product) -> Parser Text -> Parser Product
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"ProductArn")
)
instance Prelude.Hashable Product
instance Prelude.NFData Product