{-# 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.AppMesh.UpdateVirtualGateway
-- 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 an existing virtual gateway in a specified service mesh.
module Amazonka.AppMesh.UpdateVirtualGateway
  ( -- * Creating a Request
    UpdateVirtualGateway (..),
    newUpdateVirtualGateway,

    -- * Request Lenses
    updateVirtualGateway_clientToken,
    updateVirtualGateway_meshOwner,
    updateVirtualGateway_meshName,
    updateVirtualGateway_spec,
    updateVirtualGateway_virtualGatewayName,

    -- * Destructuring the Response
    UpdateVirtualGatewayResponse (..),
    newUpdateVirtualGatewayResponse,

    -- * Response Lenses
    updateVirtualGatewayResponse_httpStatus,
    updateVirtualGatewayResponse_virtualGateway,
  )
where

import Amazonka.AppMesh.Types
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

-- | /See:/ 'newUpdateVirtualGateway' smart constructor.
data UpdateVirtualGateway = UpdateVirtualGateway'
  { -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request. Up to 36 letters, numbers, hyphens, and
    -- underscores are allowed.
    UpdateVirtualGateway -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The Amazon Web Services IAM account ID of the service mesh owner. If the
    -- account ID is not your own, then it\'s the ID of the account that shared
    -- the mesh with your account. For more information about mesh sharing, see
    -- <https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html Working with shared meshes>.
    UpdateVirtualGateway -> Maybe Text
meshOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the service mesh that the virtual gateway resides in.
    UpdateVirtualGateway -> Text
meshName :: Prelude.Text,
    -- | The new virtual gateway specification to apply. This overwrites the
    -- existing data.
    UpdateVirtualGateway -> VirtualGatewaySpec
spec :: VirtualGatewaySpec,
    -- | The name of the virtual gateway to update.
    UpdateVirtualGateway -> Text
virtualGatewayName :: Prelude.Text
  }
  deriving (UpdateVirtualGateway -> UpdateVirtualGateway -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVirtualGateway -> UpdateVirtualGateway -> Bool
$c/= :: UpdateVirtualGateway -> UpdateVirtualGateway -> Bool
== :: UpdateVirtualGateway -> UpdateVirtualGateway -> Bool
$c== :: UpdateVirtualGateway -> UpdateVirtualGateway -> Bool
Prelude.Eq, ReadPrec [UpdateVirtualGateway]
ReadPrec UpdateVirtualGateway
Int -> ReadS UpdateVirtualGateway
ReadS [UpdateVirtualGateway]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVirtualGateway]
$creadListPrec :: ReadPrec [UpdateVirtualGateway]
readPrec :: ReadPrec UpdateVirtualGateway
$creadPrec :: ReadPrec UpdateVirtualGateway
readList :: ReadS [UpdateVirtualGateway]
$creadList :: ReadS [UpdateVirtualGateway]
readsPrec :: Int -> ReadS UpdateVirtualGateway
$creadsPrec :: Int -> ReadS UpdateVirtualGateway
Prelude.Read, Int -> UpdateVirtualGateway -> ShowS
[UpdateVirtualGateway] -> ShowS
UpdateVirtualGateway -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVirtualGateway] -> ShowS
$cshowList :: [UpdateVirtualGateway] -> ShowS
show :: UpdateVirtualGateway -> String
$cshow :: UpdateVirtualGateway -> String
showsPrec :: Int -> UpdateVirtualGateway -> ShowS
$cshowsPrec :: Int -> UpdateVirtualGateway -> ShowS
Prelude.Show, forall x. Rep UpdateVirtualGateway x -> UpdateVirtualGateway
forall x. UpdateVirtualGateway -> Rep UpdateVirtualGateway x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateVirtualGateway x -> UpdateVirtualGateway
$cfrom :: forall x. UpdateVirtualGateway -> Rep UpdateVirtualGateway x
Prelude.Generic)

