{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.ImageBuilder.ImportComponent
(
ImportComponent (..),
newImportComponent,
importComponent_data,
importComponent_uri,
importComponent_kmsKeyId,
importComponent_changeDescription,
importComponent_description,
importComponent_tags,
importComponent_name,
importComponent_semanticVersion,
importComponent_type,
importComponent_format,
importComponent_platform,
importComponent_clientToken,
ImportComponentResponse (..),
newImportComponentResponse,
importComponentResponse_requestId,
importComponentResponse_clientToken,
importComponentResponse_componentBuildVersionArn,
importComponentResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ImageBuilder.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data ImportComponent = ImportComponent'
{
ImportComponent -> Maybe Text
data' :: Prelude.Maybe Prelude.Text,
ImportComponent -> Maybe Text
uri :: Prelude.Maybe Prelude.Text,
ImportComponent -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
ImportComponent -> Maybe Text
changeDescription :: Prelude.Maybe Prelude.Text,
ImportComponent -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
ImportComponent -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
ImportComponent -> Text
name :: Prelude.Text,
ImportComponent -> Text
semanticVersion :: Prelude.Text,
ImportComponent -> ComponentType
type' :: ComponentType,
ImportComponent -> ComponentFormat
format :: ComponentFormat,
ImportComponent -> Platform
platform :: Platform,
ImportComponent -> Text
clientToken :: Prelude.Text
}
deriving (ImportComponent -> ImportComponent -> Bool
(ImportComponent -> ImportComponent -> Bool)
-> (ImportComponent -> ImportComponent -> Bool)
-> Eq ImportComponent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportComponent -> ImportComponent -> Bool
$c/= :: ImportComponent -> ImportComponent -> Bool
== :: ImportComponent -> ImportComponent -> Bool
$c== :: ImportComponent -> ImportComponent -> Bool
Prelude.Eq, ReadPrec [ImportComponent]
ReadPrec ImportComponent
Int -> ReadS ImportComponent
ReadS [ImportComponent]
(Int -> ReadS ImportComponent)
-> ReadS [ImportComponent]
-> ReadPrec ImportComponent
-> ReadPrec [ImportComponent]
-> Read ImportComponent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportComponent]
$creadListPrec :: ReadPrec [ImportComponent]
readPrec :: ReadPrec ImportComponent
$creadPrec :: ReadPrec ImportComponent
readList :: ReadS [ImportComponent]
$creadList :: ReadS [ImportComponent]
readsPrec :: Int -> ReadS ImportComponent
$creadsPrec :: Int -> ReadS ImportComponent
Prelude.Read, Int -> ImportComponent -> ShowS
[ImportComponent] -> ShowS
ImportComponent -> String
(Int -> ImportComponent -> ShowS)
-> (ImportComponent -> String)
-> ([ImportComponent] -> ShowS)
-> Show ImportComponent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportComponent] -> ShowS
$cshowList :: [ImportComponent] -> ShowS
show :: ImportComponent -> String
$cshow :: ImportComponent -> String
showsPrec :: Int -> ImportComponent -> ShowS
$cshowsPrec :: Int -> ImportComponent -> ShowS
Prelude.Show, (forall x. ImportComponent -> Rep ImportComponent x)
-> (forall x. Rep ImportComponent x -> ImportComponent)
-> Generic ImportComponent
forall x. Rep ImportComponent x -> ImportComponent
forall x. ImportComponent -> Rep ImportComponent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportComponent x -> ImportComponent
$cfrom :: forall x. ImportComponent -> Rep ImportComponent x
Prelude.Generic)
newImportComponent ::
Prelude.Text ->
Prelude.Text ->
ComponentType ->
ComponentFormat ->
Platform ->
Prelude.Text ->
ImportComponent
newImportComponent :: Text
-> Text
-> ComponentType
-> ComponentFormat
-> Platform
-> Text
-> ImportComponent
newImportComponent
Text
pName_
Text
pSemanticVersion_
ComponentType
pType_
ComponentFormat
pFormat_
Platform
pPlatform_
Text
pClientToken_ =
ImportComponent' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> ComponentType
-> ComponentFormat
-> Platform
-> Text
-> ImportComponent
ImportComponent'
{ $sel:data':ImportComponent' :: Maybe Text
data' = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:uri:ImportComponent' :: Maybe Text
uri = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:kmsKeyId:ImportComponent' :: Maybe Text
kmsKeyId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:changeDescription:ImportComponent' :: Maybe Text
changeDescription = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:ImportComponent' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:ImportComponent' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:ImportComponent' :: Text
name = Text
pName_,
$sel:semanticVersion:ImportComponent' :: Text
semanticVersion = Text
pSemanticVersion_,
$sel:type':ImportComponent' :: ComponentType
type' = ComponentType
pType_,
$sel:format:ImportComponent' :: ComponentFormat
format = ComponentFormat
pFormat_,
$sel:platform:ImportComponent' :: Platform
platform = Platform
pPlatform_,
$sel:clientToken:ImportComponent' :: Text
clientToken = Text
pClientToken_
}
importComponent_data :: Lens.Lens' ImportComponent (Prelude.Maybe Prelude.Text)
importComponent_data :: (Maybe Text -> f (Maybe Text))
-> ImportComponent -> f ImportComponent
importComponent_data = (ImportComponent -> Maybe Text)
-> (ImportComponent -> Maybe Text -> ImportComponent)
-> Lens ImportComponent ImportComponent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {Maybe Text
data' :: Maybe Text
$sel:data':ImportComponent' :: ImportComponent -> Maybe Text
data'} -> Maybe Text
data') (\s :: ImportComponent
s@ImportComponent' {} Maybe Text
a -> ImportComponent
s {$sel:data':ImportComponent' :: Maybe Text
data' = Maybe Text
a} :: ImportComponent)
importComponent_uri :: Lens.Lens' ImportComponent (Prelude.Maybe Prelude.Text)
importComponent_uri :: (Maybe Text -> f (Maybe Text))
-> ImportComponent -> f ImportComponent
importComponent_uri = (ImportComponent -> Maybe Text)
-> (ImportComponent -> Maybe Text -> ImportComponent)
-> Lens ImportComponent ImportComponent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {Maybe Text
uri :: Maybe Text
$sel:uri:ImportComponent' :: ImportComponent -> Maybe Text
uri} -> Maybe Text
uri) (\s :: ImportComponent
s@ImportComponent' {} Maybe Text
a -> ImportComponent
s {$sel:uri:ImportComponent' :: Maybe Text
uri = Maybe Text
a} :: ImportComponent)
importComponent_kmsKeyId :: Lens.Lens' ImportComponent (Prelude.Maybe Prelude.Text)
importComponent_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> ImportComponent -> f ImportComponent
importComponent_kmsKeyId = (ImportComponent -> Maybe Text)
-> (ImportComponent -> Maybe Text -> ImportComponent)
-> Lens ImportComponent ImportComponent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:ImportComponent' :: ImportComponent -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: ImportComponent
s@ImportComponent' {} Maybe Text
a -> ImportComponent
s {$sel:kmsKeyId:ImportComponent' :: Maybe Text
kmsKeyId = Maybe Text
a} :: ImportComponent)
importComponent_changeDescription :: Lens.Lens' ImportComponent (Prelude.Maybe Prelude.Text)
importComponent_changeDescription :: (Maybe Text -> f (Maybe Text))
-> ImportComponent -> f ImportComponent
importComponent_changeDescription = (ImportComponent -> Maybe Text)
-> (ImportComponent -> Maybe Text -> ImportComponent)
-> Lens ImportComponent ImportComponent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {Maybe Text
changeDescription :: Maybe Text
$sel:changeDescription:ImportComponent' :: ImportComponent -> Maybe Text
changeDescription} -> Maybe Text
changeDescription) (\s :: ImportComponent
s@ImportComponent' {} Maybe Text
a -> ImportComponent
s {$sel:changeDescription:ImportComponent' :: Maybe Text
changeDescription = Maybe Text
a} :: ImportComponent)
importComponent_description :: Lens.Lens' ImportComponent (Prelude.Maybe Prelude.Text)
importComponent_description :: (Maybe Text -> f (Maybe Text))
-> ImportComponent -> f ImportComponent
importComponent_description = (ImportComponent -> Maybe Text)
-> (ImportComponent -> Maybe Text -> ImportComponent)
-> Lens ImportComponent ImportComponent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {Maybe Text
description :: Maybe Text
$sel:description:ImportComponent' :: ImportComponent -> Maybe Text
description} -> Maybe Text
description) (\s :: ImportComponent
s@ImportComponent' {} Maybe Text
a -> ImportComponent
s {$sel:description:ImportComponent' :: Maybe Text
description = Maybe Text
a} :: ImportComponent)
importComponent_tags :: Lens.Lens' ImportComponent (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
importComponent_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ImportComponent -> f ImportComponent
importComponent_tags = (ImportComponent -> Maybe (HashMap Text Text))
-> (ImportComponent
-> Maybe (HashMap Text Text) -> ImportComponent)
-> Lens
ImportComponent
ImportComponent
(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 (\ImportComponent' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:ImportComponent' :: ImportComponent -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: ImportComponent
s@ImportComponent' {} Maybe (HashMap Text Text)
a -> ImportComponent
s {$sel:tags:ImportComponent' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: ImportComponent) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> ImportComponent -> f ImportComponent)
-> ((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)))
-> ImportComponent
-> f ImportComponent
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
importComponent_name :: Lens.Lens' ImportComponent Prelude.Text
importComponent_name :: (Text -> f Text) -> ImportComponent -> f ImportComponent
importComponent_name = (ImportComponent -> Text)
-> (ImportComponent -> Text -> ImportComponent)
-> Lens ImportComponent ImportComponent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {Text
name :: Text
$sel:name:ImportComponent' :: ImportComponent -> Text
name} -> Text
name) (\s :: ImportComponent
s@ImportComponent' {} Text
a -> ImportComponent
s {$sel:name:ImportComponent' :: Text
name = Text
a} :: ImportComponent)
importComponent_semanticVersion :: Lens.Lens' ImportComponent Prelude.Text
importComponent_semanticVersion :: (Text -> f Text) -> ImportComponent -> f ImportComponent
importComponent_semanticVersion = (ImportComponent -> Text)
-> (ImportComponent -> Text -> ImportComponent)
-> Lens ImportComponent ImportComponent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {Text
semanticVersion :: Text
$sel:semanticVersion:ImportComponent' :: ImportComponent -> Text
semanticVersion} -> Text
semanticVersion) (\s :: ImportComponent
s@ImportComponent' {} Text
a -> ImportComponent
s {$sel:semanticVersion:ImportComponent' :: Text
semanticVersion = Text
a} :: ImportComponent)
importComponent_type :: Lens.Lens' ImportComponent ComponentType
importComponent_type :: (ComponentType -> f ComponentType)
-> ImportComponent -> f ImportComponent
importComponent_type = (ImportComponent -> ComponentType)
-> (ImportComponent -> ComponentType -> ImportComponent)
-> Lens ImportComponent ImportComponent ComponentType ComponentType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {ComponentType
type' :: ComponentType
$sel:type':ImportComponent' :: ImportComponent -> ComponentType
type'} -> ComponentType
type') (\s :: ImportComponent
s@ImportComponent' {} ComponentType
a -> ImportComponent
s {$sel:type':ImportComponent' :: ComponentType
type' = ComponentType
a} :: ImportComponent)
importComponent_format :: Lens.Lens' ImportComponent ComponentFormat
importComponent_format :: (ComponentFormat -> f ComponentFormat)
-> ImportComponent -> f ImportComponent
importComponent_format = (ImportComponent -> ComponentFormat)
-> (ImportComponent -> ComponentFormat -> ImportComponent)
-> Lens
ImportComponent ImportComponent ComponentFormat ComponentFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {ComponentFormat
format :: ComponentFormat
$sel:format:ImportComponent' :: ImportComponent -> ComponentFormat
format} -> ComponentFormat
format) (\s :: ImportComponent
s@ImportComponent' {} ComponentFormat
a -> ImportComponent
s {$sel:format:ImportComponent' :: ComponentFormat
format = ComponentFormat
a} :: ImportComponent)
importComponent_platform :: Lens.Lens' ImportComponent Platform
importComponent_platform :: (Platform -> f Platform) -> ImportComponent -> f ImportComponent
importComponent_platform = (ImportComponent -> Platform)
-> (ImportComponent -> Platform -> ImportComponent)
-> Lens ImportComponent ImportComponent Platform Platform
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {Platform
platform :: Platform
$sel:platform:ImportComponent' :: ImportComponent -> Platform
platform} -> Platform
platform) (\s :: ImportComponent
s@ImportComponent' {} Platform
a -> ImportComponent
s {$sel:platform:ImportComponent' :: Platform
platform = Platform
a} :: ImportComponent)
importComponent_clientToken :: Lens.Lens' ImportComponent Prelude.Text
importComponent_clientToken :: (Text -> f Text) -> ImportComponent -> f ImportComponent
importComponent_clientToken = (ImportComponent -> Text)
-> (ImportComponent -> Text -> ImportComponent)
-> Lens ImportComponent ImportComponent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponent' {Text
clientToken :: Text
$sel:clientToken:ImportComponent' :: ImportComponent -> Text
clientToken} -> Text
clientToken) (\s :: ImportComponent
s@ImportComponent' {} Text
a -> ImportComponent
s {$sel:clientToken:ImportComponent' :: Text
clientToken = Text
a} :: ImportComponent)
instance Core.AWSRequest ImportComponent where
type
AWSResponse ImportComponent =
ImportComponentResponse
request :: ImportComponent -> Request ImportComponent
request = Service -> ImportComponent -> Request ImportComponent
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy ImportComponent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ImportComponent)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse ImportComponent))
-> Logger
-> Service
-> Proxy ImportComponent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ImportComponent)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Int -> ImportComponentResponse
ImportComponentResponse'
(Maybe Text
-> Maybe Text -> Maybe Text -> Int -> ImportComponentResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Text -> Int -> ImportComponentResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"requestId")
Either
String (Maybe Text -> Maybe Text -> Int -> ImportComponentResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> ImportComponentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"clientToken")
Either String (Maybe Text -> Int -> ImportComponentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> ImportComponentResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"componentBuildVersionArn")
Either String (Int -> ImportComponentResponse)
-> Either String Int -> Either String ImportComponentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable ImportComponent
instance Prelude.NFData ImportComponent
instance Core.ToHeaders ImportComponent where
toHeaders :: ImportComponent -> ResponseHeaders
toHeaders =
ResponseHeaders -> ImportComponent -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON ImportComponent where
toJSON :: ImportComponent -> Value
toJSON ImportComponent' {Maybe Text
Maybe (HashMap Text Text)
Text
ComponentFormat
ComponentType
Platform
clientToken :: Text
platform :: Platform
format :: ComponentFormat
type' :: ComponentType
semanticVersion :: Text
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
changeDescription :: Maybe Text
kmsKeyId :: Maybe Text
uri :: Maybe Text
data' :: Maybe Text
$sel:clientToken:ImportComponent' :: ImportComponent -> Text
$sel:platform:ImportComponent' :: ImportComponent -> Platform
$sel:format:ImportComponent' :: ImportComponent -> ComponentFormat
$sel:type':ImportComponent' :: ImportComponent -> ComponentType
$sel:semanticVersion:ImportComponent' :: ImportComponent -> Text
$sel:name:ImportComponent' :: ImportComponent -> Text
$sel:tags:ImportComponent' :: ImportComponent -> Maybe (HashMap Text Text)
$sel:description:ImportComponent' :: ImportComponent -> Maybe Text
$sel:changeDescription:ImportComponent' :: ImportComponent -> Maybe Text
$sel:kmsKeyId:ImportComponent' :: ImportComponent -> Maybe Text
$sel:uri:ImportComponent' :: ImportComponent -> Maybe Text
$sel:data':ImportComponent' :: ImportComponent -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"data" 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
data',
(Text
"uri" 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
uri,
(Text
"kmsKeyId" 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
kmsKeyId,
(Text
"changeDescription" 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
changeDescription,
(Text
"description" 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
description,
(Text
"tags" 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)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"semanticVersion" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
semanticVersion),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"type" Text -> ComponentType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ComponentType
type'),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"format" Text -> ComponentFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ComponentFormat
format),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"platform" Text -> Platform -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Platform
platform),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"clientToken" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
clientToken)
]
)
instance Core.ToPath ImportComponent where
toPath :: ImportComponent -> ByteString
toPath = ByteString -> ImportComponent -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/ImportComponent"
instance Core.ToQuery ImportComponent where
toQuery :: ImportComponent -> QueryString
toQuery = QueryString -> ImportComponent -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data ImportComponentResponse = ImportComponentResponse'
{
ImportComponentResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
ImportComponentResponse -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
ImportComponentResponse -> Maybe Text
componentBuildVersionArn :: Prelude.Maybe Prelude.Text,
ImportComponentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (ImportComponentResponse -> ImportComponentResponse -> Bool
(ImportComponentResponse -> ImportComponentResponse -> Bool)
-> (ImportComponentResponse -> ImportComponentResponse -> Bool)
-> Eq ImportComponentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportComponentResponse -> ImportComponentResponse -> Bool
$c/= :: ImportComponentResponse -> ImportComponentResponse -> Bool
== :: ImportComponentResponse -> ImportComponentResponse -> Bool
$c== :: ImportComponentResponse -> ImportComponentResponse -> Bool
Prelude.Eq, ReadPrec [ImportComponentResponse]
ReadPrec ImportComponentResponse
Int -> ReadS ImportComponentResponse
ReadS [ImportComponentResponse]
(Int -> ReadS ImportComponentResponse)
-> ReadS [ImportComponentResponse]
-> ReadPrec ImportComponentResponse
-> ReadPrec [ImportComponentResponse]
-> Read ImportComponentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportComponentResponse]
$creadListPrec :: ReadPrec [ImportComponentResponse]
readPrec :: ReadPrec ImportComponentResponse
$creadPrec :: ReadPrec ImportComponentResponse
readList :: ReadS [ImportComponentResponse]
$creadList :: ReadS [ImportComponentResponse]
readsPrec :: Int -> ReadS ImportComponentResponse
$creadsPrec :: Int -> ReadS ImportComponentResponse
Prelude.Read, Int -> ImportComponentResponse -> ShowS
[ImportComponentResponse] -> ShowS
ImportComponentResponse -> String
(Int -> ImportComponentResponse -> ShowS)
-> (ImportComponentResponse -> String)
-> ([ImportComponentResponse] -> ShowS)
-> Show ImportComponentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportComponentResponse] -> ShowS
$cshowList :: [ImportComponentResponse] -> ShowS
show :: ImportComponentResponse -> String
$cshow :: ImportComponentResponse -> String
showsPrec :: Int -> ImportComponentResponse -> ShowS
$cshowsPrec :: Int -> ImportComponentResponse -> ShowS
Prelude.Show, (forall x.
ImportComponentResponse -> Rep ImportComponentResponse x)
-> (forall x.
Rep ImportComponentResponse x -> ImportComponentResponse)
-> Generic ImportComponentResponse
forall x. Rep ImportComponentResponse x -> ImportComponentResponse
forall x. ImportComponentResponse -> Rep ImportComponentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportComponentResponse x -> ImportComponentResponse
$cfrom :: forall x. ImportComponentResponse -> Rep ImportComponentResponse x
Prelude.Generic)
newImportComponentResponse ::
Prelude.Int ->
ImportComponentResponse
newImportComponentResponse :: Int -> ImportComponentResponse
newImportComponentResponse Int
pHttpStatus_ =
ImportComponentResponse' :: Maybe Text
-> Maybe Text -> Maybe Text -> Int -> ImportComponentResponse
ImportComponentResponse'
{ $sel:requestId:ImportComponentResponse' :: Maybe Text
requestId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:ImportComponentResponse' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:componentBuildVersionArn:ImportComponentResponse' :: Maybe Text
componentBuildVersionArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:ImportComponentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
importComponentResponse_requestId :: Lens.Lens' ImportComponentResponse (Prelude.Maybe Prelude.Text)
importComponentResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> ImportComponentResponse -> f ImportComponentResponse
importComponentResponse_requestId = (ImportComponentResponse -> Maybe Text)
-> (ImportComponentResponse
-> Maybe Text -> ImportComponentResponse)
-> Lens
ImportComponentResponse
ImportComponentResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponentResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:ImportComponentResponse' :: ImportComponentResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: ImportComponentResponse
s@ImportComponentResponse' {} Maybe Text
a -> ImportComponentResponse
s {$sel:requestId:ImportComponentResponse' :: Maybe Text
requestId = Maybe Text
a} :: ImportComponentResponse)
importComponentResponse_clientToken :: Lens.Lens' ImportComponentResponse (Prelude.Maybe Prelude.Text)
importComponentResponse_clientToken :: (Maybe Text -> f (Maybe Text))
-> ImportComponentResponse -> f ImportComponentResponse
importComponentResponse_clientToken = (ImportComponentResponse -> Maybe Text)
-> (ImportComponentResponse
-> Maybe Text -> ImportComponentResponse)
-> Lens
ImportComponentResponse
ImportComponentResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponentResponse' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:ImportComponentResponse' :: ImportComponentResponse -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: ImportComponentResponse
s@ImportComponentResponse' {} Maybe Text
a -> ImportComponentResponse
s {$sel:clientToken:ImportComponentResponse' :: Maybe Text
clientToken = Maybe Text
a} :: ImportComponentResponse)
importComponentResponse_componentBuildVersionArn :: Lens.Lens' ImportComponentResponse (Prelude.Maybe Prelude.Text)
importComponentResponse_componentBuildVersionArn :: (Maybe Text -> f (Maybe Text))
-> ImportComponentResponse -> f ImportComponentResponse
importComponentResponse_componentBuildVersionArn = (ImportComponentResponse -> Maybe Text)
-> (ImportComponentResponse
-> Maybe Text -> ImportComponentResponse)
-> Lens
ImportComponentResponse
ImportComponentResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponentResponse' {Maybe Text
componentBuildVersionArn :: Maybe Text
$sel:componentBuildVersionArn:ImportComponentResponse' :: ImportComponentResponse -> Maybe Text
componentBuildVersionArn} -> Maybe Text
componentBuildVersionArn) (\s :: ImportComponentResponse
s@ImportComponentResponse' {} Maybe Text
a -> ImportComponentResponse
s {$sel:componentBuildVersionArn:ImportComponentResponse' :: Maybe Text
componentBuildVersionArn = Maybe Text
a} :: ImportComponentResponse)
importComponentResponse_httpStatus :: Lens.Lens' ImportComponentResponse Prelude.Int
importComponentResponse_httpStatus :: (Int -> f Int)
-> ImportComponentResponse -> f ImportComponentResponse
importComponentResponse_httpStatus = (ImportComponentResponse -> Int)
-> (ImportComponentResponse -> Int -> ImportComponentResponse)
-> Lens ImportComponentResponse ImportComponentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportComponentResponse' {Int
httpStatus :: Int
$sel:httpStatus:ImportComponentResponse' :: ImportComponentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: ImportComponentResponse
s@ImportComponentResponse' {} Int
a -> ImportComponentResponse
s {$sel:httpStatus:ImportComponentResponse' :: Int
httpStatus = Int
a} :: ImportComponentResponse)
instance Prelude.NFData ImportComponentResponse