{-# 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.DeployAsApplicationConfigurationUpdate
-- 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.DeployAsApplicationConfigurationUpdate where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types.S3ContentBaseLocationUpdate
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Updates to the configuration information required to deploy an Amazon
-- Data Analytics Studio notebook as an application with durable state.
--
-- /See:/ 'newDeployAsApplicationConfigurationUpdate' smart constructor.
data DeployAsApplicationConfigurationUpdate = DeployAsApplicationConfigurationUpdate'
  { -- | Updates to the location that holds the data required to specify an
    -- Amazon Data Analytics application.
    DeployAsApplicationConfigurationUpdate
-> Maybe S3ContentBaseLocationUpdate
s3ContentLocationUpdate :: Prelude.Maybe S3ContentBaseLocationUpdate
  }
  deriving (DeployAsApplicationConfigurationUpdate
-> DeployAsApplicationConfigurationUpdate -> Bool
(DeployAsApplicationConfigurationUpdate
 -> DeployAsApplicationConfigurationUpdate -> Bool)
-> (DeployAsApplicationConfigurationUpdate
    -> DeployAsApplicationConfigurationUpdate -> Bool)
-> Eq DeployAsApplicationConfigurationUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeployAsApplicationConfigurationUpdate
-> DeployAsApplicationConfigurationUpdate -> Bool
$c/= :: DeployAsApplicationConfigurationUpdate
-> DeployAsApplicationConfigurationUpdate -> Bool
== :: DeployAsApplicationConfigurationUpdate
-> DeployAsApplicationConfigurationUpdate -> Bool
$c== :: DeployAsApplicationConfigurationUpdate
-> DeployAsApplicationConfigurationUpdate -> Bool
Prelude.Eq, ReadPrec [DeployAsApplicationConfigurationUpdate]
ReadPrec DeployAsApplicationConfigurationUpdate
Int -> ReadS DeployAsApplicationConfigurationUpdate
ReadS [DeployAsApplicationConfigurationUpdate]
(Int -> ReadS DeployAsApplicationConfigurationUpdate)
-> ReadS [DeployAsApplicationConfigurationUpdate]
-> ReadPrec DeployAsApplicationConfigurationUpdate
-> ReadPrec [DeployAsApplicationConfigurationUpdate]
-> Read DeployAsApplicationConfigurationUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeployAsApplicationConfigurationUpdate]
$creadListPrec :: ReadPrec [DeployAsApplicationConfigurationUpdate]
readPrec :: ReadPrec DeployAsApplicationConfigurationUpdate
$creadPrec :: ReadPrec DeployAsApplicationConfigurationUpdate
readList :: ReadS [DeployAsApplicationConfigurationUpdate]
$creadList :: ReadS [DeployAsApplicationConfigurationUpdate]
readsPrec :: Int -> ReadS DeployAsApplicationConfigurationUpdate
$creadsPrec :: Int -> ReadS DeployAsApplicationConfigurationUpdate
Prelude.Read, Int -> DeployAsApplicationConfigurationUpdate -> ShowS
[DeployAsApplicationConfigurationUpdate] -> ShowS
DeployAsApplicationConfigurationUpdate -> String
(Int -> DeployAsApplicationConfigurationUpdate -> ShowS)
-> (DeployAsApplicationConfigurationUpdate -> String)
-> ([DeployAsApplicationConfigurationUpdate] -> ShowS)
-> Show DeployAsApplicationConfigurationUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeployAsApplicationConfigurationUpdate] -> ShowS
$cshowList :: [DeployAsApplicationConfigurationUpdate] -> ShowS
show :: DeployAsApplicationConfigurationUpdate -> String
$cshow :: DeployAsApplicationConfigurationUpdate -> String
showsPrec :: Int -> DeployAsApplicationConfigurationUpdate -> ShowS
$cshowsPrec :: Int -> DeployAsApplicationConfigurationUpdate -> ShowS
Prelude.Show, (forall x.
 DeployAsApplicationConfigurationUpdate
 -> Rep DeployAsApplicationConfigurationUpdate x)
-> (forall x.
    Rep DeployAsApplicationConfigurationUpdate x
    -> DeployAsApplicationConfigurationUpdate)
-> Generic DeployAsApplicationConfigurationUpdate
forall x.
Rep DeployAsApplicationConfigurationUpdate x
-> DeployAsApplicationConfigurationUpdate
forall x.
DeployAsApplicationConfigurationUpdate
-> Rep DeployAsApplicationConfigurationUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeployAsApplicationConfigurationUpdate x
-> DeployAsApplicationConfigurationUpdate
$cfrom :: forall x.
DeployAsApplicationConfigurationUpdate
-> Rep DeployAsApplicationConfigurationUpdate x
Prelude.Generic)

