{-# 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.KinesisAnalytics.AddApplicationCloudWatchLoggingOption
-- 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)
--
-- This documentation is for version 1 of the Amazon Kinesis Data Analytics
-- API, which only supports SQL applications. Version 2 of the API supports
-- SQL and Java applications. For more information about version 2, see
-- </kinesisanalytics/latest/apiv2/Welcome.html Amazon Kinesis Data Analytics API V2 Documentation>.
--
-- Adds a CloudWatch log stream to monitor application configuration
-- errors. For more information about using CloudWatch log streams with
-- Amazon Kinesis Analytics applications, see
-- <https://docs.aws.amazon.com/kinesisanalytics/latest/dev/cloudwatch-logs.html Working with Amazon CloudWatch Logs>.
module Amazonka.KinesisAnalytics.AddApplicationCloudWatchLoggingOption
  ( -- * Creating a Request
    AddApplicationCloudWatchLoggingOption (..),
    newAddApplicationCloudWatchLoggingOption,

    -- * Request Lenses
    addApplicationCloudWatchLoggingOption_applicationName,
    addApplicationCloudWatchLoggingOption_currentApplicationVersionId,
    addApplicationCloudWatchLoggingOption_cloudWatchLoggingOption,

    -- * Destructuring the Response
    AddApplicationCloudWatchLoggingOptionResponse (..),
    newAddApplicationCloudWatchLoggingOptionResponse,

    -- * Response Lenses
    addApplicationCloudWatchLoggingOptionResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalytics.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:/ 'newAddApplicationCloudWatchLoggingOption' smart constructor.
data AddApplicationCloudWatchLoggingOption = AddApplicationCloudWatchLoggingOption'
  { -- | The Kinesis Analytics application name.
    AddApplicationCloudWatchLoggingOption -> Text
applicationName :: Prelude.Text,
    -- | The version ID of the Kinesis Analytics application.
    AddApplicationCloudWatchLoggingOption -> Natural
currentApplicationVersionId :: Prelude.Natural,
    -- | Provides the CloudWatch log stream Amazon Resource Name (ARN) and the
    -- IAM role ARN. Note: To write application messages to CloudWatch, the IAM
    -- role that is used must have the @PutLogEvents@ policy action enabled.
    AddApplicationCloudWatchLoggingOption -> CloudWatchLoggingOption
cloudWatchLoggingOption :: CloudWatchLoggingOption
  }
  deriving (AddApplicationCloudWatchLoggingOption
-> AddApplicationCloudWatchLoggingOption -> Bool
(AddApplicationCloudWatchLoggingOption
 -> AddApplicationCloudWatchLoggingOption -> Bool)
-> (AddApplicationCloudWatchLoggingOption
    -> AddApplicationCloudWatchLoggingOption -> Bool)
-> Eq AddApplicationCloudWatchLoggingOption
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddApplicationCloudWatchLoggingOption
-> AddApplicationCloudWatchLoggingOption -> Bool
$c/= :: AddApplicationCloudWatchLoggingOption
-> AddApplicationCloudWatchLoggingOption -> Bool
== :: AddApplicationCloudWatchLoggingOption
-> AddApplicationCloudWatchLoggingOption -> Bool
$c== :: AddApplicationCloudWatchLoggingOption
-> AddApplicationCloudWatchLoggingOption -> Bool
Prelude.Eq, ReadPrec [AddApplicationCloudWatchLoggingOption]
ReadPrec AddApplicationCloudWatchLoggingOption
Int -> ReadS AddApplicationCloudWatchLoggingOption
ReadS [AddApplicationCloudWatchLoggingOption]
(Int -> ReadS AddApplicationCloudWatchLoggingOption)
-> ReadS [AddApplicationCloudWatchLoggingOption]
-> ReadPrec AddApplicationCloudWatchLoggingOption
-> ReadPrec [AddApplicationCloudWatchLoggingOption]
-> Read AddApplicationCloudWatchLoggingOption
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddApplicationCloudWatchLoggingOption]
$creadListPrec :: ReadPrec [AddApplicationCloudWatchLoggingOption]
readPrec :: ReadPrec AddApplicationCloudWatchLoggingOption
$creadPrec :: ReadPrec AddApplicationCloudWatchLoggingOption
readList :: ReadS [AddApplicationCloudWatchLoggingOption]
$creadList :: ReadS [AddApplicationCloudWatchLoggingOption]
readsPrec :: Int -> ReadS AddApplicationCloudWatchLoggingOption
$creadsPrec :: Int -> ReadS AddApplicationCloudWatchLoggingOption
Prelude.Read, Int -> AddApplicationCloudWatchLoggingOption -> ShowS
[AddApplicationCloudWatchLoggingOption] -> ShowS
AddApplicationCloudWatchLoggingOption -> String
(Int -> AddApplicationCloudWatchLoggingOption -> ShowS)
-> (AddApplicationCloudWatchLoggingOption -> String)
-> ([AddApplicationCloudWatchLoggingOption] -> ShowS)
-> Show AddApplicationCloudWatchLoggingOption
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddApplicationCloudWatchLoggingOption] -> ShowS
$cshowList :: [AddApplicationCloudWatchLoggingOption] -> ShowS
show :: AddApplicationCloudWatchLoggingOption -> String
$cshow :: AddApplicationCloudWatchLoggingOption -> String
showsPrec :: Int -> AddApplicationCloudWatchLoggingOption -> ShowS
$cshowsPrec :: Int -> AddApplicationCloudWatchLoggingOption -> ShowS
Prelude.Show, (forall x.
 AddApplicationCloudWatchLoggingOption
 -> Rep AddApplicationCloudWatchLoggingOption x)
