{-# 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.DeleteApplicationCloudWatchLoggingOption
-- 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)
--
-- Deletes an Amazon CloudWatch log stream from an Kinesis Data Analytics
-- application.
module Amazonka.KinesisAnalyticsV2.DeleteApplicationCloudWatchLoggingOption
  ( -- * Creating a Request
    DeleteApplicationCloudWatchLoggingOption (..),
    newDeleteApplicationCloudWatchLoggingOption,

    -- * Request Lenses
    deleteApplicationCloudWatchLoggingOption_currentApplicationVersionId,
    deleteApplicationCloudWatchLoggingOption_conditionalToken,
    deleteApplicationCloudWatchLoggingOption_applicationName,
    deleteApplicationCloudWatchLoggingOption_cloudWatchLoggingOptionId,

    -- * Destructuring the Response
    DeleteApplicationCloudWatchLoggingOptionResponse (..),
    newDeleteApplicationCloudWatchLoggingOptionResponse,

    -- * Response Lenses
    deleteApplicationCloudWatchLoggingOptionResponse_applicationARN,
    deleteApplicationCloudWatchLoggingOptionResponse_applicationVersionId,
    deleteApplicationCloudWatchLoggingOptionResponse_cloudWatchLoggingOptionDescriptions,
    deleteApplicationCloudWatchLoggingOptionResponse_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:/ 'newDeleteApplicationCloudWatchLoggingOption' smart constructor.
data DeleteApplicationCloudWatchLoggingOption = DeleteApplicationCloudWatchLoggingOption'
  { -- | The version ID of the application. You must provide the
    -- @CurrentApplicationVersionId@ or the @ConditionalToken@. You can
    -- retrieve the application version ID using DescribeApplication. For
    -- better concurrency support, use the @ConditionalToken@ parameter instead
    -- of @CurrentApplicationVersionId@.
    DeleteApplicationCloudWatchLoggingOption -> Maybe Natural
currentApplicationVersionId :: Prelude.Maybe Prelude.Natural,
    -- | A value you use to implement strong concurrency for application updates.
    -- You must provide the @CurrentApplicationVersionId@ or the
    -- @ConditionalToken@. You get the application\'s current
    -- @ConditionalToken@ using DescribeApplication. For better concurrency
    -- support, use the @ConditionalToken@ parameter instead of
    -- @CurrentApplicationVersionId@.
    DeleteApplicationCloudWatchLoggingOption -> Maybe Text
conditionalToken :: Prelude.Maybe Prelude.Text,
    -- | The application name.
    DeleteApplicationCloudWatchLoggingOption -> Text
applicationName :: Prelude.Text,
    -- | The @CloudWatchLoggingOptionId@ of the Amazon CloudWatch logging option
    -- to delete. You can get the @CloudWatchLoggingOptionId@ by using the
    -- DescribeApplication operation.
    DeleteApplicationCloudWatchLoggingOption -> Text
cloudWatchLoggingOptionId :: Prelude.Text
  }
  deriving (DeleteApplicationCloudWatchLoggingOption
-> DeleteApplicationCloudWatchLoggingOption -> Bool
(DeleteApplicationCloudWatchLoggingOption
 -> DeleteApplicationCloudWatchLoggingOption -> Bool)
-> (DeleteApplicationCloudWatchLoggingOption
    -> DeleteApplicationCloudWatchLoggingOption -> Bool)
-> Eq DeleteApplicationCloudWatchLoggingOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApplicationCloudWatchLoggingOption
-> DeleteApplicationCloudWatchLoggingOption -> Bool
$c/= :: DeleteApplicationCloudWatchLoggingOption
-> DeleteApplicationCloudWatchLoggingOption -> Bool
== :: DeleteApplicationCloudWatchLoggingOption
-> DeleteApplicationCloudWatchLoggingOption -> Bool
$c== :: DeleteApplicationCloudWatchLoggingOption
-> DeleteApplicationCloudWatchLoggingOption -> Bool
Prelude.Eq, ReadPrec [DeleteApplicationCloudWatchLoggingOption]
ReadPrec DeleteApplicationCloudWatchLoggingOption
Int -> ReadS DeleteApplicationCloudWatchLoggingOption
ReadS [DeleteApplicationCloudWatchLoggingOption]
(Int -> ReadS DeleteApplicationCloudWatchLoggingOption)
-> ReadS [DeleteApplicationCloudWatchLoggingOption]
-> ReadPrec DeleteApplicationCloudWatchLoggingOption
-> ReadPrec [DeleteApplicationCloudWatchLoggingOption]
-> Read DeleteApplicationCloudWatchLoggingOption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApplicationCloudWatchLoggingOption]
$creadListPrec :: ReadPrec [DeleteApplicationCloudWatchLoggingOption]
readPrec :: ReadPrec DeleteApplicationCloudWatchLoggingOption
$creadPrec :: ReadPrec DeleteApplicationCloudWatchLoggingOption
readList :: ReadS [DeleteApplicationCloudWatchLoggingOption]
$creadList :: ReadS [DeleteApplicationCloudWatchLoggingOption]
readsPrec :: Int -> ReadS DeleteApplicationCloudWatchLoggingOption
$creadsPrec :: Int -> ReadS DeleteApplicationCloudWatchLoggingOption
Prelude.Read, Int -> DeleteApplicationCloudWatchLoggingOption -> ShowS
[DeleteApplicationCloudWatchLoggingOption] -> ShowS
DeleteApplicationCloudWatchLoggingOption -> String
(Int -> DeleteApplicationCloudWatchLoggingOption -> ShowS)
-> (DeleteApplicationCloudWatchLoggingOption -> String)
-> ([DeleteApplicationCloudWatchLoggingOption] -> ShowS)
-> Show DeleteApplicationCloudWatchLoggingOption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApplicationCloudWatchLoggingOption] -> ShowS
$cshowList :: [DeleteApplicationCloudWatchLoggingOption] -> ShowS
show :: DeleteApplicationCloudWatchLoggingOption -> String
$cshow :: DeleteApplicationCloudWatchLoggingOption -> String
showsPrec :: Int -> DeleteApplicationCloudWatchLoggingOption -> ShowS
$cshowsPrec :: Int -> DeleteApplicationCloudWatchLoggingOption -> ShowS
Prelude.Show, (forall x.
 DeleteApplicationCloudWatchLoggingOption
 -> Rep DeleteApplicationCloudWatchLoggingOption x)
