{-# 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.OpsWorks.Types.CloudWatchLogsLogStream
-- 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.OpsWorks.Types.CloudWatchLogsLogStream where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.OpsWorks.Types.CloudWatchLogsEncoding
import Amazonka.OpsWorks.Types.CloudWatchLogsInitialPosition
import Amazonka.OpsWorks.Types.CloudWatchLogsTimeZone
import qualified Amazonka.Prelude as Prelude

-- | Describes the Amazon CloudWatch logs configuration for a layer. For
-- detailed information about members of this data type, see the
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html CloudWatch Logs Agent Reference>.
--
-- /See:/ 'newCloudWatchLogsLogStream' smart constructor.
data CloudWatchLogsLogStream = CloudWatchLogsLogStream'
  { -- | Specifies the max number of log events in a batch, up to 10000. The
    -- default value is 1000.
    CloudWatchLogsLogStream -> Maybe Int
batchCount :: Prelude.Maybe Prelude.Int,
    -- | Specifies the range of lines for identifying a file. The valid values
    -- are one number, or two dash-delimited numbers, such as \'1\', \'2-5\'.
    -- The default value is \'1\', meaning the first line is used to calculate
    -- the fingerprint. Fingerprint lines are not sent to CloudWatch Logs
    -- unless all specified lines are available.
    CloudWatchLogsLogStream -> Maybe Text
fileFingerprintLines :: Prelude.Maybe Prelude.Text,
    -- | Specifies the time duration for the batching of log events. The minimum
    -- value is 5000ms and default value is 5000ms.
    CloudWatchLogsLogStream -> Maybe Int
bufferDuration :: Prelude.Maybe Prelude.Int,
    -- | Specifies the maximum size of log events in a batch, in bytes, up to
    -- 1048576 bytes. The default value is 32768 bytes. This size is calculated
    -- as the sum of all event messages in UTF-8, plus 26 bytes for each log
    -- event.
    CloudWatchLogsLogStream -> Maybe Int
batchSize :: Prelude.Maybe Prelude.Int,
    -- | Specifies the destination log group. A log group is created
    -- automatically if it doesn\'t already exist. Log group names can be
    -- between 1 and 512 characters long. Allowed characters include a-z, A-Z,
    -- 0-9, \'_\' (underscore), \'-\' (hyphen), \'\/\' (forward slash), and
    -- \'.\' (period).
    CloudWatchLogsLogStream -> Maybe Text
logGroupName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the pattern for identifying the start of a log message.
    CloudWatchLogsLogStream -> Maybe Text
multiLineStartPattern :: Prelude.Maybe Prelude.Text,
    -- | Specifies where to start to read data (start_of_file or end_of_file).
    -- The default is start_of_file. This setting is only used if there is no
    -- state persisted for that log stream.
    CloudWatchLogsLogStream -> Maybe CloudWatchLogsInitialPosition
initialPosition :: Prelude.Maybe CloudWatchLogsInitialPosition,
    -- | Specifies how the time stamp is extracted from logs. For more
    -- information, see the
    -- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html CloudWatch Logs Agent Reference>.
    CloudWatchLogsLogStream -> Maybe Text
datetimeFormat :: Prelude.Maybe Prelude.Text,
    -- | Specifies the encoding of the log file so that the file can be read
    -- correctly. The default is @utf_8@. Encodings supported by Python
    -- @codecs.decode()@ can be used here.
    CloudWatchLogsLogStream -> Maybe CloudWatchLogsEncoding
encoding :: Prelude.Maybe CloudWatchLogsEncoding,
    -- | Specifies the time zone of log event time stamps.
    CloudWatchLogsLogStream -> Maybe CloudWatchLogsTimeZone
timeZone :: Prelude.Maybe CloudWatchLogsTimeZone,
    -- | Specifies log files that you want to push to CloudWatch Logs.
    --
    -- @File@ can point to a specific file or multiple files (by using wild
    -- card characters such as @\/var\/log\/system.log*@). Only the latest file
    -- is pushed to CloudWatch Logs, based on file modification time. We
    -- recommend that you use wild card characters to specify a series of files
    -- of the same type, such as @access_log.2014-06-01-01@,
    -- @access_log.2014-06-01-02@, and so on by using a pattern like
    -- @access_log.*@. Don\'t use a wildcard to match multiple file types, such
    -- as @access_log_80@ and @access_log_443@. To specify multiple, different
    -- file types, add another log stream entry to the configuration file, so
    -- that each log file type is stored in a different log group.
    --
    -- Zipped files are not supported.
    CloudWatchLogsLogStream -> Maybe Text
file :: Prelude.Maybe Prelude.Text
  }
  deriving (CloudWatchLogsLogStream -> CloudWatchLogsLogStream -> Bool
(CloudWatchLogsLogStream -> CloudWatchLogsLogStream -> Bool)
-> (CloudWatchLogsLogStream -> CloudWatchLogsLogStream -> Bool)
-> Eq CloudWatchLogsLogStream
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CloudWatchLogsLogStream -> CloudWatchLogsLogStream -> Bool
$c/= :: CloudWatchLogsLogStream -> CloudWatchLogsLogStream -> Bool
== :: CloudWatchLogsLogStream -> CloudWatchLogsLogStream -> Bool
$c== :: CloudWatchLogsLogStream -> CloudWatchLogsLogStream -> Bool
Prelude.Eq, ReadPrec [CloudWatchLogsLogStream]
ReadPrec CloudWatchLogsLogStream
Int -> ReadS CloudWatchLogsLogStream
ReadS [CloudWatchLogsLogStream]
(Int -> ReadS CloudWatchLogsLogStream)
-> ReadS [CloudWatchLogsLogStream]
-> ReadPrec CloudWatchLogsLogStream
-> ReadPrec [CloudWatchLogsLogStream]
-> Read CloudWatchLogsLogStream
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CloudWatchLogsLogStream]
$creadListPrec :: ReadPrec [CloudWatchLogsLogStream]
readPrec :: ReadPrec CloudWatchLogsLogStream
$creadPrec :: ReadPrec CloudWatchLogsLogStream
readList :: ReadS [CloudWatchLogsLogStream]
$creadList :: ReadS [CloudWatchLogsLogStream]
readsPrec :: Int -> ReadS CloudWatchLogsLogStream
$creadsPrec :: Int -> ReadS CloudWatchLogsLogStream
Prelude.Read, Int -> CloudWatchLogsLogStream -> ShowS
[CloudWatchLogsLogStream] -> ShowS
CloudWatchLogsLogStream -> String
(Int -> CloudWatchLogsLogStream -> ShowS)
-> (CloudWatchLogsLogStream -> String)
-> ([CloudWatchLogsLogStream] -> ShowS)
-> Show CloudWatchLogsLogStream
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CloudWatchLogsLogStream] -> ShowS
$cshowList :: [CloudWatchLogsLogStream] -> ShowS
show :: CloudWatchLogsLogStream -> String
$cshow :: CloudWatchLogsLogStream -> String
showsPrec :: Int -> CloudWatchLogsLogStream -> ShowS
$cshowsPrec :: Int -> CloudWatchLogsLogStream -> ShowS
Prelude.Show, (forall x.
 CloudWatchLogsLogStream -> Rep CloudWatchLogsLogStream x)
