{-# 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.KinesisAnalyticsV2.UpdateApplicationMaintenanceConfiguration
-- 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 the maintenance configuration of the Kinesis Data Analytics
-- application.
--
-- You can invoke this operation on an application that is in one of the
-- two following states: @READY@ or @RUNNING@. If you invoke it when the
-- application is in a state other than these two states, it throws a
-- @ResourceInUseException@. The service makes use of the updated
-- configuration the next time it schedules maintenance for the
-- application. If you invoke this operation after the service schedules
-- maintenance, the service will apply the configuration update the next
-- time it schedules maintenance for the application. This means that you
-- might not see the maintenance configuration update applied to the
-- maintenance process that follows a successful invocation of this
-- operation, but to the following maintenance process instead.
--
-- To see the current maintenance configuration of your application, invoke
-- the DescribeApplication operation.
--
-- For information about application maintenance, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/java/maintenance.html Kinesis Data Analytics for Apache Flink Maintenance>.
--
-- This operation is supported only for Amazon Kinesis Data Analytics for
-- Apache Flink.
module Amazonka.KinesisAnalyticsV2.UpdateApplicationMaintenanceConfiguration
  ( -- * Creating a Request
    UpdateApplicationMaintenanceConfiguration (..),
    newUpdateApplicationMaintenanceConfiguration,

    -- * Request Lenses
    updateApplicationMaintenanceConfiguration_applicationName,
    updateApplicationMaintenanceConfiguration_applicationMaintenanceConfigurationUpdate,

    -- * Destructuring the Response
    UpdateApplicationMaintenanceConfigurationResponse (..),
    newUpdateApplicationMaintenanceConfigurationResponse,

    -- * Response Lenses
    updateApplicationMaintenanceConfigurationResponse_applicationARN,
    updateApplicationMaintenanceConfigurationResponse_applicationMaintenanceConfigurationDescription,
    updateApplicationMaintenanceConfigurationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types
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:/ 'newUpdateApplicationMaintenanceConfiguration' smart constructor.
data UpdateApplicationMaintenanceConfiguration = UpdateApplicationMaintenanceConfiguration'
  { -- | The name of the application for which you want to update the maintenance
    -- configuration.
    UpdateApplicationMaintenanceConfiguration -> Text
applicationName :: Prelude.Text,
    -- | Describes the application maintenance configuration update.
    UpdateApplicationMaintenanceConfiguration
-> ApplicationMaintenanceConfigurationUpdate
applicationMaintenanceConfigurationUpdate :: ApplicationMaintenanceConfigurationUpdate
  }
  deriving (UpdateApplicationMaintenanceConfiguration
-> UpdateApplicationMaintenanceConfiguration -> Bool
(UpdateApplicationMaintenanceConfiguration
 -> UpdateApplicationMaintenanceConfiguration -> Bool)
-> (UpdateApplicationMaintenanceConfiguration
    -> UpdateApplicationMaintenanceConfiguration -> Bool)
-> Eq UpdateApplicationMaintenanceConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApplicationMaintenanceConfiguration
-> UpdateApplicationMaintenanceConfiguration -> Bool
$c/= :: UpdateApplicationMaintenanceConfiguration
-> UpdateApplicationMaintenanceConfiguration -> Bool
== :: UpdateApplicationMaintenanceConfiguration
-> UpdateApplicationMaintenanceConfiguration -> Bool
$c== :: UpdateApplicationMaintenanceConfiguration
-> UpdateApplicationMaintenanceConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateApplicationMaintenanceConfiguration]
ReadPrec UpdateApplicationMaintenanceConfiguration
Int -> ReadS UpdateApplicationMaintenanceConfiguration
ReadS [UpdateApplicationMaintenanceConfiguration]
(Int -> ReadS UpdateApplicationMaintenanceConfiguration)
-> ReadS [UpdateApplicationMaintenanceConfiguration]
-> ReadPrec UpdateApplicationMaintenanceConfiguration
-> ReadPrec [UpdateApplicationMaintenanceConfiguration]
-> Read UpdateApplicationMaintenanceConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApplicationMaintenanceConfiguration]
$creadListPrec :: ReadPrec [UpdateApplicationMaintenanceConfiguration]
readPrec :: ReadPrec UpdateApplicationMaintenanceConfiguration
$creadPrec :: ReadPrec UpdateApplicationMaintenanceConfiguration
readList :: ReadS [UpdateApplicationMaintenanceConfiguration]
$creadList :: ReadS [UpdateApplicationMaintenanceConfiguration]
readsPrec :: Int -> ReadS UpdateApplicationMaintenanceConfiguration
$creadsPrec :: Int -> ReadS UpdateApplicationMaintenanceConfiguration
Prelude.Read, Int -> UpdateApplicationMaintenanceConfiguration -> ShowS
[UpdateApplicationMaintenanceConfiguration] -> ShowS
UpdateApplicationMaintenanceConfiguration -> String
(Int -> UpdateApplicationMaintenanceConfiguration -> ShowS)
-> (UpdateApplicationMaintenanceConfiguration -> String)
-> ([UpdateApplicationMaintenanceConfiguration] -> ShowS)
-> Show UpdateApplicationMaintenanceConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApplicationMaintenanceConfiguration] -> ShowS
$cshowList :: [UpdateApplicationMaintenanceConfiguration] -> ShowS
show :: UpdateApplicationMaintenanceConfiguration -> String
$cshow :: UpdateApplicationMaintenanceConfiguration -> String
showsPrec :: Int -> UpdateApplicationMaintenanceConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateApplicationMaintenanceConfiguration -> ShowS
Prelude.Show, (forall x.
 UpdateApplicationMaintenanceConfiguration
 -> Rep UpdateApplicationMaintenanceConfiguration x)
