{-# 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.Connect.CreateAgentStatus
(
CreateAgentStatus (..),
newCreateAgentStatus,
createAgentStatus_displayOrder,
createAgentStatus_description,
createAgentStatus_tags,
createAgentStatus_instanceId,
createAgentStatus_name,
createAgentStatus_state,
CreateAgentStatusResponse (..),
newCreateAgentStatusResponse,
createAgentStatusResponse_agentStatusId,
createAgentStatusResponse_agentStatusARN,
createAgentStatusResponse_httpStatus,
)
where
import Amazonka.Connect.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 CreateAgentStatus = CreateAgentStatus'
{
CreateAgentStatus -> Maybe Natural
displayOrder :: Prelude.Maybe Prelude.Natural,
CreateAgentStatus -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateAgentStatus -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateAgentStatus -> Text
instanceId :: Prelude.Text,
CreateAgentStatus -> Text
name :: Prelude.Text,
CreateAgentStatus -> AgentStatusState
state :: AgentStatusState
}
deriving (CreateAgentStatus -> CreateAgentStatus -> Bool
(CreateAgentStatus -> CreateAgentStatus -> Bool)
-> (CreateAgentStatus -> CreateAgentStatus -> Bool)
-> Eq CreateAgentStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAgentStatus -> CreateAgentStatus -> Bool
$c/= :: CreateAgentStatus -> CreateAgentStatus -> Bool
== :: CreateAgentStatus -> CreateAgentStatus -> Bool
$c== :: CreateAgentStatus -> CreateAgentStatus -> Bool
Prelude.Eq, ReadPrec [CreateAgentStatus]
ReadPrec CreateAgentStatus
Int -> ReadS CreateAgentStatus
ReadS [CreateAgentStatus]
(Int -> ReadS CreateAgentStatus)
-> ReadS [CreateAgentStatus]
-> ReadPrec CreateAgentStatus
-> ReadPrec [CreateAgentStatus]
-> Read CreateAgentStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAgentStatus]
$creadListPrec :: ReadPrec [CreateAgentStatus]
readPrec :: ReadPrec CreateAgentStatus
$creadPrec :: ReadPrec CreateAgentStatus
readList :: ReadS [CreateAgentStatus]
$creadList :: ReadS [CreateAgentStatus]
readsPrec :: Int -> ReadS CreateAgentStatus
$creadsPrec :: Int -> ReadS CreateAgentStatus
Prelude.Read, Int -> CreateAgentStatus -> ShowS
[CreateAgentStatus] -> ShowS
CreateAgentStatus -> String
(Int -> CreateAgentStatus -> ShowS)
-> (CreateAgentStatus -> String)
-> ([CreateAgentStatus] -> ShowS)
-> Show CreateAgentStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAgentStatus] -> ShowS
$cshowList :: [CreateAgentStatus] -> ShowS
show :: CreateAgentStatus -> String
$cshow :: CreateAgentStatus -> String
showsPrec :: Int -> CreateAgentStatus -> ShowS
$cshowsPrec :: Int -> CreateAgentStatus -> ShowS
Prelude.Show, (forall x. CreateAgentStatus -> Rep CreateAgentStatus x)
-> (forall x. Rep CreateAgentStatus x -> CreateAgentStatus)
-> Generic CreateAgentStatus
forall x. Rep CreateAgentStatus x -> CreateAgentStatus
forall x. CreateAgentStatus -> Rep CreateAgentStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAgentStatus x -> CreateAgentStatus
$cfrom :: forall x. CreateAgentStatus -> Rep CreateAgentStatus x
Prelude.Generic)
newCreateAgentStatus ::
Prelude.Text ->
Prelude.Text ->
AgentStatusState ->
CreateAgentStatus
newCreateAgentStatus :: Text -> Text -> AgentStatusState -> CreateAgentStatus
newCreateAgentStatus Text
pInstanceId_ Text
pName_ AgentStatusState
pState_ =
CreateAgentStatus' :: Maybe Natural
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> Text
-> AgentStatusState
-> CreateAgentStatus
CreateAgentStatus'
{ $sel:displayOrder:CreateAgentStatus' :: Maybe Natural
displayOrder = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateAgentStatus' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateAgentStatus' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:CreateAgentStatus' :: Text
instanceId = Text
pInstanceId_,
$sel:name:CreateAgentStatus' :: Text
name = Text
pName_,
$sel:state:CreateAgentStatus' :: AgentStatusState
state = AgentStatusState
pState_
}
createAgentStatus_displayOrder :: Lens.Lens' CreateAgentStatus (Prelude.Maybe Prelude.Natural)
createAgentStatus_displayOrder :: (Maybe Natural -> f (Maybe Natural))
-> CreateAgentStatus -> f CreateAgentStatus
createAgentStatus_displayOrder = (CreateAgentStatus -> Maybe Natural)
-> (CreateAgentStatus -> Maybe Natural -> CreateAgentStatus)
-> Lens
CreateAgentStatus CreateAgentStatus (Maybe Natural) (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentStatus' {Maybe Natural
displayOrder :: Maybe Natural
$sel:displayOrder:CreateAgentStatus' :: CreateAgentStatus -> Maybe Natural
displayOrder} -> Maybe Natural
displayOrder) (\s :: CreateAgentStatus
s@CreateAgentStatus' {} Maybe Natural
a -> CreateAgentStatus
s {$sel:displayOrder:CreateAgentStatus' :: Maybe Natural
displayOrder = Maybe Natural
a} :: CreateAgentStatus)
createAgentStatus_description :: Lens.Lens' CreateAgentStatus (Prelude.Maybe Prelude.Text)
createAgentStatus_description :: (Maybe Text -> f (Maybe Text))
-> CreateAgentStatus -> f CreateAgentStatus
createAgentStatus_description = (CreateAgentStatus -> Maybe Text)
-> (CreateAgentStatus -> Maybe Text -> CreateAgentStatus)
-> Lens
CreateAgentStatus CreateAgentStatus (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentStatus' {Maybe Text
description :: Maybe Text
$sel:description:CreateAgentStatus' :: CreateAgentStatus -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateAgentStatus
s@CreateAgentStatus' {} Maybe Text
a -> CreateAgentStatus
s {$sel:description:CreateAgentStatus' :: Maybe Text
description = Maybe Text
a} :: CreateAgentStatus)
createAgentStatus_tags :: Lens.Lens' CreateAgentStatus (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createAgentStatus_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAgentStatus -> f CreateAgentStatus
createAgentStatus_tags = (CreateAgentStatus -> Maybe (HashMap Text Text))
-> (CreateAgentStatus
-> Maybe (HashMap Text Text) -> CreateAgentStatus)
-> Lens
CreateAgentStatus
CreateAgentStatus
(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 (\CreateAgentStatus' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateAgentStatus' :: CreateAgentStatus -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateAgentStatus
s@CreateAgentStatus' {} Maybe (HashMap Text Text)
a -> CreateAgentStatus
s {$sel:tags:CreateAgentStatus' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateAgentStatus) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateAgentStatus -> f CreateAgentStatus)
-> ((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)))
-> CreateAgentStatus
-> f CreateAgentStatus
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
createAgentStatus_instanceId :: Lens.Lens' CreateAgentStatus Prelude.Text
createAgentStatus_instanceId :: (Text -> f Text) -> CreateAgentStatus -> f CreateAgentStatus
createAgentStatus_instanceId = (CreateAgentStatus -> Text)
-> (CreateAgentStatus -> Text -> CreateAgentStatus)
-> Lens CreateAgentStatus CreateAgentStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentStatus' {Text
instanceId :: Text
$sel:instanceId:CreateAgentStatus' :: CreateAgentStatus -> Text
instanceId} -> Text
instanceId) (\s :: CreateAgentStatus
s@CreateAgentStatus' {} Text
a -> CreateAgentStatus
s {$sel:instanceId:CreateAgentStatus' :: Text
instanceId = Text
a} :: CreateAgentStatus)
createAgentStatus_name :: Lens.Lens' CreateAgentStatus Prelude.Text
createAgentStatus_name :: (Text -> f Text) -> CreateAgentStatus -> f CreateAgentStatus
createAgentStatus_name = (CreateAgentStatus -> Text)
-> (CreateAgentStatus -> Text -> CreateAgentStatus)
-> Lens CreateAgentStatus CreateAgentStatus Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentStatus' {Text
name :: Text
$sel:name:CreateAgentStatus' :: CreateAgentStatus -> Text
name} -> Text
name) (\s :: CreateAgentStatus
s@CreateAgentStatus' {} Text
a -> CreateAgentStatus
s {$sel:name:CreateAgentStatus' :: Text
name = Text
a} :: CreateAgentStatus)
createAgentStatus_state :: Lens.Lens' CreateAgentStatus AgentStatusState
createAgentStatus_state :: (AgentStatusState -> f AgentStatusState)
-> CreateAgentStatus -> f CreateAgentStatus
createAgentStatus_state = (CreateAgentStatus -> AgentStatusState)
-> (CreateAgentStatus -> AgentStatusState -> CreateAgentStatus)
-> Lens
CreateAgentStatus
CreateAgentStatus
AgentStatusState
AgentStatusState
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentStatus' {AgentStatusState
state :: AgentStatusState
$sel:state:CreateAgentStatus' :: CreateAgentStatus -> AgentStatusState
state} -> AgentStatusState
state) (\s :: CreateAgentStatus
s@CreateAgentStatus' {} AgentStatusState
a -> CreateAgentStatus
s {$sel:state:CreateAgentStatus' :: AgentStatusState
state = AgentStatusState
a} :: CreateAgentStatus)
instance Core.AWSRequest CreateAgentStatus where
type
AWSResponse CreateAgentStatus =
CreateAgentStatusResponse
request :: CreateAgentStatus -> Request CreateAgentStatus
request = Service -> CreateAgentStatus -> Request CreateAgentStatus
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateAgentStatus
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateAgentStatus)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateAgentStatus))
-> Logger
-> Service
-> Proxy CreateAgentStatus
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateAgentStatus)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text -> Maybe Text -> Int -> CreateAgentStatusResponse
CreateAgentStatusResponse'
(Maybe Text -> Maybe Text -> Int -> CreateAgentStatusResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateAgentStatusResponse)
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
"AgentStatusId")
Either String (Maybe Text -> Int -> CreateAgentStatusResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateAgentStatusResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"AgentStatusARN")
Either String (Int -> CreateAgentStatusResponse)
-> Either String Int -> Either String CreateAgentStatusResponse
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 CreateAgentStatus
instance Prelude.NFData CreateAgentStatus
instance Core.ToHeaders CreateAgentStatus where
toHeaders :: CreateAgentStatus -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateAgentStatus -> 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 CreateAgentStatus where
toJSON :: CreateAgentStatus -> Value
toJSON CreateAgentStatus' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Text
AgentStatusState
state :: AgentStatusState
name :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
displayOrder :: Maybe Natural
$sel:state:CreateAgentStatus' :: CreateAgentStatus -> AgentStatusState
$sel:name:CreateAgentStatus' :: CreateAgentStatus -> Text
$sel:instanceId:CreateAgentStatus' :: CreateAgentStatus -> Text
$sel:tags:CreateAgentStatus' :: CreateAgentStatus -> Maybe (HashMap Text Text)
$sel:description:CreateAgentStatus' :: CreateAgentStatus -> Maybe Text
$sel:displayOrder:CreateAgentStatus' :: CreateAgentStatus -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DisplayOrder" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
displayOrder,
(Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"State" Text -> AgentStatusState -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AgentStatusState
state)
]
)
instance Core.ToPath CreateAgentStatus where
toPath :: CreateAgentStatus -> ByteString
toPath CreateAgentStatus' {Maybe Natural
Maybe Text
Maybe (HashMap Text Text)
Text
AgentStatusState
state :: AgentStatusState
name :: Text
instanceId :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
displayOrder :: Maybe Natural
$sel:state:CreateAgentStatus' :: CreateAgentStatus -> AgentStatusState
$sel:name:CreateAgentStatus' :: CreateAgentStatus -> Text
$sel:instanceId:CreateAgentStatus' :: CreateAgentStatus -> Text
$sel:tags:CreateAgentStatus' :: CreateAgentStatus -> Maybe (HashMap Text Text)
$sel:description:CreateAgentStatus' :: CreateAgentStatus -> Maybe Text
$sel:displayOrder:CreateAgentStatus' :: CreateAgentStatus -> Maybe Natural
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/agent-status/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId]
instance Core.ToQuery CreateAgentStatus where
toQuery :: CreateAgentStatus -> QueryString
toQuery = QueryString -> CreateAgentStatus -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateAgentStatusResponse = CreateAgentStatusResponse'
{
CreateAgentStatusResponse -> Maybe Text
agentStatusId :: Prelude.Maybe Prelude.Text,
CreateAgentStatusResponse -> Maybe Text
agentStatusARN :: Prelude.Maybe Prelude.Text,
CreateAgentStatusResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateAgentStatusResponse -> CreateAgentStatusResponse -> Bool
(CreateAgentStatusResponse -> CreateAgentStatusResponse -> Bool)
-> (CreateAgentStatusResponse -> CreateAgentStatusResponse -> Bool)
-> Eq CreateAgentStatusResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAgentStatusResponse -> CreateAgentStatusResponse -> Bool
$c/= :: CreateAgentStatusResponse -> CreateAgentStatusResponse -> Bool
== :: CreateAgentStatusResponse -> CreateAgentStatusResponse -> Bool
$c== :: CreateAgentStatusResponse -> CreateAgentStatusResponse -> Bool
Prelude.Eq, ReadPrec [CreateAgentStatusResponse]
ReadPrec CreateAgentStatusResponse
Int -> ReadS CreateAgentStatusResponse
ReadS [CreateAgentStatusResponse]
(Int -> ReadS CreateAgentStatusResponse)
-> ReadS [CreateAgentStatusResponse]
-> ReadPrec CreateAgentStatusResponse
-> ReadPrec [CreateAgentStatusResponse]
-> Read CreateAgentStatusResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAgentStatusResponse]
$creadListPrec :: ReadPrec [CreateAgentStatusResponse]
readPrec :: ReadPrec CreateAgentStatusResponse
$creadPrec :: ReadPrec CreateAgentStatusResponse
readList :: ReadS [CreateAgentStatusResponse]
$creadList :: ReadS [CreateAgentStatusResponse]
readsPrec :: Int -> ReadS CreateAgentStatusResponse
$creadsPrec :: Int -> ReadS CreateAgentStatusResponse
Prelude.Read, Int -> CreateAgentStatusResponse -> ShowS
[CreateAgentStatusResponse] -> ShowS
CreateAgentStatusResponse -> String
(Int -> CreateAgentStatusResponse -> ShowS)
-> (CreateAgentStatusResponse -> String)
-> ([CreateAgentStatusResponse] -> ShowS)
-> Show CreateAgentStatusResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAgentStatusResponse] -> ShowS
$cshowList :: [CreateAgentStatusResponse] -> ShowS
show :: CreateAgentStatusResponse -> String
$cshow :: CreateAgentStatusResponse -> String
showsPrec :: Int -> CreateAgentStatusResponse -> ShowS
$cshowsPrec :: Int -> CreateAgentStatusResponse -> ShowS
Prelude.Show, (forall x.
CreateAgentStatusResponse -> Rep CreateAgentStatusResponse x)
-> (forall x.
Rep CreateAgentStatusResponse x -> CreateAgentStatusResponse)
-> Generic CreateAgentStatusResponse
forall x.
Rep CreateAgentStatusResponse x -> CreateAgentStatusResponse
forall x.
CreateAgentStatusResponse -> Rep CreateAgentStatusResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateAgentStatusResponse x -> CreateAgentStatusResponse
$cfrom :: forall x.
CreateAgentStatusResponse -> Rep CreateAgentStatusResponse x
Prelude.Generic)
newCreateAgentStatusResponse ::
Prelude.Int ->
CreateAgentStatusResponse
newCreateAgentStatusResponse :: Int -> CreateAgentStatusResponse
newCreateAgentStatusResponse Int
pHttpStatus_ =
CreateAgentStatusResponse' :: Maybe Text -> Maybe Text -> Int -> CreateAgentStatusResponse
CreateAgentStatusResponse'
{ $sel:agentStatusId:CreateAgentStatusResponse' :: Maybe Text
agentStatusId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:agentStatusARN:CreateAgentStatusResponse' :: Maybe Text
agentStatusARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateAgentStatusResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createAgentStatusResponse_agentStatusId :: Lens.Lens' CreateAgentStatusResponse (Prelude.Maybe Prelude.Text)
createAgentStatusResponse_agentStatusId :: (Maybe Text -> f (Maybe Text))
-> CreateAgentStatusResponse -> f CreateAgentStatusResponse
createAgentStatusResponse_agentStatusId = (CreateAgentStatusResponse -> Maybe Text)
-> (CreateAgentStatusResponse
-> Maybe Text -> CreateAgentStatusResponse)
-> Lens
CreateAgentStatusResponse
CreateAgentStatusResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentStatusResponse' {Maybe Text
agentStatusId :: Maybe Text
$sel:agentStatusId:CreateAgentStatusResponse' :: CreateAgentStatusResponse -> Maybe Text
agentStatusId} -> Maybe Text
agentStatusId) (\s :: CreateAgentStatusResponse
s@CreateAgentStatusResponse' {} Maybe Text
a -> CreateAgentStatusResponse
s {$sel:agentStatusId:CreateAgentStatusResponse' :: Maybe Text
agentStatusId = Maybe Text
a} :: CreateAgentStatusResponse)
createAgentStatusResponse_agentStatusARN :: Lens.Lens' CreateAgentStatusResponse (Prelude.Maybe Prelude.Text)
createAgentStatusResponse_agentStatusARN :: (Maybe Text -> f (Maybe Text))
-> CreateAgentStatusResponse -> f CreateAgentStatusResponse
createAgentStatusResponse_agentStatusARN = (CreateAgentStatusResponse -> Maybe Text)
-> (CreateAgentStatusResponse
-> Maybe Text -> CreateAgentStatusResponse)
-> Lens
CreateAgentStatusResponse
CreateAgentStatusResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentStatusResponse' {Maybe Text
agentStatusARN :: Maybe Text
$sel:agentStatusARN:CreateAgentStatusResponse' :: CreateAgentStatusResponse -> Maybe Text
agentStatusARN} -> Maybe Text
agentStatusARN) (\s :: CreateAgentStatusResponse
s@CreateAgentStatusResponse' {} Maybe Text
a -> CreateAgentStatusResponse
s {$sel:agentStatusARN:CreateAgentStatusResponse' :: Maybe Text
agentStatusARN = Maybe Text
a} :: CreateAgentStatusResponse)
createAgentStatusResponse_httpStatus :: Lens.Lens' CreateAgentStatusResponse Prelude.Int
createAgentStatusResponse_httpStatus :: (Int -> f Int)
-> CreateAgentStatusResponse -> f CreateAgentStatusResponse
createAgentStatusResponse_httpStatus = (CreateAgentStatusResponse -> Int)
-> (CreateAgentStatusResponse -> Int -> CreateAgentStatusResponse)
-> Lens CreateAgentStatusResponse CreateAgentStatusResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentStatusResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAgentStatusResponse' :: CreateAgentStatusResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAgentStatusResponse
s@CreateAgentStatusResponse' {} Int
a -> CreateAgentStatusResponse
s {$sel:httpStatus:CreateAgentStatusResponse' :: Int
httpStatus = Int
a} :: CreateAgentStatusResponse)
instance Prelude.NFData CreateAgentStatusResponse