{-# 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.CloudTrail.UpdateTrail
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Updates trail settings that control what events you are logging, and how
-- to handle log files. Changes to a trail do not require stopping the
-- CloudTrail service. Use this action to designate an existing bucket for
-- log delivery. If the existing bucket has previously been a target for
-- CloudTrail log files, an IAM policy exists for the bucket. @UpdateTrail@
-- must be called from the region in which the trail was created;
-- otherwise, an @InvalidHomeRegionException@ is thrown.
module Amazonka.CloudTrail.UpdateTrail
  ( -- * Creating a Request
    UpdateTrail (..),
    newUpdateTrail,

    -- * Request Lenses
    updateTrail_cloudWatchLogsLogGroupArn,
    updateTrail_cloudWatchLogsRoleArn,
    updateTrail_enableLogFileValidation,
    updateTrail_includeGlobalServiceEvents,
    updateTrail_isMultiRegionTrail,
    updateTrail_isOrganizationTrail,
    updateTrail_kmsKeyId,
    updateTrail_s3BucketName,
    updateTrail_s3KeyPrefix,
    updateTrail_snsTopicName,
    updateTrail_name,

    -- * Destructuring the Response
    UpdateTrailResponse (..),
    newUpdateTrailResponse,

    -- * Response Lenses
    updateTrailResponse_cloudWatchLogsLogGroupArn,
    updateTrailResponse_cloudWatchLogsRoleArn,
    updateTrailResponse_includeGlobalServiceEvents,
    updateTrailResponse_isMultiRegionTrail,
    updateTrailResponse_isOrganizationTrail,
    updateTrailResponse_kmsKeyId,
    updateTrailResponse_logFileValidationEnabled,
    updateTrailResponse_name,
    updateTrailResponse_s3BucketName,
    updateTrailResponse_s3KeyPrefix,
    updateTrailResponse_snsTopicARN,
    updateTrailResponse_snsTopicName,
    updateTrailResponse_trailARN,
    updateTrailResponse_httpStatus,
  )
where

import Amazonka.CloudTrail.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | Specifies settings to update for the trail.
--
-- /See:/ 'newUpdateTrail' smart constructor.
data UpdateTrail = UpdateTrail'
  { -- | Specifies a log group name using an Amazon Resource Name (ARN), a unique
    -- identifier that represents the log group to which CloudTrail logs are
    -- delivered. Not required unless you specify @CloudWatchLogsRoleArn@.
    UpdateTrail -> Maybe Text
cloudWatchLogsLogGroupArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies the role for the CloudWatch Logs endpoint to assume to write
    -- to a user\'s log group.
    UpdateTrail -> Maybe Text
cloudWatchLogsRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether log file validation is enabled. The default is false.
    --
    -- When you disable log file integrity validation, the chain of digest
    -- files is broken after one hour. CloudTrail does not create digest files
    -- for log files that were delivered during a period in which log file
    -- integrity validation was disabled. For example, if you enable log file
    -- integrity validation at noon on January 1, disable it at noon on January
    -- 2, and re-enable it at noon on January 10, digest files will not be
    -- created for the log files delivered from noon on January 2 to noon on
    -- January 10. The same applies whenever you stop CloudTrail logging or
    -- delete a trail.
    UpdateTrail -> Maybe Bool
enableLogFileValidation :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the trail is publishing events from global services
    -- such as IAM to the log files.
    UpdateTrail -> Maybe Bool
includeGlobalServiceEvents :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the trail applies only to the current region or to all
    -- regions. The default is false. If the trail exists only in the current
    -- region and this value is set to true, shadow trails (replications of the
    -- trail) will be created in the other regions. If the trail exists in all
    -- regions and this value is set to false, the trail will remain in the
    -- region where it was created, and its shadow trails in other regions will
    -- be deleted. As a best practice, consider using trails that log events in
    -- all regions.
    UpdateTrail -> Maybe Bool
isMultiRegionTrail :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the trail is applied to all accounts in an
    -- organization in Organizations, or only for the current Amazon Web
    -- Services account. The default is false, and cannot be true unless the
    -- call is made on behalf of an Amazon Web Services account that is the
    -- management account for an organization in Organizations. If the trail is
    -- not an organization trail and this is set to @true@, the trail will be
    -- created in all Amazon Web Services accounts that belong to the
    -- organization. If the trail is an organization trail and this is set to
    -- @false@, the trail will remain in the current Amazon Web Services
    -- account but be deleted from all member accounts in the organization.
    UpdateTrail -> Maybe Bool
isOrganizationTrail :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the KMS key ID to use to encrypt the logs delivered by
    -- CloudTrail. The value can be an alias name prefixed by \"alias\/\", a
    -- fully specified ARN to an alias, a fully specified ARN to a key, or a
    -- globally unique identifier.
    --
    -- CloudTrail also supports KMS multi-Region keys. For more information
    -- about multi-Region keys, see
    -- <https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html Using multi-Region keys>
    -- in the /Key Management Service Developer Guide/.
    --
    -- Examples:
    --
    -- -   alias\/MyAliasName
    --
    -- -   arn:aws:kms:us-east-2:123456789012:alias\/MyAliasName
    --
    -- -   arn:aws:kms:us-east-2:123456789012:key\/12345678-1234-1234-1234-123456789012
    --
    -- -   12345678-1234-1234-1234-123456789012
    UpdateTrail -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Specifies the name of the Amazon S3 bucket designated for publishing log
    -- files. See
    -- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html Amazon S3 Bucket Naming Requirements>.
    UpdateTrail -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the Amazon S3 key prefix that comes after the name of the
    -- bucket you have designated for log file delivery. For more information,
    -- see
    -- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html Finding Your CloudTrail Log Files>.
    -- The maximum length is 200 characters.
    UpdateTrail -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
    -- | Specifies the name of the Amazon SNS topic defined for notification of
    -- log file delivery. The maximum length is 256 characters.
    UpdateTrail -> Maybe Text
snsTopicName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the name of the trail or trail ARN. If @Name@ is a trail name,
    -- the string must meet the following requirements:
    --
    -- -   Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
    --     underscores (_), or dashes (-)
    --
    -- -   Start with a letter or number, and end with a letter or number
    --
    -- -   Be between 3 and 128 characters
    --
    -- -   Have no adjacent periods, underscores or dashes. Names like
    --     @my-_namespace@ and @my--namespace@ are not valid.
    --
    -- -   Not be in IP address format (for example, 192.168.5.4)
    --
    -- If @Name@ is a trail ARN, it must be in the following format.
    --
    -- @arn:aws:cloudtrail:us-east-2:123456789012:trail\/MyTrail@
    UpdateTrail -> Text
name :: Prelude.Text
  }
  deriving (UpdateTrail -> UpdateTrail -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTrail -> UpdateTrail -> Bool
$c/= :: UpdateTrail -> UpdateTrail -> Bool
== :: UpdateTrail -> UpdateTrail -> Bool
$c== :: UpdateTrail -> UpdateTrail -> Bool
Prelude.Eq, ReadPrec [UpdateTrail]
ReadPrec UpdateTrail
Int -> ReadS UpdateTrail
ReadS [UpdateTrail]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTrail]
$creadListPrec :: ReadPrec [UpdateTrail]
readPrec :: ReadPrec UpdateTrail
$creadPrec :: ReadPrec UpdateTrail
readList :: ReadS [UpdateTrail]
$creadList :: ReadS [UpdateTrail]
readsPrec :: Int -> ReadS UpdateTrail
$creadsPrec :: Int -> ReadS UpdateTrail
Prelude.Read, Int -> UpdateTrail -> ShowS
[UpdateTrail] -> ShowS
UpdateTrail -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTrail] -> ShowS
$cshowList :: [UpdateTrail] -> ShowS
show :: UpdateTrail -> String
$cshow :: UpdateTrail -> String
showsPrec :: Int -> UpdateTrail -> ShowS
$cshowsPrec :: Int -> UpdateTrail -> ShowS
Prelude.Show, forall x. Rep UpdateTrail x -> UpdateTrail
forall x. UpdateTrail -> Rep UpdateTrail x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTrail x -> UpdateTrail
$cfrom :: forall x. UpdateTrail -> Rep UpdateTrail x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTrail' 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:
--
-- 'cloudWatchLogsLogGroupArn', 'updateTrail_cloudWatchLogsLogGroupArn' - Specifies a log group name using an Amazon Resource Name (ARN), a unique
-- identifier that represents the log group to which CloudTrail logs are
-- delivered. Not required unless you specify @CloudWatchLogsRoleArn@.
--
-- 'cloudWatchLogsRoleArn', 'updateTrail_cloudWatchLogsRoleArn' - Specifies the role for the CloudWatch Logs endpoint to assume to write
-- to a user\'s log group.
--
-- 'enableLogFileValidation', 'updateTrail_enableLogFileValidation' - Specifies whether log file validation is enabled. The default is false.
--
-- When you disable log file integrity validation, the chain of digest
-- files is broken after one hour. CloudTrail does not create digest files
-- for log files that were delivered during a period in which log file
-- integrity validation was disabled. For example, if you enable log file
-- integrity validation at noon on January 1, disable it at noon on January
-- 2, and re-enable it at noon on January 10, digest files will not be
-- created for the log files delivered from noon on January 2 to noon on
-- January 10. The same applies whenever you stop CloudTrail logging or
-- delete a trail.
--
-- 'includeGlobalServiceEvents', 'updateTrail_includeGlobalServiceEvents' - Specifies whether the trail is publishing events from global services
-- such as IAM to the log files.
--
-- 'isMultiRegionTrail', 'updateTrail_isMultiRegionTrail' - Specifies whether the trail applies only to the current region or to all
-- regions. The default is false. If the trail exists only in the current
-- region and this value is set to true, shadow trails (replications of the
-- trail) will be created in the other regions. If the trail exists in all
-- regions and this value is set to false, the trail will remain in the
-- region where it was created, and its shadow trails in other regions will
-- be deleted. As a best practice, consider using trails that log events in
-- all regions.
--
-- 'isOrganizationTrail', 'updateTrail_isOrganizationTrail' - Specifies whether the trail is applied to all accounts in an
-- organization in Organizations, or only for the current Amazon Web
-- Services account. The default is false, and cannot be true unless the
-- call is made on behalf of an Amazon Web Services account that is the
-- management account for an organization in Organizations. If the trail is
-- not an organization trail and this is set to @true@, the trail will be
-- created in all Amazon Web Services accounts that belong to the
-- organization. If the trail is an organization trail and this is set to
-- @false@, the trail will remain in the current Amazon Web Services
-- account but be deleted from all member accounts in the organization.
--
-- 'kmsKeyId', 'updateTrail_kmsKeyId' - Specifies the KMS key ID to use to encrypt the logs delivered by
-- CloudTrail. The value can be an alias name prefixed by \"alias\/\", a
-- fully specified ARN to an alias, a fully specified ARN to a key, or a
-- globally unique identifier.
--
-- CloudTrail also supports KMS multi-Region keys. For more information
-- about multi-Region keys, see
-- <https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html Using multi-Region keys>
-- in the /Key Management Service Developer Guide/.
--
-- Examples:
--
-- -   alias\/MyAliasName
--
-- -   arn:aws:kms:us-east-2:123456789012:alias\/MyAliasName
--
-- -   arn:aws:kms:us-east-2:123456789012:key\/12345678-1234-1234-1234-123456789012
--
-- -   12345678-1234-1234-1234-123456789012
--
-- 's3BucketName', 'updateTrail_s3BucketName' - Specifies the name of the Amazon S3 bucket designated for publishing log
-- files. See
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html Amazon S3 Bucket Naming Requirements>.
--
-- 's3KeyPrefix', 'updateTrail_s3KeyPrefix' - Specifies the Amazon S3 key prefix that comes after the name of the
-- bucket you have designated for log file delivery. For more information,
-- see
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html Finding Your CloudTrail Log Files>.
-- The maximum length is 200 characters.
--
-- 'snsTopicName', 'updateTrail_snsTopicName' - Specifies the name of the Amazon SNS topic defined for notification of
-- log file delivery. The maximum length is 256 characters.
--
-- 'name', 'updateTrail_name' - Specifies the name of the trail or trail ARN. If @Name@ is a trail name,
-- the string must meet the following requirements:
--
-- -   Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
--     underscores (_), or dashes (-)
--
-- -   Start with a letter or number, and end with a letter or number
--
-- -   Be between 3 and 128 characters
--
-- -   Have no adjacent periods, underscores or dashes. Names like
--     @my-_namespace@ and @my--namespace@ are not valid.
--
-- -   Not be in IP address format (for example, 192.168.5.4)
--
-- If @Name@ is a trail ARN, it must be in the following format.
--
-- @arn:aws:cloudtrail:us-east-2:123456789012:trail\/MyTrail@
newUpdateTrail ::
  -- | 'name'
  Prelude.Text ->
  UpdateTrail