-> (forall x.
    Rep AddApplicationCloudWatchLoggingOption x
    -> AddApplicationCloudWatchLoggingOption)
-> Generic AddApplicationCloudWatchLoggingOption
forall x.
Rep AddApplicationCloudWatchLoggingOption x
-> AddApplicationCloudWatchLoggingOption
forall x.
AddApplicationCloudWatchLoggingOption
-> Rep AddApplicationCloudWatchLoggingOption x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddApplicationCloudWatchLoggingOption x
-> AddApplicationCloudWatchLoggingOption
$cfrom :: forall x.
AddApplicationCloudWatchLoggingOption
-> Rep AddApplicationCloudWatchLoggingOption x
Prelude.Generic)

-- |
-- Create a value of 'AddApplicationCloudWatchLoggingOption' 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', 'addApplicationCloudWatchLoggingOption_applicationName' - The Kinesis Analytics application name.
--
-- 'currentApplicationVersionId', 'addApplicationCloudWatchLoggingOption_currentApplicationVersionId' - The version ID of the Kinesis Analytics application.
--
-- 'cloudWatchLoggingOption', 'addApplicationCloudWatchLoggingOption_cloudWatchLoggingOption' - Provides the CloudWatch log stream Amazon Resource Name (ARN) and the
-- IAM role ARN. Note: To write application messages to CloudWatch, the IAM
-- role that is used must have the @PutLogEvents@ policy action enabled.
newAddApplicationCloudWatchLoggingOption ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'currentApplicationVersionId'
  Prelude.Natural ->
  -- | 'cloudWatchLoggingOption'
  CloudWatchLoggingOption ->
  AddApplicationCloudWatchLoggingOption
newAddApplicationCloudWatchLoggingOption :: Text
-> Natural
-> CloudWatchLoggingOption
-> AddApplicationCloudWatchLoggingOption
newAddApplicationCloudWatchLoggingOption
  Text
pApplicationName_
  Natural
pCurrentApplicationVersionId_
  CloudWatchLoggingOption
pCloudWatchLoggingOption_ =
    AddApplicationCloudWatchLoggingOption' :: Text
-> Natural
-> CloudWatchLoggingOption
-> AddApplicationCloudWatchLoggingOption
AddApplicationCloudWatchLoggingOption'
      { $sel:applicationName:AddApplicationCloudWatchLoggingOption' :: Text
applicationName =
          Text
pApplicationName_,
        $sel:currentApplicationVersionId:AddApplicationCloudWatchLoggingOption' :: Natural
currentApplicationVersionId =
          Natural
pCurrentApplicationVersionId_,
        $sel:cloudWatchLoggingOption:AddApplicationCloudWatchLoggingOption' :: CloudWatchLoggingOption
cloudWatchLoggingOption =
          CloudWatchLoggingOption
pCloudWatchLoggingOption_
      }

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