-> (forall x.
    Rep UpdateApplicationMaintenanceConfiguration x
    -> UpdateApplicationMaintenanceConfiguration)
-> Generic UpdateApplicationMaintenanceConfiguration
forall x.
Rep UpdateApplicationMaintenanceConfiguration x
-> UpdateApplicationMaintenanceConfiguration
forall x.
UpdateApplicationMaintenanceConfiguration
-> Rep UpdateApplicationMaintenanceConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApplicationMaintenanceConfiguration x
-> UpdateApplicationMaintenanceConfiguration
$cfrom :: forall x.
UpdateApplicationMaintenanceConfiguration
-> Rep UpdateApplicationMaintenanceConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApplicationMaintenanceConfiguration' 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:
--
-- 'applicationName', 'updateApplicationMaintenanceConfiguration_applicationName' - The name of the application for which you want to update the maintenance
-- configuration.
--
-- 'applicationMaintenanceConfigurationUpdate', 'updateApplicationMaintenanceConfiguration_applicationMaintenanceConfigurationUpdate' - Describes the application maintenance configuration update.
newUpdateApplicationMaintenanceConfiguration ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'applicationMaintenanceConfigurationUpdate'
  ApplicationMaintenanceConfigurationUpdate ->
  UpdateApplicationMaintenanceConfiguration
newUpdateApplicationMaintenanceConfiguration :: Text
-> ApplicationMaintenanceConfigurationUpdate
-> UpdateApplicationMaintenanceConfiguration
newUpdateApplicationMaintenanceConfiguration
  Text
pApplicationName_
  ApplicationMaintenanceConfigurationUpdate
pApplicationMaintenanceConfigurationUpdate_ =
    UpdateApplicationMaintenanceConfiguration' :: Text
-> ApplicationMaintenanceConfigurationUpdate
-> UpdateApplicationMaintenanceConfiguration
UpdateApplicationMaintenanceConfiguration'
      { $sel:applicationName:UpdateApplicationMaintenanceConfiguration' :: Text
applicationName =
          Text
pApplicationName_,
        $sel:applicationMaintenanceConfigurationUpdate:UpdateApplicationMaintenanceConfiguration' :: ApplicationMaintenanceConfigurationUpdate
applicationMaintenanceConfigurationUpdate =
          ApplicationMaintenanceConfigurationUpdate
pApplicationMaintenanceConfigurationUpdate_
      }

