{-# 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.AppRunner.UpdateService
-- 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)
--
-- Update an App Runner service. You can update the source configuration
-- and instance configuration of the service. You can also update the ARN
-- of the auto scaling configuration resource that\'s associated with the
-- service. However, you can\'t change the name or the encryption
-- configuration of the service. These can be set only when you create the
-- service.
--
-- To update the tags applied to your service, use the separate actions
-- TagResource and UntagResource.
--
-- This is an asynchronous operation. On a successful call, you can use the
-- returned @OperationId@ and the ListOperations call to track the
-- operation\'s progress.
module Amazonka.AppRunner.UpdateService
  ( -- * Creating a Request
    UpdateService (..),
    newUpdateService,

    -- * Request Lenses
    updateService_autoScalingConfigurationArn,
    updateService_healthCheckConfiguration,
    updateService_sourceConfiguration,
    updateService_instanceConfiguration,
    updateService_serviceArn,

    -- * Destructuring the Response
    UpdateServiceResponse (..),
    newUpdateServiceResponse,

    -- * Response Lenses
    updateServiceResponse_httpStatus,
    updateServiceResponse_service,
    updateServiceResponse_operationId,
  )
where

import Amazonka.AppRunner.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:/ 'newUpdateService' smart constructor.
data UpdateService = UpdateService'
  { -- | The Amazon Resource Name (ARN) of an App Runner automatic scaling
    -- configuration resource that you want to associate with your service.
    UpdateService -> Maybe Text
autoScalingConfigurationArn :: Prelude.Maybe Prelude.Text,
    -- | The settings for the health check that App Runner performs to monitor
    -- the health of your service.
    UpdateService -> Maybe HealthCheckConfiguration
healthCheckConfiguration :: Prelude.Maybe HealthCheckConfiguration,
    -- | The source configuration to apply to the App Runner service.
    --
    -- You can change the configuration of the code or image repository that
    -- the service uses. However, you can\'t switch from code to image or the
    -- other way around. This means that you must provide the same structure
    -- member of @SourceConfiguration@ that you originally included when you
    -- created the service. Specifically, you can include either
    -- @CodeRepository@ or @ImageRepository@. To update the source
    -- configuration, set the values to members of the structure that you
    -- include.
    UpdateService -> Maybe SourceConfiguration
sourceConfiguration :: Prelude.Maybe SourceConfiguration,
    -- | The runtime configuration to apply to instances (scaling units) of the
    -- App Runner service.
    UpdateService -> Maybe InstanceConfiguration
instanceConfiguration :: Prelude.Maybe InstanceConfiguration,
    -- | The Amazon Resource Name (ARN) of the App Runner service that you want
    -- to update.
    UpdateService -> Text
serviceArn :: Prelude.Text
  }
  deriving (UpdateService -> UpdateService -> Bool
(UpdateService -> UpdateService -> Bool)
-> (UpdateService -> UpdateService -> Bool) -> Eq UpdateService
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateService -> UpdateService -> Bool
$c/= :: UpdateService -> UpdateService -> Bool
== :: UpdateService -> UpdateService -> Bool
$c== :: UpdateService -> UpdateService -> Bool
Prelude.Eq, Int -> UpdateService -> ShowS
[UpdateService] -> ShowS
UpdateService -> String
(Int -> UpdateService -> ShowS)
-> (UpdateService -> String)
-> ([UpdateService] -> ShowS)
-> Show UpdateService
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateService] -> ShowS
$cshowList :: [UpdateService] -> ShowS
show :: UpdateService -> String
$cshow :: UpdateService -> String
showsPrec :: Int -> UpdateService -> ShowS
$cshowsPrec :: Int -> UpdateService -> ShowS
Prelude.Show, (forall x. UpdateService -> Rep UpdateService x)
-> (forall x. Rep UpdateService x -> UpdateService)
-> Generic UpdateService
forall x. Rep UpdateService x -> UpdateService
forall x. UpdateService -> Rep UpdateService x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateService x -> UpdateService
$cfrom :: forall x. UpdateService -> Rep UpdateService x
Prelude.Generic)