-- | The version ID of the Kinesis Analytics application.
addApplicationCloudWatchLoggingOption_currentApplicationVersionId :: Lens.Lens' AddApplicationCloudWatchLoggingOption Prelude.Natural
addApplicationCloudWatchLoggingOption_currentApplicationVersionId :: (Natural -> f Natural)
-> AddApplicationCloudWatchLoggingOption
-> f AddApplicationCloudWatchLoggingOption
addApplicationCloudWatchLoggingOption_currentApplicationVersionId = (AddApplicationCloudWatchLoggingOption -> Natural)
-> (AddApplicationCloudWatchLoggingOption
    -> Natural -> AddApplicationCloudWatchLoggingOption)
-> Lens
     AddApplicationCloudWatchLoggingOption
     AddApplicationCloudWatchLoggingOption
     Natural
     Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationCloudWatchLoggingOption' {Natural
currentApplicationVersionId :: Natural
$sel:currentApplicationVersionId:AddApplicationCloudWatchLoggingOption' :: AddApplicationCloudWatchLoggingOption -> Natural
currentApplicationVersionId} -> Natural
currentApplicationVersionId) (\s :: AddApplicationCloudWatchLoggingOption
s@AddApplicationCloudWatchLoggingOption' {} Natural
a -> AddApplicationCloudWatchLoggingOption
s {$sel:currentApplicationVersionId:AddApplicationCloudWatchLoggingOption' :: Natural
currentApplicationVersionId = Natural
a} :: AddApplicationCloudWatchLoggingOption)

-- | Provides the CloudWatch log stream Amazon Resource Name (ARN) and the
-- IAM role ARN. Note: To write application messages to CloudWatch, the IAM
-- role that is used must have the @PutLogEvents@ policy action enabled.
addApplicationCloudWatchLoggingOption_cloudWatchLoggingOption :: Lens.Lens' AddApplicationCloudWatchLoggingOption CloudWatchLoggingOption
addApplicationCloudWatchLoggingOption_cloudWatchLoggingOption :: (CloudWatchLoggingOption -> f CloudWatchLoggingOption)
-> AddApplicationCloudWatchLoggingOption
-> f AddApplicationCloudWatchLoggingOption
addApplicationCloudWatchLoggingOption_cloudWatchLoggingOption = (AddApplicationCloudWatchLoggingOption -> CloudWatchLoggingOption)
-> (AddApplicationCloudWatchLoggingOption
    -> CloudWatchLoggingOption
    -> AddApplicationCloudWatchLoggingOption)
-> Lens
     AddApplicationCloudWatchLoggingOption
     AddApplicationCloudWatchLoggingOption
     CloudWatchLoggingOption
     CloudWatchLoggingOption
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AddApplicationCloudWatchLoggingOption' {CloudWatchLoggingOption
cloudWatchLoggingOption :: CloudWatchLoggingOption
$sel:cloudWatchLoggingOption:AddApplicationCloudWatchLoggingOption' :: AddApplicationCloudWatchLoggingOption -> CloudWatchLoggingOption
cloudWatchLoggingOption} -> CloudWatchLoggingOption
cloudWatchLoggingOption) (\s :: AddApplicationCloudWatchLoggingOption
s@AddApplicationCloudWatchLoggingOption' {} CloudWatchLoggingOption
a -> AddApplicationCloudWatchLoggingOption
s {$sel:cloudWatchLoggingOption:AddApplicationCloudWatchLoggingOption' :: CloudWatchLoggingOption
cloudWatchLoggingOption = CloudWatchLoggingOption
a} :: AddApplicationCloudWatchLoggingOption)

instance
  Core.AWSRequest
    AddApplicationCloudWatchLoggingOption
  where
  type
    AWSResponse
      AddApplicationCloudWatchLoggingOption =
      AddApplicationCloudWatchLoggingOptionResponse
  request :: AddApplicationCloudWatchLoggingOption