-> (forall x.
    Rep DeleteApplicationCloudWatchLoggingOption x
    -> DeleteApplicationCloudWatchLoggingOption)
-> Generic DeleteApplicationCloudWatchLoggingOption
forall x.
Rep DeleteApplicationCloudWatchLoggingOption x
-> DeleteApplicationCloudWatchLoggingOption
forall x.
DeleteApplicationCloudWatchLoggingOption
-> Rep DeleteApplicationCloudWatchLoggingOption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteApplicationCloudWatchLoggingOption x
-> DeleteApplicationCloudWatchLoggingOption
$cfrom :: forall x.
DeleteApplicationCloudWatchLoggingOption
-> Rep DeleteApplicationCloudWatchLoggingOption x
Prelude.Generic)

-- |
-- Create a value of 'DeleteApplicationCloudWatchLoggingOption' 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:
--
-- 'currentApplicationVersionId', 'deleteApplicationCloudWatchLoggingOption_currentApplicationVersionId' - The version ID of the application. You must provide the
-- @CurrentApplicationVersionId@ or the @ConditionalToken@. You can
-- retrieve the application version ID using DescribeApplication. For
-- better concurrency support, use the @ConditionalToken@ parameter instead
-- of @CurrentApplicationVersionId@.
--
-- 'conditionalToken', 'deleteApplicationCloudWatchLoggingOption_conditionalToken' - A value you use to implement strong concurrency for application updates.
-- You must provide the @CurrentApplicationVersionId@ or the
-- @ConditionalToken@. You get the application\'s current
-- @ConditionalToken@ using DescribeApplication. For better concurrency
-- support, use the @ConditionalToken@ parameter instead of
-- @CurrentApplicationVersionId@.
--
-- 'applicationName', 'deleteApplicationCloudWatchLoggingOption_applicationName' - The application name.
--
-- 'cloudWatchLoggingOptionId', 'deleteApplicationCloudWatchLoggingOption_cloudWatchLoggingOptionId' - The @CloudWatchLoggingOptionId@ of the Amazon CloudWatch logging option
-- to delete. You can get the @CloudWatchLoggingOptionId@ by using the
-- DescribeApplication operation.
newDeleteApplicationCloudWatchLoggingOption ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'cloudWatchLoggingOptionId'
  Prelude.Text ->
  DeleteApplicationCloudWatchLoggingOption