newUpdateTrail :: Text -> UpdateTrail
newUpdateTrail Text
pName_ =
  UpdateTrail'
    { $sel:cloudWatchLogsLogGroupArn:UpdateTrail' :: Maybe Text
cloudWatchLogsLogGroupArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLogsRoleArn:UpdateTrail' :: Maybe Text
cloudWatchLogsRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:enableLogFileValidation:UpdateTrail' :: Maybe Bool
enableLogFileValidation = forall a. Maybe a
Prelude.Nothing,
      $sel:includeGlobalServiceEvents:UpdateTrail' :: Maybe Bool
includeGlobalServiceEvents = forall a. Maybe a
Prelude.Nothing,
      $sel:isMultiRegionTrail:UpdateTrail' :: Maybe Bool
isMultiRegionTrail = forall a. Maybe a
Prelude.Nothing,
      $sel:isOrganizationTrail:UpdateTrail' :: Maybe Bool
isOrganizationTrail = forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:UpdateTrail' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:s3BucketName:UpdateTrail' :: Maybe Text
s3BucketName = forall a. Maybe a
Prelude.Nothing,
      $sel:s3KeyPrefix:UpdateTrail' :: Maybe Text
s3KeyPrefix = forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopicName:UpdateTrail' :: Maybe Text
snsTopicName = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateTrail' :: Text
name = Text
pName_
    }