-> (forall x.
    Rep CloudWatchLogsLogStream x -> CloudWatchLogsLogStream)
-> Generic CloudWatchLogsLogStream
forall x. Rep CloudWatchLogsLogStream x -> CloudWatchLogsLogStream
forall x. CloudWatchLogsLogStream -> Rep CloudWatchLogsLogStream x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CloudWatchLogsLogStream x -> CloudWatchLogsLogStream
$cfrom :: forall x. CloudWatchLogsLogStream -> Rep CloudWatchLogsLogStream x
Prelude.Generic)

-- |
-- Create a value of 'CloudWatchLogsLogStream' 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:
--
-- 'batchCount', 'cloudWatchLogsLogStream_batchCount' - Specifies the max number of log events in a batch, up to 10000. The
-- default value is 1000.
--
-- 'fileFingerprintLines', 'cloudWatchLogsLogStream_fileFingerprintLines' - Specifies the range of lines for identifying a file. The valid values
-- are one number, or two dash-delimited numbers, such as \'1\', \'2-5\'.
-- The default value is \'1\', meaning the first line is used to calculate
-- the fingerprint. Fingerprint lines are not sent to CloudWatch Logs
-- unless all specified lines are available.
--
-- 'bufferDuration', 'cloudWatchLogsLogStream_bufferDuration' - Specifies the time duration for the batching of log events. The minimum
-- value is 5000ms and default value is 5000ms.
--
-- 'batchSize', 'cloudWatchLogsLogStream_batchSize' - Specifies the maximum size of log events in a batch, in bytes, up to
-- 1048576 bytes. The default value is 32768 bytes. This size is calculated
-- as the sum of all event messages in UTF-8, plus 26 bytes for each log
-- event.
--
-- 'logGroupName', 'cloudWatchLogsLogStream_logGroupName' - Specifies the destination log group. A log group is created
-- automatically if it doesn\'t already exist. Log group names can be
-- between 1 and 512 characters long. Allowed characters include a-z, A-Z,
-- 0-9, \'_\' (underscore), \'-\' (hyphen), \'\/\' (forward slash), and
-- \'.\' (period).
--
-- 'multiLineStartPattern', 'cloudWatchLogsLogStream_multiLineStartPattern' - Specifies the pattern for identifying the start of a log message.
--
-- 'initialPosition', 'cloudWatchLogsLogStream_initialPosition' - Specifies where to start to read data (start_of_file or end_of_file).
-- The default is start_of_file. This setting is only used if there is no
-- state persisted for that log stream.
--
-- 'datetimeFormat', 'cloudWatchLogsLogStream_datetimeFormat' - Specifies how the time stamp is extracted from logs. For more
-- information, see the
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html CloudWatch Logs Agent Reference>.
--
-- 'encoding', 'cloudWatchLogsLogStream_encoding' - Specifies the encoding of the log file so that the file can be read
-- correctly. The default is @utf_8@. Encodings supported by Python
-- @codecs.decode()@ can be used here.
--
-- 'timeZone', 'cloudWatchLogsLogStream_timeZone' - Specifies the time zone of log event time stamps.
--
-- 'file', 'cloudWatchLogsLogStream_file' - Specifies log files that you want to push to CloudWatch Logs.
--
-- @File@ can point to a specific file or multiple files (by using wild
-- card characters such as @\/var\/log\/system.log*@). Only the latest file
-- is pushed to CloudWatch Logs, based on file modification time. We
-- recommend that you use wild card characters to specify a series of files
-- of the same type, such as @access_log.2014-06-01-01@,
-- @access_log.2014-06-01-02@, and so on by using a pattern like
-- @access_log.*@. Don\'t use a wildcard to match multiple file types, such
-- as @access_log_80@ and @access_log_443@. To specify multiple, different
-- file types, add another log stream entry to the configuration file, so
-- that each log file type is stored in a different log group.
--
-- Zipped files are not supported.
newCloudWatchLogsLogStream ::
  CloudWatchLogsLogStream