newDeleteApplicationCloudWatchLoggingOption :: Text -> Text -> DeleteApplicationCloudWatchLoggingOption
newDeleteApplicationCloudWatchLoggingOption
  Text
pApplicationName_
  Text
pCloudWatchLoggingOptionId_ =
    DeleteApplicationCloudWatchLoggingOption' :: Maybe Natural
-> Maybe Text
-> Text
-> Text
-> DeleteApplicationCloudWatchLoggingOption
DeleteApplicationCloudWatchLoggingOption'
      { $sel:currentApplicationVersionId:DeleteApplicationCloudWatchLoggingOption' :: Maybe Natural
currentApplicationVersionId =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:conditionalToken:DeleteApplicationCloudWatchLoggingOption' :: Maybe Text
conditionalToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:applicationName:DeleteApplicationCloudWatchLoggingOption' :: Text
applicationName =
          Text
pApplicationName_,
        $sel:cloudWatchLoggingOptionId:DeleteApplicationCloudWatchLoggingOption' :: Text
cloudWatchLoggingOptionId =
          Text
pCloudWatchLoggingOptionId_
      }

-- | The version ID of the application. You must provide the
-- @CurrentApplicationVersionId@ or the @ConditionalToken@. You can
-- retrieve the application version ID using DescribeApplication. For
-- better concurrency support, use the @ConditionalToken@ parameter instead
-- of @CurrentApplicationVersionId@.
deleteApplicationCloudWatchLoggingOption_currentApplicationVersionId :: Lens.Lens' DeleteApplicationCloudWatchLoggingOption (Prelude.Maybe Prelude.Natural)
deleteApplicationCloudWatchLoggingOption_currentApplicationVersionId :: (Maybe Natural -> f (Maybe Natural))
-> DeleteApplicationCloudWatchLoggingOption
-> f DeleteApplicationCloudWatchLoggingOption
deleteApplicationCloudWatchLoggingOption_currentApplicationVersionId = (DeleteApplicationCloudWatchLoggingOption -> Maybe Natural)
-> (DeleteApplicationCloudWatchLoggingOption
    -> Maybe Natural -> DeleteApplicationCloudWatchLoggingOption)
-> Lens
     DeleteApplicationCloudWatchLoggingOption
     DeleteApplicationCloudWatchLoggingOption
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationCloudWatchLoggingOption' {Maybe Natural
currentApplicationVersionId :: Maybe Natural
$sel:currentApplicationVersionId:DeleteApplicationCloudWatchLoggingOption' :: DeleteApplicationCloudWatchLoggingOption -> Maybe Natural
currentApplicationVersionId} -> Maybe Natural
currentApplicationVersionId) (\s :: DeleteApplicationCloudWatchLoggingOption
s@DeleteApplicationCloudWatchLoggingOption' {} Maybe Natural
a -> DeleteApplicationCloudWatchLoggingOption
s {$sel:currentApplicationVersionId:DeleteApplicationCloudWatchLoggingOption' :: Maybe Natural
currentApplicationVersionId = Maybe Natural
a} :: DeleteApplicationCloudWatchLoggingOption)

-- | A value you use to implement strong concurrency for application updates.
-- You must provide the @CurrentApplicationVersionId@ or the
-- @ConditionalToken@. You get the application\'s current
-- @ConditionalToken@ using DescribeApplication. For better concurrency
-- support, use the @ConditionalToken@ parameter instead of
-- @CurrentApplicationVersionId@.
deleteApplicationCloudWatchLoggingOption_conditionalToken :: Lens.Lens' DeleteApplicationCloudWatchLoggingOption (Prelude.Maybe Prelude.Text)
deleteApplicationCloudWatchLoggingOption_conditionalToken :: (Maybe Text -> f (Maybe Text))
-> DeleteApplicationCloudWatchLoggingOption
-> f DeleteApplicationCloudWatchLoggingOption
deleteApplicationCloudWatchLoggingOption_conditionalToken = (DeleteApplicationCloudWatchLoggingOption -> Maybe Text)
-> (DeleteApplicationCloudWatchLoggingOption
    -> Maybe Text -> DeleteApplicationCloudWatchLoggingOption)