-- | Specifies a log group name using an Amazon Resource Name (ARN), a unique
-- identifier that represents the log group to which CloudTrail logs are
-- delivered. Not required unless you specify @CloudWatchLogsRoleArn@.
updateTrail_cloudWatchLogsLogGroupArn :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Text)
updateTrail_cloudWatchLogsLogGroupArn :: Lens' UpdateTrail (Maybe Text)
updateTrail_cloudWatchLogsLogGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Text
cloudWatchLogsLogGroupArn :: Maybe Text
$sel:cloudWatchLogsLogGroupArn:UpdateTrail' :: UpdateTrail -> Maybe Text
cloudWatchLogsLogGroupArn} -> Maybe Text
cloudWatchLogsLogGroupArn) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Text
a -> UpdateTrail
s {$sel:cloudWatchLogsLogGroupArn:UpdateTrail' :: Maybe Text
cloudWatchLogsLogGroupArn = Maybe Text
a} :: UpdateTrail)

-- | Specifies the role for the CloudWatch Logs endpoint to assume to write
-- to a user\'s log group.
updateTrail_cloudWatchLogsRoleArn :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Text)
updateTrail_cloudWatchLogsRoleArn :: Lens' UpdateTrail (Maybe Text)
updateTrail_cloudWatchLogsRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Text
cloudWatchLogsRoleArn :: Maybe Text
$sel:cloudWatchLogsRoleArn:UpdateTrail' :: UpdateTrail -> Maybe Text
cloudWatchLogsRoleArn} -> Maybe Text
cloudWatchLogsRoleArn) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Text
a -> UpdateTrail
s {$sel:cloudWatchLogsRoleArn:UpdateTrail' :: Maybe Text
cloudWatchLogsRoleArn = Maybe Text
a} :: UpdateTrail)

-- | Specifies whether log file validation is enabled. The default is false.
--
-- When you disable log file integrity validation, the chain of digest
-- files is broken after one hour. CloudTrail does not create digest files
-- for log files that were delivered during a period in which log file
-- integrity validation was disabled. For example, if you enable log file
-- integrity validation at noon on January 1, disable it at noon on January
-- 2, and re-enable it at noon on January 10, digest files will not be
-- created for the log files delivered from noon on January 2 to noon on
-- January 10. The same applies whenever you stop CloudTrail logging or
-- delete a trail.
updateTrail_enableLogFileValidation :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Bool)
updateTrail_enableLogFileValidation :: Lens' UpdateTrail (Maybe Bool)
updateTrail_enableLogFileValidation = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Bool
enableLogFileValidation :: Maybe Bool
$sel:enableLogFileValidation:UpdateTrail' :: UpdateTrail -> Maybe Bool
enableLogFileValidation} -> Maybe Bool
enableLogFileValidation) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Bool
a -> UpdateTrail
s {$sel:enableLogFileValidation:UpdateTrail' :: Maybe Bool
enableLogFileValidation = Maybe Bool
a} :: UpdateTrail)

-- | Specifies whether the trail is publishing events from global services
-- such as IAM to the log files.
updateTrail_includeGlobalServiceEvents :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Bool)
updateTrail_includeGlobalServiceEvents :: Lens' UpdateTrail (Maybe Bool)
updateTrail_includeGlobalServiceEvents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Bool
includeGlobalServiceEvents :: Maybe Bool
$sel:includeGlobalServiceEvents:UpdateTrail' :: UpdateTrail -> Maybe Bool
includeGlobalServiceEvents} -> Maybe Bool
includeGlobalServiceEvents) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Bool
a -> UpdateTrail
s {$sel:includeGlobalServiceEvents:UpdateTrail' :: Maybe Bool
includeGlobalServiceEvents = Maybe Bool
a} :: UpdateTrail)

-- | Specifies whether the trail applies only to the current region or to all
-- regions. The default is false. If the trail exists only in the current
-- region and this value is set to true, shadow trails (replications of the
-- trail) will be created in the other regions. If the trail exists in all
-- regions and this value is set to false, the trail will remain in the
-- region where it was created, and its shadow trails in other regions will
-- be deleted. As a best practice, consider using trails that log events in
-- all regions.
updateTrail_isMultiRegionTrail :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Bool)
updateTrail_isMultiRegionTrail :: Lens' UpdateTrail (Maybe Bool)
updateTrail_isMultiRegionTrail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Bool
isMultiRegionTrail :: Maybe Bool
$sel:isMultiRegionTrail:UpdateTrail' :: UpdateTrail -> Maybe Bool
isMultiRegionTrail} -> Maybe Bool
isMultiRegionTrail) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Bool
a -> UpdateTrail
s {$sel:isMultiRegionTrail:UpdateTrail' :: Maybe Bool
isMultiRegionTrail = Maybe Bool
a} :: UpdateTrail)

