{-# 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.SageMaker.UpdateEndpointWeightsAndCapacities
-- 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 variant weight of one or more variants associated with an
-- existing endpoint, or capacity of one variant associated with an
-- existing endpoint. When it receives the request, SageMaker sets the
-- endpoint status to @Updating@. After updating the endpoint, it sets the
-- status to @InService@. To check the status of an endpoint, use the
-- DescribeEndpoint API.
module Amazonka.SageMaker.UpdateEndpointWeightsAndCapacities
  ( -- * Creating a Request
    UpdateEndpointWeightsAndCapacities (..),
    newUpdateEndpointWeightsAndCapacities,

    -- * Request Lenses
    updateEndpointWeightsAndCapacities_endpointName,
    updateEndpointWeightsAndCapacities_desiredWeightsAndCapacities,

    -- * Destructuring the Response
    UpdateEndpointWeightsAndCapacitiesResponse (..),
    newUpdateEndpointWeightsAndCapacitiesResponse,

    -- * Response Lenses
    updateEndpointWeightsAndCapacitiesResponse_httpStatus,
    updateEndpointWeightsAndCapacitiesResponse_endpointArn,
  )
where

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

-- | /See:/ 'newUpdateEndpointWeightsAndCapacities' smart constructor.
data UpdateEndpointWeightsAndCapacities = UpdateEndpointWeightsAndCapacities'
  { -- | The name of an existing SageMaker endpoint.
    UpdateEndpointWeightsAndCapacities -> Text
endpointName :: Prelude.Text,
    -- | An object that provides new capacity and weight values for a variant.
    UpdateEndpointWeightsAndCapacities
-> NonEmpty DesiredWeightAndCapacity
desiredWeightsAndCapacities :: Prelude.NonEmpty DesiredWeightAndCapacity
  }
  deriving (UpdateEndpointWeightsAndCapacities
-> UpdateEndpointWeightsAndCapacities -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEndpointWeightsAndCapacities
-> UpdateEndpointWeightsAndCapacities -> Bool
$c/= :: UpdateEndpointWeightsAndCapacities
-> UpdateEndpointWeightsAndCapacities -> Bool
== :: UpdateEndpointWeightsAndCapacities
-> UpdateEndpointWeightsAndCapacities -> Bool
$c== :: UpdateEndpointWeightsAndCapacities
-> UpdateEndpointWeightsAndCapacities -> Bool
Prelude.Eq, ReadPrec [UpdateEndpointWeightsAndCapacities]
ReadPrec UpdateEndpointWeightsAndCapacities
Int -> ReadS UpdateEndpointWeightsAndCapacities
ReadS [UpdateEndpointWeightsAndCapacities]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEndpointWeightsAndCapacities]
$creadListPrec :: ReadPrec [UpdateEndpointWeightsAndCapacities]
readPrec :: ReadPrec UpdateEndpointWeightsAndCapacities
$creadPrec :: ReadPrec UpdateEndpointWeightsAndCapacities
readList :: ReadS [UpdateEndpointWeightsAndCapacities]
$creadList :: ReadS [UpdateEndpointWeightsAndCapacities]
readsPrec :: Int -> ReadS UpdateEndpointWeightsAndCapacities
$creadsPrec :: Int -> ReadS UpdateEndpointWeightsAndCapacities
Prelude.Read, Int -> UpdateEndpointWeightsAndCapacities -> ShowS
[UpdateEndpointWeightsAndCapacities] -> ShowS
UpdateEndpointWeightsAndCapacities -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEndpointWeightsAndCapacities] -> ShowS
$cshowList :: [UpdateEndpointWeightsAndCapacities] -> ShowS
show :: UpdateEndpointWeightsAndCapacities -> String
$cshow :: UpdateEndpointWeightsAndCapacities -> String
showsPrec :: Int -> UpdateEndpointWeightsAndCapacities -> ShowS
$cshowsPrec :: Int -> UpdateEndpointWeightsAndCapacities -> ShowS
Prelude.Show, forall x.
Rep UpdateEndpointWeightsAndCapacities x
-> UpdateEndpointWeightsAndCapacities
forall x.
UpdateEndpointWeightsAndCapacities
-> Rep UpdateEndpointWeightsAndCapacities x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateEndpointWeightsAndCapacities x
-> UpdateEndpointWeightsAndCapacities
$cfrom :: forall x.
UpdateEndpointWeightsAndCapacities
-> Rep UpdateEndpointWeightsAndCapacities x
Prelude.Generic)