-> Lens
     DeleteApplicationCloudWatchLoggingOption
     DeleteApplicationCloudWatchLoggingOption
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationCloudWatchLoggingOption' {Maybe Text
conditionalToken :: Maybe Text
$sel:conditionalToken:DeleteApplicationCloudWatchLoggingOption' :: DeleteApplicationCloudWatchLoggingOption -> Maybe Text
conditionalToken} -> Maybe Text
conditionalToken) (\s :: DeleteApplicationCloudWatchLoggingOption
s@DeleteApplicationCloudWatchLoggingOption' {} Maybe Text
a -> DeleteApplicationCloudWatchLoggingOption
s {$sel:conditionalToken:DeleteApplicationCloudWatchLoggingOption' :: Maybe Text
conditionalToken = Maybe Text
a} :: DeleteApplicationCloudWatchLoggingOption)

-- | The application name.
deleteApplicationCloudWatchLoggingOption_applicationName :: Lens.Lens' DeleteApplicationCloudWatchLoggingOption Prelude.Text
deleteApplicationCloudWatchLoggingOption_applicationName :: (Text -> f Text)
-> DeleteApplicationCloudWatchLoggingOption
-> f DeleteApplicationCloudWatchLoggingOption
deleteApplicationCloudWatchLoggingOption_applicationName = (DeleteApplicationCloudWatchLoggingOption -> Text)
-> (DeleteApplicationCloudWatchLoggingOption
    -> Text -> DeleteApplicationCloudWatchLoggingOption)
-> Lens
     DeleteApplicationCloudWatchLoggingOption
     DeleteApplicationCloudWatchLoggingOption
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationCloudWatchLoggingOption' {Text
applicationName :: Text
$sel:applicationName:DeleteApplicationCloudWatchLoggingOption' :: DeleteApplicationCloudWatchLoggingOption -> Text
applicationName} -> Text
applicationName) (\s :: DeleteApplicationCloudWatchLoggingOption
s@DeleteApplicationCloudWatchLoggingOption' {} Text
a -> DeleteApplicationCloudWatchLoggingOption
s {$sel:applicationName:DeleteApplicationCloudWatchLoggingOption' :: Text
applicationName = Text
a} :: DeleteApplicationCloudWatchLoggingOption)

-- | The @CloudWatchLoggingOptionId@ of the Amazon CloudWatch logging option
-- to delete. You can get the @CloudWatchLoggingOptionId@ by using the
-- DescribeApplication operation.
deleteApplicationCloudWatchLoggingOption_cloudWatchLoggingOptionId :: Lens.Lens' DeleteApplicationCloudWatchLoggingOption Prelude.Text
deleteApplicationCloudWatchLoggingOption_cloudWatchLoggingOptionId :: (Text -> f Text)
-> DeleteApplicationCloudWatchLoggingOption
-> f DeleteApplicationCloudWatchLoggingOption
deleteApplicationCloudWatchLoggingOption_cloudWatchLoggingOptionId = (DeleteApplicationCloudWatchLoggingOption -> Text)
-> (DeleteApplicationCloudWatchLoggingOption
    -> Text -> DeleteApplicationCloudWatchLoggingOption)
-> Lens
     DeleteApplicationCloudWatchLoggingOption
     DeleteApplicationCloudWatchLoggingOption
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationCloudWatchLoggingOption' {Text
cloudWatchLoggingOptionId :: Text
$sel:cloudWatchLoggingOptionId:DeleteApplicationCloudWatchLoggingOption' :: DeleteApplicationCloudWatchLoggingOption -> Text
cloudWatchLoggingOptionId} -> Text
cloudWatchLoggingOptionId) (\s :: DeleteApplicationCloudWatchLoggingOption
s@DeleteApplicationCloudWatchLoggingOption' {} Text
a -> DeleteApplicationCloudWatchLoggingOption
s {$sel:cloudWatchLoggingOptionId:DeleteApplicationCloudWatchLoggingOption' :: Text
cloudWatchLoggingOptionId = Text
a} :: DeleteApplicationCloudWatchLoggingOption)

instance
  Core.AWSRequest
    DeleteApplicationCloudWatchLoggingOption
  where
  type
    AWSResponse
      DeleteApplicationCloudWatchLoggingOption =
      DeleteApplicationCloudWatchLoggingOptionResponse
  request :: DeleteApplicationCloudWatchLoggingOption