-- | Specifies whether the trail is applied to all accounts in an
-- organization in Organizations, or only for the current Amazon Web
-- Services account. The default is false, and cannot be true unless the
-- call is made on behalf of an Amazon Web Services account that is the
-- management account for an organization in Organizations. If the trail is
-- not an organization trail and this is set to @true@, the trail will be
-- created in all Amazon Web Services accounts that belong to the
-- organization. If the trail is an organization trail and this is set to
-- @false@, the trail will remain in the current Amazon Web Services
-- account but be deleted from all member accounts in the organization.
updateTrail_isOrganizationTrail :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Bool)
updateTrail_isOrganizationTrail :: Lens' UpdateTrail (Maybe Bool)
updateTrail_isOrganizationTrail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Bool
isOrganizationTrail :: Maybe Bool
$sel:isOrganizationTrail:UpdateTrail' :: UpdateTrail -> Maybe Bool
isOrganizationTrail} -> Maybe Bool
isOrganizationTrail) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Bool
a -> UpdateTrail
s {$sel:isOrganizationTrail:UpdateTrail' :: Maybe Bool
isOrganizationTrail = Maybe Bool
a} :: UpdateTrail)

-- | Specifies the KMS key ID to use to encrypt the logs delivered by
-- CloudTrail. The value can be an alias name prefixed by \"alias\/\", a
-- fully specified ARN to an alias, a fully specified ARN to a key, or a
-- globally unique identifier.
--
-- CloudTrail also supports KMS multi-Region keys. For more information
-- about multi-Region keys, see
-- <https://docs.aws.amazon.com/kms/latest/developerguide/multi-region-keys-overview.html Using multi-Region keys>
-- in the /Key Management Service Developer Guide/.
--
-- Examples:
--
-- -   alias\/MyAliasName
--
-- -   arn:aws:kms:us-east-2:123456789012:alias\/MyAliasName
--
-- -   arn:aws:kms:us-east-2:123456789012:key\/12345678-1234-1234-1234-123456789012
--
-- -   12345678-1234-1234-1234-123456789012
updateTrail_kmsKeyId :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Text)
updateTrail_kmsKeyId :: Lens' UpdateTrail (Maybe Text)
updateTrail_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:UpdateTrail' :: UpdateTrail -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Text
a -> UpdateTrail
s {$sel:kmsKeyId:UpdateTrail' :: Maybe Text
kmsKeyId = Maybe Text
a} :: UpdateTrail)

-- | Specifies the name of the Amazon S3 bucket designated for publishing log
-- files. See
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/create_trail_naming_policy.html Amazon S3 Bucket Naming Requirements>.
updateTrail_s3BucketName :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Text)
updateTrail_s3BucketName :: Lens' UpdateTrail (Maybe Text)
updateTrail_s3BucketName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:UpdateTrail' :: UpdateTrail -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Text
a -> UpdateTrail
s {$sel:s3BucketName:UpdateTrail' :: Maybe Text
s3BucketName = Maybe Text
a} :: UpdateTrail)

-- | Specifies the Amazon S3 key prefix that comes after the name of the
-- bucket you have designated for log file delivery. For more information,
-- see
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html Finding Your CloudTrail Log Files>.
-- The maximum length is 200 characters.
updateTrail_s3KeyPrefix :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Text)
updateTrail_s3KeyPrefix :: Lens' UpdateTrail (Maybe Text)
updateTrail_s3KeyPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:UpdateTrail' :: UpdateTrail -> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Text
a -> UpdateTrail
s {$sel:s3KeyPrefix:UpdateTrail' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: UpdateTrail)

-- | Specifies the name of the Amazon SNS topic defined for notification of
-- log file delivery. The maximum length is 256 characters.
updateTrail_snsTopicName :: Lens.Lens' UpdateTrail (Prelude.Maybe Prelude.Text)
updateTrail_snsTopicName :: Lens' UpdateTrail (Maybe Text)
updateTrail_snsTopicName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Maybe Text
snsTopicName :: Maybe Text
$sel:snsTopicName:UpdateTrail' :: UpdateTrail -> Maybe Text
snsTopicName} -> Maybe Text
snsTopicName) (\s :: UpdateTrail
s@UpdateTrail' {} Maybe Text
a -> UpdateTrail
s {$sel:snsTopicName:UpdateTrail' :: Maybe Text
snsTopicName = Maybe Text
a} :: UpdateTrail)

-- | Specifies the name of the trail or trail ARN. If @Name@ is a trail name,
-- the string must meet the following requirements:
--
-- -   Contain only ASCII letters (a-z, A-Z), numbers (0-9), periods (.),
--     underscores (_), or dashes (-)
--
-- -   Start with a letter or number, and end with a letter or number
--
-- -   Be between 3 and 128 characters
--
-- -   Have no adjacent periods, underscores or dashes. Names like
--     @my-_namespace@ and @my--namespace@ are not valid.
--
-- -   Not be in IP address format (for example, 192.168.5.4)
--
-- If @Name@ is a trail ARN, it must be in the following format.
--
-- @arn:aws:cloudtrail:us-east-2:123456789012:trail\/MyTrail@
updateTrail_name :: Lens.Lens' UpdateTrail Prelude.Text
updateTrail_name :: Lens' UpdateTrail Text
updateTrail_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrail' {Text
name :: Text
$sel:name:UpdateTrail' :: UpdateTrail -> Text
name} -> Text
name) (\s :: UpdateTrail
s@UpdateTrail' {} Text
a -> UpdateTrail
s {$sel:name:UpdateTrail' :: Text
name = Text
a} :: UpdateTrail)

instance Core.AWSRequest UpdateTrail where
  type AWSResponse UpdateTrail = UpdateTrailResponse
  request :: (Service -> Service) -> UpdateTrail -> Request UpdateTrail
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateTrail
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateTrail)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Bool
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Int
-> UpdateTrailResponse
UpdateTrailResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CloudWatchLogsLogGroupArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"CloudWatchLogsRoleArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"IncludeGlobalServiceEvents")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"IsMultiRegionTrail")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"IsOrganizationTrail")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"KmsKeyId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"LogFileValidationEnabled")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"S3BucketName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"S3KeyPrefix")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SnsTopicARN")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"SnsTopicName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"TrailARN")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable UpdateTrail where
  hashWithSalt :: Int -> UpdateTrail -> Int
