{-# 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-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 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.Lens as Lens
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 AWS 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
(UpdateVirtualGateway -> UpdateVirtualGateway -> Bool)
-> (UpdateVirtualGateway -> UpdateVirtualGateway -> Bool)
-> Eq UpdateVirtualGateway
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]
(Int -> ReadS UpdateVirtualGateway)
-> ReadS [UpdateVirtualGateway]
-> ReadPrec UpdateVirtualGateway
-> ReadPrec [UpdateVirtualGateway]
-> Read 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
(Int -> UpdateVirtualGateway -> ShowS)
-> (UpdateVirtualGateway -> String)
-> ([UpdateVirtualGateway] -> ShowS)
-> Show UpdateVirtualGateway
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. UpdateVirtualGateway -> Rep UpdateVirtualGateway x)
-> (forall x. Rep UpdateVirtualGateway x -> UpdateVirtualGateway)
-> Generic UpdateVirtualGateway
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 AWS 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' :: Maybe Text
-> Maybe Text
-> Text
-> VirtualGatewaySpec
-> Text
-> UpdateVirtualGateway
UpdateVirtualGateway'
      { $sel:clientToken:UpdateVirtualGateway' :: Maybe Text
clientToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:meshOwner:UpdateVirtualGateway' :: Maybe Text
meshOwner = Maybe Text
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 :: (Maybe Text -> f (Maybe Text))
-> UpdateVirtualGateway -> f UpdateVirtualGateway
updateVirtualGateway_clientToken = (UpdateVirtualGateway -> Maybe Text)
-> (UpdateVirtualGateway -> Maybe Text -> UpdateVirtualGateway)
-> Lens
     UpdateVirtualGateway UpdateVirtualGateway (Maybe Text) (Maybe Text)
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 AWS 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 :: (Maybe Text -> f (Maybe Text))
-> UpdateVirtualGateway -> f UpdateVirtualGateway
updateVirtualGateway_meshOwner = (UpdateVirtualGateway -> Maybe Text)
-> (UpdateVirtualGateway -> Maybe Text -> UpdateVirtualGateway)
-> Lens
     UpdateVirtualGateway UpdateVirtualGateway (Maybe Text) (Maybe Text)
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 :: (Text -> f Text) -> UpdateVirtualGateway -> f UpdateVirtualGateway
updateVirtualGateway_meshName = (UpdateVirtualGateway -> Text)
-> (UpdateVirtualGateway -> Text -> UpdateVirtualGateway)
-> Lens UpdateVirtualGateway UpdateVirtualGateway Text Text
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 :: (VirtualGatewaySpec -> f VirtualGatewaySpec)
-> UpdateVirtualGateway -> f UpdateVirtualGateway
updateVirtualGateway_spec = (UpdateVirtualGateway -> VirtualGatewaySpec)
-> (UpdateVirtualGateway
    -> VirtualGatewaySpec -> UpdateVirtualGateway)
-> Lens
     UpdateVirtualGateway
     UpdateVirtualGateway
     VirtualGatewaySpec
     VirtualGatewaySpec
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 :: (Text -> f Text) -> UpdateVirtualGateway -> f UpdateVirtualGateway
updateVirtualGateway_virtualGatewayName = (UpdateVirtualGateway -> Text)
-> (UpdateVirtualGateway -> Text -> UpdateVirtualGateway)
-> Lens UpdateVirtualGateway UpdateVirtualGateway Text Text
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 :: UpdateVirtualGateway -> Request UpdateVirtualGateway
request = Service -> UpdateVirtualGateway -> Request UpdateVirtualGateway
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateVirtualGateway
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateVirtualGateway)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateVirtualGateway))
-> Logger
-> Service
-> Proxy UpdateVirtualGateway
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateVirtualGateway)))
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 ->
          Int -> VirtualGatewayData -> UpdateVirtualGatewayResponse
UpdateVirtualGatewayResponse'
            (Int -> VirtualGatewayData -> UpdateVirtualGatewayResponse)
-> Either String Int
-> Either
     String (VirtualGatewayData -> UpdateVirtualGatewayResponse)
forall (f :: * -> *) a b. Functor 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))
            Either String (VirtualGatewayData -> UpdateVirtualGatewayResponse)
-> Either String VirtualGatewayData
-> Either String UpdateVirtualGatewayResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object -> Either String VirtualGatewayData
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
      )

instance Prelude.Hashable UpdateVirtualGateway

instance Prelude.NFData UpdateVirtualGateway

instance Core.ToHeaders UpdateVirtualGateway where
  toHeaders :: UpdateVirtualGateway -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateVirtualGateway -> 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 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
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"clientToken" 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
clientToken,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"spec" Text -> VirtualGatewaySpec -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= VirtualGatewaySpec
spec)
          ]
      )

instance Core.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
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/v20190125/meshes/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
meshName,
        ByteString
"/virtualGateways/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
virtualGatewayName
      ]

instance Core.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
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"meshOwner" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: 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
(UpdateVirtualGatewayResponse
 -> UpdateVirtualGatewayResponse -> Bool)
-> (UpdateVirtualGatewayResponse
    -> UpdateVirtualGatewayResponse -> Bool)
-> Eq UpdateVirtualGatewayResponse
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]
(Int -> ReadS UpdateVirtualGatewayResponse)
-> ReadS [UpdateVirtualGatewayResponse]
-> ReadPrec UpdateVirtualGatewayResponse
-> ReadPrec [UpdateVirtualGatewayResponse]
-> Read 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
(Int -> UpdateVirtualGatewayResponse -> ShowS)
-> (UpdateVirtualGatewayResponse -> String)
-> ([UpdateVirtualGatewayResponse] -> ShowS)
-> Show UpdateVirtualGatewayResponse
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.
 UpdateVirtualGatewayResponse -> Rep UpdateVirtualGatewayResponse x)
-> (forall x.
    Rep UpdateVirtualGatewayResponse x -> UpdateVirtualGatewayResponse)
-> Generic UpdateVirtualGatewayResponse
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' :: Int -> VirtualGatewayData -> UpdateVirtualGatewayResponse
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 :: (Int -> f Int)
-> UpdateVirtualGatewayResponse -> f UpdateVirtualGatewayResponse
updateVirtualGatewayResponse_httpStatus = (UpdateVirtualGatewayResponse -> Int)
-> (UpdateVirtualGatewayResponse
    -> Int -> UpdateVirtualGatewayResponse)
-> Lens
     UpdateVirtualGatewayResponse UpdateVirtualGatewayResponse Int Int
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 :: (VirtualGatewayData -> f VirtualGatewayData)
-> UpdateVirtualGatewayResponse -> f UpdateVirtualGatewayResponse
updateVirtualGatewayResponse_virtualGateway = (UpdateVirtualGatewayResponse -> VirtualGatewayData)
-> (UpdateVirtualGatewayResponse
    -> VirtualGatewayData -> UpdateVirtualGatewayResponse)
-> Lens
     UpdateVirtualGatewayResponse
     UpdateVirtualGatewayResponse
     VirtualGatewayData
     VirtualGatewayData
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