-> Request DeleteApplicationCloudWatchLoggingOption
request = Service
-> DeleteApplicationCloudWatchLoggingOption
-> Request DeleteApplicationCloudWatchLoggingOption
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy DeleteApplicationCloudWatchLoggingOption
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DeleteApplicationCloudWatchLoggingOption)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either
      String (AWSResponse DeleteApplicationCloudWatchLoggingOption))
-> Logger
-> Service
-> Proxy DeleteApplicationCloudWatchLoggingOption
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse DeleteApplicationCloudWatchLoggingOption)))
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 Natural
-> Maybe [CloudWatchLoggingOptionDescription]
-> Int
-> DeleteApplicationCloudWatchLoggingOptionResponse
DeleteApplicationCloudWatchLoggingOptionResponse'
            (Maybe Text
 -> Maybe Natural
 -> Maybe [CloudWatchLoggingOptionDescription]
 -> Int
 -> DeleteApplicationCloudWatchLoggingOptionResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Maybe Natural
      -> Maybe [CloudWatchLoggingOptionDescription]
      -> Int
      -> DeleteApplicationCloudWatchLoggingOptionResponse)
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 Natural
   -> Maybe [CloudWatchLoggingOptionDescription]
   -> Int
   -> DeleteApplicationCloudWatchLoggingOptionResponse)
