{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# 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.Types.ApplicationMaintenanceConfigurationUpdate
-- 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)
module Amazonka.KinesisAnalyticsV2.Types.ApplicationMaintenanceConfigurationUpdate where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Describes the updated maintenance configuration for the application.
--
-- /See:/ 'newApplicationMaintenanceConfigurationUpdate' smart constructor.
data ApplicationMaintenanceConfigurationUpdate = ApplicationMaintenanceConfigurationUpdate'
  { -- | The updated start time for the maintenance window.
    ApplicationMaintenanceConfigurationUpdate -> Text
applicationMaintenanceWindowStartTimeUpdate :: Prelude.Text
  }
  deriving (ApplicationMaintenanceConfigurationUpdate
-> ApplicationMaintenanceConfigurationUpdate -> Bool
(ApplicationMaintenanceConfigurationUpdate
 -> ApplicationMaintenanceConfigurationUpdate -> Bool)
-> (ApplicationMaintenanceConfigurationUpdate
    -> ApplicationMaintenanceConfigurationUpdate -> Bool)
-> Eq ApplicationMaintenanceConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ApplicationMaintenanceConfigurationUpdate
-> ApplicationMaintenanceConfigurationUpdate -> Bool
$c/= :: ApplicationMaintenanceConfigurationUpdate
-> ApplicationMaintenanceConfigurationUpdate -> Bool
== :: ApplicationMaintenanceConfigurationUpdate
-> ApplicationMaintenanceConfigurationUpdate -> Bool
$c== :: ApplicationMaintenanceConfigurationUpdate
-> ApplicationMaintenanceConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [ApplicationMaintenanceConfigurationUpdate]
ReadPrec ApplicationMaintenanceConfigurationUpdate
Int -> ReadS ApplicationMaintenanceConfigurationUpdate
ReadS [ApplicationMaintenanceConfigurationUpdate]
(Int -> ReadS ApplicationMaintenanceConfigurationUpdate)
-> ReadS [ApplicationMaintenanceConfigurationUpdate]
-> ReadPrec ApplicationMaintenanceConfigurationUpdate
-> ReadPrec [ApplicationMaintenanceConfigurationUpdate]
-> Read ApplicationMaintenanceConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ApplicationMaintenanceConfigurationUpdate]
$creadListPrec :: ReadPrec [ApplicationMaintenanceConfigurationUpdate]
readPrec :: ReadPrec ApplicationMaintenanceConfigurationUpdate
$creadPrec :: ReadPrec ApplicationMaintenanceConfigurationUpdate
readList :: ReadS [ApplicationMaintenanceConfigurationUpdate]
$creadList :: ReadS [ApplicationMaintenanceConfigurationUpdate]
readsPrec :: Int -> ReadS ApplicationMaintenanceConfigurationUpdate
$creadsPrec :: Int -> ReadS ApplicationMaintenanceConfigurationUpdate
Prelude.Read, Int -> ApplicationMaintenanceConfigurationUpdate -> ShowS
[ApplicationMaintenanceConfigurationUpdate] -> ShowS
ApplicationMaintenanceConfigurationUpdate -> String
(Int -> ApplicationMaintenanceConfigurationUpdate -> ShowS)
-> (ApplicationMaintenanceConfigurationUpdate -> String)
-> ([ApplicationMaintenanceConfigurationUpdate] -> ShowS)
-> Show ApplicationMaintenanceConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ApplicationMaintenanceConfigurationUpdate] -> ShowS
$cshowList :: [ApplicationMaintenanceConfigurationUpdate] -> ShowS
show :: ApplicationMaintenanceConfigurationUpdate -> String
$cshow :: ApplicationMaintenanceConfigurationUpdate -> String
showsPrec :: Int -> ApplicationMaintenanceConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> ApplicationMaintenanceConfigurationUpdate -> ShowS
Prelude.Show, (forall x.
 ApplicationMaintenanceConfigurationUpdate
 -> Rep ApplicationMaintenanceConfigurationUpdate x)
-> (forall x.
    Rep ApplicationMaintenanceConfigurationUpdate x
    -> ApplicationMaintenanceConfigurationUpdate)
