{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Greengrass.UpdateConnectivityInfo
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates the connectivity information for the core. Any devices that
-- belong to the group which has this core will receive this information in
-- order to find the location of the core and connect to it.
module Amazonka.Greengrass.UpdateConnectivityInfo
  ( -- * Creating a Request
    UpdateConnectivityInfo (..),
    newUpdateConnectivityInfo,

    -- * Request Lenses
    updateConnectivityInfo_connectivityInfo,
    updateConnectivityInfo_thingName,

    -- * Destructuring the Response
    UpdateConnectivityInfoResponse (..),
    newUpdateConnectivityInfoResponse,

    -- * Response Lenses
    updateConnectivityInfoResponse_version,
    updateConnectivityInfoResponse_message,
    updateConnectivityInfoResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.Greengrass.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

-- | Connectivity information.
--
-- /See:/ 'newUpdateConnectivityInfo' smart constructor.
data UpdateConnectivityInfo = UpdateConnectivityInfo'
  { -- | A list of connectivity info.
    UpdateConnectivityInfo -> Maybe [ConnectivityInfo]
connectivityInfo :: Prelude.Maybe [ConnectivityInfo],
    -- | The thing name.
    UpdateConnectivityInfo -> Text
thingName :: Prelude.Text
  }
  deriving (UpdateConnectivityInfo -> UpdateConnectivityInfo -> Bool
(UpdateConnectivityInfo -> UpdateConnectivityInfo -> Bool)
-> (UpdateConnectivityInfo -> UpdateConnectivityInfo -> Bool)
-> Eq UpdateConnectivityInfo
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateConnectivityInfo -> UpdateConnectivityInfo -> Bool
$c/= :: UpdateConnectivityInfo -> UpdateConnectivityInfo -> Bool
== :: UpdateConnectivityInfo -> UpdateConnectivityInfo -> Bool
$c== :: UpdateConnectivityInfo -> UpdateConnectivityInfo -> Bool
Prelude.Eq, ReadPrec [UpdateConnectivityInfo]
ReadPrec UpdateConnectivityInfo
Int -> ReadS UpdateConnectivityInfo
ReadS [UpdateConnectivityInfo]
(Int -> ReadS UpdateConnectivityInfo)
-> ReadS [UpdateConnectivityInfo]
-> ReadPrec UpdateConnectivityInfo
-> ReadPrec [UpdateConnectivityInfo]
-> Read UpdateConnectivityInfo
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateConnectivityInfo]
$creadListPrec :: ReadPrec [UpdateConnectivityInfo]
readPrec :: ReadPrec UpdateConnectivityInfo
$creadPrec :: ReadPrec UpdateConnectivityInfo
readList :: ReadS [UpdateConnectivityInfo]
$creadList :: ReadS [UpdateConnectivityInfo]
readsPrec :: Int -> ReadS UpdateConnectivityInfo
$creadsPrec :: Int -> ReadS UpdateConnectivityInfo
Prelude.Read, Int -> UpdateConnectivityInfo -> ShowS
[UpdateConnectivityInfo] -> ShowS
UpdateConnectivityInfo -> String
(Int -> UpdateConnectivityInfo -> ShowS)
-> (UpdateConnectivityInfo -> String)
-> ([UpdateConnectivityInfo] -> ShowS)
-> Show UpdateConnectivityInfo
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateConnectivityInfo] -> ShowS
$cshowList :: [UpdateConnectivityInfo] -> ShowS
show :: UpdateConnectivityInfo -> String
$cshow :: UpdateConnectivityInfo -> String
showsPrec :: Int -> UpdateConnectivityInfo -> ShowS
$cshowsPrec :: Int -> UpdateConnectivityInfo -> ShowS
Prelude.Show, (forall x. UpdateConnectivityInfo -> Rep UpdateConnectivityInfo x)
-> (forall x.
    Rep UpdateConnectivityInfo x -> UpdateConnectivityInfo)
-> Generic UpdateConnectivityInfo
forall x. Rep UpdateConnectivityInfo x -> UpdateConnectivityInfo
forall x. UpdateConnectivityInfo -> Rep UpdateConnectivityInfo x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateConnectivityInfo x -> UpdateConnectivityInfo
$cfrom :: forall x. UpdateConnectivityInfo -> Rep UpdateConnectivityInfo x
Prelude.Generic)