newCloudWatchLogsLogStream :: CloudWatchLogsLogStream
newCloudWatchLogsLogStream =
  CloudWatchLogsLogStream' :: Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe CloudWatchLogsInitialPosition
-> Maybe Text
-> Maybe CloudWatchLogsEncoding
-> Maybe CloudWatchLogsTimeZone
-> Maybe Text
-> CloudWatchLogsLogStream
CloudWatchLogsLogStream'
    { $sel:batchCount:CloudWatchLogsLogStream' :: Maybe Int
batchCount =
        Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:fileFingerprintLines:CloudWatchLogsLogStream' :: Maybe Text
fileFingerprintLines = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:bufferDuration:CloudWatchLogsLogStream' :: Maybe Int
bufferDuration = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:batchSize:CloudWatchLogsLogStream' :: Maybe Int
batchSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:logGroupName:CloudWatchLogsLogStream' :: Maybe Text
logGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:multiLineStartPattern:CloudWatchLogsLogStream' :: Maybe Text
multiLineStartPattern = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:initialPosition:CloudWatchLogsLogStream' :: Maybe CloudWatchLogsInitialPosition
initialPosition = Maybe CloudWatchLogsInitialPosition
forall a. Maybe a
Prelude.Nothing,
      $sel:datetimeFormat:CloudWatchLogsLogStream' :: Maybe Text
datetimeFormat = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:encoding:CloudWatchLogsLogStream' :: Maybe CloudWatchLogsEncoding
encoding = Maybe CloudWatchLogsEncoding
forall a. Maybe a
Prelude.Nothing,
      $sel:timeZone:CloudWatchLogsLogStream' :: Maybe CloudWatchLogsTimeZone
timeZone = Maybe CloudWatchLogsTimeZone
forall a. Maybe a
Prelude.Nothing,
      $sel:file:CloudWatchLogsLogStream' :: Maybe Text
file = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | Specifies the max number of log events in a batch, up to 10000. The
-- default value is 1000.
cloudWatchLogsLogStream_batchCount :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe Prelude.Int)
cloudWatchLogsLogStream_batchCount :: (Maybe Int -> f (Maybe Int))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_batchCount = (CloudWatchLogsLogStream -> Maybe Int)
-> (CloudWatchLogsLogStream
    -> Maybe Int -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe Int
batchCount :: Maybe Int
$sel:batchCount:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Int
batchCount} -> Maybe Int
batchCount) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe Int
a -> CloudWatchLogsLogStream
s {$sel:batchCount:CloudWatchLogsLogStream' :: Maybe Int
batchCount = Maybe Int
a} :: CloudWatchLogsLogStream)

