{-# 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.SubmitContainerStateChange
(
SubmitContainerStateChange (..),
newSubmitContainerStateChange,
submitContainerStateChange_networkBindings,
submitContainerStateChange_status,
submitContainerStateChange_cluster,
submitContainerStateChange_containerName,
submitContainerStateChange_reason,
submitContainerStateChange_exitCode,
submitContainerStateChange_task,
submitContainerStateChange_runtimeId,
SubmitContainerStateChangeResponse (..),
newSubmitContainerStateChangeResponse,
submitContainerStateChangeResponse_acknowledgment,
submitContainerStateChangeResponse_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 SubmitContainerStateChange = SubmitContainerStateChange'
{
SubmitContainerStateChange -> Maybe [NetworkBinding]
networkBindings :: Prelude.Maybe [NetworkBinding],
SubmitContainerStateChange -> Maybe Text
status :: Prelude.Maybe Prelude.Text,
SubmitContainerStateChange -> Maybe Text
cluster :: Prelude.Maybe Prelude.Text,
SubmitContainerStateChange -> Maybe Text
containerName :: Prelude.Maybe Prelude.Text,
SubmitContainerStateChange -> Maybe Text
reason :: Prelude.Maybe Prelude.Text,
SubmitContainerStateChange -> Maybe Int
exitCode :: Prelude.Maybe Prelude.Int,
SubmitContainerStateChange -> Maybe Text
task :: Prelude.Maybe Prelude.Text,
SubmitContainerStateChange -> Maybe Text
runtimeId :: Prelude.Maybe Prelude.Text
}
deriving (SubmitContainerStateChange -> SubmitContainerStateChange -> Bool
(SubmitContainerStateChange -> SubmitContainerStateChange -> Bool)
-> (SubmitContainerStateChange
-> SubmitContainerStateChange -> Bool)
-> Eq SubmitContainerStateChange
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubmitContainerStateChange -> SubmitContainerStateChange -> Bool
$c/= :: SubmitContainerStateChange -> SubmitContainerStateChange -> Bool
== :: SubmitContainerStateChange -> SubmitContainerStateChange -> Bool
$c== :: SubmitContainerStateChange -> SubmitContainerStateChange -> Bool
Prelude.Eq, ReadPrec [SubmitContainerStateChange]
ReadPrec SubmitContainerStateChange
Int -> ReadS SubmitContainerStateChange
ReadS [SubmitContainerStateChange]
(Int -> ReadS SubmitContainerStateChange)
-> ReadS [SubmitContainerStateChange]
-> ReadPrec SubmitContainerStateChange
-> ReadPrec [SubmitContainerStateChange]
-> Read SubmitContainerStateChange
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SubmitContainerStateChange]
$creadListPrec :: ReadPrec [SubmitContainerStateChange]
readPrec :: ReadPrec SubmitContainerStateChange
$creadPrec :: ReadPrec SubmitContainerStateChange
readList :: ReadS [SubmitContainerStateChange]
$creadList :: ReadS [SubmitContainerStateChange]
readsPrec :: Int -> ReadS SubmitContainerStateChange
$creadsPrec :: Int -> ReadS SubmitContainerStateChange
Prelude.Read, Int -> SubmitContainerStateChange -> ShowS
[SubmitContainerStateChange] -> ShowS
SubmitContainerStateChange -> String
(Int -> SubmitContainerStateChange -> ShowS)
-> (SubmitContainerStateChange -> String)
-> ([SubmitContainerStateChange] -> ShowS)
-> Show SubmitContainerStateChange
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubmitContainerStateChange] -> ShowS
$cshowList :: [SubmitContainerStateChange] -> ShowS
show :: SubmitContainerStateChange -> String
$cshow :: SubmitContainerStateChange -> String
showsPrec :: Int -> SubmitContainerStateChange -> ShowS
$cshowsPrec :: Int -> SubmitContainerStateChange -> ShowS
Prelude.Show, (forall x.
SubmitContainerStateChange -> Rep SubmitContainerStateChange x)
-> (forall x.
Rep SubmitContainerStateChange x -> SubmitContainerStateChange)
-> Generic SubmitContainerStateChange
forall x.
Rep SubmitContainerStateChange x -> SubmitContainerStateChange
forall x.
SubmitContainerStateChange -> Rep SubmitContainerStateChange x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SubmitContainerStateChange x -> SubmitContainerStateChange
$cfrom :: forall x.
SubmitContainerStateChange -> Rep SubmitContainerStateChange x
Prelude.Generic)
newSubmitContainerStateChange ::
SubmitContainerStateChange
newSubmitContainerStateChange :: SubmitContainerStateChange
newSubmitContainerStateChange =
SubmitContainerStateChange' :: Maybe [NetworkBinding]
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> SubmitContainerStateChange
SubmitContainerStateChange'
{ $sel:networkBindings:SubmitContainerStateChange' :: Maybe [NetworkBinding]
networkBindings =
Maybe [NetworkBinding]
forall a. Maybe a
Prelude.Nothing,
$sel:status:SubmitContainerStateChange' :: Maybe Text
status = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cluster:SubmitContainerStateChange' :: Maybe Text
cluster = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:containerName:SubmitContainerStateChange' :: Maybe Text
containerName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reason:SubmitContainerStateChange' :: Maybe Text
reason = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:exitCode:SubmitContainerStateChange' :: Maybe Int
exitCode = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:task:SubmitContainerStateChange' :: Maybe Text
task = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:runtimeId:SubmitContainerStateChange' :: Maybe Text
runtimeId = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
submitContainerStateChange_networkBindings :: Lens.Lens' SubmitContainerStateChange (Prelude.Maybe [NetworkBinding])
submitContainerStateChange_networkBindings :: (Maybe [NetworkBinding] -> f (Maybe [NetworkBinding]))
-> SubmitContainerStateChange -> f SubmitContainerStateChange
submitContainerStateChange_networkBindings = (SubmitContainerStateChange -> Maybe [NetworkBinding])
-> (SubmitContainerStateChange
-> Maybe [NetworkBinding] -> SubmitContainerStateChange)
-> Lens
SubmitContainerStateChange
SubmitContainerStateChange
(Maybe [NetworkBinding])
(Maybe [NetworkBinding])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChange' {Maybe [NetworkBinding]
networkBindings :: Maybe [NetworkBinding]
$sel:networkBindings:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe [NetworkBinding]
networkBindings} -> Maybe [NetworkBinding]
networkBindings) (\s :: SubmitContainerStateChange
s@SubmitContainerStateChange' {} Maybe [NetworkBinding]
a -> SubmitContainerStateChange
s {$sel:networkBindings:SubmitContainerStateChange' :: Maybe [NetworkBinding]
networkBindings = Maybe [NetworkBinding]
a} :: SubmitContainerStateChange) ((Maybe [NetworkBinding] -> f (Maybe [NetworkBinding]))
-> SubmitContainerStateChange -> f SubmitContainerStateChange)
-> ((Maybe [NetworkBinding] -> f (Maybe [NetworkBinding]))
-> Maybe [NetworkBinding] -> f (Maybe [NetworkBinding]))
-> (Maybe [NetworkBinding] -> f (Maybe [NetworkBinding]))
-> SubmitContainerStateChange
-> f SubmitContainerStateChange
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[NetworkBinding] [NetworkBinding] [NetworkBinding] [NetworkBinding]
-> Iso
(Maybe [NetworkBinding])
(Maybe [NetworkBinding])
(Maybe [NetworkBinding])
(Maybe [NetworkBinding])
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
[NetworkBinding] [NetworkBinding] [NetworkBinding] [NetworkBinding]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
submitContainerStateChange_status :: Lens.Lens' SubmitContainerStateChange (Prelude.Maybe Prelude.Text)
submitContainerStateChange_status :: (Maybe Text -> f (Maybe Text))
-> SubmitContainerStateChange -> f SubmitContainerStateChange
submitContainerStateChange_status = (SubmitContainerStateChange -> Maybe Text)
-> (SubmitContainerStateChange
-> Maybe Text -> SubmitContainerStateChange)
-> Lens
SubmitContainerStateChange
SubmitContainerStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChange' {Maybe Text
status :: Maybe Text
$sel:status:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
status} -> Maybe Text
status) (\s :: SubmitContainerStateChange
s@SubmitContainerStateChange' {} Maybe Text
a -> SubmitContainerStateChange
s {$sel:status:SubmitContainerStateChange' :: Maybe Text
status = Maybe Text
a} :: SubmitContainerStateChange)
submitContainerStateChange_cluster :: Lens.Lens' SubmitContainerStateChange (Prelude.Maybe Prelude.Text)
submitContainerStateChange_cluster :: (Maybe Text -> f (Maybe Text))
-> SubmitContainerStateChange -> f SubmitContainerStateChange
submitContainerStateChange_cluster = (SubmitContainerStateChange -> Maybe Text)
-> (SubmitContainerStateChange
-> Maybe Text -> SubmitContainerStateChange)
-> Lens
SubmitContainerStateChange
SubmitContainerStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChange' {Maybe Text
cluster :: Maybe Text
$sel:cluster:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
cluster} -> Maybe Text
cluster) (\s :: SubmitContainerStateChange
s@SubmitContainerStateChange' {} Maybe Text
a -> SubmitContainerStateChange
s {$sel:cluster:SubmitContainerStateChange' :: Maybe Text
cluster = Maybe Text
a} :: SubmitContainerStateChange)
submitContainerStateChange_containerName :: Lens.Lens' SubmitContainerStateChange (Prelude.Maybe Prelude.Text)
submitContainerStateChange_containerName :: (Maybe Text -> f (Maybe Text))
-> SubmitContainerStateChange -> f SubmitContainerStateChange
submitContainerStateChange_containerName = (SubmitContainerStateChange -> Maybe Text)
-> (SubmitContainerStateChange
-> Maybe Text -> SubmitContainerStateChange)
-> Lens
SubmitContainerStateChange
SubmitContainerStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChange' {Maybe Text
containerName :: Maybe Text
$sel:containerName:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
containerName} -> Maybe Text
containerName) (\s :: SubmitContainerStateChange
s@SubmitContainerStateChange' {} Maybe Text
a -> SubmitContainerStateChange
s {$sel:containerName:SubmitContainerStateChange' :: Maybe Text
containerName = Maybe Text
a} :: SubmitContainerStateChange)
submitContainerStateChange_reason :: Lens.Lens' SubmitContainerStateChange (Prelude.Maybe Prelude.Text)
submitContainerStateChange_reason :: (Maybe Text -> f (Maybe Text))
-> SubmitContainerStateChange -> f SubmitContainerStateChange
submitContainerStateChange_reason = (SubmitContainerStateChange -> Maybe Text)
-> (SubmitContainerStateChange
-> Maybe Text -> SubmitContainerStateChange)
-> Lens
SubmitContainerStateChange
SubmitContainerStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChange' {Maybe Text
reason :: Maybe Text
$sel:reason:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
reason} -> Maybe Text
reason) (\s :: SubmitContainerStateChange
s@SubmitContainerStateChange' {} Maybe Text
a -> SubmitContainerStateChange
s {$sel:reason:SubmitContainerStateChange' :: Maybe Text
reason = Maybe Text
a} :: SubmitContainerStateChange)
submitContainerStateChange_exitCode :: Lens.Lens' SubmitContainerStateChange (Prelude.Maybe Prelude.Int)
submitContainerStateChange_exitCode :: (Maybe Int -> f (Maybe Int))
-> SubmitContainerStateChange -> f SubmitContainerStateChange
submitContainerStateChange_exitCode = (SubmitContainerStateChange -> Maybe Int)
-> (SubmitContainerStateChange
-> Maybe Int -> SubmitContainerStateChange)
-> Lens
SubmitContainerStateChange
SubmitContainerStateChange
(Maybe Int)
(Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChange' {Maybe Int
exitCode :: Maybe Int
$sel:exitCode:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Int
exitCode} -> Maybe Int
exitCode) (\s :: SubmitContainerStateChange
s@SubmitContainerStateChange' {} Maybe Int
a -> SubmitContainerStateChange
s {$sel:exitCode:SubmitContainerStateChange' :: Maybe Int
exitCode = Maybe Int
a} :: SubmitContainerStateChange)
submitContainerStateChange_task :: Lens.Lens' SubmitContainerStateChange (Prelude.Maybe Prelude.Text)
submitContainerStateChange_task :: (Maybe Text -> f (Maybe Text))
-> SubmitContainerStateChange -> f SubmitContainerStateChange
submitContainerStateChange_task = (SubmitContainerStateChange -> Maybe Text)
-> (SubmitContainerStateChange
-> Maybe Text -> SubmitContainerStateChange)
-> Lens
SubmitContainerStateChange
SubmitContainerStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChange' {Maybe Text
task :: Maybe Text
$sel:task:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
task} -> Maybe Text
task) (\s :: SubmitContainerStateChange
s@SubmitContainerStateChange' {} Maybe Text
a -> SubmitContainerStateChange
s {$sel:task:SubmitContainerStateChange' :: Maybe Text
task = Maybe Text
a} :: SubmitContainerStateChange)
submitContainerStateChange_runtimeId :: Lens.Lens' SubmitContainerStateChange (Prelude.Maybe Prelude.Text)
submitContainerStateChange_runtimeId :: (Maybe Text -> f (Maybe Text))
-> SubmitContainerStateChange -> f SubmitContainerStateChange
submitContainerStateChange_runtimeId = (SubmitContainerStateChange -> Maybe Text)
-> (SubmitContainerStateChange
-> Maybe Text -> SubmitContainerStateChange)
-> Lens
SubmitContainerStateChange
SubmitContainerStateChange
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChange' {Maybe Text
runtimeId :: Maybe Text
$sel:runtimeId:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
runtimeId} -> Maybe Text
runtimeId) (\s :: SubmitContainerStateChange
s@SubmitContainerStateChange' {} Maybe Text
a -> SubmitContainerStateChange
s {$sel:runtimeId:SubmitContainerStateChange' :: Maybe Text
runtimeId = Maybe Text
a} :: SubmitContainerStateChange)
instance Core.AWSRequest SubmitContainerStateChange where
type
AWSResponse SubmitContainerStateChange =
SubmitContainerStateChangeResponse
request :: SubmitContainerStateChange -> Request SubmitContainerStateChange
request = Service
-> SubmitContainerStateChange -> Request SubmitContainerStateChange
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy SubmitContainerStateChange
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SubmitContainerStateChange)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse SubmitContainerStateChange))
-> Logger
-> Service
-> Proxy SubmitContainerStateChange
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse SubmitContainerStateChange)))
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 -> SubmitContainerStateChangeResponse
SubmitContainerStateChangeResponse'
(Maybe Text -> Int -> SubmitContainerStateChangeResponse)
-> Either String (Maybe Text)
-> Either String (Int -> SubmitContainerStateChangeResponse)
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 -> SubmitContainerStateChangeResponse)
-> Either String Int
-> Either String SubmitContainerStateChangeResponse
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 SubmitContainerStateChange
instance Prelude.NFData SubmitContainerStateChange
instance Core.ToHeaders SubmitContainerStateChange where
toHeaders :: SubmitContainerStateChange -> ResponseHeaders
toHeaders =
ResponseHeaders -> SubmitContainerStateChange -> 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.SubmitContainerStateChange" ::
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 SubmitContainerStateChange where
toJSON :: SubmitContainerStateChange -> Value
toJSON SubmitContainerStateChange' {Maybe Int
Maybe [NetworkBinding]
Maybe Text
runtimeId :: Maybe Text
task :: Maybe Text
exitCode :: Maybe Int
reason :: Maybe Text
containerName :: Maybe Text
cluster :: Maybe Text
status :: Maybe Text
networkBindings :: Maybe [NetworkBinding]
$sel:runtimeId:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
$sel:task:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
$sel:exitCode:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Int
$sel:reason:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
$sel:containerName:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
$sel:cluster:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
$sel:status:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe Text
$sel:networkBindings:SubmitContainerStateChange' :: SubmitContainerStateChange -> Maybe [NetworkBinding]
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"networkBindings" Text -> [NetworkBinding] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
([NetworkBinding] -> Pair) -> Maybe [NetworkBinding] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [NetworkBinding]
networkBindings,
(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
"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
"containerName" 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
containerName,
(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
"exitCode" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
exitCode,
(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
"runtimeId" 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
runtimeId
]
)
instance Core.ToPath SubmitContainerStateChange where
toPath :: SubmitContainerStateChange -> ByteString
toPath = ByteString -> SubmitContainerStateChange -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery SubmitContainerStateChange where
toQuery :: SubmitContainerStateChange -> QueryString
toQuery = QueryString -> SubmitContainerStateChange -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data SubmitContainerStateChangeResponse = SubmitContainerStateChangeResponse'
{
SubmitContainerStateChangeResponse -> Maybe Text
acknowledgment :: Prelude.Maybe Prelude.Text,
SubmitContainerStateChangeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (SubmitContainerStateChangeResponse
-> SubmitContainerStateChangeResponse -> Bool
(SubmitContainerStateChangeResponse
-> SubmitContainerStateChangeResponse -> Bool)
-> (SubmitContainerStateChangeResponse
-> SubmitContainerStateChangeResponse -> Bool)
-> Eq SubmitContainerStateChangeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SubmitContainerStateChangeResponse
-> SubmitContainerStateChangeResponse -> Bool
$c/= :: SubmitContainerStateChangeResponse
-> SubmitContainerStateChangeResponse -> Bool
== :: SubmitContainerStateChangeResponse
-> SubmitContainerStateChangeResponse -> Bool
$c== :: SubmitContainerStateChangeResponse
-> SubmitContainerStateChangeResponse -> Bool
Prelude.Eq, ReadPrec [SubmitContainerStateChangeResponse]
ReadPrec SubmitContainerStateChangeResponse
Int -> ReadS SubmitContainerStateChangeResponse
ReadS [SubmitContainerStateChangeResponse]
(Int -> ReadS SubmitContainerStateChangeResponse)
-> ReadS [SubmitContainerStateChangeResponse]
-> ReadPrec SubmitContainerStateChangeResponse
-> ReadPrec [SubmitContainerStateChangeResponse]
-> Read SubmitContainerStateChangeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SubmitContainerStateChangeResponse]
$creadListPrec :: ReadPrec [SubmitContainerStateChangeResponse]
readPrec :: ReadPrec SubmitContainerStateChangeResponse
$creadPrec :: ReadPrec SubmitContainerStateChangeResponse
readList :: ReadS [SubmitContainerStateChangeResponse]
$creadList :: ReadS [SubmitContainerStateChangeResponse]
readsPrec :: Int -> ReadS SubmitContainerStateChangeResponse
$creadsPrec :: Int -> ReadS SubmitContainerStateChangeResponse
Prelude.Read, Int -> SubmitContainerStateChangeResponse -> ShowS
[SubmitContainerStateChangeResponse] -> ShowS
SubmitContainerStateChangeResponse -> String
(Int -> SubmitContainerStateChangeResponse -> ShowS)
-> (SubmitContainerStateChangeResponse -> String)
-> ([SubmitContainerStateChangeResponse] -> ShowS)
-> Show SubmitContainerStateChangeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SubmitContainerStateChangeResponse] -> ShowS
$cshowList :: [SubmitContainerStateChangeResponse] -> ShowS
show :: SubmitContainerStateChangeResponse -> String
$cshow :: SubmitContainerStateChangeResponse -> String
showsPrec :: Int -> SubmitContainerStateChangeResponse -> ShowS
$cshowsPrec :: Int -> SubmitContainerStateChangeResponse -> ShowS
Prelude.Show, (forall x.
SubmitContainerStateChangeResponse
-> Rep SubmitContainerStateChangeResponse x)
-> (forall x.
Rep SubmitContainerStateChangeResponse x
-> SubmitContainerStateChangeResponse)
-> Generic SubmitContainerStateChangeResponse
forall x.
Rep SubmitContainerStateChangeResponse x
-> SubmitContainerStateChangeResponse
forall x.
SubmitContainerStateChangeResponse
-> Rep SubmitContainerStateChangeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep SubmitContainerStateChangeResponse x
-> SubmitContainerStateChangeResponse
$cfrom :: forall x.
SubmitContainerStateChangeResponse
-> Rep SubmitContainerStateChangeResponse x
Prelude.Generic)
newSubmitContainerStateChangeResponse ::
Prelude.Int ->
SubmitContainerStateChangeResponse
newSubmitContainerStateChangeResponse :: Int -> SubmitContainerStateChangeResponse
newSubmitContainerStateChangeResponse Int
pHttpStatus_ =
SubmitContainerStateChangeResponse' :: Maybe Text -> Int -> SubmitContainerStateChangeResponse
SubmitContainerStateChangeResponse'
{ $sel:acknowledgment:SubmitContainerStateChangeResponse' :: Maybe Text
acknowledgment =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:SubmitContainerStateChangeResponse' :: Int
httpStatus = Int
pHttpStatus_
}
submitContainerStateChangeResponse_acknowledgment :: Lens.Lens' SubmitContainerStateChangeResponse (Prelude.Maybe Prelude.Text)
submitContainerStateChangeResponse_acknowledgment :: (Maybe Text -> f (Maybe Text))
-> SubmitContainerStateChangeResponse
-> f SubmitContainerStateChangeResponse
submitContainerStateChangeResponse_acknowledgment = (SubmitContainerStateChangeResponse -> Maybe Text)
-> (SubmitContainerStateChangeResponse
-> Maybe Text -> SubmitContainerStateChangeResponse)
-> Lens
SubmitContainerStateChangeResponse
SubmitContainerStateChangeResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChangeResponse' {Maybe Text
acknowledgment :: Maybe Text
$sel:acknowledgment:SubmitContainerStateChangeResponse' :: SubmitContainerStateChangeResponse -> Maybe Text
acknowledgment} -> Maybe Text
acknowledgment) (\s :: SubmitContainerStateChangeResponse
s@SubmitContainerStateChangeResponse' {} Maybe Text
a -> SubmitContainerStateChangeResponse
s {$sel:acknowledgment:SubmitContainerStateChangeResponse' :: Maybe Text
acknowledgment = Maybe Text
a} :: SubmitContainerStateChangeResponse)
submitContainerStateChangeResponse_httpStatus :: Lens.Lens' SubmitContainerStateChangeResponse Prelude.Int
submitContainerStateChangeResponse_httpStatus :: (Int -> f Int)
-> SubmitContainerStateChangeResponse
-> f SubmitContainerStateChangeResponse
submitContainerStateChangeResponse_httpStatus = (SubmitContainerStateChangeResponse -> Int)
-> (SubmitContainerStateChangeResponse
-> Int -> SubmitContainerStateChangeResponse)
-> Lens
SubmitContainerStateChangeResponse
SubmitContainerStateChangeResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SubmitContainerStateChangeResponse' {Int
httpStatus :: Int
$sel:httpStatus:SubmitContainerStateChangeResponse' :: SubmitContainerStateChangeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: SubmitContainerStateChangeResponse
s@SubmitContainerStateChangeResponse' {} Int
a -> SubmitContainerStateChangeResponse
s {$sel:httpStatus:SubmitContainerStateChangeResponse' :: Int
httpStatus = Int
a} :: SubmitContainerStateChangeResponse)
instance
Prelude.NFData
SubmitContainerStateChangeResponse