{-# 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.CreateImagePipeline
(
CreateImagePipeline (..),
newCreateImagePipeline,
createImagePipeline_status,
createImagePipeline_containerRecipeArn,
createImagePipeline_imageTestsConfiguration,
createImagePipeline_schedule,
createImagePipeline_enhancedImageMetadataEnabled,
createImagePipeline_distributionConfigurationArn,
createImagePipeline_imageRecipeArn,
createImagePipeline_description,
createImagePipeline_tags,
createImagePipeline_name,
createImagePipeline_infrastructureConfigurationArn,
createImagePipeline_clientToken,
CreateImagePipelineResponse (..),
newCreateImagePipelineResponse,
createImagePipelineResponse_requestId,
createImagePipelineResponse_clientToken,
createImagePipelineResponse_imagePipelineArn,
createImagePipelineResponse_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 CreateImagePipeline = CreateImagePipeline'
{
CreateImagePipeline -> Maybe PipelineStatus
status :: Prelude.Maybe PipelineStatus,
CreateImagePipeline -> Maybe Text
containerRecipeArn :: Prelude.Maybe Prelude.Text,
CreateImagePipeline -> Maybe ImageTestsConfiguration
imageTestsConfiguration :: Prelude.Maybe ImageTestsConfiguration,
CreateImagePipeline -> Maybe Schedule
schedule :: Prelude.Maybe Schedule,
CreateImagePipeline -> Maybe Bool
enhancedImageMetadataEnabled :: Prelude.Maybe Prelude.Bool,
CreateImagePipeline -> Maybe Text
distributionConfigurationArn :: Prelude.Maybe Prelude.Text,
CreateImagePipeline -> Maybe Text
imageRecipeArn :: Prelude.Maybe Prelude.Text,
CreateImagePipeline -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateImagePipeline -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateImagePipeline -> Text
name :: Prelude.Text,
CreateImagePipeline -> Text
infrastructureConfigurationArn :: Prelude.Text,
CreateImagePipeline -> Text
clientToken :: Prelude.Text
}
deriving (CreateImagePipeline -> CreateImagePipeline -> Bool
(CreateImagePipeline -> CreateImagePipeline -> Bool)
-> (CreateImagePipeline -> CreateImagePipeline -> Bool)
-> Eq CreateImagePipeline
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateImagePipeline -> CreateImagePipeline -> Bool
$c/= :: CreateImagePipeline -> CreateImagePipeline -> Bool
== :: CreateImagePipeline -> CreateImagePipeline -> Bool
$c== :: CreateImagePipeline -> CreateImagePipeline -> Bool
Prelude.Eq, ReadPrec [CreateImagePipeline]
ReadPrec CreateImagePipeline
Int -> ReadS CreateImagePipeline
ReadS [CreateImagePipeline]
(Int -> ReadS CreateImagePipeline)
-> ReadS [CreateImagePipeline]
-> ReadPrec CreateImagePipeline
-> ReadPrec [CreateImagePipeline]
-> Read CreateImagePipeline
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateImagePipeline]
$creadListPrec :: ReadPrec [CreateImagePipeline]
readPrec :: ReadPrec CreateImagePipeline
$creadPrec :: ReadPrec CreateImagePipeline
readList :: ReadS [CreateImagePipeline]
$creadList :: ReadS [CreateImagePipeline]
readsPrec :: Int -> ReadS CreateImagePipeline
$creadsPrec :: Int -> ReadS CreateImagePipeline
Prelude.Read, Int -> CreateImagePipeline -> ShowS
[CreateImagePipeline] -> ShowS
CreateImagePipeline -> String
(Int -> CreateImagePipeline -> ShowS)
-> (CreateImagePipeline -> String)
-> ([CreateImagePipeline] -> ShowS)
-> Show CreateImagePipeline
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateImagePipeline] -> ShowS
$cshowList :: [CreateImagePipeline] -> ShowS
show :: CreateImagePipeline -> String
$cshow :: CreateImagePipeline -> String
showsPrec :: Int -> CreateImagePipeline -> ShowS
$cshowsPrec :: Int -> CreateImagePipeline -> ShowS
Prelude.Show, (forall x. CreateImagePipeline -> Rep CreateImagePipeline x)
-> (forall x. Rep CreateImagePipeline x -> CreateImagePipeline)
-> Generic CreateImagePipeline
forall x. Rep CreateImagePipeline x -> CreateImagePipeline
forall x. CreateImagePipeline -> Rep CreateImagePipeline x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateImagePipeline x -> CreateImagePipeline
$cfrom :: forall x. CreateImagePipeline -> Rep CreateImagePipeline x
Prelude.Generic)
newCreateImagePipeline ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateImagePipeline
newCreateImagePipeline :: Text -> Text -> Text -> CreateImagePipeline
newCreateImagePipeline
Text
pName_
Text
pInfrastructureConfigurationArn_
Text
pClientToken_ =
CreateImagePipeline' :: Maybe PipelineStatus
-> Maybe Text
-> Maybe ImageTestsConfiguration
-> Maybe Schedule
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> Text
-> CreateImagePipeline
CreateImagePipeline'
{ $sel:status:CreateImagePipeline' :: Maybe PipelineStatus
status = Maybe PipelineStatus
forall a. Maybe a
Prelude.Nothing,
$sel:containerRecipeArn:CreateImagePipeline' :: Maybe Text
containerRecipeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageTestsConfiguration:CreateImagePipeline' :: Maybe ImageTestsConfiguration
imageTestsConfiguration = Maybe ImageTestsConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:schedule:CreateImagePipeline' :: Maybe Schedule
schedule = Maybe Schedule
forall a. Maybe a
Prelude.Nothing,
$sel:enhancedImageMetadataEnabled:CreateImagePipeline' :: Maybe Bool
enhancedImageMetadataEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
$sel:distributionConfigurationArn:CreateImagePipeline' :: Maybe Text
distributionConfigurationArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imageRecipeArn:CreateImagePipeline' :: Maybe Text
imageRecipeArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateImagePipeline' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateImagePipeline' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateImagePipeline' :: Text
name = Text
pName_,
$sel:infrastructureConfigurationArn:CreateImagePipeline' :: Text
infrastructureConfigurationArn =
Text
pInfrastructureConfigurationArn_,
$sel:clientToken:CreateImagePipeline' :: Text
clientToken = Text
pClientToken_
}
createImagePipeline_status :: Lens.Lens' CreateImagePipeline (Prelude.Maybe PipelineStatus)
createImagePipeline_status :: (Maybe PipelineStatus -> f (Maybe PipelineStatus))
-> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_status = (CreateImagePipeline -> Maybe PipelineStatus)
-> (CreateImagePipeline
-> Maybe PipelineStatus -> CreateImagePipeline)
-> Lens
CreateImagePipeline
CreateImagePipeline
(Maybe PipelineStatus)
(Maybe PipelineStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Maybe PipelineStatus
status :: Maybe PipelineStatus
$sel:status:CreateImagePipeline' :: CreateImagePipeline -> Maybe PipelineStatus
status} -> Maybe PipelineStatus
status) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Maybe PipelineStatus
a -> CreateImagePipeline
s {$sel:status:CreateImagePipeline' :: Maybe PipelineStatus
status = Maybe PipelineStatus
a} :: CreateImagePipeline)
createImagePipeline_containerRecipeArn :: Lens.Lens' CreateImagePipeline (Prelude.Maybe Prelude.Text)
createImagePipeline_containerRecipeArn :: (Maybe Text -> f (Maybe Text))
-> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_containerRecipeArn = (CreateImagePipeline -> Maybe Text)
-> (CreateImagePipeline -> Maybe Text -> CreateImagePipeline)
-> Lens
CreateImagePipeline CreateImagePipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Maybe Text
containerRecipeArn :: Maybe Text
$sel:containerRecipeArn:CreateImagePipeline' :: CreateImagePipeline -> Maybe Text
containerRecipeArn} -> Maybe Text
containerRecipeArn) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Maybe Text
a -> CreateImagePipeline
s {$sel:containerRecipeArn:CreateImagePipeline' :: Maybe Text
containerRecipeArn = Maybe Text
a} :: CreateImagePipeline)
createImagePipeline_imageTestsConfiguration :: Lens.Lens' CreateImagePipeline (Prelude.Maybe ImageTestsConfiguration)
createImagePipeline_imageTestsConfiguration :: (Maybe ImageTestsConfiguration
-> f (Maybe ImageTestsConfiguration))
-> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_imageTestsConfiguration = (CreateImagePipeline -> Maybe ImageTestsConfiguration)
-> (CreateImagePipeline
-> Maybe ImageTestsConfiguration -> CreateImagePipeline)
-> Lens
CreateImagePipeline
CreateImagePipeline
(Maybe ImageTestsConfiguration)
(Maybe ImageTestsConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Maybe ImageTestsConfiguration
imageTestsConfiguration :: Maybe ImageTestsConfiguration
$sel:imageTestsConfiguration:CreateImagePipeline' :: CreateImagePipeline -> Maybe ImageTestsConfiguration
imageTestsConfiguration} -> Maybe ImageTestsConfiguration
imageTestsConfiguration) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Maybe ImageTestsConfiguration
a -> CreateImagePipeline
s {$sel:imageTestsConfiguration:CreateImagePipeline' :: Maybe ImageTestsConfiguration
imageTestsConfiguration = Maybe ImageTestsConfiguration
a} :: CreateImagePipeline)
createImagePipeline_schedule :: Lens.Lens' CreateImagePipeline (Prelude.Maybe Schedule)
createImagePipeline_schedule :: (Maybe Schedule -> f (Maybe Schedule))
-> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_schedule = (CreateImagePipeline -> Maybe Schedule)
-> (CreateImagePipeline -> Maybe Schedule -> CreateImagePipeline)
-> Lens
CreateImagePipeline
CreateImagePipeline
(Maybe Schedule)
(Maybe Schedule)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Maybe Schedule
schedule :: Maybe Schedule
$sel:schedule:CreateImagePipeline' :: CreateImagePipeline -> Maybe Schedule
schedule} -> Maybe Schedule
schedule) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Maybe Schedule
a -> CreateImagePipeline
s {$sel:schedule:CreateImagePipeline' :: Maybe Schedule
schedule = Maybe Schedule
a} :: CreateImagePipeline)
createImagePipeline_enhancedImageMetadataEnabled :: Lens.Lens' CreateImagePipeline (Prelude.Maybe Prelude.Bool)
createImagePipeline_enhancedImageMetadataEnabled :: (Maybe Bool -> f (Maybe Bool))
-> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_enhancedImageMetadataEnabled = (CreateImagePipeline -> Maybe Bool)
-> (CreateImagePipeline -> Maybe Bool -> CreateImagePipeline)
-> Lens
CreateImagePipeline CreateImagePipeline (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Maybe Bool
enhancedImageMetadataEnabled :: Maybe Bool
$sel:enhancedImageMetadataEnabled:CreateImagePipeline' :: CreateImagePipeline -> Maybe Bool
enhancedImageMetadataEnabled} -> Maybe Bool
enhancedImageMetadataEnabled) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Maybe Bool
a -> CreateImagePipeline
s {$sel:enhancedImageMetadataEnabled:CreateImagePipeline' :: Maybe Bool
enhancedImageMetadataEnabled = Maybe Bool
a} :: CreateImagePipeline)
createImagePipeline_distributionConfigurationArn :: Lens.Lens' CreateImagePipeline (Prelude.Maybe Prelude.Text)
createImagePipeline_distributionConfigurationArn :: (Maybe Text -> f (Maybe Text))
-> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_distributionConfigurationArn = (CreateImagePipeline -> Maybe Text)
-> (CreateImagePipeline -> Maybe Text -> CreateImagePipeline)
-> Lens
CreateImagePipeline CreateImagePipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Maybe Text
distributionConfigurationArn :: Maybe Text
$sel:distributionConfigurationArn:CreateImagePipeline' :: CreateImagePipeline -> Maybe Text
distributionConfigurationArn} -> Maybe Text
distributionConfigurationArn) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Maybe Text
a -> CreateImagePipeline
s {$sel:distributionConfigurationArn:CreateImagePipeline' :: Maybe Text
distributionConfigurationArn = Maybe Text
a} :: CreateImagePipeline)
createImagePipeline_imageRecipeArn :: Lens.Lens' CreateImagePipeline (Prelude.Maybe Prelude.Text)
createImagePipeline_imageRecipeArn :: (Maybe Text -> f (Maybe Text))
-> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_imageRecipeArn = (CreateImagePipeline -> Maybe Text)
-> (CreateImagePipeline -> Maybe Text -> CreateImagePipeline)
-> Lens
CreateImagePipeline CreateImagePipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Maybe Text
imageRecipeArn :: Maybe Text
$sel:imageRecipeArn:CreateImagePipeline' :: CreateImagePipeline -> Maybe Text
imageRecipeArn} -> Maybe Text
imageRecipeArn) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Maybe Text
a -> CreateImagePipeline
s {$sel:imageRecipeArn:CreateImagePipeline' :: Maybe Text
imageRecipeArn = Maybe Text
a} :: CreateImagePipeline)
createImagePipeline_description :: Lens.Lens' CreateImagePipeline (Prelude.Maybe Prelude.Text)
createImagePipeline_description :: (Maybe Text -> f (Maybe Text))
-> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_description = (CreateImagePipeline -> Maybe Text)
-> (CreateImagePipeline -> Maybe Text -> CreateImagePipeline)
-> Lens
CreateImagePipeline CreateImagePipeline (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Maybe Text
description :: Maybe Text
$sel:description:CreateImagePipeline' :: CreateImagePipeline -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Maybe Text
a -> CreateImagePipeline
s {$sel:description:CreateImagePipeline' :: Maybe Text
description = Maybe Text
a} :: CreateImagePipeline)
createImagePipeline_tags :: Lens.Lens' CreateImagePipeline (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createImagePipeline_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_tags = (CreateImagePipeline -> Maybe (HashMap Text Text))
-> (CreateImagePipeline
-> Maybe (HashMap Text Text) -> CreateImagePipeline)
-> Lens
CreateImagePipeline
CreateImagePipeline
(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 (\CreateImagePipeline' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateImagePipeline' :: CreateImagePipeline -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Maybe (HashMap Text Text)
a -> CreateImagePipeline
s {$sel:tags:CreateImagePipeline' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateImagePipeline) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateImagePipeline -> f CreateImagePipeline)
-> ((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)))
-> CreateImagePipeline
-> f CreateImagePipeline
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
createImagePipeline_name :: Lens.Lens' CreateImagePipeline Prelude.Text
createImagePipeline_name :: (Text -> f Text) -> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_name = (CreateImagePipeline -> Text)
-> (CreateImagePipeline -> Text -> CreateImagePipeline)
-> Lens CreateImagePipeline CreateImagePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Text
name :: Text
$sel:name:CreateImagePipeline' :: CreateImagePipeline -> Text
name} -> Text
name) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Text
a -> CreateImagePipeline
s {$sel:name:CreateImagePipeline' :: Text
name = Text
a} :: CreateImagePipeline)
createImagePipeline_infrastructureConfigurationArn :: Lens.Lens' CreateImagePipeline Prelude.Text
createImagePipeline_infrastructureConfigurationArn :: (Text -> f Text) -> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_infrastructureConfigurationArn = (CreateImagePipeline -> Text)
-> (CreateImagePipeline -> Text -> CreateImagePipeline)
-> Lens CreateImagePipeline CreateImagePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Text
infrastructureConfigurationArn :: Text
$sel:infrastructureConfigurationArn:CreateImagePipeline' :: CreateImagePipeline -> Text
infrastructureConfigurationArn} -> Text
infrastructureConfigurationArn) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Text
a -> CreateImagePipeline
s {$sel:infrastructureConfigurationArn:CreateImagePipeline' :: Text
infrastructureConfigurationArn = Text
a} :: CreateImagePipeline)
createImagePipeline_clientToken :: Lens.Lens' CreateImagePipeline Prelude.Text
createImagePipeline_clientToken :: (Text -> f Text) -> CreateImagePipeline -> f CreateImagePipeline
createImagePipeline_clientToken = (CreateImagePipeline -> Text)
-> (CreateImagePipeline -> Text -> CreateImagePipeline)
-> Lens CreateImagePipeline CreateImagePipeline Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipeline' {Text
clientToken :: Text
$sel:clientToken:CreateImagePipeline' :: CreateImagePipeline -> Text
clientToken} -> Text
clientToken) (\s :: CreateImagePipeline
s@CreateImagePipeline' {} Text
a -> CreateImagePipeline
s {$sel:clientToken:CreateImagePipeline' :: Text
clientToken = Text
a} :: CreateImagePipeline)
instance Core.AWSRequest CreateImagePipeline where
type
AWSResponse CreateImagePipeline =
CreateImagePipelineResponse
request :: CreateImagePipeline -> Request CreateImagePipeline
request = Service -> CreateImagePipeline -> Request CreateImagePipeline
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateImagePipeline
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateImagePipeline)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateImagePipeline))
-> Logger
-> Service
-> Proxy CreateImagePipeline
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateImagePipeline)))
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 -> CreateImagePipelineResponse
CreateImagePipelineResponse'
(Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateImagePipelineResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe Text -> Int -> CreateImagePipelineResponse)
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 -> CreateImagePipelineResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateImagePipelineResponse)
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 -> CreateImagePipelineResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateImagePipelineResponse)
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
"imagePipelineArn")
Either String (Int -> CreateImagePipelineResponse)
-> Either String Int -> Either String CreateImagePipelineResponse
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 CreateImagePipeline
instance Prelude.NFData CreateImagePipeline
instance Core.ToHeaders CreateImagePipeline where
toHeaders :: CreateImagePipeline -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateImagePipeline -> 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 CreateImagePipeline where
toJSON :: CreateImagePipeline -> Value
toJSON CreateImagePipeline' {Maybe Bool
Maybe Text
Maybe (HashMap Text Text)
Maybe ImageTestsConfiguration
Maybe PipelineStatus
Maybe Schedule
Text
clientToken :: Text
infrastructureConfigurationArn :: Text
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
imageRecipeArn :: Maybe Text
distributionConfigurationArn :: Maybe Text
enhancedImageMetadataEnabled :: Maybe Bool
schedule :: Maybe Schedule
imageTestsConfiguration :: Maybe ImageTestsConfiguration
containerRecipeArn :: Maybe Text
status :: Maybe PipelineStatus
$sel:clientToken:CreateImagePipeline' :: CreateImagePipeline -> Text
$sel:infrastructureConfigurationArn:CreateImagePipeline' :: CreateImagePipeline -> Text
$sel:name:CreateImagePipeline' :: CreateImagePipeline -> Text
$sel:tags:CreateImagePipeline' :: CreateImagePipeline -> Maybe (HashMap Text Text)
$sel:description:CreateImagePipeline' :: CreateImagePipeline -> Maybe Text
$sel:imageRecipeArn:CreateImagePipeline' :: CreateImagePipeline -> Maybe Text
$sel:distributionConfigurationArn:CreateImagePipeline' :: CreateImagePipeline -> Maybe Text
$sel:enhancedImageMetadataEnabled:CreateImagePipeline' :: CreateImagePipeline -> Maybe Bool
$sel:schedule:CreateImagePipeline' :: CreateImagePipeline -> Maybe Schedule
$sel:imageTestsConfiguration:CreateImagePipeline' :: CreateImagePipeline -> Maybe ImageTestsConfiguration
$sel:containerRecipeArn:CreateImagePipeline' :: CreateImagePipeline -> Maybe Text
$sel:status:CreateImagePipeline' :: CreateImagePipeline -> Maybe PipelineStatus
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"status" Text -> PipelineStatus -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (PipelineStatus -> Pair) -> Maybe PipelineStatus -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe PipelineStatus
status,
(Text
"containerRecipeArn" 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
containerRecipeArn,
(Text
"imageTestsConfiguration" Text -> ImageTestsConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ImageTestsConfiguration -> Pair)
-> Maybe ImageTestsConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ImageTestsConfiguration
imageTestsConfiguration,
(Text
"schedule" Text -> Schedule -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Schedule -> Pair) -> Maybe Schedule -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Schedule
schedule,
(Text
"enhancedImageMetadataEnabled" Text -> Bool -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Bool -> Pair) -> Maybe Bool -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enhancedImageMetadataEnabled,
(Text
"distributionConfigurationArn" 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
distributionConfigurationArn,
(Text
"imageRecipeArn" 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
imageRecipeArn,
(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
"infrastructureConfigurationArn"
Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
infrastructureConfigurationArn
),
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 CreateImagePipeline where
toPath :: CreateImagePipeline -> ByteString
toPath = ByteString -> CreateImagePipeline -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/CreateImagePipeline"
instance Core.ToQuery CreateImagePipeline where
toQuery :: CreateImagePipeline -> QueryString
toQuery = QueryString -> CreateImagePipeline -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateImagePipelineResponse = CreateImagePipelineResponse'
{
CreateImagePipelineResponse -> Maybe Text
requestId :: Prelude.Maybe Prelude.Text,
CreateImagePipelineResponse -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateImagePipelineResponse -> Maybe Text
imagePipelineArn :: Prelude.Maybe Prelude.Text,
CreateImagePipelineResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateImagePipelineResponse -> CreateImagePipelineResponse -> Bool
(CreateImagePipelineResponse
-> CreateImagePipelineResponse -> Bool)
-> (CreateImagePipelineResponse
-> CreateImagePipelineResponse -> Bool)
-> Eq CreateImagePipelineResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateImagePipelineResponse -> CreateImagePipelineResponse -> Bool
$c/= :: CreateImagePipelineResponse -> CreateImagePipelineResponse -> Bool
== :: CreateImagePipelineResponse -> CreateImagePipelineResponse -> Bool
$c== :: CreateImagePipelineResponse -> CreateImagePipelineResponse -> Bool
Prelude.Eq, ReadPrec [CreateImagePipelineResponse]
ReadPrec CreateImagePipelineResponse
Int -> ReadS CreateImagePipelineResponse
ReadS [CreateImagePipelineResponse]
(Int -> ReadS CreateImagePipelineResponse)
-> ReadS [CreateImagePipelineResponse]
-> ReadPrec CreateImagePipelineResponse
-> ReadPrec [CreateImagePipelineResponse]
-> Read CreateImagePipelineResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateImagePipelineResponse]
$creadListPrec :: ReadPrec [CreateImagePipelineResponse]
readPrec :: ReadPrec CreateImagePipelineResponse
$creadPrec :: ReadPrec CreateImagePipelineResponse
readList :: ReadS [CreateImagePipelineResponse]
$creadList :: ReadS [CreateImagePipelineResponse]
readsPrec :: Int -> ReadS CreateImagePipelineResponse
$creadsPrec :: Int -> ReadS CreateImagePipelineResponse
Prelude.Read, Int -> CreateImagePipelineResponse -> ShowS
[CreateImagePipelineResponse] -> ShowS
CreateImagePipelineResponse -> String
(Int -> CreateImagePipelineResponse -> ShowS)
-> (CreateImagePipelineResponse -> String)
-> ([CreateImagePipelineResponse] -> ShowS)
-> Show CreateImagePipelineResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateImagePipelineResponse] -> ShowS
$cshowList :: [CreateImagePipelineResponse] -> ShowS
show :: CreateImagePipelineResponse -> String
$cshow :: CreateImagePipelineResponse -> String
showsPrec :: Int -> CreateImagePipelineResponse -> ShowS
$cshowsPrec :: Int -> CreateImagePipelineResponse -> ShowS
Prelude.Show, (forall x.
CreateImagePipelineResponse -> Rep CreateImagePipelineResponse x)
-> (forall x.
Rep CreateImagePipelineResponse x -> CreateImagePipelineResponse)
-> Generic CreateImagePipelineResponse
forall x.
Rep CreateImagePipelineResponse x -> CreateImagePipelineResponse
forall x.
CreateImagePipelineResponse -> Rep CreateImagePipelineResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateImagePipelineResponse x -> CreateImagePipelineResponse
$cfrom :: forall x.
CreateImagePipelineResponse -> Rep CreateImagePipelineResponse x
Prelude.Generic)
newCreateImagePipelineResponse ::
Prelude.Int ->
CreateImagePipelineResponse
newCreateImagePipelineResponse :: Int -> CreateImagePipelineResponse
newCreateImagePipelineResponse Int
pHttpStatus_ =
CreateImagePipelineResponse' :: Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateImagePipelineResponse
CreateImagePipelineResponse'
{ $sel:requestId:CreateImagePipelineResponse' :: Maybe Text
requestId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:clientToken:CreateImagePipelineResponse' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:imagePipelineArn:CreateImagePipelineResponse' :: Maybe Text
imagePipelineArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateImagePipelineResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createImagePipelineResponse_requestId :: Lens.Lens' CreateImagePipelineResponse (Prelude.Maybe Prelude.Text)
createImagePipelineResponse_requestId :: (Maybe Text -> f (Maybe Text))
-> CreateImagePipelineResponse -> f CreateImagePipelineResponse
createImagePipelineResponse_requestId = (CreateImagePipelineResponse -> Maybe Text)
-> (CreateImagePipelineResponse
-> Maybe Text -> CreateImagePipelineResponse)
-> Lens
CreateImagePipelineResponse
CreateImagePipelineResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipelineResponse' {Maybe Text
requestId :: Maybe Text
$sel:requestId:CreateImagePipelineResponse' :: CreateImagePipelineResponse -> Maybe Text
requestId} -> Maybe Text
requestId) (\s :: CreateImagePipelineResponse
s@CreateImagePipelineResponse' {} Maybe Text
a -> CreateImagePipelineResponse
s {$sel:requestId:CreateImagePipelineResponse' :: Maybe Text
requestId = Maybe Text
a} :: CreateImagePipelineResponse)
createImagePipelineResponse_clientToken :: Lens.Lens' CreateImagePipelineResponse (Prelude.Maybe Prelude.Text)
createImagePipelineResponse_clientToken :: (Maybe Text -> f (Maybe Text))
-> CreateImagePipelineResponse -> f CreateImagePipelineResponse
createImagePipelineResponse_clientToken = (CreateImagePipelineResponse -> Maybe Text)
-> (CreateImagePipelineResponse
-> Maybe Text -> CreateImagePipelineResponse)
-> Lens
CreateImagePipelineResponse
CreateImagePipelineResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipelineResponse' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateImagePipelineResponse' :: CreateImagePipelineResponse -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateImagePipelineResponse
s@CreateImagePipelineResponse' {} Maybe Text
a -> CreateImagePipelineResponse
s {$sel:clientToken:CreateImagePipelineResponse' :: Maybe Text
clientToken = Maybe Text
a} :: CreateImagePipelineResponse)
createImagePipelineResponse_imagePipelineArn :: Lens.Lens' CreateImagePipelineResponse (Prelude.Maybe Prelude.Text)
createImagePipelineResponse_imagePipelineArn :: (Maybe Text -> f (Maybe Text))
-> CreateImagePipelineResponse -> f CreateImagePipelineResponse
createImagePipelineResponse_imagePipelineArn = (CreateImagePipelineResponse -> Maybe Text)
-> (CreateImagePipelineResponse
-> Maybe Text -> CreateImagePipelineResponse)
-> Lens
CreateImagePipelineResponse
CreateImagePipelineResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipelineResponse' {Maybe Text
imagePipelineArn :: Maybe Text
$sel:imagePipelineArn:CreateImagePipelineResponse' :: CreateImagePipelineResponse -> Maybe Text
imagePipelineArn} -> Maybe Text
imagePipelineArn) (\s :: CreateImagePipelineResponse
s@CreateImagePipelineResponse' {} Maybe Text
a -> CreateImagePipelineResponse
s {$sel:imagePipelineArn:CreateImagePipelineResponse' :: Maybe Text
imagePipelineArn = Maybe Text
a} :: CreateImagePipelineResponse)
createImagePipelineResponse_httpStatus :: Lens.Lens' CreateImagePipelineResponse Prelude.Int
createImagePipelineResponse_httpStatus :: (Int -> f Int)
-> CreateImagePipelineResponse -> f CreateImagePipelineResponse
createImagePipelineResponse_httpStatus = (CreateImagePipelineResponse -> Int)
-> (CreateImagePipelineResponse
-> Int -> CreateImagePipelineResponse)
-> Lens
CreateImagePipelineResponse CreateImagePipelineResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateImagePipelineResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateImagePipelineResponse' :: CreateImagePipelineResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateImagePipelineResponse
s@CreateImagePipelineResponse' {} Int
a -> CreateImagePipelineResponse
s {$sel:httpStatus:CreateImagePipelineResponse' :: Int
httpStatus = Int
a} :: CreateImagePipelineResponse)
instance Prelude.NFData CreateImagePipelineResponse