{-# 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.UpdateGatewayRoute
-- 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 gateway route that is associated to a specified
-- virtual gateway in a service mesh.
module Amazonka.AppMesh.UpdateGatewayRoute
  ( -- * Creating a Request
    UpdateGatewayRoute (..),
    newUpdateGatewayRoute,

    -- * Request Lenses
    updateGatewayRoute_clientToken,
    updateGatewayRoute_meshOwner,
    updateGatewayRoute_gatewayRouteName,
    updateGatewayRoute_meshName,
    updateGatewayRoute_spec,
    updateGatewayRoute_virtualGatewayName,

    -- * Destructuring the Response
    UpdateGatewayRouteResponse (..),
    newUpdateGatewayRouteResponse,

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

-- |
-- Create a value of 'UpdateGatewayRoute' 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', 'updateGatewayRoute_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', 'updateGatewayRoute_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>.
--
-- 'gatewayRouteName', 'updateGatewayRoute_gatewayRouteName' - The name of the gateway route to update.
--
-- 'meshName', 'updateGatewayRoute_meshName' - The name of the service mesh that the gateway route resides in.
--
-- 'spec', 'updateGatewayRoute_spec' - The new gateway route specification to apply. This overwrites the
-- existing data.
--
-- 'virtualGatewayName', 'updateGatewayRoute_virtualGatewayName' - The name of the virtual gateway that the gateway route is associated
-- with.
newUpdateGatewayRoute ::
  -- | 'gatewayRouteName'
  Prelude.Text ->
  -- | 'meshName'
  Prelude.Text ->
  -- | 'spec'
  GatewayRouteSpec ->
  -- | 'virtualGatewayName'
  Prelude.Text ->
  UpdateGatewayRoute
newUpdateGatewayRoute :: Text -> Text -> GatewayRouteSpec -> Text -> UpdateGatewayRoute
newUpdateGatewayRoute
  Text
pGatewayRouteName_
  Text
pMeshName_
  GatewayRouteSpec
pSpec_
  Text
pVirtualGatewayName_ =
    UpdateGatewayRoute'
      { $sel:clientToken:UpdateGatewayRoute' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
        $sel:meshOwner:UpdateGatewayRoute' :: Maybe Text
meshOwner = forall a. Maybe a
Prelude.Nothing,
        $sel:gatewayRouteName:UpdateGatewayRoute' :: Text
gatewayRouteName = Text
pGatewayRouteName_,
        $sel:meshName:UpdateGatewayRoute' :: Text
meshName = Text
pMeshName_,
        $sel:spec:UpdateGatewayRoute' :: GatewayRouteSpec
spec = GatewayRouteSpec
pSpec_,
        $sel:virtualGatewayName:UpdateGatewayRoute' :: 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.
updateGatewayRoute_clientToken :: Lens.Lens' UpdateGatewayRoute (Prelude.Maybe Prelude.Text)
updateGatewayRoute_clientToken :: Lens' UpdateGatewayRoute (Maybe Text)
updateGatewayRoute_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGatewayRoute' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateGatewayRoute' :: UpdateGatewayRoute -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateGatewayRoute
s@UpdateGatewayRoute' {} Maybe Text
a -> UpdateGatewayRoute
s {$sel:clientToken:UpdateGatewayRoute' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateGatewayRoute)

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

-- | The name of the gateway route to update.
updateGatewayRoute_gatewayRouteName :: Lens.Lens' UpdateGatewayRoute Prelude.Text
updateGatewayRoute_gatewayRouteName :: Lens' UpdateGatewayRoute Text
updateGatewayRoute_gatewayRouteName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGatewayRoute' {Text
gatewayRouteName :: Text
$sel:gatewayRouteName:UpdateGatewayRoute' :: UpdateGatewayRoute -> Text
gatewayRouteName} -> Text
gatewayRouteName) (\s :: UpdateGatewayRoute
s@UpdateGatewayRoute' {} Text
a -> UpdateGatewayRoute
s {$sel:gatewayRouteName:UpdateGatewayRoute' :: Text
gatewayRouteName = Text
a} :: UpdateGatewayRoute)

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

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

-- | The name of the virtual gateway that the gateway route is associated
-- with.
updateGatewayRoute_virtualGatewayName :: Lens.Lens' UpdateGatewayRoute Prelude.Text
updateGatewayRoute_virtualGatewayName :: Lens' UpdateGatewayRoute Text
updateGatewayRoute_virtualGatewayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGatewayRoute' {Text
virtualGatewayName :: Text
$sel:virtualGatewayName:UpdateGatewayRoute' :: UpdateGatewayRoute -> Text
virtualGatewayName} -> Text
virtualGatewayName) (\s :: UpdateGatewayRoute
s@UpdateGatewayRoute' {} Text
a -> UpdateGatewayRoute
s {$sel:virtualGatewayName:UpdateGatewayRoute' :: Text
virtualGatewayName = Text
a} :: UpdateGatewayRoute)

instance Core.AWSRequest UpdateGatewayRoute where
  type
    AWSResponse UpdateGatewayRoute =
      UpdateGatewayRouteResponse
  request :: (Service -> Service)