-- |
-- Create a value of 'UpdateVirtualGateway' 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', 'updateVirtualGateway_clientToken' - Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. Up to 36 letters, numbers, hyphens, and
-- underscores are allowed.
--
-- 'meshOwner', 'updateVirtualGateway_meshOwner' - The Amazon Web Services IAM account ID of the service mesh owner. If the
-- account ID is not your own, then it\'s the ID of the account that shared
-- the mesh with your account. For more information about mesh sharing, see
-- <https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html Working with shared meshes>.
--
-- 'meshName', 'updateVirtualGateway_meshName' - The name of the service mesh that the virtual gateway resides in.
--
-- 'spec', 'updateVirtualGateway_spec' - The new virtual gateway specification to apply. This overwrites the
-- existing data.
--
-- 'virtualGatewayName', 'updateVirtualGateway_virtualGatewayName' - The name of the virtual gateway to update.
newUpdateVirtualGateway ::
  -- | 'meshName'
  Prelude.Text ->
  -- | 'spec'
  VirtualGatewaySpec ->
  -- | 'virtualGatewayName'
  Prelude.Text ->
  UpdateVirtualGateway
newUpdateVirtualGateway :: Text -> VirtualGatewaySpec -> Text -> UpdateVirtualGateway
newUpdateVirtualGateway
  Text
pMeshName_
  VirtualGatewaySpec
pSpec_
  Text
pVirtualGatewayName_ =
    UpdateVirtualGateway'
      { $sel:clientToken:UpdateVirtualGateway' :: Maybe Text
clientToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:meshOwner:UpdateVirtualGateway' :: Maybe Text
meshOwner = forall a. Maybe a
Prelude.Nothing,
        $sel:meshName:UpdateVirtualGateway' :: Text
meshName = Text
pMeshName_,
        $sel:spec:UpdateVirtualGateway' :: VirtualGatewaySpec
spec = VirtualGatewaySpec
pSpec_,
        $sel:virtualGatewayName:UpdateVirtualGateway' :: Text
virtualGatewayName = Text
pVirtualGatewayName_
      }

-- | Unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. Up to 36 letters, numbers, hyphens, and
-- underscores are allowed.
updateVirtualGateway_clientToken :: Lens.Lens' UpdateVirtualGateway (Prelude.Maybe Prelude.Text)
updateVirtualGateway_clientToken :: Lens' UpdateVirtualGateway (Maybe Text)
updateVirtualGateway_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualGateway' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateVirtualGateway' :: UpdateVirtualGateway -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateVirtualGateway
s@UpdateVirtualGateway' {} Maybe Text
a -> UpdateVirtualGateway
s {$sel:clientToken:UpdateVirtualGateway' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateVirtualGateway)

-- | The Amazon Web Services IAM account ID of the service mesh owner. If the
-- account ID is not your own, then it\'s the ID of the account that shared
-- the mesh with your account. For more information about mesh sharing, see
-- <https://docs.aws.amazon.com/app-mesh/latest/userguide/sharing.html Working with shared meshes>.
updateVirtualGateway_meshOwner :: Lens.Lens' UpdateVirtualGateway (Prelude.Maybe Prelude.Text)
updateVirtualGateway_meshOwner :: Lens' UpdateVirtualGateway (Maybe Text)
updateVirtualGateway_meshOwner = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualGateway' {Maybe Text
meshOwner :: Maybe Text
$sel:meshOwner:UpdateVirtualGateway' :: UpdateVirtualGateway -> Maybe Text
meshOwner} -> Maybe Text
meshOwner) (\s :: UpdateVirtualGateway
s@UpdateVirtualGateway' {} Maybe Text
a -> UpdateVirtualGateway
s {$sel:meshOwner:UpdateVirtualGateway' :: Maybe Text
meshOwner = Maybe Text
a} :: UpdateVirtualGateway)