-- | The name of the application for which you want to update the maintenance
-- configuration.
updateApplicationMaintenanceConfiguration_applicationName :: Lens.Lens' UpdateApplicationMaintenanceConfiguration Prelude.Text
updateApplicationMaintenanceConfiguration_applicationName :: (Text -> f Text)
-> UpdateApplicationMaintenanceConfiguration
-> f UpdateApplicationMaintenanceConfiguration
updateApplicationMaintenanceConfiguration_applicationName = (UpdateApplicationMaintenanceConfiguration -> Text)
-> (UpdateApplicationMaintenanceConfiguration
    -> Text -> UpdateApplicationMaintenanceConfiguration)
-> Lens
     UpdateApplicationMaintenanceConfiguration
     UpdateApplicationMaintenanceConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationMaintenanceConfiguration' {Text
applicationName :: Text
$sel:applicationName:UpdateApplicationMaintenanceConfiguration' :: UpdateApplicationMaintenanceConfiguration -> Text
applicationName} -> Text
applicationName) (\s :: UpdateApplicationMaintenanceConfiguration
s@UpdateApplicationMaintenanceConfiguration' {} Text
a -> UpdateApplicationMaintenanceConfiguration
s {$sel:applicationName:UpdateApplicationMaintenanceConfiguration' :: Text
applicationName = Text
a} :: UpdateApplicationMaintenanceConfiguration)

-- | Describes the application maintenance configuration update.
updateApplicationMaintenanceConfiguration_applicationMaintenanceConfigurationUpdate :: Lens.Lens' UpdateApplicationMaintenanceConfiguration ApplicationMaintenanceConfigurationUpdate
updateApplicationMaintenanceConfiguration_applicationMaintenanceConfigurationUpdate :: (ApplicationMaintenanceConfigurationUpdate
 -> f ApplicationMaintenanceConfigurationUpdate)
-> UpdateApplicationMaintenanceConfiguration
-> f UpdateApplicationMaintenanceConfiguration
updateApplicationMaintenanceConfiguration_applicationMaintenanceConfigurationUpdate = (UpdateApplicationMaintenanceConfiguration
 -> ApplicationMaintenanceConfigurationUpdate)
-> (UpdateApplicationMaintenanceConfiguration
    -> ApplicationMaintenanceConfigurationUpdate
    -> UpdateApplicationMaintenanceConfiguration)
-> Lens
     UpdateApplicationMaintenanceConfiguration
     UpdateApplicationMaintenanceConfiguration
     ApplicationMaintenanceConfigurationUpdate
     ApplicationMaintenanceConfigurationUpdate
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationMaintenanceConfiguration' {ApplicationMaintenanceConfigurationUpdate
applicationMaintenanceConfigurationUpdate :: ApplicationMaintenanceConfigurationUpdate
$sel:applicationMaintenanceConfigurationUpdate:UpdateApplicationMaintenanceConfiguration' :: UpdateApplicationMaintenanceConfiguration
-> ApplicationMaintenanceConfigurationUpdate
applicationMaintenanceConfigurationUpdate} -> ApplicationMaintenanceConfigurationUpdate
applicationMaintenanceConfigurationUpdate) (\s :: UpdateApplicationMaintenanceConfiguration
s@UpdateApplicationMaintenanceConfiguration' {} ApplicationMaintenanceConfigurationUpdate
a -> UpdateApplicationMaintenanceConfiguration
s {$sel:applicationMaintenanceConfigurationUpdate:UpdateApplicationMaintenanceConfiguration' :: ApplicationMaintenanceConfigurationUpdate
applicationMaintenanceConfigurationUpdate = ApplicationMaintenanceConfigurationUpdate
a} :: UpdateApplicationMaintenanceConfiguration)

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

instance
  Prelude.Hashable
    UpdateApplicationMaintenanceConfiguration

instance
  Prelude.NFData
    UpdateApplicationMaintenanceConfiguration

instance
  Core.ToHeaders
    UpdateApplicationMaintenanceConfiguration
  where
  toHeaders :: UpdateApplicationMaintenanceConfiguration -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> UpdateApplicationMaintenanceConfiguration -> 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