-- |
-- Create a value of 'UpdateService' 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:
--
-- 'autoScalingConfigurationArn', 'updateService_autoScalingConfigurationArn' - The Amazon Resource Name (ARN) of an App Runner automatic scaling
-- configuration resource that you want to associate with your service.
--
-- 'healthCheckConfiguration', 'updateService_healthCheckConfiguration' - The settings for the health check that App Runner performs to monitor
-- the health of your service.
--
-- 'sourceConfiguration', 'updateService_sourceConfiguration' - The source configuration to apply to the App Runner service.
--
-- You can change the configuration of the code or image repository that
-- the service uses. However, you can\'t switch from code to image or the
-- other way around. This means that you must provide the same structure
-- member of @SourceConfiguration@ that you originally included when you
-- created the service. Specifically, you can include either
-- @CodeRepository@ or @ImageRepository@. To update the source
-- configuration, set the values to members of the structure that you
-- include.
--
-- 'instanceConfiguration', 'updateService_instanceConfiguration' - The runtime configuration to apply to instances (scaling units) of the
-- App Runner service.
--
-- 'serviceArn', 'updateService_serviceArn' - The Amazon Resource Name (ARN) of the App Runner service that you want
-- to update.
newUpdateService ::
  -- | 'serviceArn'
  Prelude.Text ->
  UpdateService
newUpdateService :: Text -> UpdateService
newUpdateService Text
pServiceArn_ =
  UpdateService' :: Maybe Text
-> Maybe HealthCheckConfiguration
-> Maybe SourceConfiguration
-> Maybe InstanceConfiguration
-> Text
-> UpdateService
UpdateService'
    { $sel:autoScalingConfigurationArn:UpdateService' :: Maybe Text
autoScalingConfigurationArn =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:healthCheckConfiguration:UpdateService' :: Maybe HealthCheckConfiguration
healthCheckConfiguration = Maybe HealthCheckConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:sourceConfiguration:UpdateService' :: Maybe SourceConfiguration
sourceConfiguration = Maybe SourceConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:instanceConfiguration:UpdateService' :: Maybe InstanceConfiguration
instanceConfiguration = Maybe InstanceConfiguration
forall a. Maybe a
Prelude.Nothing,
      $sel:serviceArn:UpdateService' :: Text
serviceArn = Text
pServiceArn_
    }

-- | The Amazon Resource Name (ARN) of an App Runner automatic scaling
-- configuration resource that you want to associate with your service.
updateService_autoScalingConfigurationArn :: Lens.Lens' UpdateService (Prelude.Maybe Prelude.Text)
updateService_autoScalingConfigurationArn :: (Maybe Text -> f (Maybe Text)) -> UpdateService -> f UpdateService
updateService_autoScalingConfigurationArn = (UpdateService -> Maybe Text)
-> (UpdateService -> Maybe Text -> UpdateService)
-> Lens UpdateService UpdateService (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe Text
autoScalingConfigurationArn :: Maybe Text
$sel:autoScalingConfigurationArn:UpdateService' :: UpdateService -> Maybe Text
autoScalingConfigurationArn} -> Maybe Text
autoScalingConfigurationArn) (\s :: UpdateService
s@UpdateService' {} Maybe Text
a -> UpdateService
s {$sel:autoScalingConfigurationArn:UpdateService' :: Maybe Text
autoScalingConfigurationArn = Maybe Text
a} :: UpdateService)

-- | The settings for the health check that App Runner performs to monitor
-- the health of your service.
updateService_healthCheckConfiguration :: Lens.Lens' UpdateService (Prelude.Maybe HealthCheckConfiguration)
updateService_healthCheckConfiguration :: (Maybe HealthCheckConfiguration
 -> f (Maybe HealthCheckConfiguration))