hashWithSalt Int
_salt UpdateTrail' {Maybe Bool
Maybe Text
Text
name :: Text
snsTopicName :: Maybe Text
s3KeyPrefix :: Maybe Text
s3BucketName :: Maybe Text
kmsKeyId :: Maybe Text
isOrganizationTrail :: Maybe Bool
isMultiRegionTrail :: Maybe Bool
includeGlobalServiceEvents :: Maybe Bool
enableLogFileValidation :: Maybe Bool
cloudWatchLogsRoleArn :: Maybe Text
cloudWatchLogsLogGroupArn :: Maybe Text
$sel:name:UpdateTrail' :: UpdateTrail -> Text
$sel:snsTopicName:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:s3KeyPrefix:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:s3BucketName:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:kmsKeyId:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:isOrganizationTrail:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:isMultiRegionTrail:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:includeGlobalServiceEvents:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:enableLogFileValidation:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:cloudWatchLogsRoleArn:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:cloudWatchLogsLogGroupArn:UpdateTrail' :: UpdateTrail -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cloudWatchLogsLogGroupArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
cloudWatchLogsRoleArn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
enableLogFileValidation
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
includeGlobalServiceEvents
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isMultiRegionTrail
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
isOrganizationTrail
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
kmsKeyId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3BucketName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
s3KeyPrefix
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
snsTopicName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
name

instance Prelude.NFData UpdateTrail where
  rnf :: UpdateTrail -> ()
rnf UpdateTrail' {Maybe Bool
Maybe Text
Text
name :: Text
snsTopicName :: Maybe Text
s3KeyPrefix :: Maybe Text
s3BucketName :: Maybe Text
kmsKeyId :: Maybe Text
isOrganizationTrail :: Maybe Bool
isMultiRegionTrail :: Maybe Bool
includeGlobalServiceEvents :: Maybe Bool
enableLogFileValidation :: Maybe Bool
cloudWatchLogsRoleArn :: Maybe Text
cloudWatchLogsLogGroupArn :: Maybe Text
$sel:name:UpdateTrail' :: UpdateTrail -> Text
$sel:snsTopicName:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:s3KeyPrefix:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:s3BucketName:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:kmsKeyId:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:isOrganizationTrail:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:isMultiRegionTrail:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:includeGlobalServiceEvents:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:enableLogFileValidation:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:cloudWatchLogsRoleArn:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:cloudWatchLogsLogGroupArn:UpdateTrail' :: UpdateTrail -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudWatchLogsLogGroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudWatchLogsRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
enableLogFileValidation
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeGlobalServiceEvents
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isMultiRegionTrail
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isOrganizationTrail
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3BucketName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3KeyPrefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snsTopicName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
name

instance Data.ToHeaders UpdateTrail where
  toHeaders :: UpdateTrail -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"com.amazonaws.cloudtrail.v20131101.CloudTrail_20131101.UpdateTrail" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON UpdateTrail where
  toJSON :: UpdateTrail -> Value
