{-# 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.Omics.StartRun
(
StartRun (..),
newStartRun,
startRun_logLevel,
startRun_name,
startRun_outputUri,
startRun_parameters,
startRun_priority,
startRun_runGroupId,
startRun_runId,
startRun_storageCapacity,
startRun_tags,
startRun_workflowId,
startRun_workflowType,
startRun_requestId,
startRun_roleArn,
StartRunResponse (..),
newStartRunResponse,
startRunResponse_arn,
startRunResponse_id,
startRunResponse_status,
startRunResponse_tags,
startRunResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Omics.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data StartRun = StartRun'
{
StartRun -> Maybe RunLogLevel
logLevel :: Prelude.Maybe RunLogLevel,
StartRun -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
StartRun -> Maybe Text
outputUri :: Prelude.Maybe Prelude.Text,
StartRun -> Maybe RunParameters
parameters :: Prelude.Maybe RunParameters,
StartRun -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
StartRun -> Maybe Text
runGroupId :: Prelude.Maybe Prelude.Text,
StartRun -> Maybe Text
runId :: Prelude.Maybe Prelude.Text,
StartRun -> Maybe Natural
storageCapacity :: Prelude.Maybe Prelude.Natural,
StartRun -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
StartRun -> Maybe Text
workflowId :: Prelude.Maybe Prelude.Text,
StartRun -> Maybe WorkflowType
workflowType :: Prelude.Maybe WorkflowType,
StartRun -> Text
requestId :: Prelude.Text,
StartRun -> Text
roleArn :: Prelude.Text
}
deriving (StartRun -> StartRun -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartRun -> StartRun -> Bool
$c/= :: StartRun -> StartRun -> Bool
== :: StartRun -> StartRun -> Bool
$c== :: StartRun -> StartRun -> Bool
Prelude.Eq, ReadPrec [StartRun]
ReadPrec StartRun
Int -> ReadS StartRun
ReadS [StartRun]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartRun]
$creadListPrec :: ReadPrec [StartRun]
readPrec :: ReadPrec StartRun
$creadPrec :: ReadPrec StartRun
readList :: ReadS [StartRun]
$creadList :: ReadS [StartRun]
readsPrec :: Int -> ReadS StartRun
$creadsPrec :: Int -> ReadS StartRun
Prelude.Read, Int -> StartRun -> ShowS
[StartRun] -> ShowS
StartRun -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartRun] -> ShowS
$cshowList :: [StartRun] -> ShowS
show :: StartRun -> String
$cshow :: StartRun -> String
showsPrec :: Int -> StartRun -> ShowS
$cshowsPrec :: Int -> StartRun -> ShowS
Prelude.Show, forall x. Rep StartRun x -> StartRun
forall x. StartRun -> Rep StartRun x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartRun x -> StartRun
$cfrom :: forall x. StartRun -> Rep StartRun x
Prelude.Generic)
newStartRun ::
Prelude.Text ->
Prelude.Text ->
StartRun
newStartRun :: Text -> Text -> StartRun
newStartRun Text
pRequestId_ Text
pRoleArn_ =
StartRun'
{ $sel:logLevel:StartRun' :: Maybe RunLogLevel
logLevel = forall a. Maybe a
Prelude.Nothing,
$sel:name:StartRun' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
$sel:outputUri:StartRun' :: Maybe Text
outputUri = forall a. Maybe a
Prelude.Nothing,
$sel:parameters:StartRun' :: Maybe RunParameters
parameters = forall a. Maybe a
Prelude.Nothing,
$sel:priority:StartRun' :: Maybe Natural
priority = forall a. Maybe a
Prelude.Nothing,
$sel:runGroupId:StartRun' :: Maybe Text
runGroupId = forall a. Maybe a
Prelude.Nothing,
$sel:runId:StartRun' :: Maybe Text
runId = forall a. Maybe a
Prelude.Nothing,
$sel:storageCapacity:StartRun' :: Maybe Natural
storageCapacity = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartRun' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:workflowId:StartRun' :: Maybe Text
workflowId = forall a. Maybe a
Prelude.Nothing,
$sel:workflowType:StartRun' :: Maybe WorkflowType
workflowType = forall a. Maybe a
Prelude.Nothing,
$sel:requestId:StartRun' :: Text
requestId = Text
pRequestId_,
$sel:roleArn:StartRun' :: Text
roleArn = Text
pRoleArn_
}
startRun_logLevel :: Lens.Lens' StartRun (Prelude.Maybe RunLogLevel)
startRun_logLevel :: Lens' StartRun (Maybe RunLogLevel)
startRun_logLevel = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe RunLogLevel
logLevel :: Maybe RunLogLevel
$sel:logLevel:StartRun' :: StartRun -> Maybe RunLogLevel
logLevel} -> Maybe RunLogLevel
logLevel) (\s :: StartRun
s@StartRun' {} Maybe RunLogLevel
a -> StartRun
s {$sel:logLevel:StartRun' :: Maybe RunLogLevel
logLevel = Maybe RunLogLevel
a} :: StartRun)
startRun_name :: Lens.Lens' StartRun (Prelude.Maybe Prelude.Text)
startRun_name :: Lens' StartRun (Maybe Text)
startRun_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe Text
name :: Maybe Text
$sel:name:StartRun' :: StartRun -> Maybe Text
name} -> Maybe Text
name) (\s :: StartRun
s@StartRun' {} Maybe Text
a -> StartRun
s {$sel:name:StartRun' :: Maybe Text
name = Maybe Text
a} :: StartRun)
startRun_outputUri :: Lens.Lens' StartRun (Prelude.Maybe Prelude.Text)
startRun_outputUri :: Lens' StartRun (Maybe Text)
startRun_outputUri = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe Text
outputUri :: Maybe Text
$sel:outputUri:StartRun' :: StartRun -> Maybe Text
outputUri} -> Maybe Text
outputUri) (\s :: StartRun
s@StartRun' {} Maybe Text
a -> StartRun
s {$sel:outputUri:StartRun' :: Maybe Text
outputUri = Maybe Text
a} :: StartRun)
startRun_parameters :: Lens.Lens' StartRun (Prelude.Maybe RunParameters)
startRun_parameters :: Lens' StartRun (Maybe RunParameters)
startRun_parameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe RunParameters
parameters :: Maybe RunParameters
$sel:parameters:StartRun' :: StartRun -> Maybe RunParameters
parameters} -> Maybe RunParameters
parameters) (\s :: StartRun
s@StartRun' {} Maybe RunParameters
a -> StartRun
s {$sel:parameters:StartRun' :: Maybe RunParameters
parameters = Maybe RunParameters
a} :: StartRun)
startRun_priority :: Lens.Lens' StartRun (Prelude.Maybe Prelude.Natural)
startRun_priority :: Lens' StartRun (Maybe Natural)
startRun_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe Natural
priority :: Maybe Natural
$sel:priority:StartRun' :: StartRun -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: StartRun
s@StartRun' {} Maybe Natural
a -> StartRun
s {$sel:priority:StartRun' :: Maybe Natural
priority = Maybe Natural
a} :: StartRun)
startRun_runGroupId :: Lens.Lens' StartRun (Prelude.Maybe Prelude.Text)
startRun_runGroupId :: Lens' StartRun (Maybe Text)
startRun_runGroupId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe Text
runGroupId :: Maybe Text
$sel:runGroupId:StartRun' :: StartRun -> Maybe Text
runGroupId} -> Maybe Text
runGroupId) (\s :: StartRun
s@StartRun' {} Maybe Text
a -> StartRun
s {$sel:runGroupId:StartRun' :: Maybe Text
runGroupId = Maybe Text
a} :: StartRun)
startRun_runId :: Lens.Lens' StartRun (Prelude.Maybe Prelude.Text)
startRun_runId :: Lens' StartRun (Maybe Text)
startRun_runId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe Text
runId :: Maybe Text
$sel:runId:StartRun' :: StartRun -> Maybe Text
runId} -> Maybe Text
runId) (\s :: StartRun
s@StartRun' {} Maybe Text
a -> StartRun
s {$sel:runId:StartRun' :: Maybe Text
runId = Maybe Text
a} :: StartRun)
startRun_storageCapacity :: Lens.Lens' StartRun (Prelude.Maybe Prelude.Natural)
startRun_storageCapacity :: Lens' StartRun (Maybe Natural)
startRun_storageCapacity = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe Natural
storageCapacity :: Maybe Natural
$sel:storageCapacity:StartRun' :: StartRun -> Maybe Natural
storageCapacity} -> Maybe Natural
storageCapacity) (\s :: StartRun
s@StartRun' {} Maybe Natural
a -> StartRun
s {$sel:storageCapacity:StartRun' :: Maybe Natural
storageCapacity = Maybe Natural
a} :: StartRun)
startRun_tags :: Lens.Lens' StartRun (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startRun_tags :: Lens' StartRun (Maybe (HashMap Text Text))
startRun_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StartRun' :: StartRun -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StartRun
s@StartRun' {} Maybe (HashMap Text Text)
a -> StartRun
s {$sel:tags:StartRun' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StartRun) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startRun_workflowId :: Lens.Lens' StartRun (Prelude.Maybe Prelude.Text)
startRun_workflowId :: Lens' StartRun (Maybe Text)
startRun_workflowId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe Text
workflowId :: Maybe Text
$sel:workflowId:StartRun' :: StartRun -> Maybe Text
workflowId} -> Maybe Text
workflowId) (\s :: StartRun
s@StartRun' {} Maybe Text
a -> StartRun
s {$sel:workflowId:StartRun' :: Maybe Text
workflowId = Maybe Text
a} :: StartRun)
startRun_workflowType :: Lens.Lens' StartRun (Prelude.Maybe WorkflowType)
startRun_workflowType :: Lens' StartRun (Maybe WorkflowType)
startRun_workflowType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Maybe WorkflowType
workflowType :: Maybe WorkflowType
$sel:workflowType:StartRun' :: StartRun -> Maybe WorkflowType
workflowType} -> Maybe WorkflowType
workflowType) (\s :: StartRun
s@StartRun' {} Maybe WorkflowType
a -> StartRun
s {$sel:workflowType:StartRun' :: Maybe WorkflowType
workflowType = Maybe WorkflowType
a} :: StartRun)
startRun_requestId :: Lens.Lens' StartRun Prelude.Text
startRun_requestId :: Lens' StartRun Text
startRun_requestId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Text
requestId :: Text
$sel:requestId:StartRun' :: StartRun -> Text
requestId} -> Text
requestId) (\s :: StartRun
s@StartRun' {} Text
a -> StartRun
s {$sel:requestId:StartRun' :: Text
requestId = Text
a} :: StartRun)
startRun_roleArn :: Lens.Lens' StartRun Prelude.Text
startRun_roleArn :: Lens' StartRun Text
startRun_roleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRun' {Text
roleArn :: Text
$sel:roleArn:StartRun' :: StartRun -> Text
roleArn} -> Text
roleArn) (\s :: StartRun
s@StartRun' {} Text
a -> StartRun
s {$sel:roleArn:StartRun' :: Text
roleArn = Text
a} :: StartRun)
instance Core.AWSRequest StartRun where
type AWSResponse StartRun = StartRunResponse
request :: (Service -> Service) -> StartRun -> Request StartRun
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy StartRun
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse StartRun)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text
-> Maybe RunStatus
-> Maybe (HashMap Text Text)
-> Int
-> StartRunResponse
StartRunResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"arn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"id")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"status")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"tags" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable StartRun where
hashWithSalt :: Int -> StartRun -> Int
hashWithSalt Int
_salt StartRun' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe RunLogLevel
Maybe RunParameters
Maybe WorkflowType
Text
roleArn :: Text
requestId :: Text
workflowType :: Maybe WorkflowType
workflowId :: Maybe Text
tags :: Maybe (HashMap Text Text)
storageCapacity :: Maybe Natural
runId :: Maybe Text
runGroupId :: Maybe Text
priority :: Maybe Natural
parameters :: Maybe RunParameters
outputUri :: Maybe Text
name :: Maybe Text
logLevel :: Maybe RunLogLevel
$sel:roleArn:StartRun' :: StartRun -> Text
$sel:requestId:StartRun' :: StartRun -> Text
$sel:workflowType:StartRun' :: StartRun -> Maybe WorkflowType
$sel:workflowId:StartRun' :: StartRun -> Maybe Text
$sel:tags:StartRun' :: StartRun -> Maybe (HashMap Text Text)
$sel:storageCapacity:StartRun' :: StartRun -> Maybe Natural
$sel:runId:StartRun' :: StartRun -> Maybe Text
$sel:runGroupId:StartRun' :: StartRun -> Maybe Text
$sel:priority:StartRun' :: StartRun -> Maybe Natural
$sel:parameters:StartRun' :: StartRun -> Maybe RunParameters
$sel:outputUri:StartRun' :: StartRun -> Maybe Text
$sel:name:StartRun' :: StartRun -> Maybe Text
$sel:logLevel:StartRun' :: StartRun -> Maybe RunLogLevel
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RunLogLevel
logLevel
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
outputUri
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RunParameters
parameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
priority
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
runGroupId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
runId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
storageCapacity
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
tags
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
workflowId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe WorkflowType
workflowType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
requestId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
roleArn
instance Prelude.NFData StartRun where
rnf :: StartRun -> ()
rnf StartRun' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe RunLogLevel
Maybe RunParameters
Maybe WorkflowType
Text
roleArn :: Text
requestId :: Text
workflowType :: Maybe WorkflowType
workflowId :: Maybe Text
tags :: Maybe (HashMap Text Text)
storageCapacity :: Maybe Natural
runId :: Maybe Text
runGroupId :: Maybe Text
priority :: Maybe Natural
parameters :: Maybe RunParameters
outputUri :: Maybe Text
name :: Maybe Text
logLevel :: Maybe RunLogLevel
$sel:roleArn:StartRun' :: StartRun -> Text
$sel:requestId:StartRun' :: StartRun -> Text
$sel:workflowType:StartRun' :: StartRun -> Maybe WorkflowType
$sel:workflowId:StartRun' :: StartRun -> Maybe Text
$sel:tags:StartRun' :: StartRun -> Maybe (HashMap Text Text)
$sel:storageCapacity:StartRun' :: StartRun -> Maybe Natural
$sel:runId:StartRun' :: StartRun -> Maybe Text
$sel:runGroupId:StartRun' :: StartRun -> Maybe Text
$sel:priority:StartRun' :: StartRun -> Maybe Natural
$sel:parameters:StartRun' :: StartRun -> Maybe RunParameters
$sel:outputUri:StartRun' :: StartRun -> Maybe Text
$sel:name:StartRun' :: StartRun -> Maybe Text
$sel:logLevel:StartRun' :: StartRun -> Maybe RunLogLevel
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe RunLogLevel
logLevel
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputUri
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RunParameters
parameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
priority
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
runGroupId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
runId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
storageCapacity
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
workflowId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe WorkflowType
workflowType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
requestId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
roleArn
instance Data.ToHeaders StartRun where
toHeaders :: StartRun -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON StartRun where
toJSON :: StartRun -> Value
toJSON StartRun' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Maybe RunLogLevel
Maybe RunParameters
Maybe WorkflowType
Text
roleArn :: Text
requestId :: Text
workflowType :: Maybe WorkflowType
workflowId :: Maybe Text
tags :: Maybe (HashMap Text Text)
storageCapacity :: Maybe Natural
runId :: Maybe Text
runGroupId :: Maybe Text
priority :: Maybe Natural
parameters :: Maybe RunParameters
outputUri :: Maybe Text
name :: Maybe Text
logLevel :: Maybe RunLogLevel
$sel:roleArn:StartRun' :: StartRun -> Text
$sel:requestId:StartRun' :: StartRun -> Text
$sel:workflowType:StartRun' :: StartRun -> Maybe WorkflowType
$sel:workflowId:StartRun' :: StartRun -> Maybe Text
$sel:tags:StartRun' :: StartRun -> Maybe (HashMap Text Text)
$sel:storageCapacity:StartRun' :: StartRun -> Maybe Natural
$sel:runId:StartRun' :: StartRun -> Maybe Text
$sel:runGroupId:StartRun' :: StartRun -> Maybe Text
$sel:priority:StartRun' :: StartRun -> Maybe Natural
$sel:parameters:StartRun' :: StartRun -> Maybe RunParameters
$sel:outputUri:StartRun' :: StartRun -> Maybe Text
$sel:name:StartRun' :: StartRun -> Maybe Text
$sel:logLevel:StartRun' :: StartRun -> Maybe RunLogLevel
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"logLevel" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RunLogLevel
logLevel,
(Key
"name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
(Key
"outputUri" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
outputUri,
(Key
"parameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe RunParameters
parameters,
(Key
"priority" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
priority,
(Key
"runGroupId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
runGroupId,
(Key
"runId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
runId,
(Key
"storageCapacity" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
storageCapacity,
(Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
(Key
"workflowId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
workflowId,
(Key
"workflowType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe WorkflowType
workflowType,
forall a. a -> Maybe a
Prelude.Just (Key
"requestId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
requestId),
forall a. a -> Maybe a
Prelude.Just (Key
"roleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
roleArn)
]
)
instance Data.ToPath StartRun where
toPath :: StartRun -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/run"
instance Data.ToQuery StartRun where
toQuery :: StartRun -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data StartRunResponse = StartRunResponse'
{
StartRunResponse -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
StartRunResponse -> Maybe Text
id :: Prelude.Maybe Prelude.Text,
StartRunResponse -> Maybe RunStatus
status :: Prelude.Maybe RunStatus,
StartRunResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
StartRunResponse -> Int
httpStatus :: Prelude.Int
}
deriving (StartRunResponse -> StartRunResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StartRunResponse -> StartRunResponse -> Bool
$c/= :: StartRunResponse -> StartRunResponse -> Bool
== :: StartRunResponse -> StartRunResponse -> Bool
$c== :: StartRunResponse -> StartRunResponse -> Bool
Prelude.Eq, ReadPrec [StartRunResponse]
ReadPrec StartRunResponse
Int -> ReadS StartRunResponse
ReadS [StartRunResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StartRunResponse]
$creadListPrec :: ReadPrec [StartRunResponse]
readPrec :: ReadPrec StartRunResponse
$creadPrec :: ReadPrec StartRunResponse
readList :: ReadS [StartRunResponse]
$creadList :: ReadS [StartRunResponse]
readsPrec :: Int -> ReadS StartRunResponse
$creadsPrec :: Int -> ReadS StartRunResponse
Prelude.Read, Int -> StartRunResponse -> ShowS
[StartRunResponse] -> ShowS
StartRunResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StartRunResponse] -> ShowS
$cshowList :: [StartRunResponse] -> ShowS
show :: StartRunResponse -> String
$cshow :: StartRunResponse -> String
showsPrec :: Int -> StartRunResponse -> ShowS
$cshowsPrec :: Int -> StartRunResponse -> ShowS
Prelude.Show, forall x. Rep StartRunResponse x -> StartRunResponse
forall x. StartRunResponse -> Rep StartRunResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StartRunResponse x -> StartRunResponse
$cfrom :: forall x. StartRunResponse -> Rep StartRunResponse x
Prelude.Generic)
newStartRunResponse ::
Prelude.Int ->
StartRunResponse
newStartRunResponse :: Int -> StartRunResponse
newStartRunResponse Int
pHttpStatus_ =
StartRunResponse'
{ $sel:arn:StartRunResponse' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:id:StartRunResponse' :: Maybe Text
id = forall a. Maybe a
Prelude.Nothing,
$sel:status:StartRunResponse' :: Maybe RunStatus
status = forall a. Maybe a
Prelude.Nothing,
$sel:tags:StartRunResponse' :: Maybe (HashMap Text Text)
tags = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:StartRunResponse' :: Int
httpStatus = Int
pHttpStatus_
}
startRunResponse_arn :: Lens.Lens' StartRunResponse (Prelude.Maybe Prelude.Text)
startRunResponse_arn :: Lens' StartRunResponse (Maybe Text)
startRunResponse_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRunResponse' {Maybe Text
arn :: Maybe Text
$sel:arn:StartRunResponse' :: StartRunResponse -> Maybe Text
arn} -> Maybe Text
arn) (\s :: StartRunResponse
s@StartRunResponse' {} Maybe Text
a -> StartRunResponse
s {$sel:arn:StartRunResponse' :: Maybe Text
arn = Maybe Text
a} :: StartRunResponse)
startRunResponse_id :: Lens.Lens' StartRunResponse (Prelude.Maybe Prelude.Text)
startRunResponse_id :: Lens' StartRunResponse (Maybe Text)
startRunResponse_id = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRunResponse' {Maybe Text
id :: Maybe Text
$sel:id:StartRunResponse' :: StartRunResponse -> Maybe Text
id} -> Maybe Text
id) (\s :: StartRunResponse
s@StartRunResponse' {} Maybe Text
a -> StartRunResponse
s {$sel:id:StartRunResponse' :: Maybe Text
id = Maybe Text
a} :: StartRunResponse)
startRunResponse_status :: Lens.Lens' StartRunResponse (Prelude.Maybe RunStatus)
startRunResponse_status :: Lens' StartRunResponse (Maybe RunStatus)
startRunResponse_status = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRunResponse' {Maybe RunStatus
status :: Maybe RunStatus
$sel:status:StartRunResponse' :: StartRunResponse -> Maybe RunStatus
status} -> Maybe RunStatus
status) (\s :: StartRunResponse
s@StartRunResponse' {} Maybe RunStatus
a -> StartRunResponse
s {$sel:status:StartRunResponse' :: Maybe RunStatus
status = Maybe RunStatus
a} :: StartRunResponse)
startRunResponse_tags :: Lens.Lens' StartRunResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
startRunResponse_tags :: Lens' StartRunResponse (Maybe (HashMap Text Text))
startRunResponse_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRunResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:StartRunResponse' :: StartRunResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: StartRunResponse
s@StartRunResponse' {} Maybe (HashMap Text Text)
a -> StartRunResponse
s {$sel:tags:StartRunResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: StartRunResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
startRunResponse_httpStatus :: Lens.Lens' StartRunResponse Prelude.Int
startRunResponse_httpStatus :: Lens' StartRunResponse Int
startRunResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\StartRunResponse' {Int
httpStatus :: Int
$sel:httpStatus:StartRunResponse' :: StartRunResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: StartRunResponse
s@StartRunResponse' {} Int
a -> StartRunResponse
s {$sel:httpStatus:StartRunResponse' :: Int
httpStatus = Int
a} :: StartRunResponse)
instance Prelude.NFData StartRunResponse where
rnf :: StartRunResponse -> ()
rnf StartRunResponse' {Int
Maybe Text
Maybe (HashMap Text Text)
Maybe RunStatus
httpStatus :: Int
tags :: Maybe (HashMap Text Text)
status :: Maybe RunStatus
id :: Maybe Text
arn :: Maybe Text
$sel:httpStatus:StartRunResponse' :: StartRunResponse -> Int
$sel:tags:StartRunResponse' :: StartRunResponse -> Maybe (HashMap Text Text)
$sel:status:StartRunResponse' :: StartRunResponse -> Maybe RunStatus
$sel:id:StartRunResponse' :: StartRunResponse -> Maybe Text
$sel:arn:StartRunResponse' :: StartRunResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
id
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RunStatus
status
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
tags
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus