{-# 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.UpdateVirtualNode
-- 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 node in a specified service mesh.
module Amazonka.AppMesh.UpdateVirtualNode
  ( -- * Creating a Request
    UpdateVirtualNode (..),
    newUpdateVirtualNode,

    -- * Request Lenses
    updateVirtualNode_clientToken,
    updateVirtualNode_meshOwner,
    updateVirtualNode_meshName,
    updateVirtualNode_spec,
    updateVirtualNode_virtualNodeName,

    -- * Destructuring the Response
    UpdateVirtualNodeResponse (..),
    newUpdateVirtualNodeResponse,

    -- * Response Lenses
    updateVirtualNodeResponse_httpStatus,
    updateVirtualNodeResponse_virtualNode,
  )
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:/ 'newUpdateVirtualNode' smart constructor.
data UpdateVirtualNode = UpdateVirtualNode'
  { -- | Unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request. Up to 36 letters, numbers, hyphens, and
    -- underscores are allowed.
    UpdateVirtualNode -> 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>.
    UpdateVirtualNode -> Maybe Text
meshOwner :: Prelude.Maybe Prelude.Text,
    -- | The name of the service mesh that the virtual node resides in.
    UpdateVirtualNode -> Text
meshName :: Prelude.Text,
    -- | The new virtual node specification to apply. This overwrites the
    -- existing data.
    UpdateVirtualNode -> VirtualNodeSpec
spec :: VirtualNodeSpec,
    -- | The name of the virtual node to update.
    UpdateVirtualNode -> Text
virtualNodeName :: Prelude.Text
  }
  deriving (UpdateVirtualNode -> UpdateVirtualNode -> Bool
(UpdateVirtualNode -> UpdateVirtualNode -> Bool)
-> (UpdateVirtualNode -> UpdateVirtualNode -> Bool)
-> Eq UpdateVirtualNode
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVirtualNode -> UpdateVirtualNode -> Bool
$c/= :: UpdateVirtualNode -> UpdateVirtualNode -> Bool
== :: UpdateVirtualNode -> UpdateVirtualNode -> Bool
$c== :: UpdateVirtualNode -> UpdateVirtualNode -> Bool
Prelude.Eq, ReadPrec [UpdateVirtualNode]
ReadPrec UpdateVirtualNode
Int -> ReadS UpdateVirtualNode
ReadS [UpdateVirtualNode]
(Int -> ReadS UpdateVirtualNode)
-> ReadS [UpdateVirtualNode]
-> ReadPrec UpdateVirtualNode
-> ReadPrec [UpdateVirtualNode]
-> Read UpdateVirtualNode
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVirtualNode]
$creadListPrec :: ReadPrec [UpdateVirtualNode]
readPrec :: ReadPrec UpdateVirtualNode
$creadPrec :: ReadPrec UpdateVirtualNode
readList :: ReadS [UpdateVirtualNode]
$creadList :: ReadS [UpdateVirtualNode]
readsPrec :: Int -> ReadS UpdateVirtualNode
$creadsPrec :: Int -> ReadS UpdateVirtualNode
Prelude.Read, Int -> UpdateVirtualNode -> ShowS
[UpdateVirtualNode] -> ShowS
UpdateVirtualNode -> String
(Int -> UpdateVirtualNode -> ShowS)
-> (UpdateVirtualNode -> String)
-> ([UpdateVirtualNode] -> ShowS)
-> Show UpdateVirtualNode
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVirtualNode] -> ShowS
$cshowList :: [UpdateVirtualNode] -> ShowS
show :: UpdateVirtualNode -> String
$cshow :: UpdateVirtualNode -> String
showsPrec :: Int -> UpdateVirtualNode -> ShowS
$cshowsPrec :: Int -> UpdateVirtualNode -> ShowS
Prelude.Show, (forall x. UpdateVirtualNode -> Rep UpdateVirtualNode x)
-> (forall x. Rep UpdateVirtualNode x -> UpdateVirtualNode)
-> Generic UpdateVirtualNode
forall x. Rep UpdateVirtualNode x -> UpdateVirtualNode
forall x. UpdateVirtualNode -> Rep UpdateVirtualNode x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateVirtualNode x -> UpdateVirtualNode
$cfrom :: forall x. UpdateVirtualNode -> Rep UpdateVirtualNode x
Prelude.Generic)

-- |
-- Create a value of 'UpdateVirtualNode' 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', 'updateVirtualNode_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', 'updateVirtualNode_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', 'updateVirtualNode_meshName' - The name of the service mesh that the virtual node resides in.
--
-- 'spec', 'updateVirtualNode_spec' - The new virtual node specification to apply. This overwrites the
-- existing data.
--
-- 'virtualNodeName', 'updateVirtualNode_virtualNodeName' - The name of the virtual node to update.
newUpdateVirtualNode ::
  -- | 'meshName'
  Prelude.Text ->
  -- | 'spec'
  VirtualNodeSpec ->
  -- | 'virtualNodeName'
  Prelude.Text ->
  UpdateVirtualNode
newUpdateVirtualNode :: Text -> VirtualNodeSpec -> Text -> UpdateVirtualNode
newUpdateVirtualNode
  Text
pMeshName_
  VirtualNodeSpec
pSpec_
  Text
pVirtualNodeName_ =
    UpdateVirtualNode' :: Maybe Text
-> Maybe Text
-> Text
-> VirtualNodeSpec
-> Text
-> UpdateVirtualNode
UpdateVirtualNode'
      { $sel:clientToken:UpdateVirtualNode' :: Maybe Text
clientToken = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:meshOwner:UpdateVirtualNode' :: Maybe Text
meshOwner = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:meshName:UpdateVirtualNode' :: Text
meshName = Text
pMeshName_,
        $sel:spec:UpdateVirtualNode' :: VirtualNodeSpec
spec = VirtualNodeSpec
pSpec_,
        $sel:virtualNodeName:UpdateVirtualNode' :: Text
virtualNodeName = Text
pVirtualNodeName_
      }

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

-- | 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>.
updateVirtualNode_meshOwner :: Lens.Lens' UpdateVirtualNode (Prelude.Maybe Prelude.Text)
updateVirtualNode_meshOwner :: (Maybe Text -> f (Maybe Text))
-> UpdateVirtualNode -> f UpdateVirtualNode
updateVirtualNode_meshOwner = (UpdateVirtualNode -> Maybe Text)
-> (UpdateVirtualNode -> Maybe Text -> UpdateVirtualNode)
-> Lens
     UpdateVirtualNode UpdateVirtualNode (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualNode' {Maybe Text
meshOwner :: Maybe Text
$sel:meshOwner:UpdateVirtualNode' :: UpdateVirtualNode -> Maybe Text
meshOwner} -> Maybe Text
meshOwner) (\s :: UpdateVirtualNode
s@UpdateVirtualNode' {} Maybe Text
a -> UpdateVirtualNode
s {$sel:meshOwner:UpdateVirtualNode' :: Maybe Text
meshOwner = Maybe Text
a} :: UpdateVirtualNode)

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

-- | The new virtual node specification to apply. This overwrites the
-- existing data.
updateVirtualNode_spec :: Lens.Lens' UpdateVirtualNode VirtualNodeSpec
updateVirtualNode_spec :: (VirtualNodeSpec -> f VirtualNodeSpec)
-> UpdateVirtualNode -> f UpdateVirtualNode
updateVirtualNode_spec = (UpdateVirtualNode -> VirtualNodeSpec)
-> (UpdateVirtualNode -> VirtualNodeSpec -> UpdateVirtualNode)
-> Lens
     UpdateVirtualNode UpdateVirtualNode VirtualNodeSpec VirtualNodeSpec
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualNode' {VirtualNodeSpec
spec :: VirtualNodeSpec
$sel:spec:UpdateVirtualNode' :: UpdateVirtualNode -> VirtualNodeSpec
spec} -> VirtualNodeSpec
spec) (\s :: UpdateVirtualNode
s@UpdateVirtualNode' {} VirtualNodeSpec
a -> UpdateVirtualNode
s {$sel:spec:UpdateVirtualNode' :: VirtualNodeSpec
spec = VirtualNodeSpec
a} :: UpdateVirtualNode)

-- | The name of the virtual node to update.
updateVirtualNode_virtualNodeName :: Lens.Lens' UpdateVirtualNode Prelude.Text
updateVirtualNode_virtualNodeName :: (Text -> f Text) -> UpdateVirtualNode -> f UpdateVirtualNode
updateVirtualNode_virtualNodeName = (UpdateVirtualNode -> Text)
-> (UpdateVirtualNode -> Text -> UpdateVirtualNode)
-> Lens UpdateVirtualNode UpdateVirtualNode Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualNode' {Text
virtualNodeName :: Text
$sel:virtualNodeName:UpdateVirtualNode' :: UpdateVirtualNode -> Text
virtualNodeName} -> Text
virtualNodeName) (\s :: UpdateVirtualNode
s@UpdateVirtualNode' {} Text
a -> UpdateVirtualNode
s {$sel:virtualNodeName:UpdateVirtualNode' :: Text
virtualNodeName = Text
a} :: UpdateVirtualNode)

instance Core.AWSRequest UpdateVirtualNode where
  type
    AWSResponse UpdateVirtualNode =
      UpdateVirtualNodeResponse
  request :: UpdateVirtualNode -> Request UpdateVirtualNode
request = Service -> UpdateVirtualNode -> Request UpdateVirtualNode
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateVirtualNode
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateVirtualNode)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateVirtualNode))
-> Logger
-> Service
-> Proxy UpdateVirtualNode
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateVirtualNode)))
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 -> VirtualNodeData -> UpdateVirtualNodeResponse
UpdateVirtualNodeResponse'
            (Int -> VirtualNodeData -> UpdateVirtualNodeResponse)
-> Either String Int
-> Either String (VirtualNodeData -> UpdateVirtualNodeResponse)
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 (VirtualNodeData -> UpdateVirtualNodeResponse)
-> Either String VirtualNodeData
-> Either String UpdateVirtualNodeResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object -> Either String VirtualNodeData
forall a. FromJSON a => Object -> Either String a
Core.eitherParseJSON Object
x)
      )

instance Prelude.Hashable UpdateVirtualNode

instance Prelude.NFData UpdateVirtualNode

instance Core.ToHeaders UpdateVirtualNode where
  toHeaders :: UpdateVirtualNode -> ResponseHeaders
toHeaders =
    ResponseHeaders -> UpdateVirtualNode -> 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 UpdateVirtualNode where
  toJSON :: UpdateVirtualNode -> Value
toJSON UpdateVirtualNode' {Maybe Text
Text
VirtualNodeSpec
virtualNodeName :: Text
spec :: VirtualNodeSpec
meshName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualNodeName:UpdateVirtualNode' :: UpdateVirtualNode -> Text
$sel:spec:UpdateVirtualNode' :: UpdateVirtualNode -> VirtualNodeSpec
$sel:meshName:UpdateVirtualNode' :: UpdateVirtualNode -> Text
$sel:meshOwner:UpdateVirtualNode' :: UpdateVirtualNode -> Maybe Text
$sel:clientToken:UpdateVirtualNode' :: UpdateVirtualNode -> 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 -> VirtualNodeSpec -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= VirtualNodeSpec
spec)
          ]
      )

instance Core.ToPath UpdateVirtualNode where
  toPath :: UpdateVirtualNode -> ByteString
toPath UpdateVirtualNode' {Maybe Text
Text
VirtualNodeSpec
virtualNodeName :: Text
spec :: VirtualNodeSpec
meshName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualNodeName:UpdateVirtualNode' :: UpdateVirtualNode -> Text
$sel:spec:UpdateVirtualNode' :: UpdateVirtualNode -> VirtualNodeSpec
$sel:meshName:UpdateVirtualNode' :: UpdateVirtualNode -> Text
$sel:meshOwner:UpdateVirtualNode' :: UpdateVirtualNode -> Maybe Text
$sel:clientToken:UpdateVirtualNode' :: UpdateVirtualNode -> 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
"/virtualNodes/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
virtualNodeName
      ]

instance Core.ToQuery UpdateVirtualNode where
  toQuery :: UpdateVirtualNode -> QueryString
toQuery UpdateVirtualNode' {Maybe Text
Text
VirtualNodeSpec
virtualNodeName :: Text
spec :: VirtualNodeSpec
meshName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualNodeName:UpdateVirtualNode' :: UpdateVirtualNode -> Text
$sel:spec:UpdateVirtualNode' :: UpdateVirtualNode -> VirtualNodeSpec
$sel:meshName:UpdateVirtualNode' :: UpdateVirtualNode -> Text
$sel:meshOwner:UpdateVirtualNode' :: UpdateVirtualNode -> Maybe Text
$sel:clientToken:UpdateVirtualNode' :: UpdateVirtualNode -> 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:/ 'newUpdateVirtualNodeResponse' smart constructor.
data UpdateVirtualNodeResponse = UpdateVirtualNodeResponse'
  { -- | The response's http status code.
    UpdateVirtualNodeResponse -> Int
httpStatus :: Prelude.Int,
    -- | A full description of the virtual node that was updated.
    UpdateVirtualNodeResponse -> VirtualNodeData
virtualNode :: VirtualNodeData
  }
  deriving (UpdateVirtualNodeResponse -> UpdateVirtualNodeResponse -> Bool
(UpdateVirtualNodeResponse -> UpdateVirtualNodeResponse -> Bool)
-> (UpdateVirtualNodeResponse -> UpdateVirtualNodeResponse -> Bool)
-> Eq UpdateVirtualNodeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateVirtualNodeResponse -> UpdateVirtualNodeResponse -> Bool
$c/= :: UpdateVirtualNodeResponse -> UpdateVirtualNodeResponse -> Bool
== :: UpdateVirtualNodeResponse -> UpdateVirtualNodeResponse -> Bool
$c== :: UpdateVirtualNodeResponse -> UpdateVirtualNodeResponse -> Bool
Prelude.Eq, ReadPrec [UpdateVirtualNodeResponse]
ReadPrec UpdateVirtualNodeResponse
Int -> ReadS UpdateVirtualNodeResponse
ReadS [UpdateVirtualNodeResponse]
(Int -> ReadS UpdateVirtualNodeResponse)
-> ReadS [UpdateVirtualNodeResponse]
-> ReadPrec UpdateVirtualNodeResponse
-> ReadPrec [UpdateVirtualNodeResponse]
-> Read UpdateVirtualNodeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateVirtualNodeResponse]
$creadListPrec :: ReadPrec [UpdateVirtualNodeResponse]
readPrec :: ReadPrec UpdateVirtualNodeResponse
$creadPrec :: ReadPrec UpdateVirtualNodeResponse
readList :: ReadS [UpdateVirtualNodeResponse]
$creadList :: ReadS [UpdateVirtualNodeResponse]
readsPrec :: Int -> ReadS UpdateVirtualNodeResponse
$creadsPrec :: Int -> ReadS UpdateVirtualNodeResponse
Prelude.Read, Int -> UpdateVirtualNodeResponse -> ShowS
[UpdateVirtualNodeResponse] -> ShowS
UpdateVirtualNodeResponse -> String
(Int -> UpdateVirtualNodeResponse -> ShowS)
-> (UpdateVirtualNodeResponse -> String)
-> ([UpdateVirtualNodeResponse] -> ShowS)
-> Show UpdateVirtualNodeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateVirtualNodeResponse] -> ShowS
$cshowList :: [UpdateVirtualNodeResponse] -> ShowS
show :: UpdateVirtualNodeResponse -> String
$cshow :: UpdateVirtualNodeResponse -> String
showsPrec :: Int -> UpdateVirtualNodeResponse -> ShowS
$cshowsPrec :: Int -> UpdateVirtualNodeResponse -> ShowS
Prelude.Show, (forall x.
 UpdateVirtualNodeResponse -> Rep UpdateVirtualNodeResponse x)