-- | Specifies the range of lines for identifying a file. The valid values
-- are one number, or two dash-delimited numbers, such as \'1\', \'2-5\'.
-- The default value is \'1\', meaning the first line is used to calculate
-- the fingerprint. Fingerprint lines are not sent to CloudWatch Logs
-- unless all specified lines are available.
cloudWatchLogsLogStream_fileFingerprintLines :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe Prelude.Text)
cloudWatchLogsLogStream_fileFingerprintLines :: (Maybe Text -> f (Maybe Text))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_fileFingerprintLines = (CloudWatchLogsLogStream -> Maybe Text)
-> (CloudWatchLogsLogStream
    -> Maybe Text -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe Text
fileFingerprintLines :: Maybe Text
$sel:fileFingerprintLines:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
fileFingerprintLines} -> Maybe Text
fileFingerprintLines) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe Text
a -> CloudWatchLogsLogStream
s {$sel:fileFingerprintLines:CloudWatchLogsLogStream' :: Maybe Text
fileFingerprintLines = Maybe Text
a} :: CloudWatchLogsLogStream)

-- | Specifies the time duration for the batching of log events. The minimum
-- value is 5000ms and default value is 5000ms.
cloudWatchLogsLogStream_bufferDuration :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe Prelude.Int)
cloudWatchLogsLogStream_bufferDuration :: (Maybe Int -> f (Maybe Int))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_bufferDuration = (CloudWatchLogsLogStream -> Maybe Int)
-> (CloudWatchLogsLogStream
    -> Maybe Int -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe Int
bufferDuration :: Maybe Int
$sel:bufferDuration:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Int
bufferDuration} -> Maybe Int
bufferDuration) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe Int
a -> CloudWatchLogsLogStream
s {$sel:bufferDuration:CloudWatchLogsLogStream' :: Maybe Int
bufferDuration = Maybe Int
a} :: CloudWatchLogsLogStream)

-- | Specifies the maximum size of log events in a batch, in bytes, up to
-- 1048576 bytes. The default value is 32768 bytes. This size is calculated
-- as the sum of all event messages in UTF-8, plus 26 bytes for each log
-- event.
cloudWatchLogsLogStream_batchSize :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe Prelude.Int)
cloudWatchLogsLogStream_batchSize :: (Maybe Int -> f (Maybe Int))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_batchSize = (CloudWatchLogsLogStream -> Maybe Int)
-> (CloudWatchLogsLogStream
    -> Maybe Int -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe Int
batchSize :: Maybe Int
$sel:batchSize:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Int
batchSize} -> Maybe Int
batchSize) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe Int
a -> CloudWatchLogsLogStream
s {$sel:batchSize:CloudWatchLogsLogStream' :: Maybe Int
batchSize = Maybe Int
a} :: CloudWatchLogsLogStream)