"KinesisAnalytics_20180523.UpdateApplicationMaintenanceConfiguration" ::
                          Prelude.ByteString
                      ),
            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
    UpdateApplicationMaintenanceConfiguration
  where
  toJSON :: UpdateApplicationMaintenanceConfiguration -> Value
toJSON UpdateApplicationMaintenanceConfiguration' {Text
ApplicationMaintenanceConfigurationUpdate
applicationMaintenanceConfigurationUpdate :: ApplicationMaintenanceConfigurationUpdate
applicationName :: Text
$sel:applicationMaintenanceConfigurationUpdate:UpdateApplicationMaintenanceConfiguration' :: UpdateApplicationMaintenanceConfiguration
-> ApplicationMaintenanceConfigurationUpdate
$sel:applicationName:UpdateApplicationMaintenanceConfiguration' :: UpdateApplicationMaintenanceConfiguration -> Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ApplicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"ApplicationMaintenanceConfigurationUpdate"
                  Text -> ApplicationMaintenanceConfigurationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= ApplicationMaintenanceConfigurationUpdate
applicationMaintenanceConfigurationUpdate
              )
          ]
      )

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

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

-- | /See:/ 'newUpdateApplicationMaintenanceConfigurationResponse' smart constructor.
data UpdateApplicationMaintenanceConfigurationResponse = UpdateApplicationMaintenanceConfigurationResponse'
  { -- | The Amazon Resource Name (ARN) of the application.
    UpdateApplicationMaintenanceConfigurationResponse -> Maybe Text
applicationARN :: Prelude.Maybe Prelude.Text,
    -- | The application maintenance configuration description after the update.
    UpdateApplicationMaintenanceConfigurationResponse
-> Maybe ApplicationMaintenanceConfigurationDescription
applicationMaintenanceConfigurationDescription :: Prelude.Maybe ApplicationMaintenanceConfigurationDescription,
    -- | The response's http status code.
    UpdateApplicationMaintenanceConfigurationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateApplicationMaintenanceConfigurationResponse
-> UpdateApplicationMaintenanceConfigurationResponse -> Bool
(UpdateApplicationMaintenanceConfigurationResponse
 -> UpdateApplicationMaintenanceConfigurationResponse -> Bool)
-> (UpdateApplicationMaintenanceConfigurationResponse
    -> UpdateApplicationMaintenanceConfigurationResponse -> Bool)
-> Eq UpdateApplicationMaintenanceConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateApplicationMaintenanceConfigurationResponse
-> UpdateApplicationMaintenanceConfigurationResponse -> Bool
$c/= :: UpdateApplicationMaintenanceConfigurationResponse
-> UpdateApplicationMaintenanceConfigurationResponse -> Bool
== :: UpdateApplicationMaintenanceConfigurationResponse
-> UpdateApplicationMaintenanceConfigurationResponse -> Bool
$c== :: UpdateApplicationMaintenanceConfigurationResponse
-> UpdateApplicationMaintenanceConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateApplicationMaintenanceConfigurationResponse]
ReadPrec UpdateApplicationMaintenanceConfigurationResponse
Int -> ReadS UpdateApplicationMaintenanceConfigurationResponse
ReadS [UpdateApplicationMaintenanceConfigurationResponse]
(Int -> ReadS UpdateApplicationMaintenanceConfigurationResponse)
-> ReadS [UpdateApplicationMaintenanceConfigurationResponse]
-> ReadPrec UpdateApplicationMaintenanceConfigurationResponse
-> ReadPrec [UpdateApplicationMaintenanceConfigurationResponse]
-> Read UpdateApplicationMaintenanceConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateApplicationMaintenanceConfigurationResponse]
$creadListPrec :: ReadPrec [UpdateApplicationMaintenanceConfigurationResponse]
readPrec :: ReadPrec UpdateApplicationMaintenanceConfigurationResponse
$creadPrec :: ReadPrec UpdateApplicationMaintenanceConfigurationResponse
readList :: ReadS [UpdateApplicationMaintenanceConfigurationResponse]
$creadList :: ReadS [UpdateApplicationMaintenanceConfigurationResponse]
readsPrec :: Int -> ReadS UpdateApplicationMaintenanceConfigurationResponse
$creadsPrec :: Int -> ReadS UpdateApplicationMaintenanceConfigurationResponse
Prelude.Read, Int -> UpdateApplicationMaintenanceConfigurationResponse -> ShowS
[UpdateApplicationMaintenanceConfigurationResponse] -> ShowS
UpdateApplicationMaintenanceConfigurationResponse -> String
(Int -> UpdateApplicationMaintenanceConfigurationResponse -> ShowS)
-> (UpdateApplicationMaintenanceConfigurationResponse -> String)
-> ([UpdateApplicationMaintenanceConfigurationResponse] -> ShowS)
-> Show UpdateApplicationMaintenanceConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateApplicationMaintenanceConfigurationResponse] -> ShowS
$cshowList :: [UpdateApplicationMaintenanceConfigurationResponse] -> ShowS
show :: UpdateApplicationMaintenanceConfigurationResponse -> String
$cshow :: UpdateApplicationMaintenanceConfigurationResponse -> String
showsPrec :: Int -> UpdateApplicationMaintenanceConfigurationResponse -> ShowS
$cshowsPrec :: Int -> UpdateApplicationMaintenanceConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 UpdateApplicationMaintenanceConfigurationResponse
 -> Rep UpdateApplicationMaintenanceConfigurationResponse x)