-- |
-- Create a value of 'UpdateConnectivityInfo' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'connectivityInfo', 'updateConnectivityInfo_connectivityInfo' - A list of connectivity info.
--
-- 'thingName', 'updateConnectivityInfo_thingName' - The thing name.
newUpdateConnectivityInfo ::
  -- | 'thingName'
  Prelude.Text ->
  UpdateConnectivityInfo
newUpdateConnectivityInfo :: Text -> UpdateConnectivityInfo
newUpdateConnectivityInfo Text
pThingName_ =
  UpdateConnectivityInfo' :: Maybe [ConnectivityInfo] -> Text -> UpdateConnectivityInfo
UpdateConnectivityInfo'
    { $sel:connectivityInfo:UpdateConnectivityInfo' :: Maybe [ConnectivityInfo]
connectivityInfo =
        Maybe [ConnectivityInfo]
forall a. Maybe a
Prelude.Nothing,
      $sel:thingName:UpdateConnectivityInfo' :: Text
thingName = Text
pThingName_
    }

-- | A list of connectivity info.
updateConnectivityInfo_connectivityInfo :: Lens.Lens' UpdateConnectivityInfo (Prelude.Maybe [ConnectivityInfo])
updateConnectivityInfo_connectivityInfo :: (Maybe [ConnectivityInfo] -> f (Maybe [ConnectivityInfo]))
-> UpdateConnectivityInfo -> f UpdateConnectivityInfo
updateConnectivityInfo_connectivityInfo = (UpdateConnectivityInfo -> Maybe [ConnectivityInfo])
-> (UpdateConnectivityInfo
    -> Maybe [ConnectivityInfo] -> UpdateConnectivityInfo)
-> Lens
     UpdateConnectivityInfo
     UpdateConnectivityInfo
     (Maybe [ConnectivityInfo])
     (Maybe [ConnectivityInfo])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectivityInfo' {Maybe [ConnectivityInfo]
connectivityInfo :: Maybe [ConnectivityInfo]
$sel:connectivityInfo:UpdateConnectivityInfo' :: UpdateConnectivityInfo -> Maybe [ConnectivityInfo]
connectivityInfo} -> Maybe [ConnectivityInfo]
connectivityInfo) (\s :: UpdateConnectivityInfo
s@UpdateConnectivityInfo' {} Maybe [ConnectivityInfo]
a -> UpdateConnectivityInfo
s {$sel:connectivityInfo:UpdateConnectivityInfo' :: Maybe [ConnectivityInfo]
connectivityInfo = Maybe [ConnectivityInfo]
a} :: UpdateConnectivityInfo) ((Maybe [ConnectivityInfo] -> f (Maybe [ConnectivityInfo]))
 -> UpdateConnectivityInfo -> f UpdateConnectivityInfo)
-> ((Maybe [ConnectivityInfo] -> f (Maybe [ConnectivityInfo]))
    -> Maybe [ConnectivityInfo] -> f (Maybe [ConnectivityInfo]))
-> (Maybe [ConnectivityInfo] -> f (Maybe [ConnectivityInfo]))
-> UpdateConnectivityInfo
-> f UpdateConnectivityInfo
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [ConnectivityInfo]
  [ConnectivityInfo]
  [ConnectivityInfo]
  [ConnectivityInfo]
-> Iso
     (Maybe [ConnectivityInfo])
     (Maybe [ConnectivityInfo])
     (Maybe [ConnectivityInfo])
     (Maybe [ConnectivityInfo])
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
  [ConnectivityInfo]
  [ConnectivityInfo]
  [ConnectivityInfo]
  [ConnectivityInfo]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The thing name.
