{-# 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.CloudFormation.Types.ResourceToImport where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ResourceToImport = ResourceToImport'
{
ResourceToImport -> Text
resourceType :: Prelude.Text,
ResourceToImport -> Text
logicalResourceId :: Prelude.Text,
ResourceToImport -> HashMap Text Text
resourceIdentifier :: Prelude.HashMap Prelude.Text Prelude.Text
}
deriving (ResourceToImport -> ResourceToImport -> Bool
(ResourceToImport -> ResourceToImport -> Bool)
-> (ResourceToImport -> ResourceToImport -> Bool)
-> Eq ResourceToImport
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceToImport -> ResourceToImport -> Bool
$c/= :: ResourceToImport -> ResourceToImport -> Bool
== :: ResourceToImport -> ResourceToImport -> Bool
$c== :: ResourceToImport -> ResourceToImport -> Bool
Prelude.Eq, ReadPrec [ResourceToImport]
ReadPrec ResourceToImport
Int -> ReadS ResourceToImport
ReadS [ResourceToImport]
(Int -> ReadS ResourceToImport)
-> ReadS [ResourceToImport]
-> ReadPrec ResourceToImport
-> ReadPrec [ResourceToImport]
-> Read ResourceToImport
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ResourceToImport]
$creadListPrec :: ReadPrec [ResourceToImport]
readPrec :: ReadPrec ResourceToImport
$creadPrec :: ReadPrec ResourceToImport
readList :: ReadS [ResourceToImport]
$creadList :: ReadS [ResourceToImport]
readsPrec :: Int -> ReadS ResourceToImport
$creadsPrec :: Int -> ReadS ResourceToImport
Prelude.Read, Int -> ResourceToImport -> ShowS
[ResourceToImport] -> ShowS
ResourceToImport -> String
(Int -> ResourceToImport -> ShowS)
-> (ResourceToImport -> String)
-> ([ResourceToImport] -> ShowS)
-> Show ResourceToImport
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ResourceToImport] -> ShowS
$cshowList :: [ResourceToImport] -> ShowS
show :: ResourceToImport -> String
$cshow :: ResourceToImport -> String
showsPrec :: Int -> ResourceToImport -> ShowS
$cshowsPrec :: Int -> ResourceToImport -> ShowS
Prelude.Show, (forall x. ResourceToImport -> Rep ResourceToImport x)
-> (forall x. Rep ResourceToImport x -> ResourceToImport)
-> Generic ResourceToImport
forall x. Rep ResourceToImport x -> ResourceToImport
forall x. ResourceToImport -> Rep ResourceToImport x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ResourceToImport x -> ResourceToImport
$cfrom :: forall x. ResourceToImport -> Rep ResourceToImport x
Prelude.Generic)
newResourceToImport ::
Prelude.Text ->
Prelude.Text ->
ResourceToImport
newResourceToImport :: Text -> Text -> ResourceToImport
newResourceToImport
Text
pResourceType_
Text
pLogicalResourceId_ =
ResourceToImport' :: Text -> Text -> HashMap Text Text -> ResourceToImport
ResourceToImport'
{ $sel:resourceType:ResourceToImport' :: Text
resourceType = Text
pResourceType_,
$sel:logicalResourceId:ResourceToImport' :: Text
logicalResourceId = Text
pLogicalResourceId_,
$sel:resourceIdentifier:ResourceToImport' :: HashMap Text Text
resourceIdentifier = HashMap Text Text
forall a. Monoid a => a
Prelude.mempty
}
resourceToImport_resourceType :: Lens.Lens' ResourceToImport Prelude.Text
resourceToImport_resourceType :: (Text -> f Text) -> ResourceToImport -> f ResourceToImport
resourceToImport_resourceType = (ResourceToImport -> Text)
-> (ResourceToImport -> Text -> ResourceToImport)
-> Lens ResourceToImport ResourceToImport Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceToImport' {Text
resourceType :: Text
$sel:resourceType:ResourceToImport' :: ResourceToImport -> Text
resourceType} -> Text
resourceType) (\s :: ResourceToImport
s@ResourceToImport' {} Text
a -> ResourceToImport
s {$sel:resourceType:ResourceToImport' :: Text
resourceType = Text
a} :: ResourceToImport)
resourceToImport_logicalResourceId :: Lens.Lens' ResourceToImport Prelude.Text
resourceToImport_logicalResourceId :: (Text -> f Text) -> ResourceToImport -> f ResourceToImport
resourceToImport_logicalResourceId = (ResourceToImport -> Text)
-> (ResourceToImport -> Text -> ResourceToImport)
-> Lens ResourceToImport ResourceToImport Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceToImport' {Text
logicalResourceId :: Text
$sel:logicalResourceId:ResourceToImport' :: ResourceToImport -> Text
logicalResourceId} -> Text
logicalResourceId) (\s :: ResourceToImport
s@ResourceToImport' {} Text
a -> ResourceToImport
s {$sel:logicalResourceId:ResourceToImport' :: Text
logicalResourceId = Text
a} :: ResourceToImport)
resourceToImport_resourceIdentifier :: Lens.Lens' ResourceToImport (Prelude.HashMap Prelude.Text Prelude.Text)
resourceToImport_resourceIdentifier :: (HashMap Text Text -> f (HashMap Text Text))
-> ResourceToImport -> f ResourceToImport
resourceToImport_resourceIdentifier = (ResourceToImport -> HashMap Text Text)
-> (ResourceToImport -> HashMap Text Text -> ResourceToImport)
-> Lens
ResourceToImport
ResourceToImport
(HashMap Text Text)
(HashMap Text Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ResourceToImport' {HashMap Text Text
resourceIdentifier :: HashMap Text Text
$sel:resourceIdentifier:ResourceToImport' :: ResourceToImport -> HashMap Text Text
resourceIdentifier} -> HashMap Text Text
resourceIdentifier) (\s :: ResourceToImport
s@ResourceToImport' {} HashMap Text Text
a -> ResourceToImport
s {$sel:resourceIdentifier:ResourceToImport' :: HashMap Text Text
resourceIdentifier = HashMap Text Text
a} :: ResourceToImport) ((HashMap Text Text -> f (HashMap Text Text))
-> ResourceToImport -> f ResourceToImport)
-> ((HashMap Text Text -> f (HashMap Text Text))
-> HashMap Text Text -> f (HashMap Text Text))
-> (HashMap Text Text -> f (HashMap Text Text))
-> ResourceToImport
-> f ResourceToImport
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
instance Prelude.Hashable ResourceToImport
instance Prelude.NFData ResourceToImport
instance Core.ToQuery ResourceToImport where
toQuery :: ResourceToImport -> QueryString
toQuery ResourceToImport' {Text
HashMap Text Text
resourceIdentifier :: HashMap Text Text
logicalResourceId :: Text
resourceType :: Text
$sel:resourceIdentifier:ResourceToImport' :: ResourceToImport -> HashMap Text Text
$sel:logicalResourceId:ResourceToImport' :: ResourceToImport -> Text
$sel:resourceType:ResourceToImport' :: ResourceToImport -> Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"ResourceType" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
resourceType,
ByteString
"LogicalResourceId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
logicalResourceId,
ByteString
"ResourceIdentifier"
ByteString -> QueryString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ByteString
-> ByteString -> ByteString -> HashMap Text Text -> QueryString
forall k v.
(ToQuery k, ToQuery v) =>
ByteString
-> ByteString -> ByteString -> HashMap k v -> QueryString
Core.toQueryMap
ByteString
"entry"
ByteString
"key"
ByteString
"value"
HashMap Text Text
resourceIdentifier
]