{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $sel:resourceType:ResourceToImport' :: Text
resourceType = Text
pResourceType_,
$sel:logicalResourceId:ResourceToImport' :: Text
logicalResourceId = Text
pLogicalResourceId_,
$sel:resourceIdentifier:ResourceToImport' :: HashMap Text Text
resourceIdentifier = forall a. Monoid a => a
Prelude.mempty
}
resourceToImport_resourceType :: Lens.Lens' ResourceToImport Prelude.Text
resourceToImport_resourceType :: Lens' ResourceToImport Text
resourceToImport_resourceType = 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 :: Lens' ResourceToImport Text
resourceToImport_logicalResourceId = 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 :: Lens' ResourceToImport (HashMap Text Text)
resourceToImport_resourceIdentifier = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable ResourceToImport where
hashWithSalt :: Int -> ResourceToImport -> Int
hashWithSalt Int
_salt 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
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
logicalResourceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` HashMap Text Text
resourceIdentifier
instance Prelude.NFData ResourceToImport where
rnf :: ResourceToImport -> ()
rnf 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
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
resourceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
logicalResourceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf HashMap Text Text
resourceIdentifier
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"ResourceType" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
resourceType,
ByteString
"LogicalResourceId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
logicalResourceId,
ByteString
"ResourceIdentifier"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: forall k v.
(ToQuery k, ToQuery v) =>
ByteString
-> ByteString -> ByteString -> HashMap k v -> QueryString
Data.toQueryMap
ByteString
"entry"
ByteString
"key"
ByteString
"value"
HashMap Text Text
resourceIdentifier
]