updateConnectivityInfo_thingName :: Lens.Lens' UpdateConnectivityInfo Prelude.Text
updateConnectivityInfo_thingName :: (Text -> f Text)
-> UpdateConnectivityInfo -> f UpdateConnectivityInfo
updateConnectivityInfo_thingName = (UpdateConnectivityInfo -> Text)
-> (UpdateConnectivityInfo -> Text -> UpdateConnectivityInfo)
-> Lens UpdateConnectivityInfo UpdateConnectivityInfo Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectivityInfo' {Text
thingName :: Text
$sel:thingName:UpdateConnectivityInfo' :: UpdateConnectivityInfo -> Text
thingName} -> Text
thingName) (\s :: UpdateConnectivityInfo
s@UpdateConnectivityInfo' {} Text
a -> UpdateConnectivityInfo
s {$sel:thingName:UpdateConnectivityInfo' :: Text
thingName = Text
a} :: UpdateConnectivityInfo)

instance Core.AWSRequest UpdateConnectivityInfo where
  type
    AWSResponse UpdateConnectivityInfo =
      UpdateConnectivityInfoResponse
  request :: UpdateConnectivityInfo -> Request UpdateConnectivityInfo
request = Service -> UpdateConnectivityInfo -> Request UpdateConnectivityInfo
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateConnectivityInfo
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateConnectivityInfo)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateConnectivityInfo))
-> Logger
-> Service
-> Proxy UpdateConnectivityInfo
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateConnectivityInfo)))
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 -> UpdateConnectivityInfoResponse
UpdateConnectivityInfoResponse'
            (Maybe Text -> Maybe Text -> Int -> UpdateConnectivityInfoResponse)
-> Either String (Maybe Text)
-> Either
     String (Maybe Text -> Int -> UpdateConnectivityInfoResponse)
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
"Version")
            Either String (Maybe Text -> Int -> UpdateConnectivityInfoResponse)
-> Either String (Maybe Text)
-> Either String (Int -> UpdateConnectivityInfoResponse)
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
"message")
            Either String (Int -> UpdateConnectivityInfoResponse)
-> Either String Int
-> Either String UpdateConnectivityInfoResponse
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 UpdateConnectivityInfo

instance Prelude.NFData UpdateConnectivityInfo

instance Core.ToHeaders UpdateConnectivityInfo where
  toHeaders :: UpdateConnectivityInfo -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateConnectivityInfo -> 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 UpdateConnectivityInfo where
  toJSON :: UpdateConnectivityInfo -> Value
toJSON UpdateConnectivityInfo' {Maybe [ConnectivityInfo]
Text
thingName :: Text
connectivityInfo :: Maybe [ConnectivityInfo]
$sel:thingName:UpdateConnectivityInfo' :: UpdateConnectivityInfo -> Text
$sel:connectivityInfo:UpdateConnectivityInfo' :: UpdateConnectivityInfo -> Maybe [ConnectivityInfo]
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"ConnectivityInfo" Text -> [ConnectivityInfo] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              ([ConnectivityInfo] -> Pair)
-> Maybe [ConnectivityInfo] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [ConnectivityInfo]
connectivityInfo
          ]
      )

instance Core.ToPath UpdateConnectivityInfo where
  toPath :: UpdateConnectivityInfo -> ByteString
toPath UpdateConnectivityInfo' {Maybe [ConnectivityInfo]
Text
thingName :: Text
connectivityInfo :: Maybe [ConnectivityInfo]
$sel:thingName:UpdateConnectivityInfo' :: UpdateConnectivityInfo -> Text
$sel:connectivityInfo:UpdateConnectivityInfo' :: UpdateConnectivityInfo -> Maybe [ConnectivityInfo]
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/greengrass/things/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
thingName,
        ByteString
"/connectivityInfo"
      ]

instance Core.ToQuery UpdateConnectivityInfo where
  toQuery :: UpdateConnectivityInfo -> QueryString