-> Either String (Maybe Natural)
-> Either
     String
     (Maybe [CloudWatchLoggingOptionDescription]
      -> Int -> DeleteApplicationCloudWatchLoggingOptionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ApplicationVersionId")
              Either
  String
  (Maybe [CloudWatchLoggingOptionDescription]
   -> Int -> DeleteApplicationCloudWatchLoggingOptionResponse)
-> Either String (Maybe [CloudWatchLoggingOptionDescription])
-> Either
     String (Int -> DeleteApplicationCloudWatchLoggingOptionResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object
-> Text
-> Either
     String (Maybe (Maybe [CloudWatchLoggingOptionDescription]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"CloudWatchLoggingOptionDescriptions"
                              Either String (Maybe (Maybe [CloudWatchLoggingOptionDescription]))
-> Maybe [CloudWatchLoggingOptionDescription]
-> Either String (Maybe [CloudWatchLoggingOptionDescription])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [CloudWatchLoggingOptionDescription]
forall a. Monoid a => a
Prelude.mempty
                          )
              Either
  String (Int -> DeleteApplicationCloudWatchLoggingOptionResponse)
-> Either String Int
-> Either String DeleteApplicationCloudWatchLoggingOptionResponse
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
    DeleteApplicationCloudWatchLoggingOption

instance
  Prelude.NFData
    DeleteApplicationCloudWatchLoggingOption

instance
  Core.ToHeaders
    DeleteApplicationCloudWatchLoggingOption
  where
  toHeaders :: DeleteApplicationCloudWatchLoggingOption -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> DeleteApplicationCloudWatchLoggingOption -> 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.DeleteApplicationCloudWatchLoggingOption" ::
                          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
    DeleteApplicationCloudWatchLoggingOption
  where
  toJSON :: DeleteApplicationCloudWatchLoggingOption -> Value
toJSON DeleteApplicationCloudWatchLoggingOption' {Maybe Natural
Maybe Text
Text
cloudWatchLoggingOptionId :: Text
applicationName :: Text
conditionalToken :: Maybe Text
currentApplicationVersionId :: Maybe Natural
$sel:cloudWatchLoggingOptionId:DeleteApplicationCloudWatchLoggingOption' :: DeleteApplicationCloudWatchLoggingOption -> Text
$sel:applicationName:DeleteApplicationCloudWatchLoggingOption' :: DeleteApplicationCloudWatchLoggingOption -> Text
$sel:conditionalToken:DeleteApplicationCloudWatchLoggingOption' :: DeleteApplicationCloudWatchLoggingOption -> Maybe Text
$sel:currentApplicationVersionId:DeleteApplicationCloudWatchLoggingOption' :: DeleteApplicationCloudWatchLoggingOption -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"CurrentApplicationVersionId" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
currentApplicationVersionId,
            (Text
"ConditionalToken" 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
conditionalToken,
            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
"CloudWatchLoggingOptionId"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
cloudWatchLoggingOptionId
              )
          ]
      )

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

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

-- | /See:/ 'newDeleteApplicationCloudWatchLoggingOptionResponse' smart constructor.
data DeleteApplicationCloudWatchLoggingOptionResponse = DeleteApplicationCloudWatchLoggingOptionResponse'
  { -- | The application\'s Amazon Resource Name (ARN).
    DeleteApplicationCloudWatchLoggingOptionResponse -> Maybe Text
applicationARN :: Prelude.Maybe Prelude.Text,
    -- | The version ID of the application. Kinesis Data Analytics updates the
    -- @ApplicationVersionId@ each time you change the CloudWatch logging
    -- options.
    DeleteApplicationCloudWatchLoggingOptionResponse -> Maybe Natural
applicationVersionId :: Prelude.Maybe Prelude.Natural,
    -- | The descriptions of the remaining CloudWatch logging options for the
    -- application.
    DeleteApplicationCloudWatchLoggingOptionResponse
-> Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions :: Prelude.Maybe [CloudWatchLoggingOptionDescription],
    -- | The response's http status code.
    DeleteApplicationCloudWatchLoggingOptionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DeleteApplicationCloudWatchLoggingOptionResponse
-> DeleteApplicationCloudWatchLoggingOptionResponse -> Bool
(DeleteApplicationCloudWatchLoggingOptionResponse
 -> DeleteApplicationCloudWatchLoggingOptionResponse -> Bool)
-> (DeleteApplicationCloudWatchLoggingOptionResponse
    -> DeleteApplicationCloudWatchLoggingOptionResponse -> Bool)
-> Eq DeleteApplicationCloudWatchLoggingOptionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteApplicationCloudWatchLoggingOptionResponse
-> DeleteApplicationCloudWatchLoggingOptionResponse -> Bool
$c/= :: DeleteApplicationCloudWatchLoggingOptionResponse
-> DeleteApplicationCloudWatchLoggingOptionResponse -> Bool
== :: DeleteApplicationCloudWatchLoggingOptionResponse
-> DeleteApplicationCloudWatchLoggingOptionResponse -> Bool
$c== :: DeleteApplicationCloudWatchLoggingOptionResponse
-> DeleteApplicationCloudWatchLoggingOptionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteApplicationCloudWatchLoggingOptionResponse]
ReadPrec DeleteApplicationCloudWatchLoggingOptionResponse
Int -> ReadS DeleteApplicationCloudWatchLoggingOptionResponse
ReadS [DeleteApplicationCloudWatchLoggingOptionResponse]
(Int -> ReadS DeleteApplicationCloudWatchLoggingOptionResponse)
-> ReadS [DeleteApplicationCloudWatchLoggingOptionResponse]
-> ReadPrec DeleteApplicationCloudWatchLoggingOptionResponse
-> ReadPrec [DeleteApplicationCloudWatchLoggingOptionResponse]
-> Read DeleteApplicationCloudWatchLoggingOptionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteApplicationCloudWatchLoggingOptionResponse]
$creadListPrec :: ReadPrec [DeleteApplicationCloudWatchLoggingOptionResponse]
readPrec :: ReadPrec DeleteApplicationCloudWatchLoggingOptionResponse
$creadPrec :: ReadPrec DeleteApplicationCloudWatchLoggingOptionResponse
readList :: ReadS [DeleteApplicationCloudWatchLoggingOptionResponse]
$creadList :: ReadS [DeleteApplicationCloudWatchLoggingOptionResponse]
readsPrec :: Int -> ReadS DeleteApplicationCloudWatchLoggingOptionResponse
$creadsPrec :: Int -> ReadS DeleteApplicationCloudWatchLoggingOptionResponse
Prelude.Read, Int -> DeleteApplicationCloudWatchLoggingOptionResponse -> ShowS
[DeleteApplicationCloudWatchLoggingOptionResponse] -> ShowS
DeleteApplicationCloudWatchLoggingOptionResponse -> String
(Int -> DeleteApplicationCloudWatchLoggingOptionResponse -> ShowS)
-> (DeleteApplicationCloudWatchLoggingOptionResponse -> String)
-> ([DeleteApplicationCloudWatchLoggingOptionResponse] -> ShowS)
-> Show DeleteApplicationCloudWatchLoggingOptionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteApplicationCloudWatchLoggingOptionResponse] -> ShowS
$cshowList :: [DeleteApplicationCloudWatchLoggingOptionResponse] -> ShowS
show :: DeleteApplicationCloudWatchLoggingOptionResponse -> String
$cshow :: DeleteApplicationCloudWatchLoggingOptionResponse -> String
showsPrec :: Int -> DeleteApplicationCloudWatchLoggingOptionResponse -> ShowS
$cshowsPrec :: Int -> DeleteApplicationCloudWatchLoggingOptionResponse -> ShowS
Prelude.Show, (forall x.
 DeleteApplicationCloudWatchLoggingOptionResponse
 -> Rep DeleteApplicationCloudWatchLoggingOptionResponse x)