-- |
-- Create a value of 'UpdateEndpointWeightsAndCapacities' 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:
--
-- 'endpointName', 'updateEndpointWeightsAndCapacities_endpointName' - The name of an existing SageMaker endpoint.
--
-- 'desiredWeightsAndCapacities', 'updateEndpointWeightsAndCapacities_desiredWeightsAndCapacities' - An object that provides new capacity and weight values for a variant.
newUpdateEndpointWeightsAndCapacities ::
  -- | 'endpointName'
  Prelude.Text ->
  -- | 'desiredWeightsAndCapacities'
  Prelude.NonEmpty DesiredWeightAndCapacity ->
  UpdateEndpointWeightsAndCapacities
newUpdateEndpointWeightsAndCapacities :: Text
-> NonEmpty DesiredWeightAndCapacity
-> UpdateEndpointWeightsAndCapacities
newUpdateEndpointWeightsAndCapacities
  Text
pEndpointName_
  NonEmpty DesiredWeightAndCapacity
pDesiredWeightsAndCapacities_ =
    UpdateEndpointWeightsAndCapacities'
      { $sel:endpointName:UpdateEndpointWeightsAndCapacities' :: Text
endpointName =
          Text
pEndpointName_,
        $sel:desiredWeightsAndCapacities:UpdateEndpointWeightsAndCapacities' :: NonEmpty DesiredWeightAndCapacity
desiredWeightsAndCapacities =
          forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
            forall t b. AReview t b -> b -> t
Lens.# NonEmpty DesiredWeightAndCapacity
pDesiredWeightsAndCapacities_
      }

-- | The name of an existing SageMaker endpoint.
updateEndpointWeightsAndCapacities_endpointName :: Lens.Lens' UpdateEndpointWeightsAndCapacities Prelude.Text
updateEndpointWeightsAndCapacities_endpointName :: Lens' UpdateEndpointWeightsAndCapacities Text
updateEndpointWeightsAndCapacities_endpointName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointWeightsAndCapacities' {Text
endpointName :: Text
$sel:endpointName:UpdateEndpointWeightsAndCapacities' :: UpdateEndpointWeightsAndCapacities -> Text
endpointName} -> Text
endpointName) (\s :: UpdateEndpointWeightsAndCapacities
s@UpdateEndpointWeightsAndCapacities' {} Text
a -> UpdateEndpointWeightsAndCapacities
s {$sel:endpointName:UpdateEndpointWeightsAndCapacities' :: Text
endpointName = Text
a} :: UpdateEndpointWeightsAndCapacities)

-- | An object that provides new capacity and weight values for a variant.
updateEndpointWeightsAndCapacities_desiredWeightsAndCapacities :: Lens.Lens' UpdateEndpointWeightsAndCapacities (Prelude.NonEmpty DesiredWeightAndCapacity)
updateEndpointWeightsAndCapacities_desiredWeightsAndCapacities :: Lens'
  UpdateEndpointWeightsAndCapacities
  (NonEmpty DesiredWeightAndCapacity)
updateEndpointWeightsAndCapacities_desiredWeightsAndCapacities = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointWeightsAndCapacities' {NonEmpty DesiredWeightAndCapacity
desiredWeightsAndCapacities :: NonEmpty DesiredWeightAndCapacity
$sel:desiredWeightsAndCapacities:UpdateEndpointWeightsAndCapacities' :: UpdateEndpointWeightsAndCapacities
-> NonEmpty DesiredWeightAndCapacity
desiredWeightsAndCapacities} -> NonEmpty DesiredWeightAndCapacity
desiredWeightsAndCapacities) (\s :: UpdateEndpointWeightsAndCapacities
s@UpdateEndpointWeightsAndCapacities' {} NonEmpty DesiredWeightAndCapacity
a -> UpdateEndpointWeightsAndCapacities
s {$sel:desiredWeightsAndCapacities:UpdateEndpointWeightsAndCapacities' :: NonEmpty DesiredWeightAndCapacity
desiredWeightsAndCapacities = NonEmpty DesiredWeightAndCapacity
a} :: UpdateEndpointWeightsAndCapacities) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    UpdateEndpointWeightsAndCapacities
  where
  type
    AWSResponse UpdateEndpointWeightsAndCapacities =
      UpdateEndpointWeightsAndCapacitiesResponse
  request :: (Service -> Service)
-> UpdateEndpointWeightsAndCapacities
-> Request UpdateEndpointWeightsAndCapacities
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateEndpointWeightsAndCapacities
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateEndpointWeightsAndCapacities)))
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 -> Text -> UpdateEndpointWeightsAndCapacitiesResponse
UpdateEndpointWeightsAndCapacitiesResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"EndpointArn")
      )