-> (forall x.
    Rep UpdateApplicationMaintenanceConfigurationResponse x
    -> UpdateApplicationMaintenanceConfigurationResponse)
-> Generic UpdateApplicationMaintenanceConfigurationResponse
forall x.
Rep UpdateApplicationMaintenanceConfigurationResponse x
-> UpdateApplicationMaintenanceConfigurationResponse
forall x.
UpdateApplicationMaintenanceConfigurationResponse
-> Rep UpdateApplicationMaintenanceConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateApplicationMaintenanceConfigurationResponse x
-> UpdateApplicationMaintenanceConfigurationResponse
$cfrom :: forall x.
UpdateApplicationMaintenanceConfigurationResponse
-> Rep UpdateApplicationMaintenanceConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateApplicationMaintenanceConfigurationResponse' 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:
--
-- 'applicationARN', 'updateApplicationMaintenanceConfigurationResponse_applicationARN' - The Amazon Resource Name (ARN) of the application.
--
-- 'applicationMaintenanceConfigurationDescription', 'updateApplicationMaintenanceConfigurationResponse_applicationMaintenanceConfigurationDescription' - The application maintenance configuration description after the update.
--
-- 'httpStatus', 'updateApplicationMaintenanceConfigurationResponse_httpStatus' - The response's http status code.
newUpdateApplicationMaintenanceConfigurationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateApplicationMaintenanceConfigurationResponse
newUpdateApplicationMaintenanceConfigurationResponse :: Int -> UpdateApplicationMaintenanceConfigurationResponse
newUpdateApplicationMaintenanceConfigurationResponse
  Int
pHttpStatus_ =
    UpdateApplicationMaintenanceConfigurationResponse' :: Maybe Text