-> UpdateService -> f UpdateService
updateService_healthCheckConfiguration = (UpdateService -> Maybe HealthCheckConfiguration)
-> (UpdateService
    -> Maybe HealthCheckConfiguration -> UpdateService)
-> Lens
     UpdateService
     UpdateService
     (Maybe HealthCheckConfiguration)
     (Maybe HealthCheckConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe HealthCheckConfiguration
healthCheckConfiguration :: Maybe HealthCheckConfiguration
$sel:healthCheckConfiguration:UpdateService' :: UpdateService -> Maybe HealthCheckConfiguration
healthCheckConfiguration} -> Maybe HealthCheckConfiguration
healthCheckConfiguration) (\s :: UpdateService
s@UpdateService' {} Maybe HealthCheckConfiguration
a -> UpdateService
s {$sel:healthCheckConfiguration:UpdateService' :: Maybe HealthCheckConfiguration
healthCheckConfiguration = Maybe HealthCheckConfiguration
a} :: UpdateService)

-- | The source configuration to apply to the App Runner service.
--
-- You can change the configuration of the code or image repository that
-- the service uses. However, you can\'t switch from code to image or the
-- other way around. This means that you must provide the same structure
-- member of @SourceConfiguration@ that you originally included when you
-- created the service. Specifically, you can include either
-- @CodeRepository@ or @ImageRepository@. To update the source
-- configuration, set the values to members of the structure that you
-- include.
updateService_sourceConfiguration :: Lens.Lens' UpdateService (Prelude.Maybe SourceConfiguration)
updateService_sourceConfiguration :: (Maybe SourceConfiguration -> f (Maybe SourceConfiguration))
-> UpdateService -> f UpdateService
updateService_sourceConfiguration = (UpdateService -> Maybe SourceConfiguration)
-> (UpdateService -> Maybe SourceConfiguration -> UpdateService)
-> Lens
     UpdateService
     UpdateService
     (Maybe SourceConfiguration)
     (Maybe SourceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe SourceConfiguration
sourceConfiguration :: Maybe SourceConfiguration
$sel:sourceConfiguration:UpdateService' :: UpdateService -> Maybe SourceConfiguration
sourceConfiguration} -> Maybe SourceConfiguration
sourceConfiguration) (\s :: UpdateService
s@UpdateService' {} Maybe SourceConfiguration
a -> UpdateService
s {$sel:sourceConfiguration:UpdateService' :: Maybe SourceConfiguration
sourceConfiguration = Maybe SourceConfiguration
a} :: UpdateService)

-- | The runtime configuration to apply to instances (scaling units) of the
-- App Runner service.
updateService_instanceConfiguration :: Lens.Lens' UpdateService (Prelude.Maybe InstanceConfiguration)
updateService_instanceConfiguration :: (Maybe InstanceConfiguration -> f (Maybe InstanceConfiguration))
-> UpdateService -> f UpdateService
updateService_instanceConfiguration = (UpdateService -> Maybe InstanceConfiguration)
-> (UpdateService -> Maybe InstanceConfiguration -> UpdateService)
-> Lens
     UpdateService
     UpdateService
     (Maybe InstanceConfiguration)
     (Maybe InstanceConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Maybe InstanceConfiguration
instanceConfiguration :: Maybe InstanceConfiguration
$sel:instanceConfiguration:UpdateService' :: UpdateService -> Maybe InstanceConfiguration
instanceConfiguration} -> Maybe InstanceConfiguration
instanceConfiguration) (\s :: UpdateService
s@UpdateService' {} Maybe InstanceConfiguration
a -> UpdateService
s {$sel:instanceConfiguration:UpdateService' :: Maybe InstanceConfiguration
instanceConfiguration = Maybe InstanceConfiguration
a} :: UpdateService)

