{-# 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.NetworkManager.CreateConnection
(
CreateConnection (..),
newCreateConnection,
createConnection_connectedLinkId,
createConnection_linkId,
createConnection_description,
createConnection_tags,
createConnection_globalNetworkId,
createConnection_deviceId,
createConnection_connectedDeviceId,
CreateConnectionResponse (..),
newCreateConnectionResponse,
createConnectionResponse_connection,
createConnectionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.NetworkManager.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateConnection = CreateConnection'
{
CreateConnection -> Maybe Text
connectedLinkId :: Prelude.Maybe Prelude.Text,
CreateConnection -> Maybe Text
linkId :: Prelude.Maybe Prelude.Text,
CreateConnection -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateConnection -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateConnection -> Text
globalNetworkId :: Prelude.Text,
CreateConnection -> Text
deviceId :: Prelude.Text,
CreateConnection -> Text
connectedDeviceId :: Prelude.Text
}
deriving (CreateConnection -> CreateConnection -> Bool
(CreateConnection -> CreateConnection -> Bool)
-> (CreateConnection -> CreateConnection -> Bool)
-> Eq CreateConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConnection -> CreateConnection -> Bool
$c/= :: CreateConnection -> CreateConnection -> Bool
== :: CreateConnection -> CreateConnection -> Bool
$c== :: CreateConnection -> CreateConnection -> Bool
Prelude.Eq, ReadPrec [CreateConnection]
ReadPrec CreateConnection
Int -> ReadS CreateConnection
ReadS [CreateConnection]
(Int -> ReadS CreateConnection)
-> ReadS [CreateConnection]
-> ReadPrec CreateConnection
-> ReadPrec [CreateConnection]
-> Read CreateConnection
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConnection]
$creadListPrec :: ReadPrec [CreateConnection]
readPrec :: ReadPrec CreateConnection
$creadPrec :: ReadPrec CreateConnection
readList :: ReadS [CreateConnection]
$creadList :: ReadS [CreateConnection]
readsPrec :: Int -> ReadS CreateConnection
$creadsPrec :: Int -> ReadS CreateConnection
Prelude.Read, Int -> CreateConnection -> ShowS
[CreateConnection] -> ShowS
CreateConnection -> String
(Int -> CreateConnection -> ShowS)
-> (CreateConnection -> String)
-> ([CreateConnection] -> ShowS)
-> Show CreateConnection
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConnection] -> ShowS
$cshowList :: [CreateConnection] -> ShowS
show :: CreateConnection -> String
$cshow :: CreateConnection -> String
showsPrec :: Int -> CreateConnection -> ShowS
$cshowsPrec :: Int -> CreateConnection -> ShowS
Prelude.Show, (forall x. CreateConnection -> Rep CreateConnection x)
-> (forall x. Rep CreateConnection x -> CreateConnection)
-> Generic CreateConnection
forall x. Rep CreateConnection x -> CreateConnection
forall x. CreateConnection -> Rep CreateConnection x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateConnection x -> CreateConnection
$cfrom :: forall x. CreateConnection -> Rep CreateConnection x
Prelude.Generic)
newCreateConnection ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
CreateConnection
newCreateConnection :: Text -> Text -> Text -> CreateConnection
newCreateConnection
Text
pGlobalNetworkId_
Text
pDeviceId_
Text
pConnectedDeviceId_ =
CreateConnection' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [Tag]
-> Text
-> Text
-> Text
-> CreateConnection
CreateConnection'
{ $sel:connectedLinkId:CreateConnection' :: Maybe Text
connectedLinkId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:linkId:CreateConnection' :: Maybe Text
linkId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateConnection' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateConnection' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:globalNetworkId:CreateConnection' :: Text
globalNetworkId = Text
pGlobalNetworkId_,
$sel:deviceId:CreateConnection' :: Text
deviceId = Text
pDeviceId_,
$sel:connectedDeviceId:CreateConnection' :: Text
connectedDeviceId = Text
pConnectedDeviceId_
}
createConnection_connectedLinkId :: Lens.Lens' CreateConnection (Prelude.Maybe Prelude.Text)
createConnection_connectedLinkId :: (Maybe Text -> f (Maybe Text))
-> CreateConnection -> f CreateConnection
createConnection_connectedLinkId = (CreateConnection -> Maybe Text)
-> (CreateConnection -> Maybe Text -> CreateConnection)
-> Lens CreateConnection CreateConnection (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnection' {Maybe Text
connectedLinkId :: Maybe Text
$sel:connectedLinkId:CreateConnection' :: CreateConnection -> Maybe Text
connectedLinkId} -> Maybe Text
connectedLinkId) (\s :: CreateConnection
s@CreateConnection' {} Maybe Text
a -> CreateConnection
s {$sel:connectedLinkId:CreateConnection' :: Maybe Text
connectedLinkId = Maybe Text
a} :: CreateConnection)
createConnection_linkId :: Lens.Lens' CreateConnection (Prelude.Maybe Prelude.Text)
createConnection_linkId :: (Maybe Text -> f (Maybe Text))
-> CreateConnection -> f CreateConnection
createConnection_linkId = (CreateConnection -> Maybe Text)
-> (CreateConnection -> Maybe Text -> CreateConnection)
-> Lens CreateConnection CreateConnection (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnection' {Maybe Text
linkId :: Maybe Text
$sel:linkId:CreateConnection' :: CreateConnection -> Maybe Text
linkId} -> Maybe Text
linkId) (\s :: CreateConnection
s@CreateConnection' {} Maybe Text
a -> CreateConnection
s {$sel:linkId:CreateConnection' :: Maybe Text
linkId = Maybe Text
a} :: CreateConnection)
createConnection_description :: Lens.Lens' CreateConnection (Prelude.Maybe Prelude.Text)
createConnection_description :: (Maybe Text -> f (Maybe Text))
-> CreateConnection -> f CreateConnection
createConnection_description = (CreateConnection -> Maybe Text)
-> (CreateConnection -> Maybe Text -> CreateConnection)
-> Lens CreateConnection CreateConnection (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnection' {Maybe Text
description :: Maybe Text
$sel:description:CreateConnection' :: CreateConnection -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateConnection
s@CreateConnection' {} Maybe Text
a -> CreateConnection
s {$sel:description:CreateConnection' :: Maybe Text
description = Maybe Text
a} :: CreateConnection)
createConnection_tags :: Lens.Lens' CreateConnection (Prelude.Maybe [Tag])
createConnection_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateConnection -> f CreateConnection
createConnection_tags = (CreateConnection -> Maybe [Tag])
-> (CreateConnection -> Maybe [Tag] -> CreateConnection)
-> Lens
CreateConnection CreateConnection (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnection' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateConnection' :: CreateConnection -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateConnection
s@CreateConnection' {} Maybe [Tag]
a -> CreateConnection
s {$sel:tags:CreateConnection' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateConnection) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateConnection -> f CreateConnection)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateConnection
-> f CreateConnection
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
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 [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createConnection_globalNetworkId :: Lens.Lens' CreateConnection Prelude.Text
createConnection_globalNetworkId :: (Text -> f Text) -> CreateConnection -> f CreateConnection
createConnection_globalNetworkId = (CreateConnection -> Text)
-> (CreateConnection -> Text -> CreateConnection)
-> Lens CreateConnection CreateConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnection' {Text
globalNetworkId :: Text
$sel:globalNetworkId:CreateConnection' :: CreateConnection -> Text
globalNetworkId} -> Text
globalNetworkId) (\s :: CreateConnection
s@CreateConnection' {} Text
a -> CreateConnection
s {$sel:globalNetworkId:CreateConnection' :: Text
globalNetworkId = Text
a} :: CreateConnection)
createConnection_deviceId :: Lens.Lens' CreateConnection Prelude.Text
createConnection_deviceId :: (Text -> f Text) -> CreateConnection -> f CreateConnection
createConnection_deviceId = (CreateConnection -> Text)
-> (CreateConnection -> Text -> CreateConnection)
-> Lens CreateConnection CreateConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnection' {Text
deviceId :: Text
$sel:deviceId:CreateConnection' :: CreateConnection -> Text
deviceId} -> Text
deviceId) (\s :: CreateConnection
s@CreateConnection' {} Text
a -> CreateConnection
s {$sel:deviceId:CreateConnection' :: Text
deviceId = Text
a} :: CreateConnection)
createConnection_connectedDeviceId :: Lens.Lens' CreateConnection Prelude.Text
createConnection_connectedDeviceId :: (Text -> f Text) -> CreateConnection -> f CreateConnection
createConnection_connectedDeviceId = (CreateConnection -> Text)
-> (CreateConnection -> Text -> CreateConnection)
-> Lens CreateConnection CreateConnection Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnection' {Text
connectedDeviceId :: Text
$sel:connectedDeviceId:CreateConnection' :: CreateConnection -> Text
connectedDeviceId} -> Text
connectedDeviceId) (\s :: CreateConnection
s@CreateConnection' {} Text
a -> CreateConnection
s {$sel:connectedDeviceId:CreateConnection' :: Text
connectedDeviceId = Text
a} :: CreateConnection)
instance Core.AWSRequest CreateConnection where
type
AWSResponse CreateConnection =
CreateConnectionResponse
request :: CreateConnection -> Request CreateConnection
request = Service -> CreateConnection -> Request CreateConnection
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateConnection
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateConnection)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateConnection))
-> Logger
-> Service
-> Proxy CreateConnection
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateConnection)))
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 Connection -> Int -> CreateConnectionResponse
CreateConnectionResponse'
(Maybe Connection -> Int -> CreateConnectionResponse)
-> Either String (Maybe Connection)
-> Either String (Int -> CreateConnectionResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Connection)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Connection")
Either String (Int -> CreateConnectionResponse)
-> Either String Int -> Either String CreateConnectionResponse
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 CreateConnection
instance Prelude.NFData CreateConnection
instance Core.ToHeaders CreateConnection where
toHeaders :: CreateConnection -> ResponseHeaders
toHeaders =
ResponseHeaders -> CreateConnection -> 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 CreateConnection where
toJSON :: CreateConnection -> Value
toJSON CreateConnection' {Maybe [Tag]
Maybe Text
Text
connectedDeviceId :: Text
deviceId :: Text
globalNetworkId :: Text
tags :: Maybe [Tag]
description :: Maybe Text
linkId :: Maybe Text
connectedLinkId :: Maybe Text
$sel:connectedDeviceId:CreateConnection' :: CreateConnection -> Text
$sel:deviceId:CreateConnection' :: CreateConnection -> Text
$sel:globalNetworkId:CreateConnection' :: CreateConnection -> Text
$sel:tags:CreateConnection' :: CreateConnection -> Maybe [Tag]
$sel:description:CreateConnection' :: CreateConnection -> Maybe Text
$sel:linkId:CreateConnection' :: CreateConnection -> Maybe Text
$sel:connectedLinkId:CreateConnection' :: CreateConnection -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ConnectedLinkId" 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
connectedLinkId,
(Text
"LinkId" 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
linkId,
(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 -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DeviceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
deviceId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"ConnectedDeviceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
connectedDeviceId)
]
)
instance Core.ToPath CreateConnection where
toPath :: CreateConnection -> ByteString
toPath CreateConnection' {Maybe [Tag]
Maybe Text
Text
connectedDeviceId :: Text
deviceId :: Text
globalNetworkId :: Text
tags :: Maybe [Tag]
description :: Maybe Text
linkId :: Maybe Text
connectedLinkId :: Maybe Text
$sel:connectedDeviceId:CreateConnection' :: CreateConnection -> Text
$sel:deviceId:CreateConnection' :: CreateConnection -> Text
$sel:globalNetworkId:CreateConnection' :: CreateConnection -> Text
$sel:tags:CreateConnection' :: CreateConnection -> Maybe [Tag]
$sel:description:CreateConnection' :: CreateConnection -> Maybe Text
$sel:linkId:CreateConnection' :: CreateConnection -> Maybe Text
$sel:connectedLinkId:CreateConnection' :: CreateConnection -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/global-networks/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
globalNetworkId,
ByteString
"/connections"
]
instance Core.ToQuery CreateConnection where
toQuery :: CreateConnection -> QueryString
toQuery = QueryString -> CreateConnection -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateConnectionResponse = CreateConnectionResponse'
{
CreateConnectionResponse -> Maybe Connection
connection :: Prelude.Maybe Connection,
CreateConnectionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateConnectionResponse -> CreateConnectionResponse -> Bool
(CreateConnectionResponse -> CreateConnectionResponse -> Bool)
-> (CreateConnectionResponse -> CreateConnectionResponse -> Bool)
-> Eq CreateConnectionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateConnectionResponse -> CreateConnectionResponse -> Bool
$c/= :: CreateConnectionResponse -> CreateConnectionResponse -> Bool
== :: CreateConnectionResponse -> CreateConnectionResponse -> Bool
$c== :: CreateConnectionResponse -> CreateConnectionResponse -> Bool
Prelude.Eq, ReadPrec [CreateConnectionResponse]
ReadPrec CreateConnectionResponse
Int -> ReadS CreateConnectionResponse
ReadS [CreateConnectionResponse]
(Int -> ReadS CreateConnectionResponse)
-> ReadS [CreateConnectionResponse]
-> ReadPrec CreateConnectionResponse
-> ReadPrec [CreateConnectionResponse]
-> Read CreateConnectionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateConnectionResponse]
$creadListPrec :: ReadPrec [CreateConnectionResponse]
readPrec :: ReadPrec CreateConnectionResponse
$creadPrec :: ReadPrec CreateConnectionResponse
readList :: ReadS [CreateConnectionResponse]
$creadList :: ReadS [CreateConnectionResponse]
readsPrec :: Int -> ReadS CreateConnectionResponse
$creadsPrec :: Int -> ReadS CreateConnectionResponse
Prelude.Read, Int -> CreateConnectionResponse -> ShowS
[CreateConnectionResponse] -> ShowS
CreateConnectionResponse -> String
(Int -> CreateConnectionResponse -> ShowS)
-> (CreateConnectionResponse -> String)
-> ([CreateConnectionResponse] -> ShowS)
-> Show CreateConnectionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateConnectionResponse] -> ShowS
$cshowList :: [CreateConnectionResponse] -> ShowS
show :: CreateConnectionResponse -> String
$cshow :: CreateConnectionResponse -> String
showsPrec :: Int -> CreateConnectionResponse -> ShowS
$cshowsPrec :: Int -> CreateConnectionResponse -> ShowS
Prelude.Show, (forall x.
CreateConnectionResponse -> Rep CreateConnectionResponse x)
-> (forall x.
Rep CreateConnectionResponse x -> CreateConnectionResponse)
-> Generic CreateConnectionResponse
forall x.
Rep CreateConnectionResponse x -> CreateConnectionResponse
forall x.
CreateConnectionResponse -> Rep CreateConnectionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateConnectionResponse x -> CreateConnectionResponse
$cfrom :: forall x.
CreateConnectionResponse -> Rep CreateConnectionResponse x
Prelude.Generic)
newCreateConnectionResponse ::
Prelude.Int ->
CreateConnectionResponse
newCreateConnectionResponse :: Int -> CreateConnectionResponse
newCreateConnectionResponse Int
pHttpStatus_ =
CreateConnectionResponse' :: Maybe Connection -> Int -> CreateConnectionResponse
CreateConnectionResponse'
{ $sel:connection:CreateConnectionResponse' :: Maybe Connection
connection =
Maybe Connection
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateConnectionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createConnectionResponse_connection :: Lens.Lens' CreateConnectionResponse (Prelude.Maybe Connection)
createConnectionResponse_connection :: (Maybe Connection -> f (Maybe Connection))
-> CreateConnectionResponse -> f CreateConnectionResponse
createConnectionResponse_connection = (CreateConnectionResponse -> Maybe Connection)
-> (CreateConnectionResponse
-> Maybe Connection -> CreateConnectionResponse)
-> Lens
CreateConnectionResponse
CreateConnectionResponse
(Maybe Connection)
(Maybe Connection)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnectionResponse' {Maybe Connection
connection :: Maybe Connection
$sel:connection:CreateConnectionResponse' :: CreateConnectionResponse -> Maybe Connection
connection} -> Maybe Connection
connection) (\s :: CreateConnectionResponse
s@CreateConnectionResponse' {} Maybe Connection
a -> CreateConnectionResponse
s {$sel:connection:CreateConnectionResponse' :: Maybe Connection
connection = Maybe Connection
a} :: CreateConnectionResponse)
createConnectionResponse_httpStatus :: Lens.Lens' CreateConnectionResponse Prelude.Int
createConnectionResponse_httpStatus :: (Int -> f Int)
-> CreateConnectionResponse -> f CreateConnectionResponse
createConnectionResponse_httpStatus = (CreateConnectionResponse -> Int)
-> (CreateConnectionResponse -> Int -> CreateConnectionResponse)
-> Lens CreateConnectionResponse CreateConnectionResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateConnectionResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateConnectionResponse' :: CreateConnectionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateConnectionResponse
s@CreateConnectionResponse' {} Int
a -> CreateConnectionResponse
s {$sel:httpStatus:CreateConnectionResponse' :: Int
httpStatus = Int
a} :: CreateConnectionResponse)
instance Prelude.NFData CreateConnectionResponse