{-# 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.ECS.SubmitTaskStateChange
(
SubmitTaskStateChange (..),
newSubmitTaskStateChange,
submitTaskStateChange_status,
submitTaskStateChange_managedAgents,
submitTaskStateChange_cluster,
submitTaskStateChange_attachments,
submitTaskStateChange_executionStoppedAt,
submitTaskStateChange_pullStoppedAt,
submitTaskStateChange_containers,
submitTaskStateChange_reason,
submitTaskStateChange_task,
submitTaskStateChange_pullStartedAt,
SubmitTaskStateChangeResponse (..),
newSubmitTaskStateChangeResponse,
submitTaskStateChangeResponse_acknowledgment,
submitTaskStateChangeResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.ECS.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 SubmitTaskStateChange = SubmitTaskStateChange'
{
SubmitTaskStateChange -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
SubmitTaskStateChange -> Maybe [ManagedAgentStateChange]
managedAgents :: Prelude.Maybe [ManagedAgentStateChange],
SubmitTaskStateChange -> Maybe Text
cluster :: Prelude.Maybe Prelude.Text,
SubmitTaskStateChange -> Maybe [AttachmentStateChange]
attachments :: Prelude.Maybe [AttachmentStateChange],
SubmitTaskStateChange -> Maybe POSIX
executionStoppedAt :: Prelude.Maybe Core.POSIX,
SubmitTaskStateChange -> Maybe POSIX
pullStoppedAt :: Prelude.Maybe Core.POSIX,
SubmitTaskStateChange -> Maybe [ContainerStateChange]
containers :: Prelude.Maybe [ContainerStateChange],
SubmitTaskStateChange -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
SubmitTaskStateChange -> Maybe Text
task :: Prelude.Maybe Prelude.Text,
SubmitTaskStateChange -> Maybe POSIX
pullStartedAt :: Prelude.Maybe Core.POSIX
}
deriving (SubmitTaskStateChange -> SubmitTaskStateChange -> Bool
(SubmitTaskStateChange -> SubmitTaskStateChange -> Bool)
-> (SubmitTaskStateChange -> SubmitTaskStateChange -> Bool)
-> Eq SubmitTaskStateChange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubmitTaskStateChange -> SubmitTaskStateChange -> Bool
$c/= :: SubmitTaskStateChange -> SubmitTaskStateChange -> Bool
== :: SubmitTaskStateChange -> SubmitTaskStateChange -> Bool
$c== :: SubmitTaskStateChange -> SubmitTaskStateChange -> Bool
Prelude.Eq, ReadPrec [SubmitTaskStateChange]
ReadPrec SubmitTaskStateChange
Int -> ReadS SubmitTaskStateChange
ReadS [SubmitTaskStateChange]
(Int -> ReadS SubmitTaskStateChange)
-> ReadS [SubmitTaskStateChange]
-> ReadPrec SubmitTaskStateChange
-> ReadPrec [SubmitTaskStateChange]
-> Read SubmitTaskStateChange
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SubmitTaskStateChange]
$creadListPrec :: ReadPrec [SubmitTaskStateChange]
readPrec :: ReadPrec SubmitTaskStateChange
$creadPrec :: ReadPrec SubmitTaskStateChange
readList :: ReadS [SubmitTaskStateChange]
$creadList :: ReadS [SubmitTaskStateChange]
readsPrec :: Int -> ReadS SubmitTaskStateChange
$creadsPrec :: Int -> ReadS SubmitTaskStateChange
Prelude.Read, Int -> SubmitTaskStateChange -> ShowS
[SubmitTaskStateChange] -> ShowS
SubmitTaskStateChange -> String
(Int -> SubmitTaskStateChange -> ShowS)
-> (SubmitTaskStateChange -> String)
-> ([SubmitTaskStateChange] -> ShowS)
-> Show SubmitTaskStateChange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubmitTaskStateChange] -> ShowS
$cshowList :: [SubmitTaskStateChange] -> ShowS
show :: SubmitTaskStateChange -> String
$cshow :: SubmitTaskStateChange -> String
showsPrec :: Int -> SubmitTaskStateChange -> ShowS
$cshowsPrec :: Int -> SubmitTaskStateChange -> ShowS
Prelude.Show, (forall x. SubmitTaskStateChange -> Rep SubmitTaskStateChange x)
-> (forall x. Rep SubmitTaskStateChange x -> SubmitTaskStateChange)
-> Generic SubmitTaskStateChange
forall x. Rep SubmitTaskStateChange x -> SubmitTaskStateChange
forall x. SubmitTaskStateChange -> Rep SubmitTaskStateChange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SubmitTaskStateChange x -> SubmitTaskStateChange
$cfrom :: forall x. SubmitTaskStateChange -> Rep SubmitTaskStateChange x
Prelude.Generic)
newSubmitTaskStateChange ::
SubmitTaskStateChange
newSubmitTaskStateChange :: SubmitTaskStateChange
newSubmitTaskStateChange =
SubmitTaskStateChange' :: Maybe Text
-> Maybe [ManagedAgentStateChange]
-> Maybe Text
-> Maybe [AttachmentStateChange]
-> Maybe POSIX
-> Maybe POSIX
-> Maybe [ContainerStateChange]
-> Maybe Text
-> Maybe Text
-> Maybe POSIX
-> SubmitTaskStateChange
SubmitTaskStateChange'
{ $sel:status:SubmitTaskStateChange' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:managedAgents:SubmitTaskStateChange' :: Maybe [ManagedAgentStateChange]
managedAgents = Maybe [ManagedAgentStateChange]
forall a. Maybe a
Prelude.Nothing,
$sel:cluster:SubmitTaskStateChange' :: Maybe Text
cluster = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attachments:SubmitTaskStateChange' :: Maybe [AttachmentStateChange]
attachments = Maybe [AttachmentStateChange]
forall a. Maybe a
Prelude.Nothing,
$sel:executionStoppedAt:SubmitTaskStateChange' :: Maybe POSIX
executionStoppedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:pullStoppedAt:SubmitTaskStateChange' :: Maybe POSIX
pullStoppedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:containers:SubmitTaskStateChange' :: Maybe [ContainerStateChange]
containers = Maybe [ContainerStateChange]
forall a. Maybe a
Prelude.Nothing,
$sel:reason:SubmitTaskStateChange' :: Maybe Text
reason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:task:SubmitTaskStateChange' :: Maybe Text
task = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:pullStartedAt:SubmitTaskStateChange' :: Maybe POSIX
pullStartedAt = Maybe POSIX
forall a. Maybe a
Prelude.Nothing
}
submitTaskStateChange_status :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe Prelude.Text)
submitTaskStateChange_status :: (Maybe Text -> f (Maybe Text))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_status = (SubmitTaskStateChange -> Maybe Text)
-> (SubmitTaskStateChange -> Maybe Text -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe Text
status :: Maybe Text
$sel:status:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe Text
status} -> Maybe Text
status) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe Text
a -> SubmitTaskStateChange
s {$sel:status:SubmitTaskStateChange' :: Maybe Text
status = Maybe Text
a} :: SubmitTaskStateChange)
submitTaskStateChange_managedAgents :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe [ManagedAgentStateChange])
submitTaskStateChange_managedAgents :: (Maybe [ManagedAgentStateChange]
-> f (Maybe [ManagedAgentStateChange]))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_managedAgents = (SubmitTaskStateChange -> Maybe [ManagedAgentStateChange])
-> (SubmitTaskStateChange
-> Maybe [ManagedAgentStateChange] -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe [ManagedAgentStateChange])
(Maybe [ManagedAgentStateChange])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe [ManagedAgentStateChange]
managedAgents :: Maybe [ManagedAgentStateChange]
$sel:managedAgents:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe [ManagedAgentStateChange]
managedAgents} -> Maybe [ManagedAgentStateChange]
managedAgents) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe [ManagedAgentStateChange]
a -> SubmitTaskStateChange
s {$sel:managedAgents:SubmitTaskStateChange' :: Maybe [ManagedAgentStateChange]
managedAgents = Maybe [ManagedAgentStateChange]
a} :: SubmitTaskStateChange) ((Maybe [ManagedAgentStateChange]
-> f (Maybe [ManagedAgentStateChange]))
-> SubmitTaskStateChange -> f SubmitTaskStateChange)
-> ((Maybe [ManagedAgentStateChange]
-> f (Maybe [ManagedAgentStateChange]))
-> Maybe [ManagedAgentStateChange]
-> f (Maybe [ManagedAgentStateChange]))
-> (Maybe [ManagedAgentStateChange]
-> f (Maybe [ManagedAgentStateChange]))
-> SubmitTaskStateChange
-> f SubmitTaskStateChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ManagedAgentStateChange]
[ManagedAgentStateChange]
[ManagedAgentStateChange]
[ManagedAgentStateChange]
-> Iso
(Maybe [ManagedAgentStateChange])
(Maybe [ManagedAgentStateChange])
(Maybe [ManagedAgentStateChange])
(Maybe [ManagedAgentStateChange])
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
[ManagedAgentStateChange]
[ManagedAgentStateChange]
[ManagedAgentStateChange]
[ManagedAgentStateChange]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
submitTaskStateChange_cluster :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe Prelude.Text)
submitTaskStateChange_cluster :: (Maybe Text -> f (Maybe Text))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_cluster = (SubmitTaskStateChange -> Maybe Text)
-> (SubmitTaskStateChange -> Maybe Text -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe Text
cluster :: Maybe Text
$sel:cluster:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe Text
cluster} -> Maybe Text
cluster) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe Text
a -> SubmitTaskStateChange
s {$sel:cluster:SubmitTaskStateChange' :: Maybe Text
cluster = Maybe Text
a} :: SubmitTaskStateChange)
submitTaskStateChange_attachments :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe [AttachmentStateChange])
submitTaskStateChange_attachments :: (Maybe [AttachmentStateChange]
-> f (Maybe [AttachmentStateChange]))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_attachments = (SubmitTaskStateChange -> Maybe [AttachmentStateChange])
-> (SubmitTaskStateChange
-> Maybe [AttachmentStateChange] -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe [AttachmentStateChange])
(Maybe [AttachmentStateChange])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe [AttachmentStateChange]
attachments :: Maybe [AttachmentStateChange]
$sel:attachments:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe [AttachmentStateChange]
attachments} -> Maybe [AttachmentStateChange]
attachments) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe [AttachmentStateChange]
a -> SubmitTaskStateChange
s {$sel:attachments:SubmitTaskStateChange' :: Maybe [AttachmentStateChange]
attachments = Maybe [AttachmentStateChange]
a} :: SubmitTaskStateChange) ((Maybe [AttachmentStateChange]
-> f (Maybe [AttachmentStateChange]))
-> SubmitTaskStateChange -> f SubmitTaskStateChange)
-> ((Maybe [AttachmentStateChange]
-> f (Maybe [AttachmentStateChange]))
-> Maybe [AttachmentStateChange]
-> f (Maybe [AttachmentStateChange]))
-> (Maybe [AttachmentStateChange]
-> f (Maybe [AttachmentStateChange]))
-> SubmitTaskStateChange
-> f SubmitTaskStateChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[AttachmentStateChange]
[AttachmentStateChange]
[AttachmentStateChange]
[AttachmentStateChange]
-> Iso
(Maybe [AttachmentStateChange])
(Maybe [AttachmentStateChange])
(Maybe [AttachmentStateChange])
(Maybe [AttachmentStateChange])
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
[AttachmentStateChange]
[AttachmentStateChange]
[AttachmentStateChange]
[AttachmentStateChange]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
submitTaskStateChange_executionStoppedAt :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe Prelude.UTCTime)
submitTaskStateChange_executionStoppedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_executionStoppedAt = (SubmitTaskStateChange -> Maybe POSIX)
-> (SubmitTaskStateChange -> Maybe POSIX -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe POSIX
executionStoppedAt :: Maybe POSIX
$sel:executionStoppedAt:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe POSIX
executionStoppedAt} -> Maybe POSIX
executionStoppedAt) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe POSIX
a -> SubmitTaskStateChange
s {$sel:executionStoppedAt:SubmitTaskStateChange' :: Maybe POSIX
executionStoppedAt = Maybe POSIX
a} :: SubmitTaskStateChange) ((Maybe POSIX -> f (Maybe POSIX))
-> SubmitTaskStateChange -> f SubmitTaskStateChange)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SubmitTaskStateChange
-> f SubmitTaskStateChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
submitTaskStateChange_pullStoppedAt :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe Prelude.UTCTime)
submitTaskStateChange_pullStoppedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_pullStoppedAt = (SubmitTaskStateChange -> Maybe POSIX)
-> (SubmitTaskStateChange -> Maybe POSIX -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe POSIX
pullStoppedAt :: Maybe POSIX
$sel:pullStoppedAt:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe POSIX
pullStoppedAt} -> Maybe POSIX
pullStoppedAt) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe POSIX
a -> SubmitTaskStateChange
s {$sel:pullStoppedAt:SubmitTaskStateChange' :: Maybe POSIX
pullStoppedAt = Maybe POSIX
a} :: SubmitTaskStateChange) ((Maybe POSIX -> f (Maybe POSIX))
-> SubmitTaskStateChange -> f SubmitTaskStateChange)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SubmitTaskStateChange
-> f SubmitTaskStateChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
submitTaskStateChange_containers :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe [ContainerStateChange])
submitTaskStateChange_containers :: (Maybe [ContainerStateChange] -> f (Maybe [ContainerStateChange]))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_containers = (SubmitTaskStateChange -> Maybe [ContainerStateChange])
-> (SubmitTaskStateChange
-> Maybe [ContainerStateChange] -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe [ContainerStateChange])
(Maybe [ContainerStateChange])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe [ContainerStateChange]
containers :: Maybe [ContainerStateChange]
$sel:containers:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe [ContainerStateChange]
containers} -> Maybe [ContainerStateChange]
containers) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe [ContainerStateChange]
a -> SubmitTaskStateChange
s {$sel:containers:SubmitTaskStateChange' :: Maybe [ContainerStateChange]
containers = Maybe [ContainerStateChange]
a} :: SubmitTaskStateChange) ((Maybe [ContainerStateChange] -> f (Maybe [ContainerStateChange]))
-> SubmitTaskStateChange -> f SubmitTaskStateChange)
-> ((Maybe [ContainerStateChange]
-> f (Maybe [ContainerStateChange]))
-> Maybe [ContainerStateChange]
-> f (Maybe [ContainerStateChange]))
-> (Maybe [ContainerStateChange]
-> f (Maybe [ContainerStateChange]))
-> SubmitTaskStateChange
-> f SubmitTaskStateChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[ContainerStateChange]
[ContainerStateChange]
[ContainerStateChange]
[ContainerStateChange]
-> Iso
(Maybe [ContainerStateChange])
(Maybe [ContainerStateChange])
(Maybe [ContainerStateChange])
(Maybe [ContainerStateChange])
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
[ContainerStateChange]
[ContainerStateChange]
[ContainerStateChange]
[ContainerStateChange]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
submitTaskStateChange_reason :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe Prelude.Text)
submitTaskStateChange_reason :: (Maybe Text -> f (Maybe Text))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_reason = (SubmitTaskStateChange -> Maybe Text)
-> (SubmitTaskStateChange -> Maybe Text -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe Text
reason :: Maybe Text
$sel:reason:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe Text
reason} -> Maybe Text
reason) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe Text
a -> SubmitTaskStateChange
s {$sel:reason:SubmitTaskStateChange' :: Maybe Text
reason = Maybe Text
a} :: SubmitTaskStateChange)
submitTaskStateChange_task :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe Prelude.Text)
submitTaskStateChange_task :: (Maybe Text -> f (Maybe Text))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_task = (SubmitTaskStateChange -> Maybe Text)
-> (SubmitTaskStateChange -> Maybe Text -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe Text
task :: Maybe Text
$sel:task:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe Text
task} -> Maybe Text
task) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe Text
a -> SubmitTaskStateChange
s {$sel:task:SubmitTaskStateChange' :: Maybe Text
task = Maybe Text
a} :: SubmitTaskStateChange)
submitTaskStateChange_pullStartedAt :: Lens.Lens' SubmitTaskStateChange (Prelude.Maybe Prelude.UTCTime)
submitTaskStateChange_pullStartedAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> SubmitTaskStateChange -> f SubmitTaskStateChange
submitTaskStateChange_pullStartedAt = (SubmitTaskStateChange -> Maybe POSIX)
-> (SubmitTaskStateChange -> Maybe POSIX -> SubmitTaskStateChange)
-> Lens
SubmitTaskStateChange
SubmitTaskStateChange
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChange' {Maybe POSIX
pullStartedAt :: Maybe POSIX
$sel:pullStartedAt:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe POSIX
pullStartedAt} -> Maybe POSIX
pullStartedAt) (\s :: SubmitTaskStateChange
s@SubmitTaskStateChange' {} Maybe POSIX
a -> SubmitTaskStateChange
s {$sel:pullStartedAt:SubmitTaskStateChange' :: Maybe POSIX
pullStartedAt = Maybe POSIX
a} :: SubmitTaskStateChange) ((Maybe POSIX -> f (Maybe POSIX))
-> SubmitTaskStateChange -> f SubmitTaskStateChange)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> SubmitTaskStateChange
-> f SubmitTaskStateChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
instance Core.AWSRequest SubmitTaskStateChange where
type
AWSResponse SubmitTaskStateChange =
SubmitTaskStateChangeResponse
request :: SubmitTaskStateChange -> Request SubmitTaskStateChange
request = Service -> SubmitTaskStateChange -> Request SubmitTaskStateChange
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy SubmitTaskStateChange
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SubmitTaskStateChange)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse SubmitTaskStateChange))
-> Logger
-> Service
-> Proxy SubmitTaskStateChange
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SubmitTaskStateChange)))
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 -> Int -> SubmitTaskStateChangeResponse
SubmitTaskStateChangeResponse'
(Maybe Text -> Int -> SubmitTaskStateChangeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> SubmitTaskStateChangeResponse)
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
"acknowledgment")
Either String (Int -> SubmitTaskStateChangeResponse)
-> Either String Int -> Either String SubmitTaskStateChangeResponse
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 SubmitTaskStateChange
instance Prelude.NFData SubmitTaskStateChange
instance Core.ToHeaders SubmitTaskStateChange where
toHeaders :: SubmitTaskStateChange -> ResponseHeaders
toHeaders =
ResponseHeaders -> SubmitTaskStateChange -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonEC2ContainerServiceV20141113.SubmitTaskStateChange" ::
Prelude.ByteString
),
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 SubmitTaskStateChange where
toJSON :: SubmitTaskStateChange -> Value
toJSON SubmitTaskStateChange' {Maybe [AttachmentStateChange]
Maybe [ManagedAgentStateChange]
Maybe [ContainerStateChange]
Maybe Text
Maybe POSIX
pullStartedAt :: Maybe POSIX
task :: Maybe Text
reason :: Maybe Text
containers :: Maybe [ContainerStateChange]
pullStoppedAt :: Maybe POSIX
executionStoppedAt :: Maybe POSIX
attachments :: Maybe [AttachmentStateChange]
cluster :: Maybe Text
managedAgents :: Maybe [ManagedAgentStateChange]
status :: Maybe Text
$sel:pullStartedAt:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe POSIX
$sel:task:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe Text
$sel:reason:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe Text
$sel:containers:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe [ContainerStateChange]
$sel:pullStoppedAt:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe POSIX
$sel:executionStoppedAt:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe POSIX
$sel:attachments:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe [AttachmentStateChange]
$sel:cluster:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe Text
$sel:managedAgents:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe [ManagedAgentStateChange]
$sel:status:SubmitTaskStateChange' :: SubmitTaskStateChange -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"status" 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
status,
(Text
"managedAgents" Text -> [ManagedAgentStateChange] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ManagedAgentStateChange] -> Pair)
-> Maybe [ManagedAgentStateChange] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ManagedAgentStateChange]
managedAgents,
(Text
"cluster" 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
cluster,
(Text
"attachments" Text -> [AttachmentStateChange] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([AttachmentStateChange] -> Pair)
-> Maybe [AttachmentStateChange] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [AttachmentStateChange]
attachments,
(Text
"executionStoppedAt" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
executionStoppedAt,
(Text
"pullStoppedAt" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
pullStoppedAt,
(Text
"containers" Text -> [ContainerStateChange] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([ContainerStateChange] -> Pair)
-> Maybe [ContainerStateChange] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ContainerStateChange]
containers,
(Text
"reason" 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
reason,
(Text
"task" 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
task,
(Text
"pullStartedAt" Text -> POSIX -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (POSIX -> Pair) -> Maybe POSIX -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe POSIX
pullStartedAt
]
)
instance Core.ToPath SubmitTaskStateChange where
toPath :: SubmitTaskStateChange -> ByteString
toPath = ByteString -> SubmitTaskStateChange -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SubmitTaskStateChange where
toQuery :: SubmitTaskStateChange -> QueryString
toQuery = QueryString -> SubmitTaskStateChange -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SubmitTaskStateChangeResponse = SubmitTaskStateChangeResponse'
{
SubmitTaskStateChangeResponse -> Maybe Text
acknowledgment :: Prelude.Maybe Prelude.Text,
SubmitTaskStateChangeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SubmitTaskStateChangeResponse
-> SubmitTaskStateChangeResponse -> Bool
(SubmitTaskStateChangeResponse
-> SubmitTaskStateChangeResponse -> Bool)
-> (SubmitTaskStateChangeResponse
-> SubmitTaskStateChangeResponse -> Bool)
-> Eq SubmitTaskStateChangeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubmitTaskStateChangeResponse
-> SubmitTaskStateChangeResponse -> Bool
$c/= :: SubmitTaskStateChangeResponse
-> SubmitTaskStateChangeResponse -> Bool
== :: SubmitTaskStateChangeResponse
-> SubmitTaskStateChangeResponse -> Bool
$c== :: SubmitTaskStateChangeResponse
-> SubmitTaskStateChangeResponse -> Bool
Prelude.Eq, ReadPrec [SubmitTaskStateChangeResponse]
ReadPrec SubmitTaskStateChangeResponse
Int -> ReadS SubmitTaskStateChangeResponse
ReadS [SubmitTaskStateChangeResponse]
(Int -> ReadS SubmitTaskStateChangeResponse)
-> ReadS [SubmitTaskStateChangeResponse]
-> ReadPrec SubmitTaskStateChangeResponse
-> ReadPrec [SubmitTaskStateChangeResponse]
-> Read SubmitTaskStateChangeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SubmitTaskStateChangeResponse]
$creadListPrec :: ReadPrec [SubmitTaskStateChangeResponse]
readPrec :: ReadPrec SubmitTaskStateChangeResponse
$creadPrec :: ReadPrec SubmitTaskStateChangeResponse
readList :: ReadS [SubmitTaskStateChangeResponse]
$creadList :: ReadS [SubmitTaskStateChangeResponse]
readsPrec :: Int -> ReadS SubmitTaskStateChangeResponse
$creadsPrec :: Int -> ReadS SubmitTaskStateChangeResponse
Prelude.Read, Int -> SubmitTaskStateChangeResponse -> ShowS
[SubmitTaskStateChangeResponse] -> ShowS
SubmitTaskStateChangeResponse -> String
(Int -> SubmitTaskStateChangeResponse -> ShowS)
-> (SubmitTaskStateChangeResponse -> String)
-> ([SubmitTaskStateChangeResponse] -> ShowS)
-> Show SubmitTaskStateChangeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubmitTaskStateChangeResponse] -> ShowS
$cshowList :: [SubmitTaskStateChangeResponse] -> ShowS
show :: SubmitTaskStateChangeResponse -> String
$cshow :: SubmitTaskStateChangeResponse -> String
showsPrec :: Int -> SubmitTaskStateChangeResponse -> ShowS
$cshowsPrec :: Int -> SubmitTaskStateChangeResponse -> ShowS
Prelude.Show, (forall x.
SubmitTaskStateChangeResponse
-> Rep SubmitTaskStateChangeResponse x)
-> (forall x.
Rep SubmitTaskStateChangeResponse x
-> SubmitTaskStateChangeResponse)
-> Generic SubmitTaskStateChangeResponse
forall x.
Rep SubmitTaskStateChangeResponse x
-> SubmitTaskStateChangeResponse
forall x.
SubmitTaskStateChangeResponse
-> Rep SubmitTaskStateChangeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SubmitTaskStateChangeResponse x
-> SubmitTaskStateChangeResponse
$cfrom :: forall x.
SubmitTaskStateChangeResponse
-> Rep SubmitTaskStateChangeResponse x
Prelude.Generic)
newSubmitTaskStateChangeResponse ::
Prelude.Int ->
SubmitTaskStateChangeResponse
newSubmitTaskStateChangeResponse :: Int -> SubmitTaskStateChangeResponse
newSubmitTaskStateChangeResponse Int
pHttpStatus_ =
SubmitTaskStateChangeResponse' :: Maybe Text -> Int -> SubmitTaskStateChangeResponse
SubmitTaskStateChangeResponse'
{ $sel:acknowledgment:SubmitTaskStateChangeResponse' :: Maybe Text
acknowledgment =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SubmitTaskStateChangeResponse' :: Int
httpStatus = Int
pHttpStatus_
}
submitTaskStateChangeResponse_acknowledgment :: Lens.Lens' SubmitTaskStateChangeResponse (Prelude.Maybe Prelude.Text)
submitTaskStateChangeResponse_acknowledgment :: (Maybe Text -> f (Maybe Text))
-> SubmitTaskStateChangeResponse -> f SubmitTaskStateChangeResponse
submitTaskStateChangeResponse_acknowledgment = (SubmitTaskStateChangeResponse -> Maybe Text)
-> (SubmitTaskStateChangeResponse
-> Maybe Text -> SubmitTaskStateChangeResponse)
-> Lens
SubmitTaskStateChangeResponse
SubmitTaskStateChangeResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChangeResponse' {Maybe Text
acknowledgment :: Maybe Text
$sel:acknowledgment:SubmitTaskStateChangeResponse' :: SubmitTaskStateChangeResponse -> Maybe Text
acknowledgment} -> Maybe Text
acknowledgment) (\s :: SubmitTaskStateChangeResponse
s@SubmitTaskStateChangeResponse' {} Maybe Text
a -> SubmitTaskStateChangeResponse
s {$sel:acknowledgment:SubmitTaskStateChangeResponse' :: Maybe Text
acknowledgment = Maybe Text
a} :: SubmitTaskStateChangeResponse)
submitTaskStateChangeResponse_httpStatus :: Lens.Lens' SubmitTaskStateChangeResponse Prelude.Int
submitTaskStateChangeResponse_httpStatus :: (Int -> f Int)
-> SubmitTaskStateChangeResponse -> f SubmitTaskStateChangeResponse
submitTaskStateChangeResponse_httpStatus = (SubmitTaskStateChangeResponse -> Int)
-> (SubmitTaskStateChangeResponse
-> Int -> SubmitTaskStateChangeResponse)
-> Lens
SubmitTaskStateChangeResponse SubmitTaskStateChangeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitTaskStateChangeResponse' {Int
httpStatus :: Int
$sel:httpStatus:SubmitTaskStateChangeResponse' :: SubmitTaskStateChangeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SubmitTaskStateChangeResponse
s@SubmitTaskStateChangeResponse' {} Int
a -> SubmitTaskStateChangeResponse
s {$sel:httpStatus:SubmitTaskStateChangeResponse' :: Int
httpStatus = Int
a} :: SubmitTaskStateChangeResponse)
instance Prelude.NFData SubmitTaskStateChangeResponse