-- |
-- Create a value of 'DeployAsApplicationConfigurationUpdate' 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:
--
-- 's3ContentLocationUpdate', 'deployAsApplicationConfigurationUpdate_s3ContentLocationUpdate' - Updates to the location that holds the data required to specify an
-- Amazon Data Analytics application.
newDeployAsApplicationConfigurationUpdate ::
  DeployAsApplicationConfigurationUpdate
newDeployAsApplicationConfigurationUpdate :: DeployAsApplicationConfigurationUpdate
newDeployAsApplicationConfigurationUpdate =
  DeployAsApplicationConfigurationUpdate' :: Maybe S3ContentBaseLocationUpdate
-> DeployAsApplicationConfigurationUpdate
DeployAsApplicationConfigurationUpdate'
    { $sel:s3ContentLocationUpdate:DeployAsApplicationConfigurationUpdate' :: Maybe S3ContentBaseLocationUpdate
s3ContentLocationUpdate =
        Maybe S3ContentBaseLocationUpdate
forall a. Maybe a
Prelude.Nothing
    }

-- | Updates to the location that holds the data required to specify an
-- Amazon Data Analytics application.
deployAsApplicationConfigurationUpdate_s3ContentLocationUpdate :: Lens.Lens' DeployAsApplicationConfigurationUpdate (Prelude.Maybe S3ContentBaseLocationUpdate)
deployAsApplicationConfigurationUpdate_s3ContentLocationUpdate :: (Maybe S3ContentBaseLocationUpdate
 -> f (Maybe S3ContentBaseLocationUpdate))
-> DeployAsApplicationConfigurationUpdate
-> f DeployAsApplicationConfigurationUpdate
deployAsApplicationConfigurationUpdate_s3ContentLocationUpdate = (DeployAsApplicationConfigurationUpdate
 -> Maybe S3ContentBaseLocationUpdate)
-> (DeployAsApplicationConfigurationUpdate
    -> Maybe S3ContentBaseLocationUpdate
    -> DeployAsApplicationConfigurationUpdate)
-> Lens
     DeployAsApplicationConfigurationUpdate
     DeployAsApplicationConfigurationUpdate
     (Maybe S3ContentBaseLocationUpdate)
     (Maybe S3ContentBaseLocationUpdate)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeployAsApplicationConfigurationUpdate' {Maybe S3ContentBaseLocationUpdate
s3ContentLocationUpdate :: Maybe S3ContentBaseLocationUpdate
$sel:s3ContentLocationUpdate:DeployAsApplicationConfigurationUpdate' :: DeployAsApplicationConfigurationUpdate
-> Maybe S3ContentBaseLocationUpdate
s3ContentLocationUpdate} -> Maybe S3ContentBaseLocationUpdate
s3ContentLocationUpdate) (\s :: DeployAsApplicationConfigurationUpdate
s@DeployAsApplicationConfigurationUpdate' {} Maybe S3ContentBaseLocationUpdate
a -> DeployAsApplicationConfigurationUpdate
s {$sel:s3ContentLocationUpdate:DeployAsApplicationConfigurationUpdate' :: Maybe S3ContentBaseLocationUpdate
s3ContentLocationUpdate = Maybe S3ContentBaseLocationUpdate
a} :: DeployAsApplicationConfigurationUpdate)

instance
  Prelude.Hashable
    DeployAsApplicationConfigurationUpdate

instance
  Prelude.NFData
    DeployAsApplicationConfigurationUpdate

instance
  Core.ToJSON
    DeployAsApplicationConfigurationUpdate
  where
  toJSON :: DeployAsApplicationConfigurationUpdate -> Value
toJSON DeployAsApplicationConfigurationUpdate' {Maybe S3ContentBaseLocationUpdate
s3ContentLocationUpdate :: Maybe S3ContentBaseLocationUpdate
$sel:s3ContentLocationUpdate:DeployAsApplicationConfigurationUpdate' :: DeployAsApplicationConfigurationUpdate
-> Maybe S3ContentBaseLocationUpdate
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"S3ContentLocationUpdate" Text -> S3ContentBaseLocationUpdate -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (S3ContentBaseLocationUpdate -> Pair)
-> Maybe S3ContentBaseLocationUpdate -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe S3ContentBaseLocationUpdate
s3ContentLocationUpdate
          ]
      )