-> UpdateGatewayRoute -> Request UpdateGatewayRoute
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 UpdateGatewayRoute
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateGatewayRoute)))
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 -> GatewayRouteData -> UpdateGatewayRouteResponse
UpdateGatewayRouteResponse'
            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 UpdateGatewayRoute where
  hashWithSalt :: Int -> UpdateGatewayRoute -> Int
hashWithSalt Int
_salt UpdateGatewayRoute' {Maybe Text
Text
GatewayRouteSpec
virtualGatewayName :: Text
spec :: GatewayRouteSpec
meshName :: Text
gatewayRouteName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:UpdateGatewayRoute' :: UpdateGatewayRoute -> Text
$sel:spec:UpdateGatewayRoute' :: UpdateGatewayRoute -> GatewayRouteSpec
$sel:meshName:UpdateGatewayRoute' :: UpdateGatewayRoute -> Text
$sel:gatewayRouteName:UpdateGatewayRoute' :: UpdateGatewayRoute -> Text
$sel:meshOwner:UpdateGatewayRoute' :: UpdateGatewayRoute -> Maybe Text
$sel:clientToken:UpdateGatewayRoute' :: UpdateGatewayRoute -> 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
gatewayRouteName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
meshName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` GatewayRouteSpec
spec
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
virtualGatewayName

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

instance Data.ToHeaders UpdateGatewayRoute where
  toHeaders :: UpdateGatewayRoute -> 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 UpdateGatewayRoute where
  toJSON :: UpdateGatewayRoute -> Value
toJSON UpdateGatewayRoute' {Maybe Text
Text
GatewayRouteSpec
virtualGatewayName :: Text
spec :: GatewayRouteSpec
meshName :: Text
gatewayRouteName :: Text
meshOwner :: Maybe Text
clientToken :: Maybe Text
$sel:virtualGatewayName:UpdateGatewayRoute' :: UpdateGatewayRoute -> Text
$sel:spec:UpdateGatewayRoute' :: UpdateGatewayRoute -> GatewayRouteSpec
$sel:meshName:UpdateGatewayRoute' :: UpdateGatewayRoute -> Text
$sel:gatewayRouteName:UpdateGatewayRoute' :: UpdateGatewayRoute -> Text
$sel:meshOwner:UpdateGatewayRoute' :: UpdateGatewayRoute -> Maybe Text
$sel:clientToken:UpdateGatewayRoute' :: UpdateGatewayRoute -> 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..= GatewayRouteSpec
spec)
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateGatewayRouteResponse' 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', 'updateGatewayRouteResponse_httpStatus' - The response's http status code.
--
-- 'gatewayRoute', 'updateGatewayRouteResponse_gatewayRoute' - A full description of the gateway route that was updated.
newUpdateGatewayRouteResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'gatewayRoute'
  GatewayRouteData ->
  UpdateGatewayRouteResponse
newUpdateGatewayRouteResponse :: Int -> GatewayRouteData -> UpdateGatewayRouteResponse
newUpdateGatewayRouteResponse
  Int
pHttpStatus_
  GatewayRouteData
pGatewayRoute_ =
    UpdateGatewayRouteResponse'
      { $sel:httpStatus:UpdateGatewayRouteResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:gatewayRoute:UpdateGatewayRouteResponse' :: GatewayRouteData
gatewayRoute = GatewayRouteData
pGatewayRoute_
      }

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

-- | A full description of the gateway route that was updated.
updateGatewayRouteResponse_gatewayRoute :: Lens.Lens' UpdateGatewayRouteResponse GatewayRouteData
updateGatewayRouteResponse_gatewayRoute :: Lens' UpdateGatewayRouteResponse GatewayRouteData
updateGatewayRouteResponse_gatewayRoute = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGatewayRouteResponse' {GatewayRouteData
gatewayRoute :: GatewayRouteData
$sel:gatewayRoute:UpdateGatewayRouteResponse' :: UpdateGatewayRouteResponse -> GatewayRouteData
gatewayRoute} -> GatewayRouteData
gatewayRoute) (\s :: UpdateGatewayRouteResponse
s@UpdateGatewayRouteResponse' {} GatewayRouteData
a -> UpdateGatewayRouteResponse
s {$sel:gatewayRoute:UpdateGatewayRouteResponse' :: GatewayRouteData
gatewayRoute = GatewayRouteData
a} :: UpdateGatewayRouteResponse)

instance Prelude.NFData UpdateGatewayRouteResponse where
  rnf :: UpdateGatewayRouteResponse -> ()
rnf UpdateGatewayRouteResponse' {Int
GatewayRouteData
gatewayRoute :: GatewayRouteData
httpStatus :: Int
$sel:gatewayRoute:UpdateGatewayRouteResponse' :: UpdateGatewayRouteResponse -> GatewayRouteData
$sel:httpStatus:UpdateGatewayRouteResponse' :: UpdateGatewayRouteResponse -> 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 GatewayRouteData
gatewayRoute