-- | Specifies the destination log group. A log group is created
-- automatically if it doesn\'t already exist. Log group names can be
-- between 1 and 512 characters long. Allowed characters include a-z, A-Z,
-- 0-9, \'_\' (underscore), \'-\' (hyphen), \'\/\' (forward slash), and
-- \'.\' (period).
cloudWatchLogsLogStream_logGroupName :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe Prelude.Text)
cloudWatchLogsLogStream_logGroupName :: (Maybe Text -> f (Maybe Text))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_logGroupName = (CloudWatchLogsLogStream -> Maybe Text)
-> (CloudWatchLogsLogStream
    -> Maybe Text -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe Text
logGroupName :: Maybe Text
$sel:logGroupName:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
logGroupName} -> Maybe Text
logGroupName) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe Text
a -> CloudWatchLogsLogStream
s {$sel:logGroupName:CloudWatchLogsLogStream' :: Maybe Text
logGroupName = Maybe Text
a} :: CloudWatchLogsLogStream)

-- | Specifies the pattern for identifying the start of a log message.
cloudWatchLogsLogStream_multiLineStartPattern :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe Prelude.Text)
cloudWatchLogsLogStream_multiLineStartPattern :: (Maybe Text -> f (Maybe Text))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_multiLineStartPattern = (CloudWatchLogsLogStream -> Maybe Text)
-> (CloudWatchLogsLogStream
    -> Maybe Text -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe Text
multiLineStartPattern :: Maybe Text
$sel:multiLineStartPattern:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
multiLineStartPattern} -> Maybe Text
multiLineStartPattern) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe Text
a -> CloudWatchLogsLogStream
s {$sel:multiLineStartPattern:CloudWatchLogsLogStream' :: Maybe Text
multiLineStartPattern = Maybe Text
a} :: CloudWatchLogsLogStream)

-- | Specifies where to start to read data (start_of_file or end_of_file).
-- The default is start_of_file. This setting is only used if there is no
-- state persisted for that log stream.
cloudWatchLogsLogStream_initialPosition :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe CloudWatchLogsInitialPosition)
cloudWatchLogsLogStream_initialPosition :: (Maybe CloudWatchLogsInitialPosition
 -> f (Maybe CloudWatchLogsInitialPosition))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_initialPosition = (CloudWatchLogsLogStream -> Maybe CloudWatchLogsInitialPosition)
-> (CloudWatchLogsLogStream
    -> Maybe CloudWatchLogsInitialPosition -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe CloudWatchLogsInitialPosition)
     (Maybe CloudWatchLogsInitialPosition)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe CloudWatchLogsInitialPosition
initialPosition :: Maybe CloudWatchLogsInitialPosition
$sel:initialPosition:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe CloudWatchLogsInitialPosition
initialPosition} -> Maybe CloudWatchLogsInitialPosition
initialPosition) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe CloudWatchLogsInitialPosition
a -> CloudWatchLogsLogStream
s {$sel:initialPosition:CloudWatchLogsLogStream' :: Maybe CloudWatchLogsInitialPosition
initialPosition = Maybe CloudWatchLogsInitialPosition
a} :: CloudWatchLogsLogStream)

-- | Specifies how the time stamp is extracted from logs. For more
-- information, see the
-- <https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/AgentReference.html CloudWatch Logs Agent Reference>.
cloudWatchLogsLogStream_datetimeFormat :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe Prelude.Text)
cloudWatchLogsLogStream_datetimeFormat :: (Maybe Text -> f (Maybe Text))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_datetimeFormat = (CloudWatchLogsLogStream -> Maybe Text)
-> (CloudWatchLogsLogStream
    -> Maybe Text -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe Text
datetimeFormat :: Maybe Text
$sel:datetimeFormat:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
datetimeFormat} -> Maybe Text
datetimeFormat) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe Text
a -> CloudWatchLogsLogStream
s {$sel:datetimeFormat:CloudWatchLogsLogStream' :: Maybe Text
datetimeFormat = Maybe Text
a} :: CloudWatchLogsLogStream)

