{-# 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.StandardsSubscription where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SecurityHub.Types.StandardsStatus
data StandardsSubscription = StandardsSubscription'
{
StandardsSubscription -> Text
standardsSubscriptionArn :: Prelude.Text,
StandardsSubscription -> Text
standardsArn :: Prelude.Text,
StandardsSubscription -> HashMap Text Text
standardsInput :: Prelude.HashMap Prelude.Text Prelude.Text,
StandardsSubscription -> StandardsStatus
standardsStatus :: StandardsStatus
}
deriving (StandardsSubscription -> StandardsSubscription -> Bool
(StandardsSubscription -> StandardsSubscription -> Bool)
-> (StandardsSubscription -> StandardsSubscription -> Bool)
-> Eq StandardsSubscription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StandardsSubscription -> StandardsSubscription -> Bool
$c/= :: StandardsSubscription -> StandardsSubscription -> Bool
== :: StandardsSubscription -> StandardsSubscription -> Bool
$c== :: StandardsSubscription -> StandardsSubscription -> Bool
Prelude.Eq, ReadPrec [StandardsSubscription]
ReadPrec StandardsSubscription
Int -> ReadS StandardsSubscription
ReadS [StandardsSubscription]
(Int -> ReadS StandardsSubscription)
-> ReadS [StandardsSubscription]
-> ReadPrec StandardsSubscription
-> ReadPrec [StandardsSubscription]
-> Read StandardsSubscription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StandardsSubscription]
$creadListPrec :: ReadPrec [StandardsSubscription]
readPrec :: ReadPrec StandardsSubscription
$creadPrec :: ReadPrec StandardsSubscription
readList :: ReadS [StandardsSubscription]
$creadList :: ReadS [StandardsSubscription]
readsPrec :: Int -> ReadS StandardsSubscription
$creadsPrec :: Int -> ReadS StandardsSubscription
Prelude.Read, Int -> StandardsSubscription -> ShowS
[StandardsSubscription] -> ShowS
StandardsSubscription -> String
(Int -> StandardsSubscription -> ShowS)
-> (StandardsSubscription -> String)
-> ([StandardsSubscription] -> ShowS)
-> Show StandardsSubscription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StandardsSubscription] -> ShowS
$cshowList :: [StandardsSubscription] -> ShowS
show :: StandardsSubscription -> String
$cshow :: StandardsSubscription -> String
showsPrec :: Int -> StandardsSubscription -> ShowS
$cshowsPrec :: Int -> StandardsSubscription -> ShowS
Prelude.Show, (forall x. StandardsSubscription -> Rep StandardsSubscription x)
-> (forall x. Rep StandardsSubscription x -> StandardsSubscription)
-> Generic StandardsSubscription
forall x. Rep StandardsSubscription x -> StandardsSubscription
forall x. StandardsSubscription -> Rep StandardsSubscription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StandardsSubscription x -> StandardsSubscription
$cfrom :: forall x. StandardsSubscription -> Rep StandardsSubscription x
Prelude.Generic)
newStandardsSubscription ::
Prelude.Text ->
Prelude.Text ->
StandardsStatus ->
StandardsSubscription
newStandardsSubscription :: Text -> Text -> StandardsStatus -> StandardsSubscription
newStandardsSubscription
Text
pStandardsSubscriptionArn_
Text
pStandardsArn_
StandardsStatus
pStandardsStatus_ =
StandardsSubscription' :: Text
-> Text
-> HashMap Text Text
-> StandardsStatus
-> StandardsSubscription
StandardsSubscription'
{ $sel:standardsSubscriptionArn:StandardsSubscription' :: Text
standardsSubscriptionArn =
Text
pStandardsSubscriptionArn_,
$sel:standardsArn:StandardsSubscription' :: Text
standardsArn = Text
pStandardsArn_,
$sel:standardsInput:StandardsSubscription' :: HashMap Text Text
standardsInput = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty,
$sel:standardsStatus:StandardsSubscription' :: StandardsStatus
standardsStatus = StandardsStatus
pStandardsStatus_
}
standardsSubscription_standardsSubscriptionArn :: Lens.Lens' StandardsSubscription Prelude.Text
standardsSubscription_standardsSubscriptionArn :: (Text -> f Text)
-> StandardsSubscription -> f StandardsSubscription
standardsSubscription_standardsSubscriptionArn = (StandardsSubscription -> Text)
-> (StandardsSubscription -> Text -> StandardsSubscription)
-> Lens StandardsSubscription StandardsSubscription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsSubscription' {Text
standardsSubscriptionArn :: Text
$sel:standardsSubscriptionArn:StandardsSubscription' :: StandardsSubscription -> Text
standardsSubscriptionArn} -> Text
standardsSubscriptionArn) (\s :: StandardsSubscription
s@StandardsSubscription' {} Text
a -> StandardsSubscription
s {$sel:standardsSubscriptionArn:StandardsSubscription' :: Text
standardsSubscriptionArn = Text
a} :: StandardsSubscription)
standardsSubscription_standardsArn :: Lens.Lens' StandardsSubscription Prelude.Text
standardsSubscription_standardsArn :: (Text -> f Text)
-> StandardsSubscription -> f StandardsSubscription
standardsSubscription_standardsArn = (StandardsSubscription -> Text)
-> (StandardsSubscription -> Text -> StandardsSubscription)
-> Lens StandardsSubscription StandardsSubscription Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsSubscription' {Text
standardsArn :: Text
$sel:standardsArn:StandardsSubscription' :: StandardsSubscription -> Text
standardsArn} -> Text
standardsArn) (\s :: StandardsSubscription
s@StandardsSubscription' {} Text
a -> StandardsSubscription
s {$sel:standardsArn:StandardsSubscription' :: Text
standardsArn = Text
a} :: StandardsSubscription)
standardsSubscription_standardsInput :: Lens.Lens' StandardsSubscription (Prelude.HashMap Prelude.Text Prelude.Text)
standardsSubscription_standardsInput :: (HashMap Text Text -> f (HashMap Text Text))
-> StandardsSubscription -> f StandardsSubscription
standardsSubscription_standardsInput = (StandardsSubscription -> HashMap Text Text)
-> (StandardsSubscription
-> HashMap Text Text -> StandardsSubscription)
-> Lens
StandardsSubscription
StandardsSubscription
(HashMap Text Text)
(HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsSubscription' {HashMap Text Text
standardsInput :: HashMap Text Text
$sel:standardsInput:StandardsSubscription' :: StandardsSubscription -> HashMap Text Text
standardsInput} -> HashMap Text Text
standardsInput) (\s :: StandardsSubscription
s@StandardsSubscription' {} HashMap Text Text
a -> StandardsSubscription
s {$sel:standardsInput:StandardsSubscription' :: HashMap Text Text
standardsInput = HashMap Text Text
a} :: StandardsSubscription) ((HashMap Text Text -> f (HashMap Text Text))
-> StandardsSubscription -> f StandardsSubscription)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> StandardsSubscription
-> f StandardsSubscription
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
standardsSubscription_standardsStatus :: Lens.Lens' StandardsSubscription StandardsStatus
standardsSubscription_standardsStatus :: (StandardsStatus -> f StandardsStatus)
-> StandardsSubscription -> f StandardsSubscription
standardsSubscription_standardsStatus = (StandardsSubscription -> StandardsStatus)
-> (StandardsSubscription
-> StandardsStatus -> StandardsSubscription)
-> Lens
StandardsSubscription
StandardsSubscription
StandardsStatus
StandardsStatus
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StandardsSubscription' {StandardsStatus
standardsStatus :: StandardsStatus
$sel:standardsStatus:StandardsSubscription' :: StandardsSubscription -> StandardsStatus
standardsStatus} -> StandardsStatus
standardsStatus) (\s :: StandardsSubscription
s@StandardsSubscription' {} StandardsStatus
a -> StandardsSubscription
s {$sel:standardsStatus:StandardsSubscription' :: StandardsStatus
standardsStatus = StandardsStatus
a} :: StandardsSubscription)
instance Core.FromJSON StandardsSubscription where
parseJSON :: Value -> Parser StandardsSubscription
parseJSON =
String
-> (Object -> Parser StandardsSubscription)
-> Value
-> Parser StandardsSubscription
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"StandardsSubscription"
( \Object
x ->
Text
-> Text
-> HashMap Text Text
-> StandardsStatus
-> StandardsSubscription
StandardsSubscription'
(Text
-> Text
-> HashMap Text Text
-> StandardsStatus
-> StandardsSubscription)
-> Parser Text
-> Parser
(Text
-> HashMap Text Text -> StandardsStatus -> StandardsSubscription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"StandardsSubscriptionArn")
Parser
(Text
-> HashMap Text Text -> StandardsStatus -> StandardsSubscription)
-> Parser Text
-> Parser
(HashMap Text Text -> StandardsStatus -> StandardsSubscription)
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
"StandardsArn")
Parser
(HashMap Text Text -> StandardsStatus -> StandardsSubscription)
-> Parser (HashMap Text Text)
-> Parser (StandardsStatus -> StandardsSubscription)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (HashMap Text Text))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"StandardsInput" Parser (Maybe (HashMap Text Text))
-> HashMap Text Text -> Parser (HashMap Text Text)
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= HashMap Text Text
forall a. Monoid a => a
Prelude.mempty)
Parser (StandardsStatus -> StandardsSubscription)
-> Parser StandardsStatus -> Parser StandardsSubscription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser StandardsStatus
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"StandardsStatus")
)
instance Prelude.Hashable StandardsSubscription
instance Prelude.NFData StandardsSubscription