{-# 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.WorkSpacesWeb.UpdateNetworkSettings
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates network settings.
module Amazonka.WorkSpacesWeb.UpdateNetworkSettings
  ( -- * Creating a Request
    UpdateNetworkSettings (..),
    newUpdateNetworkSettings,

    -- * Request Lenses
    updateNetworkSettings_clientToken,
    updateNetworkSettings_securityGroupIds,
    updateNetworkSettings_subnetIds,
    updateNetworkSettings_vpcId,
    updateNetworkSettings_networkSettingsArn,

    -- * Destructuring the Response
    UpdateNetworkSettingsResponse (..),
    newUpdateNetworkSettingsResponse,

    -- * Response Lenses
    updateNetworkSettingsResponse_httpStatus,
    updateNetworkSettingsResponse_networkSettings,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.WorkSpacesWeb.Types

-- | /See:/ 'newUpdateNetworkSettings' smart constructor.
data UpdateNetworkSettings = UpdateNetworkSettings'
  { -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request. Idempotency ensures that an API request
    -- completes only once. With an idempotent request, if the original request
    -- completes successfully, subsequent retries with the same client token
    -- return the result from the original successful request.
    --
    -- If you do not specify a client token, one is automatically generated by
    -- the AWS SDK.
    UpdateNetworkSettings -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | One or more security groups used to control access from streaming
    -- instances to your VPC.
    UpdateNetworkSettings -> Maybe (NonEmpty Text)
securityGroupIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The subnets in which network interfaces are created to connect streaming
    -- instances to your VPC. At least two of these subnets must be in
    -- different availability zones.
    UpdateNetworkSettings -> Maybe (NonEmpty Text)
subnetIds :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
    -- | The VPC that streaming instances will connect to.
    UpdateNetworkSettings -> Maybe Text
vpcId :: Prelude.Maybe Prelude.Text,
    -- | The ARN of the network settings.
    UpdateNetworkSettings -> Text
networkSettingsArn :: Prelude.Text
  }
  deriving (UpdateNetworkSettings -> UpdateNetworkSettings -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNetworkSettings -> UpdateNetworkSettings -> Bool
$c/= :: UpdateNetworkSettings -> UpdateNetworkSettings -> Bool
== :: UpdateNetworkSettings -> UpdateNetworkSettings -> Bool
$c== :: UpdateNetworkSettings -> UpdateNetworkSettings -> Bool
Prelude.Eq, ReadPrec [UpdateNetworkSettings]
ReadPrec UpdateNetworkSettings
Int -> ReadS UpdateNetworkSettings
ReadS [UpdateNetworkSettings]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNetworkSettings]
$creadListPrec :: ReadPrec [UpdateNetworkSettings]
readPrec :: ReadPrec UpdateNetworkSettings
$creadPrec :: ReadPrec UpdateNetworkSettings
readList :: ReadS [UpdateNetworkSettings]
$creadList :: ReadS [UpdateNetworkSettings]
readsPrec :: Int -> ReadS UpdateNetworkSettings
$creadsPrec :: Int -> ReadS UpdateNetworkSettings
Prelude.Read, Int -> UpdateNetworkSettings -> ShowS
[UpdateNetworkSettings] -> ShowS
UpdateNetworkSettings -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNetworkSettings] -> ShowS
$cshowList :: [UpdateNetworkSettings] -> ShowS
show :: UpdateNetworkSettings -> String
$cshow :: UpdateNetworkSettings -> String
showsPrec :: Int -> UpdateNetworkSettings -> ShowS
$cshowsPrec :: Int -> UpdateNetworkSettings -> ShowS
Prelude.Show, forall x. Rep UpdateNetworkSettings x -> UpdateNetworkSettings
forall x. UpdateNetworkSettings -> Rep UpdateNetworkSettings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateNetworkSettings x -> UpdateNetworkSettings
$cfrom :: forall x. UpdateNetworkSettings -> Rep UpdateNetworkSettings x
Prelude.Generic)

-- |
-- Create a value of 'UpdateNetworkSettings' 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:
--
-- 'clientToken', 'updateNetworkSettings_clientToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. Idempotency ensures that an API request
-- completes only once. With an idempotent request, if the original request
-- completes successfully, subsequent retries with the same client token
-- return the result from the original successful request.
--
-- If you do not specify a client token, one is automatically generated by
-- the AWS SDK.
--
-- 'securityGroupIds', 'updateNetworkSettings_securityGroupIds' - One or more security groups used to control access from streaming
-- instances to your VPC.
--
-- 'subnetIds', 'updateNetworkSettings_subnetIds' - The subnets in which network interfaces are created to connect streaming
-- instances to your VPC. At least two of these subnets must be in
-- different availability zones.
--
-- 'vpcId', 'updateNetworkSettings_vpcId' - The VPC that streaming instances will connect to.
--
-- 'networkSettingsArn', 'updateNetworkSettings_networkSettingsArn' - The ARN of the network settings.
newUpdateNetworkSettings ::
  -- | 'networkSettingsArn'
  Prelude.Text ->
  UpdateNetworkSettings