-> (forall x.
    Rep DeleteApplicationCloudWatchLoggingOptionResponse x
    -> DeleteApplicationCloudWatchLoggingOptionResponse)
-> Generic DeleteApplicationCloudWatchLoggingOptionResponse
forall x.
Rep DeleteApplicationCloudWatchLoggingOptionResponse x
-> DeleteApplicationCloudWatchLoggingOptionResponse
forall x.
DeleteApplicationCloudWatchLoggingOptionResponse
-> Rep DeleteApplicationCloudWatchLoggingOptionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteApplicationCloudWatchLoggingOptionResponse x
-> DeleteApplicationCloudWatchLoggingOptionResponse
$cfrom :: forall x.
DeleteApplicationCloudWatchLoggingOptionResponse
-> Rep DeleteApplicationCloudWatchLoggingOptionResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteApplicationCloudWatchLoggingOptionResponse' 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', 'deleteApplicationCloudWatchLoggingOptionResponse_applicationARN' - The application\'s Amazon Resource Name (ARN).
--
-- 'applicationVersionId', 'deleteApplicationCloudWatchLoggingOptionResponse_applicationVersionId' - The version ID of the application. Kinesis Data Analytics updates the
-- @ApplicationVersionId@ each time you change the CloudWatch logging
-- options.
--
-- 'cloudWatchLoggingOptionDescriptions', 'deleteApplicationCloudWatchLoggingOptionResponse_cloudWatchLoggingOptionDescriptions' - The descriptions of the remaining CloudWatch logging options for the
-- application.
--
-- 'httpStatus', 'deleteApplicationCloudWatchLoggingOptionResponse_httpStatus' - The response's http status code.
newDeleteApplicationCloudWatchLoggingOptionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DeleteApplicationCloudWatchLoggingOptionResponse
newDeleteApplicationCloudWatchLoggingOptionResponse :: Int -> DeleteApplicationCloudWatchLoggingOptionResponse
newDeleteApplicationCloudWatchLoggingOptionResponse
  Int
pHttpStatus_ =
    DeleteApplicationCloudWatchLoggingOptionResponse' :: Maybe Text
-> Maybe Natural
-> Maybe [CloudWatchLoggingOptionDescription]
-> Int
-> DeleteApplicationCloudWatchLoggingOptionResponse
DeleteApplicationCloudWatchLoggingOptionResponse'
      { $sel:applicationARN:DeleteApplicationCloudWatchLoggingOptionResponse' :: Maybe Text
applicationARN =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:applicationVersionId:DeleteApplicationCloudWatchLoggingOptionResponse' :: Maybe Natural
applicationVersionId =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:cloudWatchLoggingOptionDescriptions:DeleteApplicationCloudWatchLoggingOptionResponse' :: Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions =
          Maybe [CloudWatchLoggingOptionDescription]
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:DeleteApplicationCloudWatchLoggingOptionResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

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

-- | The version ID of the application. Kinesis Data Analytics updates the
-- @ApplicationVersionId@ each time you change the CloudWatch logging
-- options.
deleteApplicationCloudWatchLoggingOptionResponse_applicationVersionId :: Lens.Lens' DeleteApplicationCloudWatchLoggingOptionResponse (Prelude.Maybe Prelude.Natural)
deleteApplicationCloudWatchLoggingOptionResponse_applicationVersionId :: (Maybe Natural -> f (Maybe Natural))
-> DeleteApplicationCloudWatchLoggingOptionResponse
-> f DeleteApplicationCloudWatchLoggingOptionResponse
deleteApplicationCloudWatchLoggingOptionResponse_applicationVersionId = (DeleteApplicationCloudWatchLoggingOptionResponse -> Maybe Natural)
-> (DeleteApplicationCloudWatchLoggingOptionResponse
    -> Maybe Natural
    -> DeleteApplicationCloudWatchLoggingOptionResponse)
-> Lens
     DeleteApplicationCloudWatchLoggingOptionResponse
     DeleteApplicationCloudWatchLoggingOptionResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationCloudWatchLoggingOptionResponse' {Maybe Natural
applicationVersionId :: Maybe Natural
$sel:applicationVersionId:DeleteApplicationCloudWatchLoggingOptionResponse' :: DeleteApplicationCloudWatchLoggingOptionResponse -> Maybe Natural
applicationVersionId} -> Maybe Natural
applicationVersionId) (\s :: DeleteApplicationCloudWatchLoggingOptionResponse
s@DeleteApplicationCloudWatchLoggingOptionResponse' {} Maybe Natural
a -> DeleteApplicationCloudWatchLoggingOptionResponse
s {$sel:applicationVersionId:DeleteApplicationCloudWatchLoggingOptionResponse' :: Maybe Natural
applicationVersionId = Maybe Natural
a} :: DeleteApplicationCloudWatchLoggingOptionResponse)