toJSON UpdateTrail' {Maybe Bool
Maybe Text
Text
name :: Text
snsTopicName :: Maybe Text
s3KeyPrefix :: Maybe Text
s3BucketName :: Maybe Text
kmsKeyId :: Maybe Text
isOrganizationTrail :: Maybe Bool
isMultiRegionTrail :: Maybe Bool
includeGlobalServiceEvents :: Maybe Bool
enableLogFileValidation :: Maybe Bool
cloudWatchLogsRoleArn :: Maybe Text
cloudWatchLogsLogGroupArn :: Maybe Text
$sel:name:UpdateTrail' :: UpdateTrail -> Text
$sel:snsTopicName:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:s3KeyPrefix:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:s3BucketName:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:kmsKeyId:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:isOrganizationTrail:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:isMultiRegionTrail:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:includeGlobalServiceEvents:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:enableLogFileValidation:UpdateTrail' :: UpdateTrail -> Maybe Bool
$sel:cloudWatchLogsRoleArn:UpdateTrail' :: UpdateTrail -> Maybe Text
$sel:cloudWatchLogsLogGroupArn:UpdateTrail' :: UpdateTrail -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CloudWatchLogsLogGroupArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
cloudWatchLogsLogGroupArn,
            (Key
"CloudWatchLogsRoleArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
cloudWatchLogsRoleArn,
            (Key
"EnableLogFileValidation" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
enableLogFileValidation,
            (Key
"IncludeGlobalServiceEvents" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
includeGlobalServiceEvents,
            (Key
"IsMultiRegionTrail" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isMultiRegionTrail,
            (Key
"IsOrganizationTrail" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Bool
isOrganizationTrail,
            (Key
"KmsKeyId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKeyId,
            (Key
"S3BucketName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3BucketName,
            (Key
"S3KeyPrefix" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
s3KeyPrefix,
            (Key
"SnsTopicName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
snsTopicName,
            forall a. a -> Maybe a
Prelude.Just (Key
"Name" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
name)
          ]
      )

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

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

-- | Returns the objects or data listed below if successful. Otherwise,
-- returns an error.
--
-- /See:/ 'newUpdateTrailResponse' smart constructor.
data UpdateTrailResponse = UpdateTrailResponse'
  { -- | Specifies the Amazon Resource Name (ARN) of the log group to which
    -- CloudTrail logs are delivered.
    UpdateTrailResponse -> Maybe Text
cloudWatchLogsLogGroupArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies the role for the CloudWatch Logs endpoint to assume to write
    -- to a user\'s log group.
    UpdateTrailResponse -> Maybe Text
cloudWatchLogsRoleArn :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether the trail is publishing events from global services
    -- such as IAM to the log files.
    UpdateTrailResponse -> Maybe Bool
includeGlobalServiceEvents :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the trail exists in one region or in all regions.
    UpdateTrailResponse -> Maybe Bool
isMultiRegionTrail :: Prelude.Maybe Prelude.Bool,
    -- | Specifies whether the trail is an organization trail.
    UpdateTrailResponse -> Maybe Bool
isOrganizationTrail :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
    -- The value is a fully specified ARN to a KMS key in the following format.
    --
    -- @arn:aws:kms:us-east-2:123456789012:key\/12345678-1234-1234-1234-123456789012@
    UpdateTrailResponse -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether log file integrity validation is enabled.
    UpdateTrailResponse -> Maybe Bool
logFileValidationEnabled :: Prelude.Maybe Prelude.Bool,
    -- | Specifies the name of the trail.
    UpdateTrailResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | Specifies the name of the Amazon S3 bucket designated for publishing log
    -- files.
    UpdateTrailResponse -> Maybe Text
s3BucketName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the Amazon S3 key prefix that comes after the name of the
    -- bucket you have designated for log file delivery. For more information,
    -- see
    -- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html Finding Your IAM Log Files>.
    UpdateTrailResponse -> Maybe Text
s3KeyPrefix :: Prelude.Maybe Prelude.Text,
    -- | Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send
    -- notifications when log files are delivered. The following is the format
    -- of a topic ARN.
    --
    -- @arn:aws:sns:us-east-2:123456789012:MyTopic@
    UpdateTrailResponse -> Maybe Text
snsTopicARN :: Prelude.Maybe Prelude.Text,
    -- | This field is no longer in use. Use UpdateTrailResponse$SnsTopicARN.
    UpdateTrailResponse -> Maybe Text
snsTopicName :: Prelude.Maybe Prelude.Text,
    -- | Specifies the ARN of the trail that was updated. The following is the
    -- format of a trail ARN.
    --
    -- @arn:aws:cloudtrail:us-east-2:123456789012:trail\/MyTrail@
    UpdateTrailResponse -> Maybe Text
trailARN :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    UpdateTrailResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateTrailResponse -> UpdateTrailResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTrailResponse -> UpdateTrailResponse -> Bool
$c/= :: UpdateTrailResponse -> UpdateTrailResponse -> Bool
== :: UpdateTrailResponse -> UpdateTrailResponse -> Bool
$c== :: UpdateTrailResponse -> UpdateTrailResponse -> Bool
Prelude.Eq, ReadPrec [UpdateTrailResponse]
ReadPrec UpdateTrailResponse
Int -> ReadS UpdateTrailResponse
ReadS [UpdateTrailResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTrailResponse]
$creadListPrec :: ReadPrec [UpdateTrailResponse]
readPrec :: ReadPrec UpdateTrailResponse
$creadPrec :: ReadPrec UpdateTrailResponse
readList :: ReadS [UpdateTrailResponse]
$creadList :: ReadS [UpdateTrailResponse]
readsPrec :: Int -> ReadS UpdateTrailResponse
$creadsPrec :: Int -> ReadS UpdateTrailResponse
Prelude.Read, Int -> UpdateTrailResponse -> ShowS
[UpdateTrailResponse] -> ShowS
UpdateTrailResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTrailResponse] -> ShowS
$cshowList :: [UpdateTrailResponse] -> ShowS
show :: UpdateTrailResponse -> String
$cshow :: UpdateTrailResponse -> String
showsPrec :: Int -> UpdateTrailResponse -> ShowS
$cshowsPrec :: Int -> UpdateTrailResponse -> ShowS
Prelude.Show, forall x. Rep UpdateTrailResponse x -> UpdateTrailResponse
forall x. UpdateTrailResponse -> Rep UpdateTrailResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateTrailResponse x -> UpdateTrailResponse
$cfrom :: forall x. UpdateTrailResponse -> Rep UpdateTrailResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateTrailResponse' 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:
--
-- 'cloudWatchLogsLogGroupArn', 'updateTrailResponse_cloudWatchLogsLogGroupArn' - Specifies the Amazon Resource Name (ARN) of the log group to which
-- CloudTrail logs are delivered.
--
-- 'cloudWatchLogsRoleArn', 'updateTrailResponse_cloudWatchLogsRoleArn' - Specifies the role for the CloudWatch Logs endpoint to assume to write
-- to a user\'s log group.
--
-- 'includeGlobalServiceEvents', 'updateTrailResponse_includeGlobalServiceEvents' - Specifies whether the trail is publishing events from global services
-- such as IAM to the log files.
--
-- 'isMultiRegionTrail', 'updateTrailResponse_isMultiRegionTrail' - Specifies whether the trail exists in one region or in all regions.
--
-- 'isOrganizationTrail', 'updateTrailResponse_isOrganizationTrail' - Specifies whether the trail is an organization trail.
--
-- 'kmsKeyId', 'updateTrailResponse_kmsKeyId' - Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
-- The value is a fully specified ARN to a KMS key in the following format.
--
-- @arn:aws:kms:us-east-2:123456789012:key\/12345678-1234-1234-1234-123456789012@
--
-- 'logFileValidationEnabled', 'updateTrailResponse_logFileValidationEnabled' - Specifies whether log file integrity validation is enabled.
--
-- 'name', 'updateTrailResponse_name' - Specifies the name of the trail.
--
-- 's3BucketName', 'updateTrailResponse_s3BucketName' - Specifies the name of the Amazon S3 bucket designated for publishing log
-- files.
--
-- 's3KeyPrefix', 'updateTrailResponse_s3KeyPrefix' - Specifies the Amazon S3 key prefix that comes after the name of the
-- bucket you have designated for log file delivery. For more information,
-- see
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html Finding Your IAM Log Files>.
--
-- 'snsTopicARN', 'updateTrailResponse_snsTopicARN' - Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send
-- notifications when log files are delivered. The following is the format
-- of a topic ARN.
--
-- @arn:aws:sns:us-east-2:123456789012:MyTopic@
--
-- 'snsTopicName', 'updateTrailResponse_snsTopicName' - This field is no longer in use. Use UpdateTrailResponse$SnsTopicARN.
--
-- 'trailARN', 'updateTrailResponse_trailARN' - Specifies the ARN of the trail that was updated. The following is the
-- format of a trail ARN.
--
-- @arn:aws:cloudtrail:us-east-2:123456789012:trail\/MyTrail@
--
-- 'httpStatus', 'updateTrailResponse_httpStatus' - The response's http status code.
newUpdateTrailResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateTrailResponse
newUpdateTrailResponse :: Int -> UpdateTrailResponse
newUpdateTrailResponse Int
pHttpStatus_ =
  UpdateTrailResponse'
    { $sel:cloudWatchLogsLogGroupArn:UpdateTrailResponse' :: Maybe Text
cloudWatchLogsLogGroupArn =
        forall a. Maybe a
Prelude.Nothing,
      $sel:cloudWatchLogsRoleArn:UpdateTrailResponse' :: Maybe Text
cloudWatchLogsRoleArn = forall a. Maybe a
Prelude.Nothing,
      $sel:includeGlobalServiceEvents:UpdateTrailResponse' :: Maybe Bool
includeGlobalServiceEvents = forall a. Maybe a
Prelude.Nothing,
      $sel:isMultiRegionTrail:UpdateTrailResponse' :: Maybe Bool
isMultiRegionTrail = forall a. Maybe a
Prelude.Nothing,
      $sel:isOrganizationTrail:UpdateTrailResponse' :: Maybe Bool
isOrganizationTrail = forall a. Maybe a
Prelude.Nothing,
      $sel:kmsKeyId:UpdateTrailResponse' :: Maybe Text
kmsKeyId = forall a. Maybe a
Prelude.Nothing,
      $sel:logFileValidationEnabled:UpdateTrailResponse' :: Maybe Bool
logFileValidationEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:name:UpdateTrailResponse' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:s3BucketName:UpdateTrailResponse' :: Maybe Text
s3BucketName = forall a. Maybe a
Prelude.Nothing,
      $sel:s3KeyPrefix:UpdateTrailResponse' :: Maybe Text
s3KeyPrefix = forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopicARN:UpdateTrailResponse' :: Maybe Text
snsTopicARN = forall a. Maybe a
Prelude.Nothing,
      $sel:snsTopicName:UpdateTrailResponse' :: Maybe Text
snsTopicName = forall a. Maybe a
Prelude.Nothing,
      $sel:trailARN:UpdateTrailResponse' :: Maybe Text
trailARN = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateTrailResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Specifies the Amazon Resource Name (ARN) of the log group to which
-- CloudTrail logs are delivered.
updateTrailResponse_cloudWatchLogsLogGroupArn :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Text)
updateTrailResponse_cloudWatchLogsLogGroupArn :: Lens' UpdateTrailResponse (Maybe Text)
updateTrailResponse_cloudWatchLogsLogGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Text
cloudWatchLogsLogGroupArn :: Maybe Text
$sel:cloudWatchLogsLogGroupArn:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
cloudWatchLogsLogGroupArn} -> Maybe Text
cloudWatchLogsLogGroupArn) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Text
a -> UpdateTrailResponse
s {$sel:cloudWatchLogsLogGroupArn:UpdateTrailResponse' :: Maybe Text
cloudWatchLogsLogGroupArn = Maybe Text
a} :: UpdateTrailResponse)

-- | Specifies the role for the CloudWatch Logs endpoint to assume to write
-- to a user\'s log group.
updateTrailResponse_cloudWatchLogsRoleArn :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Text)
updateTrailResponse_cloudWatchLogsRoleArn :: Lens' UpdateTrailResponse (Maybe Text)
updateTrailResponse_cloudWatchLogsRoleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Text
cloudWatchLogsRoleArn :: Maybe Text
$sel:cloudWatchLogsRoleArn:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
cloudWatchLogsRoleArn} -> Maybe Text
cloudWatchLogsRoleArn) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Text
a -> UpdateTrailResponse
s {$sel:cloudWatchLogsRoleArn:UpdateTrailResponse' :: Maybe Text
cloudWatchLogsRoleArn = Maybe Text
a} :: UpdateTrailResponse)