-- | Specifies the encoding of the log file so that the file can be read
-- correctly. The default is @utf_8@. Encodings supported by Python
-- @codecs.decode()@ can be used here.
cloudWatchLogsLogStream_encoding :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe CloudWatchLogsEncoding)
cloudWatchLogsLogStream_encoding :: (Maybe CloudWatchLogsEncoding -> f (Maybe CloudWatchLogsEncoding))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_encoding = (CloudWatchLogsLogStream -> Maybe CloudWatchLogsEncoding)
-> (CloudWatchLogsLogStream
    -> Maybe CloudWatchLogsEncoding -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe CloudWatchLogsEncoding)
     (Maybe CloudWatchLogsEncoding)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe CloudWatchLogsEncoding
encoding :: Maybe CloudWatchLogsEncoding
$sel:encoding:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe CloudWatchLogsEncoding
encoding} -> Maybe CloudWatchLogsEncoding
encoding) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe CloudWatchLogsEncoding
a -> CloudWatchLogsLogStream
s {$sel:encoding:CloudWatchLogsLogStream' :: Maybe CloudWatchLogsEncoding
encoding = Maybe CloudWatchLogsEncoding
a} :: CloudWatchLogsLogStream)

-- | Specifies the time zone of log event time stamps.
cloudWatchLogsLogStream_timeZone :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe CloudWatchLogsTimeZone)
cloudWatchLogsLogStream_timeZone :: (Maybe CloudWatchLogsTimeZone -> f (Maybe CloudWatchLogsTimeZone))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_timeZone = (CloudWatchLogsLogStream -> Maybe CloudWatchLogsTimeZone)
-> (CloudWatchLogsLogStream
    -> Maybe CloudWatchLogsTimeZone -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe CloudWatchLogsTimeZone)
     (Maybe CloudWatchLogsTimeZone)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe CloudWatchLogsTimeZone
timeZone :: Maybe CloudWatchLogsTimeZone
$sel:timeZone:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe CloudWatchLogsTimeZone
timeZone} -> Maybe CloudWatchLogsTimeZone
timeZone) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe CloudWatchLogsTimeZone
a -> CloudWatchLogsLogStream
s {$sel:timeZone:CloudWatchLogsLogStream' :: Maybe CloudWatchLogsTimeZone
timeZone = Maybe CloudWatchLogsTimeZone
a} :: CloudWatchLogsLogStream)

-- | Specifies log files that you want to push to CloudWatch Logs.
--
-- @File@ can point to a specific file or multiple files (by using wild
-- card characters such as @\/var\/log\/system.log*@). Only the latest file
-- is pushed to CloudWatch Logs, based on file modification time. We
-- recommend that you use wild card characters to specify a series of files
-- of the same type, such as @access_log.2014-06-01-01@,
-- @access_log.2014-06-01-02@, and so on by using a pattern like
-- @access_log.*@. Don\'t use a wildcard to match multiple file types, such
-- as @access_log_80@ and @access_log_443@. To specify multiple, different
-- file types, add another log stream entry to the configuration file, so
-- that each log file type is stored in a different log group.
--
-- Zipped files are not supported.
cloudWatchLogsLogStream_file :: Lens.Lens' CloudWatchLogsLogStream (Prelude.Maybe Prelude.Text)
cloudWatchLogsLogStream_file :: (Maybe Text -> f (Maybe Text))
-> CloudWatchLogsLogStream -> f CloudWatchLogsLogStream
cloudWatchLogsLogStream_file = (CloudWatchLogsLogStream -> Maybe Text)
-> (CloudWatchLogsLogStream
    -> Maybe Text -> CloudWatchLogsLogStream)
-> Lens
     CloudWatchLogsLogStream
     CloudWatchLogsLogStream
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CloudWatchLogsLogStream' {Maybe Text
file :: Maybe Text
$sel:file:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
file} -> Maybe Text
file) (\s :: CloudWatchLogsLogStream
s@CloudWatchLogsLogStream' {} Maybe Text
a -> CloudWatchLogsLogStream
s {$sel:file:CloudWatchLogsLogStream' :: Maybe Text
file = Maybe Text
a} :: CloudWatchLogsLogStream)

instance Core.FromJSON CloudWatchLogsLogStream where
  parseJSON :: Value -> Parser CloudWatchLogsLogStream
parseJSON =
    String
