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

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

-- | The information required to deploy a Kinesis Data Analytics Studio
-- notebook as an application with durable state.
--
-- /See:/ 'newDeployAsApplicationConfiguration' smart constructor.
data DeployAsApplicationConfiguration = DeployAsApplicationConfiguration'
  { -- | The description of an Amazon S3 object that contains the Amazon Data
    -- Analytics application, including the Amazon Resource Name (ARN) of the
    -- S3 bucket, the name of the Amazon S3 object that contains the data, and
    -- the version number of the Amazon S3 object that contains the data.
    DeployAsApplicationConfiguration -> S3ContentBaseLocation
s3ContentLocation :: S3ContentBaseLocation
  }
  deriving (DeployAsApplicationConfiguration
-> DeployAsApplicationConfiguration -> Bool
(DeployAsApplicationConfiguration
 -> DeployAsApplicationConfiguration -> Bool)
-> (DeployAsApplicationConfiguration
    -> DeployAsApplicationConfiguration -> Bool)
-> Eq DeployAsApplicationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeployAsApplicationConfiguration
-> DeployAsApplicationConfiguration -> Bool
$c/= :: DeployAsApplicationConfiguration
-> DeployAsApplicationConfiguration -> Bool
== :: DeployAsApplicationConfiguration
-> DeployAsApplicationConfiguration -> Bool
$c== :: DeployAsApplicationConfiguration
-> DeployAsApplicationConfiguration -> Bool
Prelude.Eq, ReadPrec [DeployAsApplicationConfiguration]
ReadPrec DeployAsApplicationConfiguration
Int -> ReadS DeployAsApplicationConfiguration
ReadS [DeployAsApplicationConfiguration]
(Int -> ReadS DeployAsApplicationConfiguration)
-> ReadS [DeployAsApplicationConfiguration]
-> ReadPrec DeployAsApplicationConfiguration
-> ReadPrec [DeployAsApplicationConfiguration]
-> Read DeployAsApplicationConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeployAsApplicationConfiguration]
$creadListPrec :: ReadPrec [DeployAsApplicationConfiguration]
readPrec :: ReadPrec DeployAsApplicationConfiguration
$creadPrec :: ReadPrec DeployAsApplicationConfiguration
readList :: ReadS [DeployAsApplicationConfiguration]
$creadList :: ReadS [DeployAsApplicationConfiguration]
readsPrec :: Int -> ReadS DeployAsApplicationConfiguration
$creadsPrec :: Int -> ReadS DeployAsApplicationConfiguration
Prelude.Read, Int -> DeployAsApplicationConfiguration -> ShowS
[DeployAsApplicationConfiguration] -> ShowS
DeployAsApplicationConfiguration -> String
(Int -> DeployAsApplicationConfiguration -> ShowS)
-> (DeployAsApplicationConfiguration -> String)
-> ([DeployAsApplicationConfiguration] -> ShowS)
-> Show DeployAsApplicationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeployAsApplicationConfiguration] -> ShowS
$cshowList :: [DeployAsApplicationConfiguration] -> ShowS
show :: DeployAsApplicationConfiguration -> String
$cshow :: DeployAsApplicationConfiguration -> String
showsPrec :: Int -> DeployAsApplicationConfiguration -> ShowS
$cshowsPrec :: Int -> DeployAsApplicationConfiguration -> ShowS
Prelude.Show, (forall x.
 DeployAsApplicationConfiguration
 -> Rep DeployAsApplicationConfiguration x)
-> (forall x.
    Rep DeployAsApplicationConfiguration x
    -> DeployAsApplicationConfiguration)
-> Generic DeployAsApplicationConfiguration
forall x.
Rep DeployAsApplicationConfiguration x
-> DeployAsApplicationConfiguration
forall x.
DeployAsApplicationConfiguration
-> Rep DeployAsApplicationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeployAsApplicationConfiguration x
-> DeployAsApplicationConfiguration
$cfrom :: forall x.
DeployAsApplicationConfiguration
-> Rep DeployAsApplicationConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'DeployAsApplicationConfiguration' 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:
--
-- 's3ContentLocation', 'deployAsApplicationConfiguration_s3ContentLocation' - The description of an Amazon S3 object that contains the Amazon Data
-- Analytics application, including the Amazon Resource Name (ARN) of the
-- S3 bucket, the name of the Amazon S3 object that contains the data, and
-- the version number of the Amazon S3 object that contains the data.
newDeployAsApplicationConfiguration ::
  -- | 's3ContentLocation'
  S3ContentBaseLocation ->
  DeployAsApplicationConfiguration
newDeployAsApplicationConfiguration :: S3ContentBaseLocation -> DeployAsApplicationConfiguration
newDeployAsApplicationConfiguration
  S3ContentBaseLocation
pS3ContentLocation_ =
    DeployAsApplicationConfiguration' :: S3ContentBaseLocation -> DeployAsApplicationConfiguration
DeployAsApplicationConfiguration'
      { $sel:s3ContentLocation:DeployAsApplicationConfiguration' :: S3ContentBaseLocation
s3ContentLocation =
          S3ContentBaseLocation
pS3ContentLocation_
      }

-- | The description of an Amazon S3 object that contains the Amazon Data
-- Analytics application, including the Amazon Resource Name (ARN) of the
-- S3 bucket, the name of the Amazon S3 object that contains the data, and
-- the version number of the Amazon S3 object that contains the data.
deployAsApplicationConfiguration_s3ContentLocation :: Lens.Lens' DeployAsApplicationConfiguration S3ContentBaseLocation
deployAsApplicationConfiguration_s3ContentLocation :: (S3ContentBaseLocation -> f S3ContentBaseLocation)
-> DeployAsApplicationConfiguration
-> f DeployAsApplicationConfiguration
deployAsApplicationConfiguration_s3ContentLocation = (DeployAsApplicationConfiguration -> S3ContentBaseLocation)
-> (DeployAsApplicationConfiguration
    -> S3ContentBaseLocation -> DeployAsApplicationConfiguration)
-> Lens
     DeployAsApplicationConfiguration
     DeployAsApplicationConfiguration
     S3ContentBaseLocation
     S3ContentBaseLocation
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeployAsApplicationConfiguration' {S3ContentBaseLocation
s3ContentLocation :: S3ContentBaseLocation
$sel:s3ContentLocation:DeployAsApplicationConfiguration' :: DeployAsApplicationConfiguration -> S3ContentBaseLocation
s3ContentLocation} -> S3ContentBaseLocation
s3ContentLocation) (\s :: DeployAsApplicationConfiguration
s@DeployAsApplicationConfiguration' {} S3ContentBaseLocation
a -> DeployAsApplicationConfiguration
s {$sel:s3ContentLocation:DeployAsApplicationConfiguration' :: S3ContentBaseLocation
s3ContentLocation = S3ContentBaseLocation
a} :: DeployAsApplicationConfiguration)

instance
  Prelude.Hashable
    DeployAsApplicationConfiguration

instance
  Prelude.NFData
    DeployAsApplicationConfiguration

instance Core.ToJSON DeployAsApplicationConfiguration where
  toJSON :: DeployAsApplicationConfiguration -> Value
toJSON DeployAsApplicationConfiguration' {S3ContentBaseLocation
s3ContentLocation :: S3ContentBaseLocation
$sel:s3ContentLocation:DeployAsApplicationConfiguration' :: DeployAsApplicationConfiguration -> S3ContentBaseLocation
..} =
    [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
"S3ContentLocation" Text -> S3ContentBaseLocation -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= S3ContentBaseLocation
s3ContentLocation)
          ]
      )