{-# 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.DataSync.CreateAgent
(
CreateAgent (..),
newCreateAgent,
createAgent_securityGroupArns,
createAgent_subnetArns,
createAgent_agentName,
createAgent_vpcEndpointId,
createAgent_tags,
createAgent_activationKey,
CreateAgentResponse (..),
newCreateAgentResponse,
createAgentResponse_agentArn,
createAgentResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.DataSync.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 CreateAgent = CreateAgent'
{
CreateAgent -> Maybe (NonEmpty Text)
securityGroupArns :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateAgent -> Maybe (NonEmpty Text)
subnetArns :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
CreateAgent -> Maybe Text
agentName :: Prelude.Maybe Prelude.Text,
CreateAgent -> Maybe Text
vpcEndpointId :: Prelude.Maybe Prelude.Text,
CreateAgent -> Maybe [TagListEntry]
tags :: Prelude.Maybe [TagListEntry],
CreateAgent -> Text
activationKey :: Prelude.Text
}
deriving (CreateAgent -> CreateAgent -> Bool
(CreateAgent -> CreateAgent -> Bool)
-> (CreateAgent -> CreateAgent -> Bool) -> Eq CreateAgent
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAgent -> CreateAgent -> Bool
$c/= :: CreateAgent -> CreateAgent -> Bool
== :: CreateAgent -> CreateAgent -> Bool
$c== :: CreateAgent -> CreateAgent -> Bool
Prelude.Eq, ReadPrec [CreateAgent]
ReadPrec CreateAgent
Int -> ReadS CreateAgent
ReadS [CreateAgent]
(Int -> ReadS CreateAgent)
-> ReadS [CreateAgent]
-> ReadPrec CreateAgent
-> ReadPrec [CreateAgent]
-> Read CreateAgent
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAgent]
$creadListPrec :: ReadPrec [CreateAgent]
readPrec :: ReadPrec CreateAgent
$creadPrec :: ReadPrec CreateAgent
readList :: ReadS [CreateAgent]
$creadList :: ReadS [CreateAgent]
readsPrec :: Int -> ReadS CreateAgent
$creadsPrec :: Int -> ReadS CreateAgent
Prelude.Read, Int -> CreateAgent -> ShowS
[CreateAgent] -> ShowS
CreateAgent -> String
(Int -> CreateAgent -> ShowS)
-> (CreateAgent -> String)
-> ([CreateAgent] -> ShowS)
-> Show CreateAgent
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAgent] -> ShowS
$cshowList :: [CreateAgent] -> ShowS
show :: CreateAgent -> String
$cshow :: CreateAgent -> String
showsPrec :: Int -> CreateAgent -> ShowS
$cshowsPrec :: Int -> CreateAgent -> ShowS
Prelude.Show, (forall x. CreateAgent -> Rep CreateAgent x)
-> (forall x. Rep CreateAgent x -> CreateAgent)
-> Generic CreateAgent
forall x. Rep CreateAgent x -> CreateAgent
forall x. CreateAgent -> Rep CreateAgent x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAgent x -> CreateAgent
$cfrom :: forall x. CreateAgent -> Rep CreateAgent x
Prelude.Generic)
newCreateAgent ::
Prelude.Text ->
CreateAgent
newCreateAgent :: Text -> CreateAgent
newCreateAgent Text
pActivationKey_ =
CreateAgent' :: Maybe (NonEmpty Text)
-> Maybe (NonEmpty Text)
-> Maybe Text
-> Maybe Text
-> Maybe [TagListEntry]
-> Text
-> CreateAgent
CreateAgent'
{ $sel:securityGroupArns:CreateAgent' :: Maybe (NonEmpty Text)
securityGroupArns = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:subnetArns:CreateAgent' :: Maybe (NonEmpty Text)
subnetArns = Maybe (NonEmpty Text)
forall a. Maybe a
Prelude.Nothing,
$sel:agentName:CreateAgent' :: Maybe Text
agentName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:vpcEndpointId:CreateAgent' :: Maybe Text
vpcEndpointId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateAgent' :: Maybe [TagListEntry]
tags = Maybe [TagListEntry]
forall a. Maybe a
Prelude.Nothing,
$sel:activationKey:CreateAgent' :: Text
activationKey = Text
pActivationKey_
}
createAgent_securityGroupArns :: Lens.Lens' CreateAgent (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createAgent_securityGroupArns :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateAgent -> f CreateAgent
createAgent_securityGroupArns = (CreateAgent -> Maybe (NonEmpty Text))
-> (CreateAgent -> Maybe (NonEmpty Text) -> CreateAgent)
-> Lens
CreateAgent
CreateAgent
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgent' {Maybe (NonEmpty Text)
securityGroupArns :: Maybe (NonEmpty Text)
$sel:securityGroupArns:CreateAgent' :: CreateAgent -> Maybe (NonEmpty Text)
securityGroupArns} -> Maybe (NonEmpty Text)
securityGroupArns) (\s :: CreateAgent
s@CreateAgent' {} Maybe (NonEmpty Text)
a -> CreateAgent
s {$sel:securityGroupArns:CreateAgent' :: Maybe (NonEmpty Text)
securityGroupArns = Maybe (NonEmpty Text)
a} :: CreateAgent) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateAgent -> f CreateAgent)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateAgent
-> f CreateAgent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty 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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAgent_subnetArns :: Lens.Lens' CreateAgent (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
createAgent_subnetArns :: (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateAgent -> f CreateAgent
createAgent_subnetArns = (CreateAgent -> Maybe (NonEmpty Text))
-> (CreateAgent -> Maybe (NonEmpty Text) -> CreateAgent)
-> Lens
CreateAgent
CreateAgent
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgent' {Maybe (NonEmpty Text)
subnetArns :: Maybe (NonEmpty Text)
$sel:subnetArns:CreateAgent' :: CreateAgent -> Maybe (NonEmpty Text)
subnetArns} -> Maybe (NonEmpty Text)
subnetArns) (\s :: CreateAgent
s@CreateAgent' {} Maybe (NonEmpty Text)
a -> CreateAgent
s {$sel:subnetArns:CreateAgent' :: Maybe (NonEmpty Text)
subnetArns = Maybe (NonEmpty Text)
a} :: CreateAgent) ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateAgent -> f CreateAgent)
-> ((Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> (Maybe (NonEmpty Text) -> f (Maybe (NonEmpty Text)))
-> CreateAgent
-> f CreateAgent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
-> Iso
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty Text))
(Maybe (NonEmpty 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
(NonEmpty Text) (NonEmpty Text) (NonEmpty Text) (NonEmpty Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAgent_agentName :: Lens.Lens' CreateAgent (Prelude.Maybe Prelude.Text)
createAgent_agentName :: (Maybe Text -> f (Maybe Text)) -> CreateAgent -> f CreateAgent
createAgent_agentName = (CreateAgent -> Maybe Text)
-> (CreateAgent -> Maybe Text -> CreateAgent)
-> Lens CreateAgent CreateAgent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgent' {Maybe Text
agentName :: Maybe Text
$sel:agentName:CreateAgent' :: CreateAgent -> Maybe Text
agentName} -> Maybe Text
agentName) (\s :: CreateAgent
s@CreateAgent' {} Maybe Text
a -> CreateAgent
s {$sel:agentName:CreateAgent' :: Maybe Text
agentName = Maybe Text
a} :: CreateAgent)
createAgent_vpcEndpointId :: Lens.Lens' CreateAgent (Prelude.Maybe Prelude.Text)
createAgent_vpcEndpointId :: (Maybe Text -> f (Maybe Text)) -> CreateAgent -> f CreateAgent
createAgent_vpcEndpointId = (CreateAgent -> Maybe Text)
-> (CreateAgent -> Maybe Text -> CreateAgent)
-> Lens CreateAgent CreateAgent (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgent' {Maybe Text
vpcEndpointId :: Maybe Text
$sel:vpcEndpointId:CreateAgent' :: CreateAgent -> Maybe Text
vpcEndpointId} -> Maybe Text
vpcEndpointId) (\s :: CreateAgent
s@CreateAgent' {} Maybe Text
a -> CreateAgent
s {$sel:vpcEndpointId:CreateAgent' :: Maybe Text
vpcEndpointId = Maybe Text
a} :: CreateAgent)
createAgent_tags :: Lens.Lens' CreateAgent (Prelude.Maybe [TagListEntry])
createAgent_tags :: (Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
-> CreateAgent -> f CreateAgent
createAgent_tags = (CreateAgent -> Maybe [TagListEntry])
-> (CreateAgent -> Maybe [TagListEntry] -> CreateAgent)
-> Lens
CreateAgent
CreateAgent
(Maybe [TagListEntry])
(Maybe [TagListEntry])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgent' {Maybe [TagListEntry]
tags :: Maybe [TagListEntry]
$sel:tags:CreateAgent' :: CreateAgent -> Maybe [TagListEntry]
tags} -> Maybe [TagListEntry]
tags) (\s :: CreateAgent
s@CreateAgent' {} Maybe [TagListEntry]
a -> CreateAgent
s {$sel:tags:CreateAgent' :: Maybe [TagListEntry]
tags = Maybe [TagListEntry]
a} :: CreateAgent) ((Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
-> CreateAgent -> f CreateAgent)
-> ((Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
-> Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
-> (Maybe [TagListEntry] -> f (Maybe [TagListEntry]))
-> CreateAgent
-> f CreateAgent
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [TagListEntry] [TagListEntry] [TagListEntry] [TagListEntry]
-> Iso
(Maybe [TagListEntry])
(Maybe [TagListEntry])
(Maybe [TagListEntry])
(Maybe [TagListEntry])
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 [TagListEntry] [TagListEntry] [TagListEntry] [TagListEntry]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createAgent_activationKey :: Lens.Lens' CreateAgent Prelude.Text
createAgent_activationKey :: (Text -> f Text) -> CreateAgent -> f CreateAgent
createAgent_activationKey = (CreateAgent -> Text)
-> (CreateAgent -> Text -> CreateAgent)
-> Lens CreateAgent CreateAgent Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgent' {Text
activationKey :: Text
$sel:activationKey:CreateAgent' :: CreateAgent -> Text
activationKey} -> Text
activationKey) (\s :: CreateAgent
s@CreateAgent' {} Text
a -> CreateAgent
s {$sel:activationKey:CreateAgent' :: Text
activationKey = Text
a} :: CreateAgent)
instance Core.AWSRequest CreateAgent where
type AWSResponse CreateAgent = CreateAgentResponse
request :: CreateAgent -> Request CreateAgent
request = Service -> CreateAgent -> Request CreateAgent
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateAgent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAgent)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateAgent))
-> Logger
-> Service
-> Proxy CreateAgent
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateAgent)))
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 -> CreateAgentResponse
CreateAgentResponse'
(Maybe Text -> Int -> CreateAgentResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateAgentResponse)
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
"AgentArn")
Either String (Int -> CreateAgentResponse)
-> Either String Int -> Either String CreateAgentResponse
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 CreateAgent
instance Prelude.NFData CreateAgent
instance Core.ToHeaders CreateAgent where
toHeaders :: CreateAgent -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateAgent -> 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
"FmrsService.CreateAgent" :: 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 CreateAgent where
toJSON :: CreateAgent -> Value
toJSON CreateAgent' {Maybe [TagListEntry]
Maybe (NonEmpty Text)
Maybe Text
Text
activationKey :: Text
tags :: Maybe [TagListEntry]
vpcEndpointId :: Maybe Text
agentName :: Maybe Text
subnetArns :: Maybe (NonEmpty Text)
securityGroupArns :: Maybe (NonEmpty Text)
$sel:activationKey:CreateAgent' :: CreateAgent -> Text
$sel:tags:CreateAgent' :: CreateAgent -> Maybe [TagListEntry]
$sel:vpcEndpointId:CreateAgent' :: CreateAgent -> Maybe Text
$sel:agentName:CreateAgent' :: CreateAgent -> Maybe Text
$sel:subnetArns:CreateAgent' :: CreateAgent -> Maybe (NonEmpty Text)
$sel:securityGroupArns:CreateAgent' :: CreateAgent -> Maybe (NonEmpty Text)
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SecurityGroupArns" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
securityGroupArns,
(Text
"SubnetArns" Text -> NonEmpty Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty Text -> Pair) -> Maybe (NonEmpty Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
subnetArns,
(Text
"AgentName" 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
agentName,
(Text
"VpcEndpointId" 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
vpcEndpointId,
(Text
"Tags" Text -> [TagListEntry] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([TagListEntry] -> Pair) -> Maybe [TagListEntry] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagListEntry]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ActivationKey" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
activationKey)
]
)
instance Core.ToPath CreateAgent where
toPath :: CreateAgent -> ByteString
toPath = ByteString -> CreateAgent -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery CreateAgent where
toQuery :: CreateAgent -> QueryString
toQuery = QueryString -> CreateAgent -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateAgentResponse = CreateAgentResponse'
{
CreateAgentResponse -> Maybe Text
agentArn :: Prelude.Maybe Prelude.Text,
CreateAgentResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateAgentResponse -> CreateAgentResponse -> Bool
(CreateAgentResponse -> CreateAgentResponse -> Bool)
-> (CreateAgentResponse -> CreateAgentResponse -> Bool)
-> Eq CreateAgentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateAgentResponse -> CreateAgentResponse -> Bool
$c/= :: CreateAgentResponse -> CreateAgentResponse -> Bool
== :: CreateAgentResponse -> CreateAgentResponse -> Bool
$c== :: CreateAgentResponse -> CreateAgentResponse -> Bool
Prelude.Eq, ReadPrec [CreateAgentResponse]
ReadPrec CreateAgentResponse
Int -> ReadS CreateAgentResponse
ReadS [CreateAgentResponse]
(Int -> ReadS CreateAgentResponse)
-> ReadS [CreateAgentResponse]
-> ReadPrec CreateAgentResponse
-> ReadPrec [CreateAgentResponse]
-> Read CreateAgentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateAgentResponse]
$creadListPrec :: ReadPrec [CreateAgentResponse]
readPrec :: ReadPrec CreateAgentResponse
$creadPrec :: ReadPrec CreateAgentResponse
readList :: ReadS [CreateAgentResponse]
$creadList :: ReadS [CreateAgentResponse]
readsPrec :: Int -> ReadS CreateAgentResponse
$creadsPrec :: Int -> ReadS CreateAgentResponse
Prelude.Read, Int -> CreateAgentResponse -> ShowS
[CreateAgentResponse] -> ShowS
CreateAgentResponse -> String
(Int -> CreateAgentResponse -> ShowS)
-> (CreateAgentResponse -> String)
-> ([CreateAgentResponse] -> ShowS)
-> Show CreateAgentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateAgentResponse] -> ShowS
$cshowList :: [CreateAgentResponse] -> ShowS
show :: CreateAgentResponse -> String
$cshow :: CreateAgentResponse -> String
showsPrec :: Int -> CreateAgentResponse -> ShowS
$cshowsPrec :: Int -> CreateAgentResponse -> ShowS
Prelude.Show, (forall x. CreateAgentResponse -> Rep CreateAgentResponse x)
-> (forall x. Rep CreateAgentResponse x -> CreateAgentResponse)
-> Generic CreateAgentResponse
forall x. Rep CreateAgentResponse x -> CreateAgentResponse
forall x. CreateAgentResponse -> Rep CreateAgentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateAgentResponse x -> CreateAgentResponse
$cfrom :: forall x. CreateAgentResponse -> Rep CreateAgentResponse x
Prelude.Generic)
newCreateAgentResponse ::
Prelude.Int ->
CreateAgentResponse
newCreateAgentResponse :: Int -> CreateAgentResponse
newCreateAgentResponse Int
pHttpStatus_ =
CreateAgentResponse' :: Maybe Text -> Int -> CreateAgentResponse
CreateAgentResponse'
{ $sel:agentArn:CreateAgentResponse' :: Maybe Text
agentArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateAgentResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createAgentResponse_agentArn :: Lens.Lens' CreateAgentResponse (Prelude.Maybe Prelude.Text)
createAgentResponse_agentArn :: (Maybe Text -> f (Maybe Text))
-> CreateAgentResponse -> f CreateAgentResponse
createAgentResponse_agentArn = (CreateAgentResponse -> Maybe Text)
-> (CreateAgentResponse -> Maybe Text -> CreateAgentResponse)
-> Lens
CreateAgentResponse CreateAgentResponse (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentResponse' {Maybe Text
agentArn :: Maybe Text
$sel:agentArn:CreateAgentResponse' :: CreateAgentResponse -> Maybe Text
agentArn} -> Maybe Text
agentArn) (\s :: CreateAgentResponse
s@CreateAgentResponse' {} Maybe Text
a -> CreateAgentResponse
s {$sel:agentArn:CreateAgentResponse' :: Maybe Text
agentArn = Maybe Text
a} :: CreateAgentResponse)
createAgentResponse_httpStatus :: Lens.Lens' CreateAgentResponse Prelude.Int
createAgentResponse_httpStatus :: (Int -> f Int) -> CreateAgentResponse -> f CreateAgentResponse
createAgentResponse_httpStatus = (CreateAgentResponse -> Int)
-> (CreateAgentResponse -> Int -> CreateAgentResponse)
-> Lens CreateAgentResponse CreateAgentResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateAgentResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateAgentResponse' :: CreateAgentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateAgentResponse
s@CreateAgentResponse' {} Int
a -> CreateAgentResponse
s {$sel:httpStatus:CreateAgentResponse' :: Int
httpStatus = Int
a} :: CreateAgentResponse)
instance Prelude.NFData CreateAgentResponse