-> (Object -> Parser CloudWatchLogsLogStream)
-> Value
-> Parser CloudWatchLogsLogStream
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"CloudWatchLogsLogStream"
      ( \Object
x ->
          Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Int
-> Maybe Text
-> Maybe Text
-> Maybe CloudWatchLogsInitialPosition
-> Maybe Text
-> Maybe CloudWatchLogsEncoding
-> Maybe CloudWatchLogsTimeZone
-> Maybe Text
-> CloudWatchLogsLogStream
CloudWatchLogsLogStream'
            (Maybe Int
 -> Maybe Text
 -> Maybe Int
 -> Maybe Int
 -> Maybe Text
 -> Maybe Text
 -> Maybe CloudWatchLogsInitialPosition
 -> Maybe Text
 -> Maybe CloudWatchLogsEncoding
 -> Maybe CloudWatchLogsTimeZone
 -> Maybe Text
 -> CloudWatchLogsLogStream)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe CloudWatchLogsInitialPosition
      -> Maybe Text
      -> Maybe CloudWatchLogsEncoding
      -> Maybe CloudWatchLogsTimeZone
      -> Maybe Text
      -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BatchCount")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe CloudWatchLogsInitialPosition
   -> Maybe Text
   -> Maybe CloudWatchLogsEncoding
   -> Maybe CloudWatchLogsTimeZone
   -> Maybe Text
   -> CloudWatchLogsLogStream)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe CloudWatchLogsInitialPosition
      -> Maybe Text
      -> Maybe CloudWatchLogsEncoding
      -> Maybe CloudWatchLogsTimeZone
      -> Maybe Text
      -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"FileFingerprintLines")
            Parser
  (Maybe Int
   -> Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe CloudWatchLogsInitialPosition
   -> Maybe Text
   -> Maybe CloudWatchLogsEncoding
   -> Maybe CloudWatchLogsTimeZone
   -> Maybe Text
   -> CloudWatchLogsLogStream)
-> Parser (Maybe Int)
-> Parser
     (Maybe Int
      -> Maybe Text
      -> Maybe Text
      -> Maybe CloudWatchLogsInitialPosition
      -> Maybe Text
      -> Maybe CloudWatchLogsEncoding
      -> Maybe CloudWatchLogsTimeZone
      -> Maybe Text
      -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BufferDuration")
            Parser
  (Maybe Int
   -> Maybe Text
   -> Maybe Text
   -> Maybe CloudWatchLogsInitialPosition
   -> Maybe Text
   -> Maybe CloudWatchLogsEncoding
   -> Maybe CloudWatchLogsTimeZone
   -> Maybe Text
   -> CloudWatchLogsLogStream)
-> Parser (Maybe Int)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe CloudWatchLogsInitialPosition
      -> Maybe Text
      -> Maybe CloudWatchLogsEncoding
      -> Maybe CloudWatchLogsTimeZone
      -> Maybe Text
      -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"BatchSize")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe CloudWatchLogsInitialPosition
   -> Maybe Text
   -> Maybe CloudWatchLogsEncoding
   -> Maybe CloudWatchLogsTimeZone
   -> Maybe Text
   -> CloudWatchLogsLogStream)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe CloudWatchLogsInitialPosition
      -> Maybe Text
      -> Maybe CloudWatchLogsEncoding
      -> Maybe CloudWatchLogsTimeZone
      -> Maybe Text
      -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"LogGroupName")
            Parser
  (Maybe Text
   -> Maybe CloudWatchLogsInitialPosition
   -> Maybe Text
   -> Maybe CloudWatchLogsEncoding
   -> Maybe CloudWatchLogsTimeZone
   -> Maybe Text
   -> CloudWatchLogsLogStream)
-> Parser (Maybe Text)
-> Parser
     (Maybe CloudWatchLogsInitialPosition
      -> Maybe Text
      -> Maybe CloudWatchLogsEncoding
      -> Maybe CloudWatchLogsTimeZone
      -> Maybe Text
      -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"MultiLineStartPattern")
            Parser
  (Maybe CloudWatchLogsInitialPosition
   -> Maybe Text
   -> Maybe CloudWatchLogsEncoding
   -> Maybe CloudWatchLogsTimeZone
   -> Maybe Text
   -> CloudWatchLogsLogStream)
