{-# 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.AppFlow.CreateFlow
(
CreateFlow (..),
newCreateFlow,
createFlow_kmsArn,
createFlow_description,
createFlow_tags,
createFlow_flowName,
createFlow_triggerConfig,
createFlow_sourceFlowConfig,
createFlow_destinationFlowConfigList,
createFlow_tasks,
CreateFlowResponse (..),
newCreateFlowResponse,
createFlowResponse_flowArn,
createFlowResponse_flowStatus,
createFlowResponse_httpStatus,
)
where
import Amazonka.AppFlow.Types
import qualified Amazonka.Core as Core
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 CreateFlow = CreateFlow'
{
CreateFlow -> Maybe Text
kmsArn :: Prelude.Maybe Prelude.Text,
CreateFlow -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateFlow -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateFlow -> Text
flowName :: Prelude.Text,
CreateFlow -> TriggerConfig
triggerConfig :: TriggerConfig,
CreateFlow -> SourceFlowConfig
sourceFlowConfig :: SourceFlowConfig,
CreateFlow -> [DestinationFlowConfig]
destinationFlowConfigList :: [DestinationFlowConfig],
CreateFlow -> [Task]
tasks :: [Task]
}
deriving (CreateFlow -> CreateFlow -> Bool
(CreateFlow -> CreateFlow -> Bool)
-> (CreateFlow -> CreateFlow -> Bool) -> Eq CreateFlow
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFlow -> CreateFlow -> Bool
$c/= :: CreateFlow -> CreateFlow -> Bool
== :: CreateFlow -> CreateFlow -> Bool
$c== :: CreateFlow -> CreateFlow -> Bool
Prelude.Eq, ReadPrec [CreateFlow]
ReadPrec CreateFlow
Int -> ReadS CreateFlow
ReadS [CreateFlow]
(Int -> ReadS CreateFlow)
-> ReadS [CreateFlow]
-> ReadPrec CreateFlow
-> ReadPrec [CreateFlow]
-> Read CreateFlow
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFlow]
$creadListPrec :: ReadPrec [CreateFlow]
readPrec :: ReadPrec CreateFlow
$creadPrec :: ReadPrec CreateFlow
readList :: ReadS [CreateFlow]
$creadList :: ReadS [CreateFlow]
readsPrec :: Int -> ReadS CreateFlow
$creadsPrec :: Int -> ReadS CreateFlow
Prelude.Read, Int -> CreateFlow -> ShowS
[CreateFlow] -> ShowS
CreateFlow -> String
(Int -> CreateFlow -> ShowS)
-> (CreateFlow -> String)
-> ([CreateFlow] -> ShowS)
-> Show CreateFlow
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFlow] -> ShowS
$cshowList :: [CreateFlow] -> ShowS
show :: CreateFlow -> String
$cshow :: CreateFlow -> String
showsPrec :: Int -> CreateFlow -> ShowS
$cshowsPrec :: Int -> CreateFlow -> ShowS
Prelude.Show, (forall x. CreateFlow -> Rep CreateFlow x)
-> (forall x. Rep CreateFlow x -> CreateFlow) -> Generic CreateFlow
forall x. Rep CreateFlow x -> CreateFlow
forall x. CreateFlow -> Rep CreateFlow x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFlow x -> CreateFlow
$cfrom :: forall x. CreateFlow -> Rep CreateFlow x
Prelude.Generic)
newCreateFlow ::
Prelude.Text ->
TriggerConfig ->
SourceFlowConfig ->
CreateFlow
newCreateFlow :: Text -> TriggerConfig -> SourceFlowConfig -> CreateFlow
newCreateFlow
Text
pFlowName_
TriggerConfig
pTriggerConfig_
SourceFlowConfig
pSourceFlowConfig_ =
CreateFlow' :: Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> TriggerConfig
-> SourceFlowConfig
-> [DestinationFlowConfig]
-> [Task]
-> CreateFlow
CreateFlow'
{ $sel:kmsArn:CreateFlow' :: Maybe Text
kmsArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateFlow' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateFlow' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:flowName:CreateFlow' :: Text
flowName = Text
pFlowName_,
$sel:triggerConfig:CreateFlow' :: TriggerConfig
triggerConfig = TriggerConfig
pTriggerConfig_,
$sel:sourceFlowConfig:CreateFlow' :: SourceFlowConfig
sourceFlowConfig = SourceFlowConfig
pSourceFlowConfig_,
$sel:destinationFlowConfigList:CreateFlow' :: [DestinationFlowConfig]
destinationFlowConfigList = [DestinationFlowConfig]
forall a. Monoid a => a
Prelude.mempty,
$sel:tasks:CreateFlow' :: [Task]
tasks = [Task]
forall a. Monoid a => a
Prelude.mempty
}
createFlow_kmsArn :: Lens.Lens' CreateFlow (Prelude.Maybe Prelude.Text)
createFlow_kmsArn :: (Maybe Text -> f (Maybe Text)) -> CreateFlow -> f CreateFlow
createFlow_kmsArn = (CreateFlow -> Maybe Text)
-> (CreateFlow -> Maybe Text -> CreateFlow)
-> Lens CreateFlow CreateFlow (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlow' {Maybe Text
kmsArn :: Maybe Text
$sel:kmsArn:CreateFlow' :: CreateFlow -> Maybe Text
kmsArn} -> Maybe Text
kmsArn) (\s :: CreateFlow
s@CreateFlow' {} Maybe Text
a -> CreateFlow
s {$sel:kmsArn:CreateFlow' :: Maybe Text
kmsArn = Maybe Text
a} :: CreateFlow)
createFlow_description :: Lens.Lens' CreateFlow (Prelude.Maybe Prelude.Text)
createFlow_description :: (Maybe Text -> f (Maybe Text)) -> CreateFlow -> f CreateFlow
createFlow_description = (CreateFlow -> Maybe Text)
-> (CreateFlow -> Maybe Text -> CreateFlow)
-> Lens CreateFlow CreateFlow (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlow' {Maybe Text
description :: Maybe Text
$sel:description:CreateFlow' :: CreateFlow -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateFlow
s@CreateFlow' {} Maybe Text
a -> CreateFlow
s {$sel:description:CreateFlow' :: Maybe Text
description = Maybe Text
a} :: CreateFlow)
createFlow_tags :: Lens.Lens' CreateFlow (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createFlow_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFlow -> f CreateFlow
createFlow_tags = (CreateFlow -> Maybe (HashMap Text Text))
-> (CreateFlow -> Maybe (HashMap Text Text) -> CreateFlow)
-> Lens
CreateFlow
CreateFlow
(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 (\CreateFlow' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateFlow' :: CreateFlow -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateFlow
s@CreateFlow' {} Maybe (HashMap Text Text)
a -> CreateFlow
s {$sel:tags:CreateFlow' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateFlow) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateFlow -> f CreateFlow)
-> ((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)))
-> CreateFlow
-> f CreateFlow
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
createFlow_flowName :: Lens.Lens' CreateFlow Prelude.Text
createFlow_flowName :: (Text -> f Text) -> CreateFlow -> f CreateFlow
createFlow_flowName = (CreateFlow -> Text)
-> (CreateFlow -> Text -> CreateFlow)
-> Lens CreateFlow CreateFlow Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlow' {Text
flowName :: Text
$sel:flowName:CreateFlow' :: CreateFlow -> Text
flowName} -> Text
flowName) (\s :: CreateFlow
s@CreateFlow' {} Text
a -> CreateFlow
s {$sel:flowName:CreateFlow' :: Text
flowName = Text
a} :: CreateFlow)
createFlow_triggerConfig :: Lens.Lens' CreateFlow TriggerConfig
createFlow_triggerConfig :: (TriggerConfig -> f TriggerConfig) -> CreateFlow -> f CreateFlow
createFlow_triggerConfig = (CreateFlow -> TriggerConfig)
-> (CreateFlow -> TriggerConfig -> CreateFlow)
-> Lens CreateFlow CreateFlow TriggerConfig TriggerConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlow' {TriggerConfig
triggerConfig :: TriggerConfig
$sel:triggerConfig:CreateFlow' :: CreateFlow -> TriggerConfig
triggerConfig} -> TriggerConfig
triggerConfig) (\s :: CreateFlow
s@CreateFlow' {} TriggerConfig
a -> CreateFlow
s {$sel:triggerConfig:CreateFlow' :: TriggerConfig
triggerConfig = TriggerConfig
a} :: CreateFlow)
createFlow_sourceFlowConfig :: Lens.Lens' CreateFlow SourceFlowConfig
createFlow_sourceFlowConfig :: (SourceFlowConfig -> f SourceFlowConfig)
-> CreateFlow -> f CreateFlow
createFlow_sourceFlowConfig = (CreateFlow -> SourceFlowConfig)
-> (CreateFlow -> SourceFlowConfig -> CreateFlow)
-> Lens CreateFlow CreateFlow SourceFlowConfig SourceFlowConfig
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlow' {SourceFlowConfig
sourceFlowConfig :: SourceFlowConfig
$sel:sourceFlowConfig:CreateFlow' :: CreateFlow -> SourceFlowConfig
sourceFlowConfig} -> SourceFlowConfig
sourceFlowConfig) (\s :: CreateFlow
s@CreateFlow' {} SourceFlowConfig
a -> CreateFlow
s {$sel:sourceFlowConfig:CreateFlow' :: SourceFlowConfig
sourceFlowConfig = SourceFlowConfig
a} :: CreateFlow)
createFlow_destinationFlowConfigList :: Lens.Lens' CreateFlow [DestinationFlowConfig]
createFlow_destinationFlowConfigList :: ([DestinationFlowConfig] -> f [DestinationFlowConfig])
-> CreateFlow -> f CreateFlow
createFlow_destinationFlowConfigList = (CreateFlow -> [DestinationFlowConfig])
-> (CreateFlow -> [DestinationFlowConfig] -> CreateFlow)
-> Lens
CreateFlow
CreateFlow
[DestinationFlowConfig]
[DestinationFlowConfig]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlow' {[DestinationFlowConfig]
destinationFlowConfigList :: [DestinationFlowConfig]
$sel:destinationFlowConfigList:CreateFlow' :: CreateFlow -> [DestinationFlowConfig]
destinationFlowConfigList} -> [DestinationFlowConfig]
destinationFlowConfigList) (\s :: CreateFlow
s@CreateFlow' {} [DestinationFlowConfig]
a -> CreateFlow
s {$sel:destinationFlowConfigList:CreateFlow' :: [DestinationFlowConfig]
destinationFlowConfigList = [DestinationFlowConfig]
a} :: CreateFlow) (([DestinationFlowConfig] -> f [DestinationFlowConfig])
-> CreateFlow -> f CreateFlow)
-> (([DestinationFlowConfig] -> f [DestinationFlowConfig])
-> [DestinationFlowConfig] -> f [DestinationFlowConfig])
-> ([DestinationFlowConfig] -> f [DestinationFlowConfig])
-> CreateFlow
-> f CreateFlow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([DestinationFlowConfig] -> f [DestinationFlowConfig])
-> [DestinationFlowConfig] -> f [DestinationFlowConfig]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createFlow_tasks :: Lens.Lens' CreateFlow [Task]
createFlow_tasks :: ([Task] -> f [Task]) -> CreateFlow -> f CreateFlow
createFlow_tasks = (CreateFlow -> [Task])
-> (CreateFlow -> [Task] -> CreateFlow)
-> Lens CreateFlow CreateFlow [Task] [Task]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlow' {[Task]
tasks :: [Task]
$sel:tasks:CreateFlow' :: CreateFlow -> [Task]
tasks} -> [Task]
tasks) (\s :: CreateFlow
s@CreateFlow' {} [Task]
a -> CreateFlow
s {$sel:tasks:CreateFlow' :: [Task]
tasks = [Task]
a} :: CreateFlow) (([Task] -> f [Task]) -> CreateFlow -> f CreateFlow)
-> (([Task] -> f [Task]) -> [Task] -> f [Task])
-> ([Task] -> f [Task])
-> CreateFlow
-> f CreateFlow
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Task] -> f [Task]) -> [Task] -> f [Task]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Core.AWSRequest CreateFlow where
type AWSResponse CreateFlow = CreateFlowResponse
request :: CreateFlow -> Request CreateFlow
request = Service -> CreateFlow -> Request CreateFlow
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateFlow
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFlow)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateFlow))
-> Logger
-> Service
-> Proxy CreateFlow
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateFlow)))
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 FlowStatus -> Int -> CreateFlowResponse
CreateFlowResponse'
(Maybe Text -> Maybe FlowStatus -> Int -> CreateFlowResponse)
-> Either String (Maybe Text)
-> Either String (Maybe FlowStatus -> Int -> CreateFlowResponse)
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
"flowArn")
Either String (Maybe FlowStatus -> Int -> CreateFlowResponse)
-> Either String (Maybe FlowStatus)
-> Either String (Int -> CreateFlowResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe FlowStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"flowStatus")
Either String (Int -> CreateFlowResponse)
-> Either String Int -> Either String CreateFlowResponse
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 CreateFlow
instance Prelude.NFData CreateFlow
instance Core.ToHeaders CreateFlow where
toHeaders :: CreateFlow -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateFlow -> 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 CreateFlow where
toJSON :: CreateFlow -> Value
toJSON CreateFlow' {[Task]
[DestinationFlowConfig]
Maybe Text
Maybe (HashMap Text Text)
Text
TriggerConfig
SourceFlowConfig
tasks :: [Task]
destinationFlowConfigList :: [DestinationFlowConfig]
sourceFlowConfig :: SourceFlowConfig
triggerConfig :: TriggerConfig
flowName :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
kmsArn :: Maybe Text
$sel:tasks:CreateFlow' :: CreateFlow -> [Task]
$sel:destinationFlowConfigList:CreateFlow' :: CreateFlow -> [DestinationFlowConfig]
$sel:sourceFlowConfig:CreateFlow' :: CreateFlow -> SourceFlowConfig
$sel:triggerConfig:CreateFlow' :: CreateFlow -> TriggerConfig
$sel:flowName:CreateFlow' :: CreateFlow -> Text
$sel:tags:CreateFlow' :: CreateFlow -> Maybe (HashMap Text Text)
$sel:description:CreateFlow' :: CreateFlow -> Maybe Text
$sel:kmsArn:CreateFlow' :: CreateFlow -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"kmsArn" 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
kmsArn,
(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
"flowName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
flowName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"triggerConfig" Text -> TriggerConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= TriggerConfig
triggerConfig),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"sourceFlowConfig" Text -> SourceFlowConfig -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= SourceFlowConfig
sourceFlowConfig),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"destinationFlowConfigList"
Text -> [DestinationFlowConfig] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [DestinationFlowConfig]
destinationFlowConfigList
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"tasks" Text -> [Task] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Task]
tasks)
]
)
instance Core.ToPath CreateFlow where
toPath :: CreateFlow -> ByteString
toPath = ByteString -> CreateFlow -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/create-flow"
instance Core.ToQuery CreateFlow where
toQuery :: CreateFlow -> QueryString
toQuery = QueryString -> CreateFlow -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateFlowResponse = CreateFlowResponse'
{
CreateFlowResponse -> Maybe Text
flowArn :: Prelude.Maybe Prelude.Text,
CreateFlowResponse -> Maybe FlowStatus
flowStatus :: Prelude.Maybe FlowStatus,
CreateFlowResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateFlowResponse -> CreateFlowResponse -> Bool
(CreateFlowResponse -> CreateFlowResponse -> Bool)
-> (CreateFlowResponse -> CreateFlowResponse -> Bool)
-> Eq CreateFlowResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateFlowResponse -> CreateFlowResponse -> Bool
$c/= :: CreateFlowResponse -> CreateFlowResponse -> Bool
== :: CreateFlowResponse -> CreateFlowResponse -> Bool
$c== :: CreateFlowResponse -> CreateFlowResponse -> Bool
Prelude.Eq, ReadPrec [CreateFlowResponse]
ReadPrec CreateFlowResponse
Int -> ReadS CreateFlowResponse
ReadS [CreateFlowResponse]
(Int -> ReadS CreateFlowResponse)
-> ReadS [CreateFlowResponse]
-> ReadPrec CreateFlowResponse
-> ReadPrec [CreateFlowResponse]
-> Read CreateFlowResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateFlowResponse]
$creadListPrec :: ReadPrec [CreateFlowResponse]
readPrec :: ReadPrec CreateFlowResponse
$creadPrec :: ReadPrec CreateFlowResponse
readList :: ReadS [CreateFlowResponse]
$creadList :: ReadS [CreateFlowResponse]
readsPrec :: Int -> ReadS CreateFlowResponse
$creadsPrec :: Int -> ReadS CreateFlowResponse
Prelude.Read, Int -> CreateFlowResponse -> ShowS
[CreateFlowResponse] -> ShowS
CreateFlowResponse -> String
(Int -> CreateFlowResponse -> ShowS)
-> (CreateFlowResponse -> String)
-> ([CreateFlowResponse] -> ShowS)
-> Show CreateFlowResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateFlowResponse] -> ShowS
$cshowList :: [CreateFlowResponse] -> ShowS
show :: CreateFlowResponse -> String
$cshow :: CreateFlowResponse -> String
showsPrec :: Int -> CreateFlowResponse -> ShowS
$cshowsPrec :: Int -> CreateFlowResponse -> ShowS
Prelude.Show, (forall x. CreateFlowResponse -> Rep CreateFlowResponse x)
-> (forall x. Rep CreateFlowResponse x -> CreateFlowResponse)
-> Generic CreateFlowResponse
forall x. Rep CreateFlowResponse x -> CreateFlowResponse
forall x. CreateFlowResponse -> Rep CreateFlowResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateFlowResponse x -> CreateFlowResponse
$cfrom :: forall x. CreateFlowResponse -> Rep CreateFlowResponse x
Prelude.Generic)
newCreateFlowResponse ::
Prelude.Int ->
CreateFlowResponse
newCreateFlowResponse :: Int -> CreateFlowResponse
newCreateFlowResponse Int
pHttpStatus_ =
CreateFlowResponse' :: Maybe Text -> Maybe FlowStatus -> Int -> CreateFlowResponse
CreateFlowResponse'
{ $sel:flowArn:CreateFlowResponse' :: Maybe Text
flowArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:flowStatus:CreateFlowResponse' :: Maybe FlowStatus
flowStatus = Maybe FlowStatus
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateFlowResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createFlowResponse_flowArn :: Lens.Lens' CreateFlowResponse (Prelude.Maybe Prelude.Text)
createFlowResponse_flowArn :: (Maybe Text -> f (Maybe Text))
-> CreateFlowResponse -> f CreateFlowResponse
createFlowResponse_flowArn = (CreateFlowResponse -> Maybe Text)
-> (CreateFlowResponse -> Maybe Text -> CreateFlowResponse)
-> Lens
CreateFlowResponse CreateFlowResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowResponse' {Maybe Text
flowArn :: Maybe Text
$sel:flowArn:CreateFlowResponse' :: CreateFlowResponse -> Maybe Text
flowArn} -> Maybe Text
flowArn) (\s :: CreateFlowResponse
s@CreateFlowResponse' {} Maybe Text
a -> CreateFlowResponse
s {$sel:flowArn:CreateFlowResponse' :: Maybe Text
flowArn = Maybe Text
a} :: CreateFlowResponse)
createFlowResponse_flowStatus :: Lens.Lens' CreateFlowResponse (Prelude.Maybe FlowStatus)
createFlowResponse_flowStatus :: (Maybe FlowStatus -> f (Maybe FlowStatus))
-> CreateFlowResponse -> f CreateFlowResponse
createFlowResponse_flowStatus = (CreateFlowResponse -> Maybe FlowStatus)
-> (CreateFlowResponse -> Maybe FlowStatus -> CreateFlowResponse)
-> Lens
CreateFlowResponse
CreateFlowResponse
(Maybe FlowStatus)
(Maybe FlowStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowResponse' {Maybe FlowStatus
flowStatus :: Maybe FlowStatus
$sel:flowStatus:CreateFlowResponse' :: CreateFlowResponse -> Maybe FlowStatus
flowStatus} -> Maybe FlowStatus
flowStatus) (\s :: CreateFlowResponse
s@CreateFlowResponse' {} Maybe FlowStatus
a -> CreateFlowResponse
s {$sel:flowStatus:CreateFlowResponse' :: Maybe FlowStatus
flowStatus = Maybe FlowStatus
a} :: CreateFlowResponse)
createFlowResponse_httpStatus :: Lens.Lens' CreateFlowResponse Prelude.Int
createFlowResponse_httpStatus :: (Int -> f Int) -> CreateFlowResponse -> f CreateFlowResponse
createFlowResponse_httpStatus = (CreateFlowResponse -> Int)
-> (CreateFlowResponse -> Int -> CreateFlowResponse)
-> Lens CreateFlowResponse CreateFlowResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateFlowResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateFlowResponse' :: CreateFlowResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateFlowResponse
s@CreateFlowResponse' {} Int
a -> CreateFlowResponse
s {$sel:httpStatus:CreateFlowResponse' :: Int
httpStatus = Int
a} :: CreateFlowResponse)
instance Prelude.NFData CreateFlowResponse