-> Request AddApplicationCloudWatchLoggingOption
request = Service
-> AddApplicationCloudWatchLoggingOption
-> Request AddApplicationCloudWatchLoggingOption
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy AddApplicationCloudWatchLoggingOption
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse AddApplicationCloudWatchLoggingOption)))
response =
    (Int
 -> ResponseHeaders
 -> ()
 -> Either
      String (AWSResponse AddApplicationCloudWatchLoggingOption))
-> Logger
-> Service
-> Proxy AddApplicationCloudWatchLoggingOption
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse
           (AWSResponse AddApplicationCloudWatchLoggingOption)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
      ( \Int
s ResponseHeaders
h ()
x ->
          Int -> AddApplicationCloudWatchLoggingOptionResponse
AddApplicationCloudWatchLoggingOptionResponse'
            (Int -> AddApplicationCloudWatchLoggingOptionResponse)
-> Either String Int
-> Either String AddApplicationCloudWatchLoggingOptionResponse
forall (f :: * -> *) a b. Functor 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
    AddApplicationCloudWatchLoggingOption

instance
  Prelude.NFData
    AddApplicationCloudWatchLoggingOption

instance
  Core.ToHeaders
    AddApplicationCloudWatchLoggingOption
  where
  toHeaders :: AddApplicationCloudWatchLoggingOption -> ResponseHeaders
toHeaders =
    ResponseHeaders
-> AddApplicationCloudWatchLoggingOption -> 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_20150814.AddApplicationCloudWatchLoggingOption" ::
                          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
    AddApplicationCloudWatchLoggingOption
  where
  toJSON :: AddApplicationCloudWatchLoggingOption -> Value
toJSON AddApplicationCloudWatchLoggingOption' {Natural
Text
CloudWatchLoggingOption
cloudWatchLoggingOption :: CloudWatchLoggingOption
currentApplicationVersionId :: Natural
applicationName :: Text
$sel:cloudWatchLoggingOption:AddApplicationCloudWatchLoggingOption' :: AddApplicationCloudWatchLoggingOption -> CloudWatchLoggingOption
$sel:currentApplicationVersionId:AddApplicationCloudWatchLoggingOption' :: AddApplicationCloudWatchLoggingOption -> Natural
$sel:applicationName:AddApplicationCloudWatchLoggingOption' :: AddApplicationCloudWatchLoggingOption -> 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
"CurrentApplicationVersionId"
                  Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Natural
currentApplicationVersionId
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"CloudWatchLoggingOption"
                  Text -> CloudWatchLoggingOption -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= CloudWatchLoggingOption
cloudWatchLoggingOption
              )
          ]
      )

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

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