-- | The Amazon Resource Name (ARN) of the App Runner service that you want
-- to update.
updateService_serviceArn :: Lens.Lens' UpdateService Prelude.Text
updateService_serviceArn :: (Text -> f Text) -> UpdateService -> f UpdateService
updateService_serviceArn = (UpdateService -> Text)
-> (UpdateService -> Text -> UpdateService)
-> Lens UpdateService UpdateService Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateService' {Text
serviceArn :: Text
$sel:serviceArn:UpdateService' :: UpdateService -> Text
serviceArn} -> Text
serviceArn) (\s :: UpdateService
s@UpdateService' {} Text
a -> UpdateService
s {$sel:serviceArn:UpdateService' :: Text
serviceArn = Text
a} :: UpdateService)

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

instance Prelude.Hashable UpdateService

instance Prelude.NFData UpdateService

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

instance Core.ToJSON UpdateService where
  toJSON :: UpdateService -> Value
toJSON UpdateService' {Maybe Text
Maybe HealthCheckConfiguration
Maybe InstanceConfiguration
Maybe SourceConfiguration
Text
serviceArn :: Text
instanceConfiguration :: Maybe InstanceConfiguration
sourceConfiguration :: Maybe SourceConfiguration
healthCheckConfiguration :: Maybe HealthCheckConfiguration
autoScalingConfigurationArn :: Maybe Text
$sel:serviceArn:UpdateService' :: UpdateService -> Text
$sel:instanceConfiguration:UpdateService' :: UpdateService -> Maybe InstanceConfiguration
$sel:sourceConfiguration:UpdateService' :: UpdateService -> Maybe SourceConfiguration
$sel:healthCheckConfiguration:UpdateService' :: UpdateService -> Maybe HealthCheckConfiguration
$sel:autoScalingConfigurationArn:UpdateService' :: UpdateService -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"AutoScalingConfigurationArn" 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
autoScalingConfigurationArn,
            (Text
"HealthCheckConfiguration" Text -> HealthCheckConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (HealthCheckConfiguration -> Pair)
-> Maybe HealthCheckConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe HealthCheckConfiguration
healthCheckConfiguration,
            (Text
"SourceConfiguration" Text -> SourceConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (SourceConfiguration -> Pair)
-> Maybe SourceConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe SourceConfiguration
sourceConfiguration,
            (Text
"InstanceConfiguration" Text -> InstanceConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (InstanceConfiguration -> Pair)
-> Maybe InstanceConfiguration -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe InstanceConfiguration
instanceConfiguration,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ServiceArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
serviceArn)
          ]
      )

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

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

-- | /See:/ 'newUpdateServiceResponse' smart constructor.
data UpdateServiceResponse = UpdateServiceResponse'
  { -- | The response's http status code.
    UpdateServiceResponse -> Int
httpStatus :: Prelude.Int,
    -- | A description of the App Runner service updated by this request. All
    -- configuration values in the returned @Service@ structure reflect
    -- configuration changes that are being applied by this request.
    UpdateServiceResponse -> Service
service :: Service,
    -- | The unique ID of the asynchronous operation that this request started.
    -- You can use it combined with the ListOperations call to track the
    -- operation\'s progress.
    UpdateServiceResponse -> Text
operationId :: Prelude.Text
  }
  deriving (UpdateServiceResponse -> UpdateServiceResponse -> Bool
(UpdateServiceResponse -> UpdateServiceResponse -> Bool)
-> (UpdateServiceResponse -> UpdateServiceResponse -> Bool)
-> Eq UpdateServiceResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateServiceResponse -> UpdateServiceResponse -> Bool
$c/= :: UpdateServiceResponse -> UpdateServiceResponse -> Bool
== :: UpdateServiceResponse -> UpdateServiceResponse -> Bool
$c== :: UpdateServiceResponse -> UpdateServiceResponse -> Bool
Prelude.Eq, Int -> UpdateServiceResponse -> ShowS
[UpdateServiceResponse] -> ShowS
UpdateServiceResponse -> String
(Int -> UpdateServiceResponse -> ShowS)
-> (UpdateServiceResponse -> String)
-> ([UpdateServiceResponse] -> ShowS)
-> Show UpdateServiceResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateServiceResponse] -> ShowS
$cshowList :: [UpdateServiceResponse] -> ShowS
show :: UpdateServiceResponse -> String
$cshow :: UpdateServiceResponse -> String
showsPrec :: Int -> UpdateServiceResponse -> ShowS
$cshowsPrec :: Int -> UpdateServiceResponse -> ShowS
Prelude.Show, (forall x. UpdateServiceResponse -> Rep UpdateServiceResponse x)
-> (forall x. Rep UpdateServiceResponse x -> UpdateServiceResponse)
-> Generic UpdateServiceResponse
forall x. Rep UpdateServiceResponse x -> UpdateServiceResponse
forall x. UpdateServiceResponse -> Rep UpdateServiceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateServiceResponse x -> UpdateServiceResponse
$cfrom :: forall x. UpdateServiceResponse -> Rep UpdateServiceResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateServiceResponse' 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', 'updateServiceResponse_httpStatus' - The response's http status code.
--
-- 'service', 'updateServiceResponse_service' - A description of the App Runner service updated by this request. All
-- configuration values in the returned @Service@ structure reflect
-- configuration changes that are being applied by this request.
--
-- 'operationId', 'updateServiceResponse_operationId' - The unique ID of the asynchronous operation that this request started.
-- You can use it combined with the ListOperations call to track the
-- operation\'s progress.
newUpdateServiceResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'service'
  Service ->
  -- | 'operationId'
  Prelude.Text ->
  UpdateServiceResponse