toQuery = QueryString -> UpdateConnectivityInfo -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newUpdateConnectivityInfoResponse' smart constructor.
data UpdateConnectivityInfoResponse = UpdateConnectivityInfoResponse'
  { -- | The new version of the connectivity info.
    UpdateConnectivityInfoResponse -> Maybe Text
version :: Prelude.Maybe Prelude.Text,
    -- | A message about the connectivity info update request.
    UpdateConnectivityInfoResponse -> Maybe Text
message :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateConnectivityInfoResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateConnectivityInfoResponse
-> UpdateConnectivityInfoResponse -> Bool
(UpdateConnectivityInfoResponse
 -> UpdateConnectivityInfoResponse -> Bool)
-> (UpdateConnectivityInfoResponse
    -> UpdateConnectivityInfoResponse -> Bool)
-> Eq UpdateConnectivityInfoResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateConnectivityInfoResponse
-> UpdateConnectivityInfoResponse -> Bool
$c/= :: UpdateConnectivityInfoResponse
-> UpdateConnectivityInfoResponse -> Bool
== :: UpdateConnectivityInfoResponse
-> UpdateConnectivityInfoResponse -> Bool
$c== :: UpdateConnectivityInfoResponse
-> UpdateConnectivityInfoResponse -> Bool
Prelude.Eq, ReadPrec [UpdateConnectivityInfoResponse]
ReadPrec UpdateConnectivityInfoResponse
Int -> ReadS UpdateConnectivityInfoResponse
ReadS [UpdateConnectivityInfoResponse]
(Int -> ReadS UpdateConnectivityInfoResponse)
-> ReadS [UpdateConnectivityInfoResponse]
-> ReadPrec UpdateConnectivityInfoResponse
-> ReadPrec [UpdateConnectivityInfoResponse]
-> Read UpdateConnectivityInfoResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateConnectivityInfoResponse]
$creadListPrec :: ReadPrec [UpdateConnectivityInfoResponse]
readPrec :: ReadPrec UpdateConnectivityInfoResponse
$creadPrec :: ReadPrec UpdateConnectivityInfoResponse
readList :: ReadS [UpdateConnectivityInfoResponse]
$creadList :: ReadS [UpdateConnectivityInfoResponse]
readsPrec :: Int -> ReadS UpdateConnectivityInfoResponse
$creadsPrec :: Int -> ReadS UpdateConnectivityInfoResponse
Prelude.Read, Int -> UpdateConnectivityInfoResponse -> ShowS
[UpdateConnectivityInfoResponse] -> ShowS
UpdateConnectivityInfoResponse -> String
(Int -> UpdateConnectivityInfoResponse -> ShowS)
-> (UpdateConnectivityInfoResponse -> String)
-> ([UpdateConnectivityInfoResponse] -> ShowS)
-> Show UpdateConnectivityInfoResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateConnectivityInfoResponse] -> ShowS
$cshowList :: [UpdateConnectivityInfoResponse] -> ShowS
show :: UpdateConnectivityInfoResponse -> String
$cshow :: UpdateConnectivityInfoResponse -> String
showsPrec :: Int -> UpdateConnectivityInfoResponse -> ShowS
$cshowsPrec :: Int -> UpdateConnectivityInfoResponse -> ShowS
Prelude.Show, (forall x.
 UpdateConnectivityInfoResponse
 -> Rep UpdateConnectivityInfoResponse x)
-> (forall x.
    Rep UpdateConnectivityInfoResponse x
    -> UpdateConnectivityInfoResponse)
-> Generic UpdateConnectivityInfoResponse
forall x.
Rep UpdateConnectivityInfoResponse x
-> UpdateConnectivityInfoResponse
forall x.
UpdateConnectivityInfoResponse
-> Rep UpdateConnectivityInfoResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateConnectivityInfoResponse x
-> UpdateConnectivityInfoResponse
$cfrom :: forall x.
UpdateConnectivityInfoResponse
-> Rep UpdateConnectivityInfoResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateConnectivityInfoResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'version', 'updateConnectivityInfoResponse_version' - The new version of the connectivity info.
--
-- 'message', 'updateConnectivityInfoResponse_message' - A message about the connectivity info update request.
--
-- 'httpStatus', 'updateConnectivityInfoResponse_httpStatus' - The response's http status code.
newUpdateConnectivityInfoResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateConnectivityInfoResponse
newUpdateConnectivityInfoResponse :: Int -> UpdateConnectivityInfoResponse
newUpdateConnectivityInfoResponse Int
pHttpStatus_ =
  UpdateConnectivityInfoResponse' :: Maybe Text -> Maybe Text -> Int -> UpdateConnectivityInfoResponse