-- | Specifies whether the trail is publishing events from global services
-- such as IAM to the log files.
updateTrailResponse_includeGlobalServiceEvents :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Bool)
updateTrailResponse_includeGlobalServiceEvents :: Lens' UpdateTrailResponse (Maybe Bool)
updateTrailResponse_includeGlobalServiceEvents = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Bool
includeGlobalServiceEvents :: Maybe Bool
$sel:includeGlobalServiceEvents:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Bool
includeGlobalServiceEvents} -> Maybe Bool
includeGlobalServiceEvents) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Bool
a -> UpdateTrailResponse
s {$sel:includeGlobalServiceEvents:UpdateTrailResponse' :: Maybe Bool
includeGlobalServiceEvents = Maybe Bool
a} :: UpdateTrailResponse)

-- | Specifies whether the trail exists in one region or in all regions.
updateTrailResponse_isMultiRegionTrail :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Bool)
updateTrailResponse_isMultiRegionTrail :: Lens' UpdateTrailResponse (Maybe Bool)
updateTrailResponse_isMultiRegionTrail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Bool
isMultiRegionTrail :: Maybe Bool
$sel:isMultiRegionTrail:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Bool
isMultiRegionTrail} -> Maybe Bool
isMultiRegionTrail) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Bool
a -> UpdateTrailResponse
s {$sel:isMultiRegionTrail:UpdateTrailResponse' :: Maybe Bool
isMultiRegionTrail = Maybe Bool
a} :: UpdateTrailResponse)

-- | Specifies whether the trail is an organization trail.
updateTrailResponse_isOrganizationTrail :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Bool)
updateTrailResponse_isOrganizationTrail :: Lens' UpdateTrailResponse (Maybe Bool)
updateTrailResponse_isOrganizationTrail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Bool
isOrganizationTrail :: Maybe Bool
$sel:isOrganizationTrail:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Bool
isOrganizationTrail} -> Maybe Bool
isOrganizationTrail) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Bool
a -> UpdateTrailResponse
s {$sel:isOrganizationTrail:UpdateTrailResponse' :: Maybe Bool
isOrganizationTrail = Maybe Bool
a} :: UpdateTrailResponse)

-- | Specifies the KMS key ID that encrypts the logs delivered by CloudTrail.
-- The value is a fully specified ARN to a KMS key in the following format.
--
-- @arn:aws:kms:us-east-2:123456789012:key\/12345678-1234-1234-1234-123456789012@
updateTrailResponse_kmsKeyId :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Text)
updateTrailResponse_kmsKeyId :: Lens' UpdateTrailResponse (Maybe Text)
updateTrailResponse_kmsKeyId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Text
a -> UpdateTrailResponse
s {$sel:kmsKeyId:UpdateTrailResponse' :: Maybe Text
kmsKeyId = Maybe Text
a} :: UpdateTrailResponse)