newUpdateServiceResponse :: Int -> Service -> Text -> UpdateServiceResponse
newUpdateServiceResponse
  Int
pHttpStatus_
  Service
pService_
  Text
pOperationId_ =
    UpdateServiceResponse' :: Int -> Service -> Text -> UpdateServiceResponse
UpdateServiceResponse'
      { $sel:httpStatus:UpdateServiceResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:service:UpdateServiceResponse' :: Service
service = Service
pService_,
        $sel:operationId:UpdateServiceResponse' :: Text
operationId = Text
pOperationId_
      }

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

-- | A description of the App Runner service updated by this request. All
-- configuration values in the returned @Service@ structure reflect
-- configuration changes that are being applied by this request.
updateServiceResponse_service :: Lens.Lens' UpdateServiceResponse Service
updateServiceResponse_service :: (Service -> f Service)
-> UpdateServiceResponse -> f UpdateServiceResponse
updateServiceResponse_service = (UpdateServiceResponse -> Service)
-> (UpdateServiceResponse -> Service -> UpdateServiceResponse)
-> Lens UpdateServiceResponse UpdateServiceResponse Service Service
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceResponse' {Service
service :: Service
$sel:service:UpdateServiceResponse' :: UpdateServiceResponse -> Service
service} -> Service
service) (\s :: UpdateServiceResponse
s@UpdateServiceResponse' {} Service
a -> UpdateServiceResponse
s {$sel:service:UpdateServiceResponse' :: Service
service = Service
a} :: UpdateServiceResponse)

-- | The unique ID of the asynchronous operation that this request started.
-- You can use it combined with the ListOperations call to track the
-- operation\'s progress.
updateServiceResponse_operationId :: Lens.Lens' UpdateServiceResponse Prelude.Text
updateServiceResponse_operationId :: (Text -> f Text)
-> UpdateServiceResponse -> f UpdateServiceResponse
updateServiceResponse_operationId = (UpdateServiceResponse -> Text)
-> (UpdateServiceResponse -> Text -> UpdateServiceResponse)
-> Lens UpdateServiceResponse UpdateServiceResponse Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateServiceResponse' {Text
operationId :: Text
$sel:operationId:UpdateServiceResponse' :: UpdateServiceResponse -> Text
operationId} -> Text
operationId) (\s :: UpdateServiceResponse
s@UpdateServiceResponse' {} Text
a -> UpdateServiceResponse
s {$sel:operationId:UpdateServiceResponse' :: Text
operationId = Text
a} :: UpdateServiceResponse)

instance Prelude.NFData UpdateServiceResponse