instance
  Prelude.Hashable
    UpdateEndpointWeightsAndCapacities
  where
  hashWithSalt :: Int -> UpdateEndpointWeightsAndCapacities -> Int
hashWithSalt
    Int
_salt
    UpdateEndpointWeightsAndCapacities' {NonEmpty DesiredWeightAndCapacity
Text
desiredWeightsAndCapacities :: NonEmpty DesiredWeightAndCapacity
endpointName :: Text
$sel:desiredWeightsAndCapacities:UpdateEndpointWeightsAndCapacities' :: UpdateEndpointWeightsAndCapacities
-> NonEmpty DesiredWeightAndCapacity
$sel:endpointName:UpdateEndpointWeightsAndCapacities' :: UpdateEndpointWeightsAndCapacities -> Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
endpointName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` NonEmpty DesiredWeightAndCapacity
desiredWeightsAndCapacities

instance
  Prelude.NFData
    UpdateEndpointWeightsAndCapacities
  where
  rnf :: UpdateEndpointWeightsAndCapacities -> ()
rnf UpdateEndpointWeightsAndCapacities' {NonEmpty DesiredWeightAndCapacity
Text
desiredWeightsAndCapacities :: NonEmpty DesiredWeightAndCapacity
endpointName :: Text
$sel:desiredWeightsAndCapacities:UpdateEndpointWeightsAndCapacities' :: UpdateEndpointWeightsAndCapacities
-> NonEmpty DesiredWeightAndCapacity
$sel:endpointName:UpdateEndpointWeightsAndCapacities' :: UpdateEndpointWeightsAndCapacities -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
endpointName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf NonEmpty DesiredWeightAndCapacity
desiredWeightsAndCapacities

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

instance
  Data.ToJSON
    UpdateEndpointWeightsAndCapacities
  where
  toJSON :: UpdateEndpointWeightsAndCapacities -> Value
toJSON UpdateEndpointWeightsAndCapacities' {NonEmpty DesiredWeightAndCapacity
Text
desiredWeightsAndCapacities :: NonEmpty DesiredWeightAndCapacity
endpointName :: Text
$sel:desiredWeightsAndCapacities:UpdateEndpointWeightsAndCapacities' :: UpdateEndpointWeightsAndCapacities
-> NonEmpty DesiredWeightAndCapacity
$sel:endpointName:UpdateEndpointWeightsAndCapacities' :: UpdateEndpointWeightsAndCapacities -> Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ forall a. a -> Maybe a
Prelude.Just (Key
"EndpointName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
endpointName),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"DesiredWeightsAndCapacities"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= NonEmpty DesiredWeightAndCapacity
desiredWeightsAndCapacities
              )
          ]
      )

instance
  Data.ToPath
    UpdateEndpointWeightsAndCapacities
  where
  toPath :: UpdateEndpointWeightsAndCapacities -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newUpdateEndpointWeightsAndCapacitiesResponse' smart constructor.
data UpdateEndpointWeightsAndCapacitiesResponse = UpdateEndpointWeightsAndCapacitiesResponse'
  { -- | The response's http status code.
    UpdateEndpointWeightsAndCapacitiesResponse -> Int
httpStatus :: Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the updated endpoint.
    UpdateEndpointWeightsAndCapacitiesResponse -> Text
endpointArn :: Prelude.Text
  }
  deriving (UpdateEndpointWeightsAndCapacitiesResponse
-> UpdateEndpointWeightsAndCapacitiesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateEndpointWeightsAndCapacitiesResponse
-> UpdateEndpointWeightsAndCapacitiesResponse -> Bool
$c/= :: UpdateEndpointWeightsAndCapacitiesResponse
-> UpdateEndpointWeightsAndCapacitiesResponse -> Bool
== :: UpdateEndpointWeightsAndCapacitiesResponse
-> UpdateEndpointWeightsAndCapacitiesResponse -> Bool
$c== :: UpdateEndpointWeightsAndCapacitiesResponse
-> UpdateEndpointWeightsAndCapacitiesResponse -> Bool
Prelude.Eq, ReadPrec [UpdateEndpointWeightsAndCapacitiesResponse]
ReadPrec UpdateEndpointWeightsAndCapacitiesResponse
Int -> ReadS UpdateEndpointWeightsAndCapacitiesResponse
ReadS [UpdateEndpointWeightsAndCapacitiesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateEndpointWeightsAndCapacitiesResponse]
$creadListPrec :: ReadPrec [UpdateEndpointWeightsAndCapacitiesResponse]
readPrec :: ReadPrec UpdateEndpointWeightsAndCapacitiesResponse
$creadPrec :: ReadPrec UpdateEndpointWeightsAndCapacitiesResponse
readList :: ReadS [UpdateEndpointWeightsAndCapacitiesResponse]
$creadList :: ReadS [UpdateEndpointWeightsAndCapacitiesResponse]
readsPrec :: Int -> ReadS UpdateEndpointWeightsAndCapacitiesResponse
$creadsPrec :: Int -> ReadS UpdateEndpointWeightsAndCapacitiesResponse
Prelude.Read, Int -> UpdateEndpointWeightsAndCapacitiesResponse -> ShowS
[UpdateEndpointWeightsAndCapacitiesResponse] -> ShowS
UpdateEndpointWeightsAndCapacitiesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateEndpointWeightsAndCapacitiesResponse] -> ShowS
$cshowList :: [UpdateEndpointWeightsAndCapacitiesResponse] -> ShowS
show :: UpdateEndpointWeightsAndCapacitiesResponse -> String
$cshow :: UpdateEndpointWeightsAndCapacitiesResponse -> String
showsPrec :: Int -> UpdateEndpointWeightsAndCapacitiesResponse -> ShowS
$cshowsPrec :: Int -> UpdateEndpointWeightsAndCapacitiesResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateEndpointWeightsAndCapacitiesResponse x
-> UpdateEndpointWeightsAndCapacitiesResponse
forall x.
UpdateEndpointWeightsAndCapacitiesResponse
-> Rep UpdateEndpointWeightsAndCapacitiesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateEndpointWeightsAndCapacitiesResponse x
-> UpdateEndpointWeightsAndCapacitiesResponse
$cfrom :: forall x.
UpdateEndpointWeightsAndCapacitiesResponse
-> Rep UpdateEndpointWeightsAndCapacitiesResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateEndpointWeightsAndCapacitiesResponse' 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', 'updateEndpointWeightsAndCapacitiesResponse_httpStatus' - The response's http status code.
--
-- 'endpointArn', 'updateEndpointWeightsAndCapacitiesResponse_endpointArn' - The Amazon Resource Name (ARN) of the updated endpoint.
newUpdateEndpointWeightsAndCapacitiesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'endpointArn'
  Prelude.Text ->
  UpdateEndpointWeightsAndCapacitiesResponse
newUpdateEndpointWeightsAndCapacitiesResponse :: Int -> Text -> UpdateEndpointWeightsAndCapacitiesResponse
newUpdateEndpointWeightsAndCapacitiesResponse
  Int
pHttpStatus_
  Text
pEndpointArn_ =
    UpdateEndpointWeightsAndCapacitiesResponse'
      { $sel:httpStatus:UpdateEndpointWeightsAndCapacitiesResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:endpointArn:UpdateEndpointWeightsAndCapacitiesResponse' :: Text
endpointArn = Text
pEndpointArn_
      }

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

-- | The Amazon Resource Name (ARN) of the updated endpoint.
updateEndpointWeightsAndCapacitiesResponse_endpointArn :: Lens.Lens' UpdateEndpointWeightsAndCapacitiesResponse Prelude.Text
updateEndpointWeightsAndCapacitiesResponse_endpointArn :: Lens' UpdateEndpointWeightsAndCapacitiesResponse Text
updateEndpointWeightsAndCapacitiesResponse_endpointArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateEndpointWeightsAndCapacitiesResponse' {Text
endpointArn :: Text
$sel:endpointArn:UpdateEndpointWeightsAndCapacitiesResponse' :: UpdateEndpointWeightsAndCapacitiesResponse -> Text
endpointArn} -> Text
endpointArn) (\s :: UpdateEndpointWeightsAndCapacitiesResponse
s@UpdateEndpointWeightsAndCapacitiesResponse' {} Text
a -> UpdateEndpointWeightsAndCapacitiesResponse
s {$sel:endpointArn:UpdateEndpointWeightsAndCapacitiesResponse' :: Text
endpointArn = Text
a} :: UpdateEndpointWeightsAndCapacitiesResponse)

instance
  Prelude.NFData
    UpdateEndpointWeightsAndCapacitiesResponse
  where
  rnf :: UpdateEndpointWeightsAndCapacitiesResponse -> ()
rnf UpdateEndpointWeightsAndCapacitiesResponse' {Int
Text
endpointArn :: Text
httpStatus :: Int
$sel:endpointArn:UpdateEndpointWeightsAndCapacitiesResponse' :: UpdateEndpointWeightsAndCapacitiesResponse -> Text
$sel:httpStatus:UpdateEndpointWeightsAndCapacitiesResponse' :: UpdateEndpointWeightsAndCapacitiesResponse -> 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 Text
endpointArn