module Stratosphere.Resources.Trail where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
import Stratosphere.ResourceProperties.ResourceTag
data Trail =
Trail
{ _trailCloudWatchLogsLogGroupArn :: Maybe (Val Text)
, _trailCloudWatchLogsRoleArn :: Maybe (Val Text)
, _trailEnableLogFileValidation :: Maybe (Val Bool)
, _trailIncludeGlobalServiceEvents :: Maybe (Val Bool)
, _trailIsLogging :: Val Bool
, _trailIsMultiRegionTrail :: Maybe (Val Bool)
, _trailKMSKeyId :: Maybe (Val Text)
, _trailS3BucketName :: Val Text
, _trailS3KeyPrefix :: Maybe (Val Text)
, _trailSnsTopicName :: Maybe (Val Text)
, _trailTags :: Maybe [ResourceTag]
} deriving (Show, Generic)
instance ToJSON Trail where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 6, omitNothingFields = True }
instance FromJSON Trail where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 6, omitNothingFields = True }
trail
:: Val Bool
-> Val Text
-> Trail
trail isLoggingarg s3BucketNamearg =
Trail
{ _trailCloudWatchLogsLogGroupArn = Nothing
, _trailCloudWatchLogsRoleArn = Nothing
, _trailEnableLogFileValidation = Nothing
, _trailIncludeGlobalServiceEvents = Nothing
, _trailIsLogging = isLoggingarg
, _trailIsMultiRegionTrail = Nothing
, _trailKMSKeyId = Nothing
, _trailS3BucketName = s3BucketNamearg
, _trailS3KeyPrefix = Nothing
, _trailSnsTopicName = Nothing
, _trailTags = Nothing
}
tCloudWatchLogsLogGroupArn :: Lens' Trail (Maybe (Val Text))
tCloudWatchLogsLogGroupArn = lens _trailCloudWatchLogsLogGroupArn (\s a -> s { _trailCloudWatchLogsLogGroupArn = a })
tCloudWatchLogsRoleArn :: Lens' Trail (Maybe (Val Text))
tCloudWatchLogsRoleArn = lens _trailCloudWatchLogsRoleArn (\s a -> s { _trailCloudWatchLogsRoleArn = a })
tEnableLogFileValidation :: Lens' Trail (Maybe (Val Bool))
tEnableLogFileValidation = lens _trailEnableLogFileValidation (\s a -> s { _trailEnableLogFileValidation = a })
tIncludeGlobalServiceEvents :: Lens' Trail (Maybe (Val Bool))
tIncludeGlobalServiceEvents = lens _trailIncludeGlobalServiceEvents (\s a -> s { _trailIncludeGlobalServiceEvents = a })
tIsLogging :: Lens' Trail (Val Bool)
tIsLogging = lens _trailIsLogging (\s a -> s { _trailIsLogging = a })
tIsMultiRegionTrail :: Lens' Trail (Maybe (Val Bool))
tIsMultiRegionTrail = lens _trailIsMultiRegionTrail (\s a -> s { _trailIsMultiRegionTrail = a })
tKMSKeyId :: Lens' Trail (Maybe (Val Text))
tKMSKeyId = lens _trailKMSKeyId (\s a -> s { _trailKMSKeyId = a })
tS3BucketName :: Lens' Trail (Val Text)
tS3BucketName = lens _trailS3BucketName (\s a -> s { _trailS3BucketName = a })
tS3KeyPrefix :: Lens' Trail (Maybe (Val Text))
tS3KeyPrefix = lens _trailS3KeyPrefix (\s a -> s { _trailS3KeyPrefix = a })
tSnsTopicName :: Lens' Trail (Maybe (Val Text))
tSnsTopicName = lens _trailSnsTopicName (\s a -> s { _trailSnsTopicName = a })
tTags :: Lens' Trail (Maybe [ResourceTag])
tTags = lens _trailTags (\s a -> s { _trailTags = a })