-> Parser (Maybe CloudWatchLogsInitialPosition)
-> Parser
     (Maybe Text
      -> Maybe CloudWatchLogsEncoding
      -> Maybe CloudWatchLogsTimeZone
      -> Maybe Text
      -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CloudWatchLogsInitialPosition)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"InitialPosition")
            Parser
  (Maybe Text
   -> Maybe CloudWatchLogsEncoding
   -> Maybe CloudWatchLogsTimeZone
   -> Maybe Text
   -> CloudWatchLogsLogStream)
-> Parser (Maybe Text)
-> Parser
     (Maybe CloudWatchLogsEncoding
      -> Maybe CloudWatchLogsTimeZone
      -> Maybe Text
      -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"DatetimeFormat")
            Parser
  (Maybe CloudWatchLogsEncoding
   -> Maybe CloudWatchLogsTimeZone
   -> Maybe Text
   -> CloudWatchLogsLogStream)
-> Parser (Maybe CloudWatchLogsEncoding)
-> Parser
     (Maybe CloudWatchLogsTimeZone
      -> Maybe Text -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CloudWatchLogsEncoding)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Encoding")
            Parser
  (Maybe CloudWatchLogsTimeZone
   -> Maybe Text -> CloudWatchLogsLogStream)
-> Parser (Maybe CloudWatchLogsTimeZone)
-> Parser (Maybe Text -> CloudWatchLogsLogStream)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe CloudWatchLogsTimeZone)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"TimeZone")
            Parser (Maybe Text -> CloudWatchLogsLogStream)
-> Parser (Maybe Text) -> Parser CloudWatchLogsLogStream
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"File")
      )

instance Prelude.Hashable CloudWatchLogsLogStream

instance Prelude.NFData CloudWatchLogsLogStream

instance Core.ToJSON CloudWatchLogsLogStream where
  toJSON :: CloudWatchLogsLogStream -> Value
toJSON CloudWatchLogsLogStream' {Maybe Int
Maybe Text
Maybe CloudWatchLogsEncoding
Maybe CloudWatchLogsInitialPosition
Maybe CloudWatchLogsTimeZone
file :: Maybe Text
timeZone :: Maybe CloudWatchLogsTimeZone
encoding :: Maybe CloudWatchLogsEncoding
datetimeFormat :: Maybe Text
initialPosition :: Maybe CloudWatchLogsInitialPosition
multiLineStartPattern :: Maybe Text
logGroupName :: Maybe Text
batchSize :: Maybe Int
bufferDuration :: Maybe Int
fileFingerprintLines :: Maybe Text
batchCount :: Maybe Int
$sel:file:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
$sel:timeZone:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe CloudWatchLogsTimeZone
$sel:encoding:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe CloudWatchLogsEncoding
$sel:datetimeFormat:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
$sel:initialPosition:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe CloudWatchLogsInitialPosition
$sel:multiLineStartPattern:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
$sel:logGroupName:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
$sel:batchSize:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Int
$sel:bufferDuration:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Int
$sel:fileFingerprintLines:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Text
$sel:batchCount:CloudWatchLogsLogStream' :: CloudWatchLogsLogStream -> Maybe Int
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"BatchCount" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
batchCount,
            (Text
"FileFingerprintLines" 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
fileFingerprintLines,
            (Text
"BufferDuration" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
bufferDuration,
            (Text
"BatchSize" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
batchSize,
            (Text
"LogGroupName" 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
logGroupName,
            (Text
"MultiLineStartPattern" 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
multiLineStartPattern,
            (Text
"InitialPosition" Text -> CloudWatchLogsInitialPosition -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (CloudWatchLogsInitialPosition -> Pair)
-> Maybe CloudWatchLogsInitialPosition -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLogsInitialPosition
initialPosition,
            (Text
"DatetimeFormat" 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
datetimeFormat,
            (Text
"Encoding" Text -> CloudWatchLogsEncoding -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CloudWatchLogsEncoding -> Pair)
-> Maybe CloudWatchLogsEncoding -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLogsEncoding
encoding,
            (Text
"TimeZone" Text -> CloudWatchLogsTimeZone -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (CloudWatchLogsTimeZone -> Pair)
-> Maybe CloudWatchLogsTimeZone -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe CloudWatchLogsTimeZone
timeZone,
            (Text
"File" 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
file
          ]
      )