-- | Specifies whether log file integrity validation is enabled.
updateTrailResponse_logFileValidationEnabled :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Bool)
updateTrailResponse_logFileValidationEnabled :: Lens' UpdateTrailResponse (Maybe Bool)
updateTrailResponse_logFileValidationEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Bool
logFileValidationEnabled :: Maybe Bool
$sel:logFileValidationEnabled:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Bool
logFileValidationEnabled} -> Maybe Bool
logFileValidationEnabled) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Bool
a -> UpdateTrailResponse
s {$sel:logFileValidationEnabled:UpdateTrailResponse' :: Maybe Bool
logFileValidationEnabled = Maybe Bool
a} :: UpdateTrailResponse)

-- | Specifies the name of the trail.
updateTrailResponse_name :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Text)
updateTrailResponse_name :: Lens' UpdateTrailResponse (Maybe Text)
updateTrailResponse_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Text
name :: Maybe Text
$sel:name:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Text
a -> UpdateTrailResponse
s {$sel:name:UpdateTrailResponse' :: Maybe Text
name = Maybe Text
a} :: UpdateTrailResponse)

-- | Specifies the name of the Amazon S3 bucket designated for publishing log
-- files.
updateTrailResponse_s3BucketName :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Text)
updateTrailResponse_s3BucketName :: Lens' UpdateTrailResponse (Maybe Text)
updateTrailResponse_s3BucketName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Text
s3BucketName :: Maybe Text
$sel:s3BucketName:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
s3BucketName} -> Maybe Text
s3BucketName) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Text
a -> UpdateTrailResponse
s {$sel:s3BucketName:UpdateTrailResponse' :: Maybe Text
s3BucketName = Maybe Text
a} :: UpdateTrailResponse)

-- | Specifies the Amazon S3 key prefix that comes after the name of the
-- bucket you have designated for log file delivery. For more information,
-- see
-- <https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-find-log-files.html Finding Your IAM Log Files>.
updateTrailResponse_s3KeyPrefix :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Text)
updateTrailResponse_s3KeyPrefix :: Lens' UpdateTrailResponse (Maybe Text)
updateTrailResponse_s3KeyPrefix = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Text
s3KeyPrefix :: Maybe Text
$sel:s3KeyPrefix:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
s3KeyPrefix} -> Maybe Text
s3KeyPrefix) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Text
a -> UpdateTrailResponse
s {$sel:s3KeyPrefix:UpdateTrailResponse' :: Maybe Text
s3KeyPrefix = Maybe Text
a} :: UpdateTrailResponse)

-- | Specifies the ARN of the Amazon SNS topic that CloudTrail uses to send
-- notifications when log files are delivered. The following is the format
-- of a topic ARN.
--
-- @arn:aws:sns:us-east-2:123456789012:MyTopic@
updateTrailResponse_snsTopicARN :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Text)
updateTrailResponse_snsTopicARN :: Lens' UpdateTrailResponse (Maybe Text)
updateTrailResponse_snsTopicARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Text
snsTopicARN :: Maybe Text
$sel:snsTopicARN:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
snsTopicARN} -> Maybe Text
snsTopicARN) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Text
a -> UpdateTrailResponse
s {$sel:snsTopicARN:UpdateTrailResponse' :: Maybe Text
snsTopicARN = Maybe Text
a} :: UpdateTrailResponse)

-- | This field is no longer in use. Use UpdateTrailResponse$SnsTopicARN.
updateTrailResponse_snsTopicName :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Text)
updateTrailResponse_snsTopicName :: Lens' UpdateTrailResponse (Maybe Text)
updateTrailResponse_snsTopicName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Text
snsTopicName :: Maybe Text
$sel:snsTopicName:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
snsTopicName} -> Maybe Text
snsTopicName) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Text
a -> UpdateTrailResponse
s {$sel:snsTopicName:UpdateTrailResponse' :: Maybe Text
snsTopicName = Maybe Text
a} :: UpdateTrailResponse)

-- | Specifies the ARN of the trail that was updated. The following is the
-- format of a trail ARN.
--
-- @arn:aws:cloudtrail:us-east-2:123456789012:trail\/MyTrail@
updateTrailResponse_trailARN :: Lens.Lens' UpdateTrailResponse (Prelude.Maybe Prelude.Text)
updateTrailResponse_trailARN :: Lens' UpdateTrailResponse (Maybe Text)
updateTrailResponse_trailARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrailResponse' {Maybe Text
trailARN :: Maybe Text
$sel:trailARN:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
trailARN} -> Maybe Text
trailARN) (\s :: UpdateTrailResponse
s@UpdateTrailResponse' {} Maybe Text
a -> UpdateTrailResponse
s {$sel:trailARN:UpdateTrailResponse' :: Maybe Text
trailARN = Maybe Text
a} :: UpdateTrailResponse)

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

instance Prelude.NFData UpdateTrailResponse where
  rnf :: UpdateTrailResponse -> ()
rnf UpdateTrailResponse' {Int
Maybe Bool
Maybe Text
httpStatus :: Int
trailARN :: Maybe Text
snsTopicName :: Maybe Text
snsTopicARN :: Maybe Text
s3KeyPrefix :: Maybe Text
s3BucketName :: Maybe Text
name :: Maybe Text
logFileValidationEnabled :: Maybe Bool
kmsKeyId :: Maybe Text
isOrganizationTrail :: Maybe Bool
isMultiRegionTrail :: Maybe Bool
includeGlobalServiceEvents :: Maybe Bool
cloudWatchLogsRoleArn :: Maybe Text
cloudWatchLogsLogGroupArn :: Maybe Text
$sel:httpStatus:UpdateTrailResponse' :: UpdateTrailResponse -> Int
$sel:trailARN:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
$sel:snsTopicName:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
$sel:snsTopicARN:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
$sel:s3KeyPrefix:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
$sel:s3BucketName:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
$sel:name:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
$sel:logFileValidationEnabled:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Bool
$sel:kmsKeyId:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
$sel:isOrganizationTrail:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Bool
$sel:isMultiRegionTrail:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Bool
$sel:includeGlobalServiceEvents:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Bool
$sel:cloudWatchLogsRoleArn:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
$sel:cloudWatchLogsLogGroupArn:UpdateTrailResponse' :: UpdateTrailResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudWatchLogsLogGroupArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
cloudWatchLogsRoleArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
includeGlobalServiceEvents
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isMultiRegionTrail
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
isOrganizationTrail
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
kmsKeyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
logFileValidationEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3BucketName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
s3KeyPrefix
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snsTopicARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
snsTopicName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trailARN
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus