{-# 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.StandardsSubscriptionRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data StandardsSubscriptionRequest = StandardsSubscriptionRequest'
{
StandardsSubscriptionRequest -> Maybe (HashMap Text Text)
standardsInput :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
StandardsSubscriptionRequest -> Text
standardsArn :: Prelude.Text
}
deriving (StandardsSubscriptionRequest
-> StandardsSubscriptionRequest -> Bool
(StandardsSubscriptionRequest
-> StandardsSubscriptionRequest -> Bool)
-> (StandardsSubscriptionRequest
-> StandardsSubscriptionRequest -> Bool)
-> Eq StandardsSubscriptionRequest
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StandardsSubscriptionRequest
-> StandardsSubscriptionRequest -> Bool
$c/= :: StandardsSubscriptionRequest
-> StandardsSubscriptionRequest -> Bool
== :: StandardsSubscriptionRequest
-> StandardsSubscriptionRequest -> Bool
$c== :: StandardsSubscriptionRequest
-> StandardsSubscriptionRequest -> Bool
Prelude.Eq, ReadPrec [StandardsSubscriptionRequest]
ReadPrec StandardsSubscriptionRequest
Int -> ReadS StandardsSubscriptionRequest
ReadS [StandardsSubscriptionRequest]
(Int -> ReadS StandardsSubscriptionRequest)
-> ReadS [StandardsSubscriptionRequest]
-> ReadPrec StandardsSubscriptionRequest
-> ReadPrec [StandardsSubscriptionRequest]
-> Read StandardsSubscriptionRequest
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StandardsSubscriptionRequest]
$creadListPrec :: ReadPrec [StandardsSubscriptionRequest]
readPrec :: ReadPrec StandardsSubscriptionRequest
$creadPrec :: ReadPrec StandardsSubscriptionRequest
readList :: ReadS [StandardsSubscriptionRequest]
$creadList :: ReadS [StandardsSubscriptionRequest]
readsPrec :: Int -> ReadS StandardsSubscriptionRequest
$creadsPrec :: Int -> ReadS StandardsSubscriptionRequest
Prelude.Read, Int -> StandardsSubscriptionRequest -> ShowS
[StandardsSubscriptionRequest] -> ShowS
StandardsSubscriptionRequest -> String
(Int -> StandardsSubscriptionRequest -> ShowS)
-> (StandardsSubscriptionRequest -> String)
-> ([StandardsSubscriptionRequest] -> ShowS)
-> Show StandardsSubscriptionRequest
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StandardsSubscriptionRequest] -> ShowS
$cshowList :: [StandardsSubscriptionRequest] -> ShowS
show :: StandardsSubscriptionRequest -> String
$cshow :: StandardsSubscriptionRequest -> String
showsPrec :: Int -> StandardsSubscriptionRequest -> ShowS
$cshowsPrec :: Int -> StandardsSubscriptionRequest -> ShowS
Prelude.Show, (forall x.
StandardsSubscriptionRequest -> Rep StandardsSubscriptionRequest x)
-> (forall x.
Rep StandardsSubscriptionRequest x -> StandardsSubscriptionRequest)
-> Generic StandardsSubscriptionRequest
forall x.
Rep StandardsSubscriptionRequest x -> StandardsSubscriptionRequest
forall x.
StandardsSubscriptionRequest -> Rep StandardsSubscriptionRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep StandardsSubscriptionRequest x -> StandardsSubscriptionRequest
$cfrom :: forall x.
StandardsSubscriptionRequest -> Rep StandardsSubscriptionRequest x
Prelude.Generic)
newStandardsSubscriptionRequest ::
Prelude.Text ->
StandardsSubscriptionRequest
newStandardsSubscriptionRequest :: Text -> StandardsSubscriptionRequest
newStandardsSubscriptionRequest Text
pStandardsArn_ =
StandardsSubscriptionRequest' :: Maybe (HashMap Text Text) -> Text -> StandardsSubscriptionRequest
StandardsSubscriptionRequest'
{ $sel:standardsInput:StandardsSubscriptionRequest' :: Maybe (HashMap Text Text)
standardsInput =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:standardsArn:StandardsSubscriptionRequest' :: Text
standardsArn = Text
pStandardsArn_
}
standardsSubscriptionRequest_standardsInput :: Lens.Lens' StandardsSubscriptionRequest (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
standardsSubscriptionRequest_standardsInput :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StandardsSubscriptionRequest -> f StandardsSubscriptionRequest
standardsSubscriptionRequest_standardsInput = (StandardsSubscriptionRequest -> Maybe (HashMap Text Text))
-> (StandardsSubscriptionRequest
-> Maybe (HashMap Text Text) -> StandardsSubscriptionRequest)
-> Lens
StandardsSubscriptionRequest
StandardsSubscriptionRequest
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsSubscriptionRequest' {Maybe (HashMap Text Text)
standardsInput :: Maybe (HashMap Text Text)
$sel:standardsInput:StandardsSubscriptionRequest' :: StandardsSubscriptionRequest -> Maybe (HashMap Text Text)
standardsInput} -> Maybe (HashMap Text Text)
standardsInput) (\s :: StandardsSubscriptionRequest
s@StandardsSubscriptionRequest' {} Maybe (HashMap Text Text)
a -> StandardsSubscriptionRequest
s {$sel:standardsInput:StandardsSubscriptionRequest' :: Maybe (HashMap Text Text)
standardsInput = Maybe (HashMap Text Text)
a} :: StandardsSubscriptionRequest) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StandardsSubscriptionRequest -> f StandardsSubscriptionRequest)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> StandardsSubscriptionRequest
-> f StandardsSubscriptionRequest
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text 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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
standardsSubscriptionRequest_standardsArn :: Lens.Lens' StandardsSubscriptionRequest Prelude.Text
standardsSubscriptionRequest_standardsArn :: (Text -> f Text)
-> StandardsSubscriptionRequest -> f StandardsSubscriptionRequest
standardsSubscriptionRequest_standardsArn = (StandardsSubscriptionRequest -> Text)
-> (StandardsSubscriptionRequest
-> Text -> StandardsSubscriptionRequest)
-> Lens
StandardsSubscriptionRequest StandardsSubscriptionRequest Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsSubscriptionRequest' {Text
standardsArn :: Text
$sel:standardsArn:StandardsSubscriptionRequest' :: StandardsSubscriptionRequest -> Text
standardsArn} -> Text
standardsArn) (\s :: StandardsSubscriptionRequest
s@StandardsSubscriptionRequest' {} Text
a -> StandardsSubscriptionRequest
s {$sel:standardsArn:StandardsSubscriptionRequest' :: Text
standardsArn = Text
a} :: StandardsSubscriptionRequest)
instance
Prelude.Hashable
StandardsSubscriptionRequest
instance Prelude.NFData StandardsSubscriptionRequest
instance Core.ToJSON StandardsSubscriptionRequest where
toJSON :: StandardsSubscriptionRequest -> Value
toJSON StandardsSubscriptionRequest' {Maybe (HashMap Text Text)
Text
standardsArn :: Text
standardsInput :: Maybe (HashMap Text Text)
$sel:standardsArn:StandardsSubscriptionRequest' :: StandardsSubscriptionRequest -> Text
$sel:standardsInput:StandardsSubscriptionRequest' :: StandardsSubscriptionRequest -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"StandardsInput" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
standardsInput,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"StandardsArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
standardsArn)
]
)