newUpdateNetworkSettings :: Text -> UpdateNetworkSettings
newUpdateNetworkSettings Text
pNetworkSettingsArn_ =
  UpdateNetworkSettings'
    { $sel:clientToken:UpdateNetworkSettings' :: Maybe Text
clientToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:securityGroupIds:UpdateNetworkSettings' :: Maybe (NonEmpty Text)
securityGroupIds = forall a. Maybe a
Prelude.Nothing,
      $sel:subnetIds:UpdateNetworkSettings' :: Maybe (NonEmpty Text)
subnetIds = forall a. Maybe a
Prelude.Nothing,
      $sel:vpcId:UpdateNetworkSettings' :: Maybe Text
vpcId = forall a. Maybe a
Prelude.Nothing,
      $sel:networkSettingsArn:UpdateNetworkSettings' :: Text
networkSettingsArn = Text
pNetworkSettingsArn_
    }

-- | A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. Idempotency ensures that an API request
-- completes only once. With an idempotent request, if the original request
-- completes successfully, subsequent retries with the same client token
-- return the result from the original successful request.
--
-- If you do not specify a client token, one is automatically generated by
-- the AWS SDK.
updateNetworkSettings_clientToken :: Lens.Lens' UpdateNetworkSettings (Prelude.Maybe Prelude.Text)
updateNetworkSettings_clientToken :: Lens' UpdateNetworkSettings (Maybe Text)
updateNetworkSettings_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNetworkSettings' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateNetworkSettings
s@UpdateNetworkSettings' {} Maybe Text
a -> UpdateNetworkSettings
s {$sel:clientToken:UpdateNetworkSettings' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateNetworkSettings)

-- | One or more security groups used to control access from streaming
-- instances to your VPC.
updateNetworkSettings_securityGroupIds :: Lens.Lens' UpdateNetworkSettings (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
updateNetworkSettings_securityGroupIds :: Lens' UpdateNetworkSettings (Maybe (NonEmpty Text))
updateNetworkSettings_securityGroupIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNetworkSettings' {Maybe (NonEmpty Text)
securityGroupIds :: Maybe (NonEmpty Text)
$sel:securityGroupIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
securityGroupIds} -> Maybe (NonEmpty Text)
securityGroupIds) (\s :: UpdateNetworkSettings
s@UpdateNetworkSettings' {} Maybe (NonEmpty Text)
a -> UpdateNetworkSettings
s {$sel:securityGroupIds:UpdateNetworkSettings' :: Maybe (NonEmpty Text)
securityGroupIds = Maybe (NonEmpty Text)
a} :: UpdateNetworkSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The subnets in which network interfaces are created to connect streaming
-- instances to your VPC. At least two of these subnets must be in
-- different availability zones.
updateNetworkSettings_subnetIds :: Lens.Lens' UpdateNetworkSettings (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
updateNetworkSettings_subnetIds :: Lens' UpdateNetworkSettings (Maybe (NonEmpty Text))
updateNetworkSettings_subnetIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNetworkSettings' {Maybe (NonEmpty Text)
subnetIds :: Maybe (NonEmpty Text)
$sel:subnetIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
subnetIds} -> Maybe (NonEmpty Text)
subnetIds) (\s :: UpdateNetworkSettings
s@UpdateNetworkSettings' {} Maybe (NonEmpty Text)
a -> UpdateNetworkSettings
s {$sel:subnetIds:UpdateNetworkSettings' :: Maybe (NonEmpty Text)
subnetIds = Maybe (NonEmpty Text)
a} :: UpdateNetworkSettings) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The VPC that streaming instances will connect to.
updateNetworkSettings_vpcId :: Lens.Lens' UpdateNetworkSettings (Prelude.Maybe Prelude.Text)
updateNetworkSettings_vpcId :: Lens' UpdateNetworkSettings (Maybe Text)
updateNetworkSettings_vpcId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNetworkSettings' {Maybe Text
vpcId :: Maybe Text
$sel:vpcId:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
vpcId} -> Maybe Text
vpcId) (\s :: UpdateNetworkSettings
s@UpdateNetworkSettings' {} Maybe Text
a -> UpdateNetworkSettings
s {$sel:vpcId:UpdateNetworkSettings' :: Maybe Text
vpcId = Maybe Text
a} :: UpdateNetworkSettings)

