{-# 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.FIS.Types.CreateExperimentTemplateTargetInput where
import qualified Amazonka.Core as Core
import Amazonka.FIS.Types.ExperimentTemplateTargetInputFilter
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data CreateExperimentTemplateTargetInput = CreateExperimentTemplateTargetInput'
{
CreateExperimentTemplateTargetInput -> Maybe (HashMap Text Text)
resourceTags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateExperimentTemplateTargetInput
-> Maybe [ExperimentTemplateTargetInputFilter]
filters :: Prelude.Maybe [ExperimentTemplateTargetInputFilter],
CreateExperimentTemplateTargetInput -> Maybe [Text]
resourceArns :: Prelude.Maybe [Prelude.Text],
CreateExperimentTemplateTargetInput -> Text
resourceType :: Prelude.Text,
CreateExperimentTemplateTargetInput -> Text
selectionMode :: Prelude.Text
}
deriving (CreateExperimentTemplateTargetInput
-> CreateExperimentTemplateTargetInput -> Bool
(CreateExperimentTemplateTargetInput
-> CreateExperimentTemplateTargetInput -> Bool)
-> (CreateExperimentTemplateTargetInput
-> CreateExperimentTemplateTargetInput -> Bool)
-> Eq CreateExperimentTemplateTargetInput
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateExperimentTemplateTargetInput
-> CreateExperimentTemplateTargetInput -> Bool
$c/= :: CreateExperimentTemplateTargetInput
-> CreateExperimentTemplateTargetInput -> Bool
== :: CreateExperimentTemplateTargetInput
-> CreateExperimentTemplateTargetInput -> Bool
$c== :: CreateExperimentTemplateTargetInput
-> CreateExperimentTemplateTargetInput -> Bool
Prelude.Eq, ReadPrec [CreateExperimentTemplateTargetInput]
ReadPrec CreateExperimentTemplateTargetInput
Int -> ReadS CreateExperimentTemplateTargetInput
ReadS [CreateExperimentTemplateTargetInput]
(Int -> ReadS CreateExperimentTemplateTargetInput)
-> ReadS [CreateExperimentTemplateTargetInput]
-> ReadPrec CreateExperimentTemplateTargetInput
-> ReadPrec [CreateExperimentTemplateTargetInput]
-> Read CreateExperimentTemplateTargetInput
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateExperimentTemplateTargetInput]
$creadListPrec :: ReadPrec [CreateExperimentTemplateTargetInput]
readPrec :: ReadPrec CreateExperimentTemplateTargetInput
$creadPrec :: ReadPrec CreateExperimentTemplateTargetInput
readList :: ReadS [CreateExperimentTemplateTargetInput]
$creadList :: ReadS [CreateExperimentTemplateTargetInput]
readsPrec :: Int -> ReadS CreateExperimentTemplateTargetInput
$creadsPrec :: Int -> ReadS CreateExperimentTemplateTargetInput
Prelude.Read, Int -> CreateExperimentTemplateTargetInput -> ShowS
[CreateExperimentTemplateTargetInput] -> ShowS
CreateExperimentTemplateTargetInput -> String
(Int -> CreateExperimentTemplateTargetInput -> ShowS)
-> (CreateExperimentTemplateTargetInput -> String)
-> ([CreateExperimentTemplateTargetInput] -> ShowS)
-> Show CreateExperimentTemplateTargetInput
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateExperimentTemplateTargetInput] -> ShowS
$cshowList :: [CreateExperimentTemplateTargetInput] -> ShowS
show :: CreateExperimentTemplateTargetInput -> String
$cshow :: CreateExperimentTemplateTargetInput -> String
showsPrec :: Int -> CreateExperimentTemplateTargetInput -> ShowS
$cshowsPrec :: Int -> CreateExperimentTemplateTargetInput -> ShowS
Prelude.Show, (forall x.
CreateExperimentTemplateTargetInput
-> Rep CreateExperimentTemplateTargetInput x)
-> (forall x.
Rep CreateExperimentTemplateTargetInput x
-> CreateExperimentTemplateTargetInput)
-> Generic CreateExperimentTemplateTargetInput
forall x.
Rep CreateExperimentTemplateTargetInput x
-> CreateExperimentTemplateTargetInput
forall x.
CreateExperimentTemplateTargetInput
-> Rep CreateExperimentTemplateTargetInput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateExperimentTemplateTargetInput x
-> CreateExperimentTemplateTargetInput
$cfrom :: forall x.
CreateExperimentTemplateTargetInput
-> Rep CreateExperimentTemplateTargetInput x
Prelude.Generic)
newCreateExperimentTemplateTargetInput ::
Prelude.Text ->
Prelude.Text ->
CreateExperimentTemplateTargetInput
newCreateExperimentTemplateTargetInput :: Text -> Text -> CreateExperimentTemplateTargetInput
newCreateExperimentTemplateTargetInput
Text
pResourceType_
Text
pSelectionMode_ =
CreateExperimentTemplateTargetInput' :: Maybe (HashMap Text Text)
-> Maybe [ExperimentTemplateTargetInputFilter]
-> Maybe [Text]
-> Text
-> Text
-> CreateExperimentTemplateTargetInput
CreateExperimentTemplateTargetInput'
{ $sel:resourceTags:CreateExperimentTemplateTargetInput' :: Maybe (HashMap Text Text)
resourceTags =
Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:filters:CreateExperimentTemplateTargetInput' :: Maybe [ExperimentTemplateTargetInputFilter]
filters = Maybe [ExperimentTemplateTargetInputFilter]
forall a. Maybe a
Prelude.Nothing,
$sel:resourceArns:CreateExperimentTemplateTargetInput' :: Maybe [Text]
resourceArns = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:resourceType:CreateExperimentTemplateTargetInput' :: Text
resourceType = Text
pResourceType_,
$sel:selectionMode:CreateExperimentTemplateTargetInput' :: Text
selectionMode = Text
pSelectionMode_
}
createExperimentTemplateTargetInput_resourceTags :: Lens.Lens' CreateExperimentTemplateTargetInput (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createExperimentTemplateTargetInput_resourceTags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput
createExperimentTemplateTargetInput_resourceTags = (CreateExperimentTemplateTargetInput -> Maybe (HashMap Text Text))
-> (CreateExperimentTemplateTargetInput
-> Maybe (HashMap Text Text)
-> CreateExperimentTemplateTargetInput)
-> Lens
CreateExperimentTemplateTargetInput
CreateExperimentTemplateTargetInput
(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 (\CreateExperimentTemplateTargetInput' {Maybe (HashMap Text Text)
resourceTags :: Maybe (HashMap Text Text)
$sel:resourceTags:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput -> Maybe (HashMap Text Text)
resourceTags} -> Maybe (HashMap Text Text)
resourceTags) (\s :: CreateExperimentTemplateTargetInput
s@CreateExperimentTemplateTargetInput' {} Maybe (HashMap Text Text)
a -> CreateExperimentTemplateTargetInput
s {$sel:resourceTags:CreateExperimentTemplateTargetInput' :: Maybe (HashMap Text Text)
resourceTags = Maybe (HashMap Text Text)
a} :: CreateExperimentTemplateTargetInput) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput)
-> ((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)))
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput
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
createExperimentTemplateTargetInput_filters :: Lens.Lens' CreateExperimentTemplateTargetInput (Prelude.Maybe [ExperimentTemplateTargetInputFilter])
createExperimentTemplateTargetInput_filters :: (Maybe [ExperimentTemplateTargetInputFilter]
-> f (Maybe [ExperimentTemplateTargetInputFilter]))
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput
createExperimentTemplateTargetInput_filters = (CreateExperimentTemplateTargetInput
-> Maybe [ExperimentTemplateTargetInputFilter])
-> (CreateExperimentTemplateTargetInput
-> Maybe [ExperimentTemplateTargetInputFilter]
-> CreateExperimentTemplateTargetInput)
-> Lens
CreateExperimentTemplateTargetInput
CreateExperimentTemplateTargetInput
(Maybe [ExperimentTemplateTargetInputFilter])
(Maybe [ExperimentTemplateTargetInputFilter])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateTargetInput' {Maybe [ExperimentTemplateTargetInputFilter]
filters :: Maybe [ExperimentTemplateTargetInputFilter]
$sel:filters:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput
-> Maybe [ExperimentTemplateTargetInputFilter]
filters} -> Maybe [ExperimentTemplateTargetInputFilter]
filters) (\s :: CreateExperimentTemplateTargetInput
s@CreateExperimentTemplateTargetInput' {} Maybe [ExperimentTemplateTargetInputFilter]
a -> CreateExperimentTemplateTargetInput
s {$sel:filters:CreateExperimentTemplateTargetInput' :: Maybe [ExperimentTemplateTargetInputFilter]
filters = Maybe [ExperimentTemplateTargetInputFilter]
a} :: CreateExperimentTemplateTargetInput) ((Maybe [ExperimentTemplateTargetInputFilter]
-> f (Maybe [ExperimentTemplateTargetInputFilter]))
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput)
-> ((Maybe [ExperimentTemplateTargetInputFilter]
-> f (Maybe [ExperimentTemplateTargetInputFilter]))
-> Maybe [ExperimentTemplateTargetInputFilter]
-> f (Maybe [ExperimentTemplateTargetInputFilter]))
-> (Maybe [ExperimentTemplateTargetInputFilter]
-> f (Maybe [ExperimentTemplateTargetInputFilter]))
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ExperimentTemplateTargetInputFilter]
[ExperimentTemplateTargetInputFilter]
[ExperimentTemplateTargetInputFilter]
[ExperimentTemplateTargetInputFilter]
-> Iso
(Maybe [ExperimentTemplateTargetInputFilter])
(Maybe [ExperimentTemplateTargetInputFilter])
(Maybe [ExperimentTemplateTargetInputFilter])
(Maybe [ExperimentTemplateTargetInputFilter])
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
[ExperimentTemplateTargetInputFilter]
[ExperimentTemplateTargetInputFilter]
[ExperimentTemplateTargetInputFilter]
[ExperimentTemplateTargetInputFilter]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createExperimentTemplateTargetInput_resourceArns :: Lens.Lens' CreateExperimentTemplateTargetInput (Prelude.Maybe [Prelude.Text])
createExperimentTemplateTargetInput_resourceArns :: (Maybe [Text] -> f (Maybe [Text]))
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput
createExperimentTemplateTargetInput_resourceArns = (CreateExperimentTemplateTargetInput -> Maybe [Text])
-> (CreateExperimentTemplateTargetInput
-> Maybe [Text] -> CreateExperimentTemplateTargetInput)
-> Lens
CreateExperimentTemplateTargetInput
CreateExperimentTemplateTargetInput
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateTargetInput' {Maybe [Text]
resourceArns :: Maybe [Text]
$sel:resourceArns:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput -> Maybe [Text]
resourceArns} -> Maybe [Text]
resourceArns) (\s :: CreateExperimentTemplateTargetInput
s@CreateExperimentTemplateTargetInput' {} Maybe [Text]
a -> CreateExperimentTemplateTargetInput
s {$sel:resourceArns:CreateExperimentTemplateTargetInput' :: Maybe [Text]
resourceArns = Maybe [Text]
a} :: CreateExperimentTemplateTargetInput) ((Maybe [Text] -> f (Maybe [Text]))
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput
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
createExperimentTemplateTargetInput_resourceType :: Lens.Lens' CreateExperimentTemplateTargetInput Prelude.Text
createExperimentTemplateTargetInput_resourceType :: (Text -> f Text)
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput
createExperimentTemplateTargetInput_resourceType = (CreateExperimentTemplateTargetInput -> Text)
-> (CreateExperimentTemplateTargetInput
-> Text -> CreateExperimentTemplateTargetInput)
-> Lens
CreateExperimentTemplateTargetInput
CreateExperimentTemplateTargetInput
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateTargetInput' {Text
resourceType :: Text
$sel:resourceType:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput -> Text
resourceType} -> Text
resourceType) (\s :: CreateExperimentTemplateTargetInput
s@CreateExperimentTemplateTargetInput' {} Text
a -> CreateExperimentTemplateTargetInput
s {$sel:resourceType:CreateExperimentTemplateTargetInput' :: Text
resourceType = Text
a} :: CreateExperimentTemplateTargetInput)
createExperimentTemplateTargetInput_selectionMode :: Lens.Lens' CreateExperimentTemplateTargetInput Prelude.Text
createExperimentTemplateTargetInput_selectionMode :: (Text -> f Text)
-> CreateExperimentTemplateTargetInput
-> f CreateExperimentTemplateTargetInput
createExperimentTemplateTargetInput_selectionMode = (CreateExperimentTemplateTargetInput -> Text)
-> (CreateExperimentTemplateTargetInput
-> Text -> CreateExperimentTemplateTargetInput)
-> Lens
CreateExperimentTemplateTargetInput
CreateExperimentTemplateTargetInput
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateExperimentTemplateTargetInput' {Text
selectionMode :: Text
$sel:selectionMode:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput -> Text
selectionMode} -> Text
selectionMode) (\s :: CreateExperimentTemplateTargetInput
s@CreateExperimentTemplateTargetInput' {} Text
a -> CreateExperimentTemplateTargetInput
s {$sel:selectionMode:CreateExperimentTemplateTargetInput' :: Text
selectionMode = Text
a} :: CreateExperimentTemplateTargetInput)
instance
Prelude.Hashable
CreateExperimentTemplateTargetInput
instance
Prelude.NFData
CreateExperimentTemplateTargetInput
instance
Core.ToJSON
CreateExperimentTemplateTargetInput
where
toJSON :: CreateExperimentTemplateTargetInput -> Value
toJSON CreateExperimentTemplateTargetInput' {Maybe [Text]
Maybe [ExperimentTemplateTargetInputFilter]
Maybe (HashMap Text Text)
Text
selectionMode :: Text
resourceType :: Text
resourceArns :: Maybe [Text]
filters :: Maybe [ExperimentTemplateTargetInputFilter]
resourceTags :: Maybe (HashMap Text Text)
$sel:selectionMode:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput -> Text
$sel:resourceType:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput -> Text
$sel:resourceArns:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput -> Maybe [Text]
$sel:filters:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput
-> Maybe [ExperimentTemplateTargetInputFilter]
$sel:resourceTags:CreateExperimentTemplateTargetInput' :: CreateExperimentTemplateTargetInput -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"resourceTags" 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)
resourceTags,
(Text
"filters" Text -> [ExperimentTemplateTargetInputFilter] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ExperimentTemplateTargetInputFilter] -> Pair)
-> Maybe [ExperimentTemplateTargetInputFilter] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ExperimentTemplateTargetInputFilter]
filters,
(Text
"resourceArns" Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Text] -> Pair) -> Maybe [Text] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
resourceArns,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"resourceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
resourceType),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"selectionMode" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
selectionMode)
]
)