UpdateConnectivityInfoResponse'
    { $sel:version:UpdateConnectivityInfoResponse' :: Maybe Text
version =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:message:UpdateConnectivityInfoResponse' :: Maybe Text
message = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateConnectivityInfoResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The new version of the connectivity info.
updateConnectivityInfoResponse_version :: Lens.Lens' UpdateConnectivityInfoResponse (Prelude.Maybe Prelude.Text)
updateConnectivityInfoResponse_version :: (Maybe Text -> f (Maybe Text))
-> UpdateConnectivityInfoResponse
-> f UpdateConnectivityInfoResponse
updateConnectivityInfoResponse_version = (UpdateConnectivityInfoResponse -> Maybe Text)
-> (UpdateConnectivityInfoResponse
    -> Maybe Text -> UpdateConnectivityInfoResponse)
-> Lens
     UpdateConnectivityInfoResponse
     UpdateConnectivityInfoResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectivityInfoResponse' {Maybe Text
version :: Maybe Text
$sel:version:UpdateConnectivityInfoResponse' :: UpdateConnectivityInfoResponse -> Maybe Text
version} -> Maybe Text
version) (\s :: UpdateConnectivityInfoResponse
s@UpdateConnectivityInfoResponse' {} Maybe Text
a -> UpdateConnectivityInfoResponse
s {$sel:version:UpdateConnectivityInfoResponse' :: Maybe Text
version = Maybe Text
a} :: UpdateConnectivityInfoResponse)

-- | A message about the connectivity info update request.
updateConnectivityInfoResponse_message :: Lens.Lens' UpdateConnectivityInfoResponse (Prelude.Maybe Prelude.Text)
updateConnectivityInfoResponse_message :: (Maybe Text -> f (Maybe Text))
-> UpdateConnectivityInfoResponse
-> f UpdateConnectivityInfoResponse
updateConnectivityInfoResponse_message = (UpdateConnectivityInfoResponse -> Maybe Text)
-> (UpdateConnectivityInfoResponse
    -> Maybe Text -> UpdateConnectivityInfoResponse)
-> Lens
     UpdateConnectivityInfoResponse
     UpdateConnectivityInfoResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectivityInfoResponse' {Maybe Text
message :: Maybe Text
$sel:message:UpdateConnectivityInfoResponse' :: UpdateConnectivityInfoResponse -> Maybe Text
message} -> Maybe Text
message) (\s :: UpdateConnectivityInfoResponse
s@UpdateConnectivityInfoResponse' {} Maybe Text
a -> UpdateConnectivityInfoResponse
s {$sel:message:UpdateConnectivityInfoResponse' :: Maybe Text
message = Maybe Text
a} :: UpdateConnectivityInfoResponse)

-- | The response's http status code.
updateConnectivityInfoResponse_httpStatus :: Lens.Lens' UpdateConnectivityInfoResponse Prelude.Int
updateConnectivityInfoResponse_httpStatus :: (Int -> f Int)
-> UpdateConnectivityInfoResponse
-> f UpdateConnectivityInfoResponse
updateConnectivityInfoResponse_httpStatus = (UpdateConnectivityInfoResponse -> Int)
-> (UpdateConnectivityInfoResponse
    -> Int -> UpdateConnectivityInfoResponse)
-> Lens
     UpdateConnectivityInfoResponse
     UpdateConnectivityInfoResponse
     Int
     Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateConnectivityInfoResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateConnectivityInfoResponse' :: UpdateConnectivityInfoResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateConnectivityInfoResponse
s@UpdateConnectivityInfoResponse' {} Int
a -> UpdateConnectivityInfoResponse
s {$sel:httpStatus:UpdateConnectivityInfoResponse' :: Int
httpStatus = Int
a} :: UpdateConnectivityInfoResponse)

instance
  Prelude.NFData
    UpdateConnectivityInfoResponse