-- | The ARN of the network settings.
updateNetworkSettings_networkSettingsArn :: Lens.Lens' UpdateNetworkSettings Prelude.Text
updateNetworkSettings_networkSettingsArn :: Lens' UpdateNetworkSettings Text
updateNetworkSettings_networkSettingsArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNetworkSettings' {Text
networkSettingsArn :: Text
$sel:networkSettingsArn:UpdateNetworkSettings' :: UpdateNetworkSettings -> Text
networkSettingsArn} -> Text
networkSettingsArn) (\s :: UpdateNetworkSettings
s@UpdateNetworkSettings' {} Text
a -> UpdateNetworkSettings
s {$sel:networkSettingsArn:UpdateNetworkSettings' :: Text
networkSettingsArn = Text
a} :: UpdateNetworkSettings)

instance Core.AWSRequest UpdateNetworkSettings where
  type
    AWSResponse UpdateNetworkSettings =
      UpdateNetworkSettingsResponse
  request :: (Service -> Service)
-> UpdateNetworkSettings -> Request UpdateNetworkSettings
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateNetworkSettings
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateNetworkSettings)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Int -> NetworkSettings -> UpdateNetworkSettingsResponse
UpdateNetworkSettingsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"networkSettings")
      )

instance Prelude.Hashable UpdateNetworkSettings where
  hashWithSalt :: Int -> UpdateNetworkSettings -> Int
hashWithSalt Int
_salt UpdateNetworkSettings' {Maybe (NonEmpty Text)
Maybe Text
Text
networkSettingsArn :: Text
vpcId :: Maybe Text
subnetIds :: Maybe (NonEmpty Text)
securityGroupIds :: Maybe (NonEmpty Text)
clientToken :: Maybe Text
$sel:networkSettingsArn:UpdateNetworkSettings' :: UpdateNetworkSettings -> Text
$sel:vpcId:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
$sel:subnetIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
$sel:securityGroupIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
$sel:clientToken:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
securityGroupIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
subnetIds
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
vpcId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
networkSettingsArn

instance Prelude.NFData UpdateNetworkSettings where
  rnf :: UpdateNetworkSettings -> ()
rnf UpdateNetworkSettings' {Maybe (NonEmpty Text)
Maybe Text
Text
networkSettingsArn :: Text
vpcId :: Maybe Text
subnetIds :: Maybe (NonEmpty Text)
securityGroupIds :: Maybe (NonEmpty Text)
clientToken :: Maybe Text
$sel:networkSettingsArn:UpdateNetworkSettings' :: UpdateNetworkSettings -> Text
$sel:vpcId:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
$sel:subnetIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
$sel:securityGroupIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
$sel:clientToken:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
securityGroupIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
subnetIds
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
networkSettingsArn

instance Data.ToHeaders UpdateNetworkSettings where
  toHeaders :: UpdateNetworkSettings -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateNetworkSettings where
  toJSON :: UpdateNetworkSettings -> Value
toJSON UpdateNetworkSettings' {Maybe (NonEmpty Text)
Maybe Text
Text
networkSettingsArn :: Text
vpcId :: Maybe Text
subnetIds :: Maybe (NonEmpty Text)
securityGroupIds :: Maybe (NonEmpty Text)
clientToken :: Maybe Text
$sel:networkSettingsArn:UpdateNetworkSettings' :: UpdateNetworkSettings -> Text
$sel:vpcId:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
$sel:subnetIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
$sel:securityGroupIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
$sel:clientToken:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"clientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
            (Key
"securityGroupIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
securityGroupIds,
            (Key
"subnetIds" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
subnetIds,
            (Key
"vpcId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
vpcId
          ]
      )

instance Data.ToPath UpdateNetworkSettings where
  toPath :: UpdateNetworkSettings -> ByteString
toPath UpdateNetworkSettings' {Maybe (NonEmpty Text)
Maybe Text
Text
networkSettingsArn :: Text
vpcId :: Maybe Text
subnetIds :: Maybe (NonEmpty Text)
securityGroupIds :: Maybe (NonEmpty Text)
clientToken :: Maybe Text
$sel:networkSettingsArn:UpdateNetworkSettings' :: UpdateNetworkSettings -> Text
$sel:vpcId:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
$sel:subnetIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
$sel:securityGroupIds:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe (NonEmpty Text)
$sel:clientToken:UpdateNetworkSettings' :: UpdateNetworkSettings -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"/networkSettings/", forall a. ToByteString a => a -> ByteString
Data.toBS Text
networkSettingsArn]

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