-> (forall x.
    Rep UpdateVirtualNodeResponse x -> UpdateVirtualNodeResponse)
-> Generic UpdateVirtualNodeResponse
forall x.
Rep UpdateVirtualNodeResponse x -> UpdateVirtualNodeResponse
forall x.
UpdateVirtualNodeResponse -> Rep UpdateVirtualNodeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateVirtualNodeResponse x -> UpdateVirtualNodeResponse
$cfrom :: forall x.
UpdateVirtualNodeResponse -> Rep UpdateVirtualNodeResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateVirtualNodeResponse' 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', 'updateVirtualNodeResponse_httpStatus' - The response's http status code.
--
-- 'virtualNode', 'updateVirtualNodeResponse_virtualNode' - A full description of the virtual node that was updated.
newUpdateVirtualNodeResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'virtualNode'
  VirtualNodeData ->
  UpdateVirtualNodeResponse
newUpdateVirtualNodeResponse :: Int -> VirtualNodeData -> UpdateVirtualNodeResponse
newUpdateVirtualNodeResponse
  Int
pHttpStatus_
  VirtualNodeData
pVirtualNode_ =
    UpdateVirtualNodeResponse' :: Int -> VirtualNodeData -> UpdateVirtualNodeResponse
UpdateVirtualNodeResponse'
      { $sel:httpStatus:UpdateVirtualNodeResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:virtualNode:UpdateVirtualNodeResponse' :: VirtualNodeData
virtualNode = VirtualNodeData
pVirtualNode_
      }

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

-- | A full description of the virtual node that was updated.
updateVirtualNodeResponse_virtualNode :: Lens.Lens' UpdateVirtualNodeResponse VirtualNodeData
updateVirtualNodeResponse_virtualNode :: (VirtualNodeData -> f VirtualNodeData)
-> UpdateVirtualNodeResponse -> f UpdateVirtualNodeResponse
updateVirtualNodeResponse_virtualNode = (UpdateVirtualNodeResponse -> VirtualNodeData)
-> (UpdateVirtualNodeResponse
    -> VirtualNodeData -> UpdateVirtualNodeResponse)
-> Lens
     UpdateVirtualNodeResponse
     UpdateVirtualNodeResponse
     VirtualNodeData
     VirtualNodeData
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateVirtualNodeResponse' {VirtualNodeData
virtualNode :: VirtualNodeData
$sel:virtualNode:UpdateVirtualNodeResponse' :: UpdateVirtualNodeResponse -> VirtualNodeData
virtualNode} -> VirtualNodeData
virtualNode) (\s :: UpdateVirtualNodeResponse
s@UpdateVirtualNodeResponse' {} VirtualNodeData
a -> UpdateVirtualNodeResponse
s {$sel:virtualNode:UpdateVirtualNodeResponse' :: VirtualNodeData
virtualNode = VirtualNodeData
a} :: UpdateVirtualNodeResponse)

instance Prelude.NFData UpdateVirtualNodeResponse