-- | The descriptions of the remaining CloudWatch logging options for the
-- application.
deleteApplicationCloudWatchLoggingOptionResponse_cloudWatchLoggingOptionDescriptions :: Lens.Lens' DeleteApplicationCloudWatchLoggingOptionResponse (Prelude.Maybe [CloudWatchLoggingOptionDescription])
deleteApplicationCloudWatchLoggingOptionResponse_cloudWatchLoggingOptionDescriptions :: (Maybe [CloudWatchLoggingOptionDescription]
 -> f (Maybe [CloudWatchLoggingOptionDescription]))
-> DeleteApplicationCloudWatchLoggingOptionResponse
-> f DeleteApplicationCloudWatchLoggingOptionResponse
deleteApplicationCloudWatchLoggingOptionResponse_cloudWatchLoggingOptionDescriptions = (DeleteApplicationCloudWatchLoggingOptionResponse
 -> Maybe [CloudWatchLoggingOptionDescription])
-> (DeleteApplicationCloudWatchLoggingOptionResponse
    -> Maybe [CloudWatchLoggingOptionDescription]
    -> DeleteApplicationCloudWatchLoggingOptionResponse)
-> Lens
     DeleteApplicationCloudWatchLoggingOptionResponse
     DeleteApplicationCloudWatchLoggingOptionResponse
     (Maybe [CloudWatchLoggingOptionDescription])
     (Maybe [CloudWatchLoggingOptionDescription])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteApplicationCloudWatchLoggingOptionResponse' {Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions :: Maybe [CloudWatchLoggingOptionDescription]
$sel:cloudWatchLoggingOptionDescriptions:DeleteApplicationCloudWatchLoggingOptionResponse' :: DeleteApplicationCloudWatchLoggingOptionResponse
-> Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions} -> Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions) (\s :: DeleteApplicationCloudWatchLoggingOptionResponse
s@DeleteApplicationCloudWatchLoggingOptionResponse' {} Maybe [CloudWatchLoggingOptionDescription]
a -> DeleteApplicationCloudWatchLoggingOptionResponse
s {$sel:cloudWatchLoggingOptionDescriptions:DeleteApplicationCloudWatchLoggingOptionResponse' :: Maybe [CloudWatchLoggingOptionDescription]
cloudWatchLoggingOptionDescriptions = Maybe [CloudWatchLoggingOptionDescription]
a} :: DeleteApplicationCloudWatchLoggingOptionResponse) ((Maybe [CloudWatchLoggingOptionDescription]
  -> f (Maybe [CloudWatchLoggingOptionDescription]))
 -> DeleteApplicationCloudWatchLoggingOptionResponse
 -> f DeleteApplicationCloudWatchLoggingOptionResponse)
-> ((Maybe [CloudWatchLoggingOptionDescription]
     -> f (Maybe [CloudWatchLoggingOptionDescription]))
    -> Maybe [CloudWatchLoggingOptionDescription]
    -> f (Maybe [CloudWatchLoggingOptionDescription]))
-> (Maybe [CloudWatchLoggingOptionDescription]
    -> f (Maybe [CloudWatchLoggingOptionDescription]))
-> DeleteApplicationCloudWatchLoggingOptionResponse
-> f DeleteApplicationCloudWatchLoggingOptionResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
-> Iso
     (Maybe [CloudWatchLoggingOptionDescription])
     (Maybe [CloudWatchLoggingOptionDescription])
     (Maybe [CloudWatchLoggingOptionDescription])
     (Maybe [CloudWatchLoggingOptionDescription])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
  [CloudWatchLoggingOptionDescription]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DeleteApplicationCloudWatchLoggingOptionResponse