-- | /See:/ 'newUpdateNetworkSettingsResponse' smart constructor.
data UpdateNetworkSettingsResponse = UpdateNetworkSettingsResponse'
  { -- | The response's http status code.
    UpdateNetworkSettingsResponse -> Int
httpStatus :: Prelude.Int,
    -- | The network settings.
    UpdateNetworkSettingsResponse -> NetworkSettings
networkSettings :: NetworkSettings
  }
  deriving (UpdateNetworkSettingsResponse
-> UpdateNetworkSettingsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateNetworkSettingsResponse
-> UpdateNetworkSettingsResponse -> Bool
$c/= :: UpdateNetworkSettingsResponse
-> UpdateNetworkSettingsResponse -> Bool
== :: UpdateNetworkSettingsResponse
-> UpdateNetworkSettingsResponse -> Bool
$c== :: UpdateNetworkSettingsResponse
-> UpdateNetworkSettingsResponse -> Bool
Prelude.Eq, ReadPrec [UpdateNetworkSettingsResponse]
ReadPrec UpdateNetworkSettingsResponse
Int -> ReadS UpdateNetworkSettingsResponse
ReadS [UpdateNetworkSettingsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateNetworkSettingsResponse]
$creadListPrec :: ReadPrec [UpdateNetworkSettingsResponse]
readPrec :: ReadPrec UpdateNetworkSettingsResponse
$creadPrec :: ReadPrec UpdateNetworkSettingsResponse
readList :: ReadS [UpdateNetworkSettingsResponse]
$creadList :: ReadS [UpdateNetworkSettingsResponse]
readsPrec :: Int -> ReadS UpdateNetworkSettingsResponse
$creadsPrec :: Int -> ReadS UpdateNetworkSettingsResponse
Prelude.Read, Int -> UpdateNetworkSettingsResponse -> ShowS
[UpdateNetworkSettingsResponse] -> ShowS
UpdateNetworkSettingsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateNetworkSettingsResponse] -> ShowS
$cshowList :: [UpdateNetworkSettingsResponse] -> ShowS
show :: UpdateNetworkSettingsResponse -> String
$cshow :: UpdateNetworkSettingsResponse -> String
showsPrec :: Int -> UpdateNetworkSettingsResponse -> ShowS
$cshowsPrec :: Int -> UpdateNetworkSettingsResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateNetworkSettingsResponse x
-> UpdateNetworkSettingsResponse
forall x.
UpdateNetworkSettingsResponse
-> Rep UpdateNetworkSettingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateNetworkSettingsResponse x
-> UpdateNetworkSettingsResponse
$cfrom :: forall x.
UpdateNetworkSettingsResponse
-> Rep UpdateNetworkSettingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateNetworkSettingsResponse' 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:
--
-- 'httpStatus', 'updateNetworkSettingsResponse_httpStatus' - The response's http status code.
--
-- 'networkSettings', 'updateNetworkSettingsResponse_networkSettings' - The network settings.
newUpdateNetworkSettingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'networkSettings'
  NetworkSettings ->
  UpdateNetworkSettingsResponse
newUpdateNetworkSettingsResponse :: Int -> NetworkSettings -> UpdateNetworkSettingsResponse
newUpdateNetworkSettingsResponse
  Int
pHttpStatus_
  NetworkSettings
pNetworkSettings_ =
    UpdateNetworkSettingsResponse'
      { $sel:httpStatus:UpdateNetworkSettingsResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:networkSettings:UpdateNetworkSettingsResponse' :: NetworkSettings
networkSettings = NetworkSettings
pNetworkSettings_
      }

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

-- | The network settings.
updateNetworkSettingsResponse_networkSettings :: Lens.Lens' UpdateNetworkSettingsResponse NetworkSettings
updateNetworkSettingsResponse_networkSettings :: Lens' UpdateNetworkSettingsResponse NetworkSettings
updateNetworkSettingsResponse_networkSettings = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateNetworkSettingsResponse' {NetworkSettings
networkSettings :: NetworkSettings
$sel:networkSettings:UpdateNetworkSettingsResponse' :: UpdateNetworkSettingsResponse -> NetworkSettings
networkSettings} -> NetworkSettings
networkSettings) (\s :: UpdateNetworkSettingsResponse
s@UpdateNetworkSettingsResponse' {} NetworkSettings
a -> UpdateNetworkSettingsResponse
s {$sel:networkSettings:UpdateNetworkSettingsResponse' :: NetworkSettings
networkSettings = NetworkSettings
a} :: UpdateNetworkSettingsResponse)

instance Prelude.NFData UpdateNetworkSettingsResponse where
  rnf :: UpdateNetworkSettingsResponse -> ()
rnf UpdateNetworkSettingsResponse' {Int
NetworkSettings
networkSettings :: NetworkSettings
httpStatus :: Int
$sel:networkSettings:UpdateNetworkSettingsResponse' :: UpdateNetworkSettingsResponse -> NetworkSettings
$sel:httpStatus:UpdateNetworkSettingsResponse' :: UpdateNetworkSettingsResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NetworkSettings
networkSettings