-> Generic ApplicationMaintenanceConfigurationUpdate
forall x.
Rep ApplicationMaintenanceConfigurationUpdate x
-> ApplicationMaintenanceConfigurationUpdate
forall x.
ApplicationMaintenanceConfigurationUpdate
-> Rep ApplicationMaintenanceConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ApplicationMaintenanceConfigurationUpdate x
-> ApplicationMaintenanceConfigurationUpdate
$cfrom :: forall x.
ApplicationMaintenanceConfigurationUpdate
-> Rep ApplicationMaintenanceConfigurationUpdate x
Prelude.Generic)

-- |
-- Create a value of 'ApplicationMaintenanceConfigurationUpdate' 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:
--
-- 'applicationMaintenanceWindowStartTimeUpdate', 'applicationMaintenanceConfigurationUpdate_applicationMaintenanceWindowStartTimeUpdate' - The updated start time for the maintenance window.
newApplicationMaintenanceConfigurationUpdate ::
  -- | 'applicationMaintenanceWindowStartTimeUpdate'
  Prelude.Text ->
  ApplicationMaintenanceConfigurationUpdate
newApplicationMaintenanceConfigurationUpdate :: Text -> ApplicationMaintenanceConfigurationUpdate
newApplicationMaintenanceConfigurationUpdate
  Text
pApplicationMaintenanceWindowStartTimeUpdate_ =
    ApplicationMaintenanceConfigurationUpdate' :: Text -> ApplicationMaintenanceConfigurationUpdate
ApplicationMaintenanceConfigurationUpdate'
      { $sel:applicationMaintenanceWindowStartTimeUpdate:ApplicationMaintenanceConfigurationUpdate' :: Text
applicationMaintenanceWindowStartTimeUpdate =
          Text
pApplicationMaintenanceWindowStartTimeUpdate_
      }

-- | The updated start time for the maintenance window.
applicationMaintenanceConfigurationUpdate_applicationMaintenanceWindowStartTimeUpdate :: Lens.Lens' ApplicationMaintenanceConfigurationUpdate Prelude.Text
applicationMaintenanceConfigurationUpdate_applicationMaintenanceWindowStartTimeUpdate :: (Text -> f Text)
-> ApplicationMaintenanceConfigurationUpdate
-> f ApplicationMaintenanceConfigurationUpdate
applicationMaintenanceConfigurationUpdate_applicationMaintenanceWindowStartTimeUpdate = (ApplicationMaintenanceConfigurationUpdate -> Text)
-> (ApplicationMaintenanceConfigurationUpdate
    -> Text -> ApplicationMaintenanceConfigurationUpdate)
-> Lens
     ApplicationMaintenanceConfigurationUpdate
     ApplicationMaintenanceConfigurationUpdate
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ApplicationMaintenanceConfigurationUpdate' {Text
applicationMaintenanceWindowStartTimeUpdate :: Text
$sel:applicationMaintenanceWindowStartTimeUpdate:ApplicationMaintenanceConfigurationUpdate' :: ApplicationMaintenanceConfigurationUpdate -> Text
applicationMaintenanceWindowStartTimeUpdate} -> Text
applicationMaintenanceWindowStartTimeUpdate) (\s :: ApplicationMaintenanceConfigurationUpdate
s@ApplicationMaintenanceConfigurationUpdate' {} Text
a -> ApplicationMaintenanceConfigurationUpdate
s {$sel:applicationMaintenanceWindowStartTimeUpdate:ApplicationMaintenanceConfigurationUpdate' :: Text
applicationMaintenanceWindowStartTimeUpdate = Text
a} :: ApplicationMaintenanceConfigurationUpdate)

instance
  Prelude.Hashable
    ApplicationMaintenanceConfigurationUpdate

instance
  Prelude.NFData
    ApplicationMaintenanceConfigurationUpdate

instance
  Core.ToJSON
    ApplicationMaintenanceConfigurationUpdate
  where
  toJSON :: ApplicationMaintenanceConfigurationUpdate -> Value
toJSON ApplicationMaintenanceConfigurationUpdate' {Text
applicationMaintenanceWindowStartTimeUpdate :: Text
$sel:applicationMaintenanceWindowStartTimeUpdate:ApplicationMaintenanceConfigurationUpdate' :: ApplicationMaintenanceConfigurationUpdate -> 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
"ApplicationMaintenanceWindowStartTimeUpdate"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationMaintenanceWindowStartTimeUpdate
              )
          ]
      )