-> Maybe ApplicationMaintenanceConfigurationDescription
-> Int
-> UpdateApplicationMaintenanceConfigurationResponse
UpdateApplicationMaintenanceConfigurationResponse'
      { $sel:applicationARN:UpdateApplicationMaintenanceConfigurationResponse' :: Maybe Text
applicationARN =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:applicationMaintenanceConfigurationDescription:UpdateApplicationMaintenanceConfigurationResponse' :: Maybe ApplicationMaintenanceConfigurationDescription
applicationMaintenanceConfigurationDescription =
          Maybe ApplicationMaintenanceConfigurationDescription
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateApplicationMaintenanceConfigurationResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

-- | The Amazon Resource Name (ARN) of the application.
updateApplicationMaintenanceConfigurationResponse_applicationARN :: Lens.Lens' UpdateApplicationMaintenanceConfigurationResponse (Prelude.Maybe Prelude.Text)
updateApplicationMaintenanceConfigurationResponse_applicationARN :: (Maybe Text -> f (Maybe Text))
-> UpdateApplicationMaintenanceConfigurationResponse
-> f UpdateApplicationMaintenanceConfigurationResponse
updateApplicationMaintenanceConfigurationResponse_applicationARN = (UpdateApplicationMaintenanceConfigurationResponse -> Maybe Text)
-> (UpdateApplicationMaintenanceConfigurationResponse
    -> Maybe Text -> UpdateApplicationMaintenanceConfigurationResponse)
-> Lens
     UpdateApplicationMaintenanceConfigurationResponse
     UpdateApplicationMaintenanceConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationMaintenanceConfigurationResponse' {Maybe Text
applicationARN :: Maybe Text
$sel:applicationARN:UpdateApplicationMaintenanceConfigurationResponse' :: UpdateApplicationMaintenanceConfigurationResponse -> Maybe Text
applicationARN} -> Maybe Text
applicationARN) (\s :: UpdateApplicationMaintenanceConfigurationResponse
s@UpdateApplicationMaintenanceConfigurationResponse' {} Maybe Text
a -> UpdateApplicationMaintenanceConfigurationResponse
s {$sel:applicationARN:UpdateApplicationMaintenanceConfigurationResponse' :: Maybe Text
applicationARN = Maybe Text
a} :: UpdateApplicationMaintenanceConfigurationResponse)

-- | The application maintenance configuration description after the update.
updateApplicationMaintenanceConfigurationResponse_applicationMaintenanceConfigurationDescription :: Lens.Lens' UpdateApplicationMaintenanceConfigurationResponse (Prelude.Maybe ApplicationMaintenanceConfigurationDescription)
updateApplicationMaintenanceConfigurationResponse_applicationMaintenanceConfigurationDescription :: (Maybe ApplicationMaintenanceConfigurationDescription
 -> f (Maybe ApplicationMaintenanceConfigurationDescription))
-> UpdateApplicationMaintenanceConfigurationResponse
-> f UpdateApplicationMaintenanceConfigurationResponse
updateApplicationMaintenanceConfigurationResponse_applicationMaintenanceConfigurationDescription = (UpdateApplicationMaintenanceConfigurationResponse
 -> Maybe ApplicationMaintenanceConfigurationDescription)
-> (UpdateApplicationMaintenanceConfigurationResponse
    -> Maybe ApplicationMaintenanceConfigurationDescription
    -> UpdateApplicationMaintenanceConfigurationResponse)
-> Lens
     UpdateApplicationMaintenanceConfigurationResponse
     UpdateApplicationMaintenanceConfigurationResponse
     (Maybe ApplicationMaintenanceConfigurationDescription)
     (Maybe ApplicationMaintenanceConfigurationDescription)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateApplicationMaintenanceConfigurationResponse' {Maybe ApplicationMaintenanceConfigurationDescription
applicationMaintenanceConfigurationDescription :: Maybe ApplicationMaintenanceConfigurationDescription
$sel:applicationMaintenanceConfigurationDescription:UpdateApplicationMaintenanceConfigurationResponse' :: UpdateApplicationMaintenanceConfigurationResponse
-> Maybe ApplicationMaintenanceConfigurationDescription
applicationMaintenanceConfigurationDescription} -> Maybe ApplicationMaintenanceConfigurationDescription
applicationMaintenanceConfigurationDescription) (\s :: UpdateApplicationMaintenanceConfigurationResponse
s@UpdateApplicationMaintenanceConfigurationResponse' {} Maybe ApplicationMaintenanceConfigurationDescription
a -> UpdateApplicationMaintenanceConfigurationResponse
s {$sel:applicationMaintenanceConfigurationDescription:UpdateApplicationMaintenanceConfigurationResponse' :: Maybe ApplicationMaintenanceConfigurationDescription
applicationMaintenanceConfigurationDescription = Maybe ApplicationMaintenanceConfigurationDescription
a} :: UpdateApplicationMaintenanceConfigurationResponse)

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

instance
  Prelude.NFData
    UpdateApplicationMaintenanceConfigurationResponse