-- | The name of the service mesh that the virtual gateway resides in.
updateVirtualGateway_meshName :: Lens.Lens' UpdateVirtualGateway Prelude.Text
updateVirtualGateway_meshName :: Lens' UpdateVirtualGateway Text
updateVirtualGateway_meshName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualGateway' {Text
meshName :: Text
$sel:meshName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
meshName} -> Text
meshName) (\s :: UpdateVirtualGateway
s@UpdateVirtualGateway' {} Text
a -> UpdateVirtualGateway
s {$sel:meshName:UpdateVirtualGateway' :: Text
meshName = Text
a} :: UpdateVirtualGateway)

-- | The new virtual gateway specification to apply. This overwrites the
-- existing data.
updateVirtualGateway_spec :: Lens.Lens' UpdateVirtualGateway VirtualGatewaySpec
updateVirtualGateway_spec :: Lens' UpdateVirtualGateway VirtualGatewaySpec
updateVirtualGateway_spec = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualGateway' {VirtualGatewaySpec
spec :: VirtualGatewaySpec
$sel:spec:UpdateVirtualGateway' :: UpdateVirtualGateway -> VirtualGatewaySpec
spec} -> VirtualGatewaySpec
spec) (\s :: UpdateVirtualGateway
s@UpdateVirtualGateway' {} VirtualGatewaySpec
a -> UpdateVirtualGateway
s {$sel:spec:UpdateVirtualGateway' :: VirtualGatewaySpec
spec = VirtualGatewaySpec
a} :: UpdateVirtualGateway)

-- | The name of the virtual gateway to update.
updateVirtualGateway_virtualGatewayName :: Lens.Lens' UpdateVirtualGateway Prelude.Text
updateVirtualGateway_virtualGatewayName :: Lens' UpdateVirtualGateway Text
updateVirtualGateway_virtualGatewayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualGateway' {Text
virtualGatewayName :: Text
$sel:virtualGatewayName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
virtualGatewayName} -> Text
virtualGatewayName) (\s :: UpdateVirtualGateway
s@UpdateVirtualGateway' {} Text
a -> UpdateVirtualGateway
s {$sel:virtualGatewayName:UpdateVirtualGateway' :: Text
virtualGatewayName = Text
a} :: UpdateVirtualGateway)

instance Core.AWSRequest UpdateVirtualGateway where
  type
    AWSResponse UpdateVirtualGateway =
      UpdateVirtualGatewayResponse
  request :: (Service -> Service)
-> UpdateVirtualGateway -> Request UpdateVirtualGateway
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateVirtualGateway
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateVirtualGateway)))
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 -> VirtualGatewayData -> UpdateVirtualGatewayResponse
UpdateVirtualGatewayResponse'
            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.<*> (forall a. FromJSON a => Object -> Either String a
Data.eitherParseJSON Object
x)
      )

instance Prelude.Hashable UpdateVirtualGateway where
  hashWithSalt :: Int -> UpdateVirtualGateway -> Int
hashWithSalt Int
_salt UpdateVirtualGateway' {Maybe Text
Text
VirtualGatewaySpec
virtualGatewayName :: Text
spec :: VirtualGatewaySpec
meshName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:spec:UpdateVirtualGateway' :: UpdateVirtualGateway -> VirtualGatewaySpec
$sel:meshName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:meshOwner:UpdateVirtualGateway' :: UpdateVirtualGateway -> Maybe Text
$sel:clientToken:UpdateVirtualGateway' :: UpdateVirtualGateway -> 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 Text
meshOwner
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
meshName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VirtualGatewaySpec
spec
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
virtualGatewayName

instance Prelude.NFData UpdateVirtualGateway where
  rnf :: UpdateVirtualGateway -> ()
rnf UpdateVirtualGateway' {Maybe Text
Text
VirtualGatewaySpec
virtualGatewayName :: Text
spec :: VirtualGatewaySpec
meshName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:spec:UpdateVirtualGateway' :: UpdateVirtualGateway -> VirtualGatewaySpec
$sel:meshName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:meshOwner:UpdateVirtualGateway' :: UpdateVirtualGateway -> Maybe Text
$sel:clientToken:UpdateVirtualGateway' :: UpdateVirtualGateway -> 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 Text
meshOwner
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
meshName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VirtualGatewaySpec
spec
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
virtualGatewayName

instance Data.ToHeaders UpdateVirtualGateway where
  toHeaders :: UpdateVirtualGateway -> 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 UpdateVirtualGateway where
  toJSON :: UpdateVirtualGateway -> Value
toJSON UpdateVirtualGateway' {Maybe Text
Text
VirtualGatewaySpec
virtualGatewayName :: Text
spec :: VirtualGatewaySpec
meshName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:spec:UpdateVirtualGateway' :: UpdateVirtualGateway -> VirtualGatewaySpec
$sel:meshName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:meshOwner:UpdateVirtualGateway' :: UpdateVirtualGateway -> Maybe Text
$sel:clientToken:UpdateVirtualGateway' :: UpdateVirtualGateway -> 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,
            forall a. a -> Maybe a
Prelude.Just (Key
"spec" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= VirtualGatewaySpec
spec)
          ]
      )

instance Data.ToPath UpdateVirtualGateway where
  toPath :: UpdateVirtualGateway -> ByteString
toPath UpdateVirtualGateway' {Maybe Text
Text
VirtualGatewaySpec
virtualGatewayName :: Text
spec :: VirtualGatewaySpec
meshName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:spec:UpdateVirtualGateway' :: UpdateVirtualGateway -> VirtualGatewaySpec
$sel:meshName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:meshOwner:UpdateVirtualGateway' :: UpdateVirtualGateway -> Maybe Text
$sel:clientToken:UpdateVirtualGateway' :: UpdateVirtualGateway -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v20190125/meshes/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
meshName,
        ByteString
"/virtualGateways/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
virtualGatewayName
      ]

instance Data.ToQuery UpdateVirtualGateway where
  toQuery :: UpdateVirtualGateway -> QueryString
toQuery UpdateVirtualGateway' {Maybe Text
Text
VirtualGatewaySpec
virtualGatewayName :: Text
spec :: VirtualGatewaySpec
meshName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:spec:UpdateVirtualGateway' :: UpdateVirtualGateway -> VirtualGatewaySpec
$sel:meshName:UpdateVirtualGateway' :: UpdateVirtualGateway -> Text
$sel:meshOwner:UpdateVirtualGateway' :: UpdateVirtualGateway -> Maybe Text
$sel:clientToken:UpdateVirtualGateway' :: UpdateVirtualGateway -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"meshOwner" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
meshOwner]

-- | /See:/ 'newUpdateVirtualGatewayResponse' smart constructor.
data UpdateVirtualGatewayResponse = UpdateVirtualGatewayResponse'
  { -- | The response's http status code.
    UpdateVirtualGatewayResponse -> Int
httpStatus :: Prelude.Int,
    -- | A full description of the virtual gateway that was updated.
    UpdateVirtualGatewayResponse -> VirtualGatewayData
virtualGateway :: VirtualGatewayData
  }
  deriving (UpdateVirtualGatewayResponse
-> UpdateVirtualGatewayResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVirtualGatewayResponse
-> UpdateVirtualGatewayResponse -> Bool
$c/= :: UpdateVirtualGatewayResponse
-> UpdateVirtualGatewayResponse -> Bool
== :: UpdateVirtualGatewayResponse
-> UpdateVirtualGatewayResponse -> Bool
$c== :: UpdateVirtualGatewayResponse
-> UpdateVirtualGatewayResponse -> Bool
Prelude.Eq, ReadPrec [UpdateVirtualGatewayResponse]
ReadPrec UpdateVirtualGatewayResponse
Int -> ReadS UpdateVirtualGatewayResponse
ReadS [UpdateVirtualGatewayResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVirtualGatewayResponse]
$creadListPrec :: ReadPrec [UpdateVirtualGatewayResponse]
readPrec :: ReadPrec UpdateVirtualGatewayResponse
$creadPrec :: ReadPrec UpdateVirtualGatewayResponse
readList :: ReadS [UpdateVirtualGatewayResponse]
$creadList :: ReadS [UpdateVirtualGatewayResponse]
readsPrec :: Int -> ReadS UpdateVirtualGatewayResponse
$creadsPrec :: Int -> ReadS UpdateVirtualGatewayResponse
Prelude.Read, Int -> UpdateVirtualGatewayResponse -> ShowS
[UpdateVirtualGatewayResponse] -> ShowS
UpdateVirtualGatewayResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVirtualGatewayResponse] -> ShowS
$cshowList :: [UpdateVirtualGatewayResponse] -> ShowS
show :: UpdateVirtualGatewayResponse -> String
$cshow :: UpdateVirtualGatewayResponse -> String
showsPrec :: Int -> UpdateVirtualGatewayResponse -> ShowS
$cshowsPrec :: Int -> UpdateVirtualGatewayResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateVirtualGatewayResponse x -> UpdateVirtualGatewayResponse
forall x.
UpdateVirtualGatewayResponse -> Rep UpdateVirtualGatewayResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateVirtualGatewayResponse x -> UpdateVirtualGatewayResponse
$cfrom :: forall x.
UpdateVirtualGatewayResponse -> Rep UpdateVirtualGatewayResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateVirtualGatewayResponse' 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', 'updateVirtualGatewayResponse_httpStatus' - The response's http status code.
--
-- 'virtualGateway', 'updateVirtualGatewayResponse_virtualGateway' - A full description of the virtual gateway that was updated.
newUpdateVirtualGatewayResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'virtualGateway'
  VirtualGatewayData ->
  UpdateVirtualGatewayResponse
newUpdateVirtualGatewayResponse :: Int -> VirtualGatewayData -> UpdateVirtualGatewayResponse
newUpdateVirtualGatewayResponse
  Int
pHttpStatus_
  VirtualGatewayData
pVirtualGateway_ =
    UpdateVirtualGatewayResponse'
      { $sel:httpStatus:UpdateVirtualGatewayResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:virtualGateway:UpdateVirtualGatewayResponse' :: VirtualGatewayData
virtualGateway = VirtualGatewayData
pVirtualGateway_
      }

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

-- | A full description of the virtual gateway that was updated.
updateVirtualGatewayResponse_virtualGateway :: Lens.Lens' UpdateVirtualGatewayResponse VirtualGatewayData
updateVirtualGatewayResponse_virtualGateway :: Lens' UpdateVirtualGatewayResponse VirtualGatewayData
updateVirtualGatewayResponse_virtualGateway = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualGatewayResponse' {VirtualGatewayData
virtualGateway :: VirtualGatewayData
$sel:virtualGateway:UpdateVirtualGatewayResponse' :: UpdateVirtualGatewayResponse -> VirtualGatewayData
virtualGateway} -> VirtualGatewayData
virtualGateway) (\s :: UpdateVirtualGatewayResponse
s@UpdateVirtualGatewayResponse' {} VirtualGatewayData
a -> UpdateVirtualGatewayResponse
s {$sel:virtualGateway:UpdateVirtualGatewayResponse' :: VirtualGatewayData
virtualGateway = VirtualGatewayData
a} :: UpdateVirtualGatewayResponse)

instance Prelude.NFData UpdateVirtualGatewayResponse where
  rnf :: UpdateVirtualGatewayResponse -> ()
rnf UpdateVirtualGatewayResponse' {Int
VirtualGatewayData
virtualGateway :: VirtualGatewayData
httpStatus :: Int
$sel:virtualGateway:UpdateVirtualGatewayResponse' :: UpdateVirtualGatewayResponse -> VirtualGatewayData
$sel:httpStatus:UpdateVirtualGatewayResponse' :: UpdateVirtualGatewayResponse -> 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 VirtualGatewayData
virtualGateway