-- | /See:/ 'newAddApplicationCloudWatchLoggingOptionResponse' smart constructor.
data AddApplicationCloudWatchLoggingOptionResponse = AddApplicationCloudWatchLoggingOptionResponse'
  { -- | The response's http status code.
    AddApplicationCloudWatchLoggingOptionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (AddApplicationCloudWatchLoggingOptionResponse
-> AddApplicationCloudWatchLoggingOptionResponse -> Bool
(AddApplicationCloudWatchLoggingOptionResponse
 -> AddApplicationCloudWatchLoggingOptionResponse -> Bool)
-> (AddApplicationCloudWatchLoggingOptionResponse
    -> AddApplicationCloudWatchLoggingOptionResponse -> Bool)
-> Eq AddApplicationCloudWatchLoggingOptionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AddApplicationCloudWatchLoggingOptionResponse
-> AddApplicationCloudWatchLoggingOptionResponse -> Bool
$c/= :: AddApplicationCloudWatchLoggingOptionResponse
-> AddApplicationCloudWatchLoggingOptionResponse -> Bool
== :: AddApplicationCloudWatchLoggingOptionResponse
-> AddApplicationCloudWatchLoggingOptionResponse -> Bool
$c== :: AddApplicationCloudWatchLoggingOptionResponse
-> AddApplicationCloudWatchLoggingOptionResponse -> Bool
Prelude.Eq, ReadPrec [AddApplicationCloudWatchLoggingOptionResponse]
ReadPrec AddApplicationCloudWatchLoggingOptionResponse
Int -> ReadS AddApplicationCloudWatchLoggingOptionResponse
ReadS [AddApplicationCloudWatchLoggingOptionResponse]
(Int -> ReadS AddApplicationCloudWatchLoggingOptionResponse)
-> ReadS [AddApplicationCloudWatchLoggingOptionResponse]
-> ReadPrec AddApplicationCloudWatchLoggingOptionResponse
-> ReadPrec [AddApplicationCloudWatchLoggingOptionResponse]
-> Read AddApplicationCloudWatchLoggingOptionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AddApplicationCloudWatchLoggingOptionResponse]
$creadListPrec :: ReadPrec [AddApplicationCloudWatchLoggingOptionResponse]
readPrec :: ReadPrec AddApplicationCloudWatchLoggingOptionResponse
$creadPrec :: ReadPrec AddApplicationCloudWatchLoggingOptionResponse
readList :: ReadS [AddApplicationCloudWatchLoggingOptionResponse]
$creadList :: ReadS [AddApplicationCloudWatchLoggingOptionResponse]
readsPrec :: Int -> ReadS AddApplicationCloudWatchLoggingOptionResponse
$creadsPrec :: Int -> ReadS AddApplicationCloudWatchLoggingOptionResponse
Prelude.Read, Int -> AddApplicationCloudWatchLoggingOptionResponse -> ShowS
[AddApplicationCloudWatchLoggingOptionResponse] -> ShowS
AddApplicationCloudWatchLoggingOptionResponse -> String
(Int -> AddApplicationCloudWatchLoggingOptionResponse -> ShowS)
-> (AddApplicationCloudWatchLoggingOptionResponse -> String)
-> ([AddApplicationCloudWatchLoggingOptionResponse] -> ShowS)
-> Show AddApplicationCloudWatchLoggingOptionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AddApplicationCloudWatchLoggingOptionResponse] -> ShowS
$cshowList :: [AddApplicationCloudWatchLoggingOptionResponse] -> ShowS
show :: AddApplicationCloudWatchLoggingOptionResponse -> String
$cshow :: AddApplicationCloudWatchLoggingOptionResponse -> String
showsPrec :: Int -> AddApplicationCloudWatchLoggingOptionResponse -> ShowS
$cshowsPrec :: Int -> AddApplicationCloudWatchLoggingOptionResponse -> ShowS
Prelude.Show, (forall x.
 AddApplicationCloudWatchLoggingOptionResponse
 -> Rep AddApplicationCloudWatchLoggingOptionResponse x)
-> (forall x.
    Rep AddApplicationCloudWatchLoggingOptionResponse x
    -> AddApplicationCloudWatchLoggingOptionResponse)
-> Generic AddApplicationCloudWatchLoggingOptionResponse
forall x.
Rep AddApplicationCloudWatchLoggingOptionResponse x
-> AddApplicationCloudWatchLoggingOptionResponse
forall x.
AddApplicationCloudWatchLoggingOptionResponse
-> Rep AddApplicationCloudWatchLoggingOptionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AddApplicationCloudWatchLoggingOptionResponse x
-> AddApplicationCloudWatchLoggingOptionResponse
$cfrom :: forall x.
AddApplicationCloudWatchLoggingOptionResponse
-> Rep AddApplicationCloudWatchLoggingOptionResponse x
Prelude.Generic)

-- |
-- Create a value of 'AddApplicationCloudWatchLoggingOptionResponse' 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:
--
-- 'httpStatus', 'addApplicationCloudWatchLoggingOptionResponse_httpStatus' - The response's http status code.
newAddApplicationCloudWatchLoggingOptionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  AddApplicationCloudWatchLoggingOptionResponse
newAddApplicationCloudWatchLoggingOptionResponse :: Int -> AddApplicationCloudWatchLoggingOptionResponse
newAddApplicationCloudWatchLoggingOptionResponse
  Int
pHttpStatus_ =
    AddApplicationCloudWatchLoggingOptionResponse' :: Int -> AddApplicationCloudWatchLoggingOptionResponse
AddApplicationCloudWatchLoggingOptionResponse'
      { $sel:httpStatus:AddApplicationCloudWatchLoggingOptionResponse' :: Int
httpStatus =
          Int
pHttpStatus_
      }

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

instance
  Prelude.NFData
    AddApplicationCloudWatchLoggingOptionResponse