module Network.AWS.Firehose.Types.Product where
import Network.AWS.Firehose.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data BufferingHints = BufferingHints'
{ _bhSizeInMBs :: !(Maybe Nat)
, _bhIntervalInSeconds :: !(Maybe Nat)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
bufferingHints
:: BufferingHints
bufferingHints =
BufferingHints'
{ _bhSizeInMBs = Nothing
, _bhIntervalInSeconds = Nothing
}
bhSizeInMBs :: Lens' BufferingHints (Maybe Natural)
bhSizeInMBs = lens _bhSizeInMBs (\ s a -> s{_bhSizeInMBs = a}) . mapping _Nat;
bhIntervalInSeconds :: Lens' BufferingHints (Maybe Natural)
bhIntervalInSeconds = lens _bhIntervalInSeconds (\ s a -> s{_bhIntervalInSeconds = a}) . mapping _Nat;
instance FromJSON BufferingHints where
parseJSON
= withObject "BufferingHints"
(\ x ->
BufferingHints' <$>
(x .:? "SizeInMBs") <*> (x .:? "IntervalInSeconds"))
instance ToJSON BufferingHints where
toJSON BufferingHints'{..}
= object
(catMaybes
[("SizeInMBs" .=) <$> _bhSizeInMBs,
("IntervalInSeconds" .=) <$> _bhIntervalInSeconds])
data CopyCommand = CopyCommand'
{ _ccCopyOptions :: !(Maybe Text)
, _ccDataTableColumns :: !(Maybe Text)
, _ccDataTableName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
copyCommand
:: Text
-> CopyCommand
copyCommand pDataTableName_ =
CopyCommand'
{ _ccCopyOptions = Nothing
, _ccDataTableColumns = Nothing
, _ccDataTableName = pDataTableName_
}
ccCopyOptions :: Lens' CopyCommand (Maybe Text)
ccCopyOptions = lens _ccCopyOptions (\ s a -> s{_ccCopyOptions = a});
ccDataTableColumns :: Lens' CopyCommand (Maybe Text)
ccDataTableColumns = lens _ccDataTableColumns (\ s a -> s{_ccDataTableColumns = a});
ccDataTableName :: Lens' CopyCommand Text
ccDataTableName = lens _ccDataTableName (\ s a -> s{_ccDataTableName = a});
instance FromJSON CopyCommand where
parseJSON
= withObject "CopyCommand"
(\ x ->
CopyCommand' <$>
(x .:? "CopyOptions") <*> (x .:? "DataTableColumns")
<*> (x .: "DataTableName"))
instance ToJSON CopyCommand where
toJSON CopyCommand'{..}
= object
(catMaybes
[("CopyOptions" .=) <$> _ccCopyOptions,
("DataTableColumns" .=) <$> _ccDataTableColumns,
Just ("DataTableName" .= _ccDataTableName)])
data DeliveryStreamDescription = DeliveryStreamDescription'
{ _dsdCreateTimestamp :: !(Maybe POSIX)
, _dsdLastUpdateTimestamp :: !(Maybe POSIX)
, _dsdDeliveryStreamName :: !Text
, _dsdDeliveryStreamARN :: !Text
, _dsdDeliveryStreamStatus :: !DeliveryStreamStatus
, _dsdVersionId :: !Text
, _dsdDestinations :: ![DestinationDescription]
, _dsdHasMoreDestinations :: !Bool
} deriving (Eq,Read,Show,Data,Typeable,Generic)
deliveryStreamDescription
:: Text
-> Text
-> DeliveryStreamStatus
-> Text
-> Bool
-> DeliveryStreamDescription
deliveryStreamDescription pDeliveryStreamName_ pDeliveryStreamARN_ pDeliveryStreamStatus_ pVersionId_ pHasMoreDestinations_ =
DeliveryStreamDescription'
{ _dsdCreateTimestamp = Nothing
, _dsdLastUpdateTimestamp = Nothing
, _dsdDeliveryStreamName = pDeliveryStreamName_
, _dsdDeliveryStreamARN = pDeliveryStreamARN_
, _dsdDeliveryStreamStatus = pDeliveryStreamStatus_
, _dsdVersionId = pVersionId_
, _dsdDestinations = mempty
, _dsdHasMoreDestinations = pHasMoreDestinations_
}
dsdCreateTimestamp :: Lens' DeliveryStreamDescription (Maybe UTCTime)
dsdCreateTimestamp = lens _dsdCreateTimestamp (\ s a -> s{_dsdCreateTimestamp = a}) . mapping _Time;
dsdLastUpdateTimestamp :: Lens' DeliveryStreamDescription (Maybe UTCTime)
dsdLastUpdateTimestamp = lens _dsdLastUpdateTimestamp (\ s a -> s{_dsdLastUpdateTimestamp = a}) . mapping _Time;
dsdDeliveryStreamName :: Lens' DeliveryStreamDescription Text
dsdDeliveryStreamName = lens _dsdDeliveryStreamName (\ s a -> s{_dsdDeliveryStreamName = a});
dsdDeliveryStreamARN :: Lens' DeliveryStreamDescription Text
dsdDeliveryStreamARN = lens _dsdDeliveryStreamARN (\ s a -> s{_dsdDeliveryStreamARN = a});
dsdDeliveryStreamStatus :: Lens' DeliveryStreamDescription DeliveryStreamStatus
dsdDeliveryStreamStatus = lens _dsdDeliveryStreamStatus (\ s a -> s{_dsdDeliveryStreamStatus = a});
dsdVersionId :: Lens' DeliveryStreamDescription Text
dsdVersionId = lens _dsdVersionId (\ s a -> s{_dsdVersionId = a});
dsdDestinations :: Lens' DeliveryStreamDescription [DestinationDescription]
dsdDestinations = lens _dsdDestinations (\ s a -> s{_dsdDestinations = a}) . _Coerce;
dsdHasMoreDestinations :: Lens' DeliveryStreamDescription Bool
dsdHasMoreDestinations = lens _dsdHasMoreDestinations (\ s a -> s{_dsdHasMoreDestinations = a});
instance FromJSON DeliveryStreamDescription where
parseJSON
= withObject "DeliveryStreamDescription"
(\ x ->
DeliveryStreamDescription' <$>
(x .:? "CreateTimestamp") <*>
(x .:? "LastUpdateTimestamp")
<*> (x .: "DeliveryStreamName")
<*> (x .: "DeliveryStreamARN")
<*> (x .: "DeliveryStreamStatus")
<*> (x .: "VersionId")
<*> (x .:? "Destinations" .!= mempty)
<*> (x .: "HasMoreDestinations"))
data DestinationDescription = DestinationDescription'
{ _ddS3DestinationDescription :: !(Maybe S3DestinationDescription)
, _ddRedshiftDestinationDescription :: !(Maybe RedshiftDestinationDescription)
, _ddDestinationId :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
destinationDescription
:: Text
-> DestinationDescription
destinationDescription pDestinationId_ =
DestinationDescription'
{ _ddS3DestinationDescription = Nothing
, _ddRedshiftDestinationDescription = Nothing
, _ddDestinationId = pDestinationId_
}
ddS3DestinationDescription :: Lens' DestinationDescription (Maybe S3DestinationDescription)
ddS3DestinationDescription = lens _ddS3DestinationDescription (\ s a -> s{_ddS3DestinationDescription = a});
ddRedshiftDestinationDescription :: Lens' DestinationDescription (Maybe RedshiftDestinationDescription)
ddRedshiftDestinationDescription = lens _ddRedshiftDestinationDescription (\ s a -> s{_ddRedshiftDestinationDescription = a});
ddDestinationId :: Lens' DestinationDescription Text
ddDestinationId = lens _ddDestinationId (\ s a -> s{_ddDestinationId = a});
instance FromJSON DestinationDescription where
parseJSON
= withObject "DestinationDescription"
(\ x ->
DestinationDescription' <$>
(x .:? "S3DestinationDescription") <*>
(x .:? "RedshiftDestinationDescription")
<*> (x .: "DestinationId"))
data EncryptionConfiguration = EncryptionConfiguration'
{ _ecNoEncryptionConfig :: !(Maybe NoEncryptionConfig)
, _ecKMSEncryptionConfig :: !(Maybe KMSEncryptionConfig)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
encryptionConfiguration
:: EncryptionConfiguration
encryptionConfiguration =
EncryptionConfiguration'
{ _ecNoEncryptionConfig = Nothing
, _ecKMSEncryptionConfig = Nothing
}
ecNoEncryptionConfig :: Lens' EncryptionConfiguration (Maybe NoEncryptionConfig)
ecNoEncryptionConfig = lens _ecNoEncryptionConfig (\ s a -> s{_ecNoEncryptionConfig = a});
ecKMSEncryptionConfig :: Lens' EncryptionConfiguration (Maybe KMSEncryptionConfig)
ecKMSEncryptionConfig = lens _ecKMSEncryptionConfig (\ s a -> s{_ecKMSEncryptionConfig = a});
instance FromJSON EncryptionConfiguration where
parseJSON
= withObject "EncryptionConfiguration"
(\ x ->
EncryptionConfiguration' <$>
(x .:? "NoEncryptionConfig") <*>
(x .:? "KMSEncryptionConfig"))
instance ToJSON EncryptionConfiguration where
toJSON EncryptionConfiguration'{..}
= object
(catMaybes
[("NoEncryptionConfig" .=) <$> _ecNoEncryptionConfig,
("KMSEncryptionConfig" .=) <$>
_ecKMSEncryptionConfig])
newtype KMSEncryptionConfig = KMSEncryptionConfig'
{ _kecAWSKMSKeyARN :: Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
kmsEncryptionConfig
:: Text
-> KMSEncryptionConfig
kmsEncryptionConfig pAWSKMSKeyARN_ =
KMSEncryptionConfig'
{ _kecAWSKMSKeyARN = pAWSKMSKeyARN_
}
kecAWSKMSKeyARN :: Lens' KMSEncryptionConfig Text
kecAWSKMSKeyARN = lens _kecAWSKMSKeyARN (\ s a -> s{_kecAWSKMSKeyARN = a});
instance FromJSON KMSEncryptionConfig where
parseJSON
= withObject "KMSEncryptionConfig"
(\ x ->
KMSEncryptionConfig' <$> (x .: "AWSKMSKeyARN"))
instance ToJSON KMSEncryptionConfig where
toJSON KMSEncryptionConfig'{..}
= object
(catMaybes
[Just ("AWSKMSKeyARN" .= _kecAWSKMSKeyARN)])
data PutRecordBatchResponseEntry = PutRecordBatchResponseEntry'
{ _prbreRecordId :: !(Maybe Text)
, _prbreErrorCode :: !(Maybe Text)
, _prbreErrorMessage :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
putRecordBatchResponseEntry
:: PutRecordBatchResponseEntry
putRecordBatchResponseEntry =
PutRecordBatchResponseEntry'
{ _prbreRecordId = Nothing
, _prbreErrorCode = Nothing
, _prbreErrorMessage = Nothing
}
prbreRecordId :: Lens' PutRecordBatchResponseEntry (Maybe Text)
prbreRecordId = lens _prbreRecordId (\ s a -> s{_prbreRecordId = a});
prbreErrorCode :: Lens' PutRecordBatchResponseEntry (Maybe Text)
prbreErrorCode = lens _prbreErrorCode (\ s a -> s{_prbreErrorCode = a});
prbreErrorMessage :: Lens' PutRecordBatchResponseEntry (Maybe Text)
prbreErrorMessage = lens _prbreErrorMessage (\ s a -> s{_prbreErrorMessage = a});
instance FromJSON PutRecordBatchResponseEntry where
parseJSON
= withObject "PutRecordBatchResponseEntry"
(\ x ->
PutRecordBatchResponseEntry' <$>
(x .:? "RecordId") <*> (x .:? "ErrorCode") <*>
(x .:? "ErrorMessage"))
newtype Record = Record'
{ _rData :: Base64
} deriving (Eq,Read,Show,Data,Typeable,Generic)
record
:: ByteString
-> Record
record pData_ =
Record'
{ _rData = _Base64 # pData_
}
rData :: Lens' Record ByteString
rData = lens _rData (\ s a -> s{_rData = a}) . _Base64;
instance ToJSON Record where
toJSON Record'{..}
= object (catMaybes [Just ("Data" .= _rData)])
data RedshiftDestinationConfiguration = RedshiftDestinationConfiguration'
{ _rdcRoleARN :: !Text
, _rdcClusterJDBCURL :: !Text
, _rdcCopyCommand :: !CopyCommand
, _rdcUsername :: !(Sensitive Text)
, _rdcPassword :: !(Sensitive Text)
, _rdcS3Configuration :: !S3DestinationConfiguration
} deriving (Eq,Read,Show,Data,Typeable,Generic)
redshiftDestinationConfiguration
:: Text
-> Text
-> CopyCommand
-> Text
-> Text
-> S3DestinationConfiguration
-> RedshiftDestinationConfiguration
redshiftDestinationConfiguration pRoleARN_ pClusterJDBCURL_ pCopyCommand_ pUsername_ pPassword_ pS3Configuration_ =
RedshiftDestinationConfiguration'
{ _rdcRoleARN = pRoleARN_
, _rdcClusterJDBCURL = pClusterJDBCURL_
, _rdcCopyCommand = pCopyCommand_
, _rdcUsername = _Sensitive # pUsername_
, _rdcPassword = _Sensitive # pPassword_
, _rdcS3Configuration = pS3Configuration_
}
rdcRoleARN :: Lens' RedshiftDestinationConfiguration Text
rdcRoleARN = lens _rdcRoleARN (\ s a -> s{_rdcRoleARN = a});
rdcClusterJDBCURL :: Lens' RedshiftDestinationConfiguration Text
rdcClusterJDBCURL = lens _rdcClusterJDBCURL (\ s a -> s{_rdcClusterJDBCURL = a});
rdcCopyCommand :: Lens' RedshiftDestinationConfiguration CopyCommand
rdcCopyCommand = lens _rdcCopyCommand (\ s a -> s{_rdcCopyCommand = a});
rdcUsername :: Lens' RedshiftDestinationConfiguration Text
rdcUsername = lens _rdcUsername (\ s a -> s{_rdcUsername = a}) . _Sensitive;
rdcPassword :: Lens' RedshiftDestinationConfiguration Text
rdcPassword = lens _rdcPassword (\ s a -> s{_rdcPassword = a}) . _Sensitive;
rdcS3Configuration :: Lens' RedshiftDestinationConfiguration S3DestinationConfiguration
rdcS3Configuration = lens _rdcS3Configuration (\ s a -> s{_rdcS3Configuration = a});
instance ToJSON RedshiftDestinationConfiguration
where
toJSON RedshiftDestinationConfiguration'{..}
= object
(catMaybes
[Just ("RoleARN" .= _rdcRoleARN),
Just ("ClusterJDBCURL" .= _rdcClusterJDBCURL),
Just ("CopyCommand" .= _rdcCopyCommand),
Just ("Username" .= _rdcUsername),
Just ("Password" .= _rdcPassword),
Just ("S3Configuration" .= _rdcS3Configuration)])
data RedshiftDestinationDescription = RedshiftDestinationDescription'
{ _rddRoleARN :: !Text
, _rddClusterJDBCURL :: !Text
, _rddCopyCommand :: !CopyCommand
, _rddUsername :: !(Sensitive Text)
, _rddS3DestinationDescription :: !S3DestinationDescription
} deriving (Eq,Read,Show,Data,Typeable,Generic)
redshiftDestinationDescription
:: Text
-> Text
-> CopyCommand
-> Text
-> S3DestinationDescription
-> RedshiftDestinationDescription
redshiftDestinationDescription pRoleARN_ pClusterJDBCURL_ pCopyCommand_ pUsername_ pS3DestinationDescription_ =
RedshiftDestinationDescription'
{ _rddRoleARN = pRoleARN_
, _rddClusterJDBCURL = pClusterJDBCURL_
, _rddCopyCommand = pCopyCommand_
, _rddUsername = _Sensitive # pUsername_
, _rddS3DestinationDescription = pS3DestinationDescription_
}
rddRoleARN :: Lens' RedshiftDestinationDescription Text
rddRoleARN = lens _rddRoleARN (\ s a -> s{_rddRoleARN = a});
rddClusterJDBCURL :: Lens' RedshiftDestinationDescription Text
rddClusterJDBCURL = lens _rddClusterJDBCURL (\ s a -> s{_rddClusterJDBCURL = a});
rddCopyCommand :: Lens' RedshiftDestinationDescription CopyCommand
rddCopyCommand = lens _rddCopyCommand (\ s a -> s{_rddCopyCommand = a});
rddUsername :: Lens' RedshiftDestinationDescription Text
rddUsername = lens _rddUsername (\ s a -> s{_rddUsername = a}) . _Sensitive;
rddS3DestinationDescription :: Lens' RedshiftDestinationDescription S3DestinationDescription
rddS3DestinationDescription = lens _rddS3DestinationDescription (\ s a -> s{_rddS3DestinationDescription = a});
instance FromJSON RedshiftDestinationDescription
where
parseJSON
= withObject "RedshiftDestinationDescription"
(\ x ->
RedshiftDestinationDescription' <$>
(x .: "RoleARN") <*> (x .: "ClusterJDBCURL") <*>
(x .: "CopyCommand")
<*> (x .: "Username")
<*> (x .: "S3DestinationDescription"))
data RedshiftDestinationUpdate = RedshiftDestinationUpdate'
{ _rduUsername :: !(Maybe (Sensitive Text))
, _rduS3Update :: !(Maybe S3DestinationUpdate)
, _rduPassword :: !(Maybe (Sensitive Text))
, _rduCopyCommand :: !(Maybe CopyCommand)
, _rduClusterJDBCURL :: !(Maybe Text)
, _rduRoleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
redshiftDestinationUpdate
:: RedshiftDestinationUpdate
redshiftDestinationUpdate =
RedshiftDestinationUpdate'
{ _rduUsername = Nothing
, _rduS3Update = Nothing
, _rduPassword = Nothing
, _rduCopyCommand = Nothing
, _rduClusterJDBCURL = Nothing
, _rduRoleARN = Nothing
}
rduUsername :: Lens' RedshiftDestinationUpdate (Maybe Text)
rduUsername = lens _rduUsername (\ s a -> s{_rduUsername = a}) . mapping _Sensitive;
rduS3Update :: Lens' RedshiftDestinationUpdate (Maybe S3DestinationUpdate)
rduS3Update = lens _rduS3Update (\ s a -> s{_rduS3Update = a});
rduPassword :: Lens' RedshiftDestinationUpdate (Maybe Text)
rduPassword = lens _rduPassword (\ s a -> s{_rduPassword = a}) . mapping _Sensitive;
rduCopyCommand :: Lens' RedshiftDestinationUpdate (Maybe CopyCommand)
rduCopyCommand = lens _rduCopyCommand (\ s a -> s{_rduCopyCommand = a});
rduClusterJDBCURL :: Lens' RedshiftDestinationUpdate (Maybe Text)
rduClusterJDBCURL = lens _rduClusterJDBCURL (\ s a -> s{_rduClusterJDBCURL = a});
rduRoleARN :: Lens' RedshiftDestinationUpdate (Maybe Text)
rduRoleARN = lens _rduRoleARN (\ s a -> s{_rduRoleARN = a});
instance ToJSON RedshiftDestinationUpdate where
toJSON RedshiftDestinationUpdate'{..}
= object
(catMaybes
[("Username" .=) <$> _rduUsername,
("S3Update" .=) <$> _rduS3Update,
("Password" .=) <$> _rduPassword,
("CopyCommand" .=) <$> _rduCopyCommand,
("ClusterJDBCURL" .=) <$> _rduClusterJDBCURL,
("RoleARN" .=) <$> _rduRoleARN])
data S3DestinationConfiguration = S3DestinationConfiguration'
{ _sdcPrefix :: !(Maybe Text)
, _sdcEncryptionConfiguration :: !(Maybe EncryptionConfiguration)
, _sdcCompressionFormat :: !(Maybe CompressionFormat)
, _sdcBufferingHints :: !(Maybe BufferingHints)
, _sdcRoleARN :: !Text
, _sdcBucketARN :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)
s3DestinationConfiguration
:: Text
-> Text
-> S3DestinationConfiguration
s3DestinationConfiguration pRoleARN_ pBucketARN_ =
S3DestinationConfiguration'
{ _sdcPrefix = Nothing
, _sdcEncryptionConfiguration = Nothing
, _sdcCompressionFormat = Nothing
, _sdcBufferingHints = Nothing
, _sdcRoleARN = pRoleARN_
, _sdcBucketARN = pBucketARN_
}
sdcPrefix :: Lens' S3DestinationConfiguration (Maybe Text)
sdcPrefix = lens _sdcPrefix (\ s a -> s{_sdcPrefix = a});
sdcEncryptionConfiguration :: Lens' S3DestinationConfiguration (Maybe EncryptionConfiguration)
sdcEncryptionConfiguration = lens _sdcEncryptionConfiguration (\ s a -> s{_sdcEncryptionConfiguration = a});
sdcCompressionFormat :: Lens' S3DestinationConfiguration (Maybe CompressionFormat)
sdcCompressionFormat = lens _sdcCompressionFormat (\ s a -> s{_sdcCompressionFormat = a});
sdcBufferingHints :: Lens' S3DestinationConfiguration (Maybe BufferingHints)
sdcBufferingHints = lens _sdcBufferingHints (\ s a -> s{_sdcBufferingHints = a});
sdcRoleARN :: Lens' S3DestinationConfiguration Text
sdcRoleARN = lens _sdcRoleARN (\ s a -> s{_sdcRoleARN = a});
sdcBucketARN :: Lens' S3DestinationConfiguration Text
sdcBucketARN = lens _sdcBucketARN (\ s a -> s{_sdcBucketARN = a});
instance ToJSON S3DestinationConfiguration where
toJSON S3DestinationConfiguration'{..}
= object
(catMaybes
[("Prefix" .=) <$> _sdcPrefix,
("EncryptionConfiguration" .=) <$>
_sdcEncryptionConfiguration,
("CompressionFormat" .=) <$> _sdcCompressionFormat,
("BufferingHints" .=) <$> _sdcBufferingHints,
Just ("RoleARN" .= _sdcRoleARN),
Just ("BucketARN" .= _sdcBucketARN)])
data S3DestinationDescription = S3DestinationDescription'
{ _sddPrefix :: !(Maybe Text)
, _sddRoleARN :: !Text
, _sddBucketARN :: !Text
, _sddBufferingHints :: !BufferingHints
, _sddCompressionFormat :: !CompressionFormat
, _sddEncryptionConfiguration :: !EncryptionConfiguration
} deriving (Eq,Read,Show,Data,Typeable,Generic)
s3DestinationDescription
:: Text
-> Text
-> BufferingHints
-> CompressionFormat
-> EncryptionConfiguration
-> S3DestinationDescription
s3DestinationDescription pRoleARN_ pBucketARN_ pBufferingHints_ pCompressionFormat_ pEncryptionConfiguration_ =
S3DestinationDescription'
{ _sddPrefix = Nothing
, _sddRoleARN = pRoleARN_
, _sddBucketARN = pBucketARN_
, _sddBufferingHints = pBufferingHints_
, _sddCompressionFormat = pCompressionFormat_
, _sddEncryptionConfiguration = pEncryptionConfiguration_
}
sddPrefix :: Lens' S3DestinationDescription (Maybe Text)
sddPrefix = lens _sddPrefix (\ s a -> s{_sddPrefix = a});
sddRoleARN :: Lens' S3DestinationDescription Text
sddRoleARN = lens _sddRoleARN (\ s a -> s{_sddRoleARN = a});
sddBucketARN :: Lens' S3DestinationDescription Text
sddBucketARN = lens _sddBucketARN (\ s a -> s{_sddBucketARN = a});
sddBufferingHints :: Lens' S3DestinationDescription BufferingHints
sddBufferingHints = lens _sddBufferingHints (\ s a -> s{_sddBufferingHints = a});
sddCompressionFormat :: Lens' S3DestinationDescription CompressionFormat
sddCompressionFormat = lens _sddCompressionFormat (\ s a -> s{_sddCompressionFormat = a});
sddEncryptionConfiguration :: Lens' S3DestinationDescription EncryptionConfiguration
sddEncryptionConfiguration = lens _sddEncryptionConfiguration (\ s a -> s{_sddEncryptionConfiguration = a});
instance FromJSON S3DestinationDescription where
parseJSON
= withObject "S3DestinationDescription"
(\ x ->
S3DestinationDescription' <$>
(x .:? "Prefix") <*> (x .: "RoleARN") <*>
(x .: "BucketARN")
<*> (x .: "BufferingHints")
<*> (x .: "CompressionFormat")
<*> (x .: "EncryptionConfiguration"))
data S3DestinationUpdate = S3DestinationUpdate'
{ _sduPrefix :: !(Maybe Text)
, _sduEncryptionConfiguration :: !(Maybe EncryptionConfiguration)
, _sduCompressionFormat :: !(Maybe CompressionFormat)
, _sduBufferingHints :: !(Maybe BufferingHints)
, _sduBucketARN :: !(Maybe Text)
, _sduRoleARN :: !(Maybe Text)
} deriving (Eq,Read,Show,Data,Typeable,Generic)
s3DestinationUpdate
:: S3DestinationUpdate
s3DestinationUpdate =
S3DestinationUpdate'
{ _sduPrefix = Nothing
, _sduEncryptionConfiguration = Nothing
, _sduCompressionFormat = Nothing
, _sduBufferingHints = Nothing
, _sduBucketARN = Nothing
, _sduRoleARN = Nothing
}
sduPrefix :: Lens' S3DestinationUpdate (Maybe Text)
sduPrefix = lens _sduPrefix (\ s a -> s{_sduPrefix = a});
sduEncryptionConfiguration :: Lens' S3DestinationUpdate (Maybe EncryptionConfiguration)
sduEncryptionConfiguration = lens _sduEncryptionConfiguration (\ s a -> s{_sduEncryptionConfiguration = a});
sduCompressionFormat :: Lens' S3DestinationUpdate (Maybe CompressionFormat)
sduCompressionFormat = lens _sduCompressionFormat (\ s a -> s{_sduCompressionFormat = a});
sduBufferingHints :: Lens' S3DestinationUpdate (Maybe BufferingHints)
sduBufferingHints = lens _sduBufferingHints (\ s a -> s{_sduBufferingHints = a});
sduBucketARN :: Lens' S3DestinationUpdate (Maybe Text)
sduBucketARN = lens _sduBucketARN (\ s a -> s{_sduBucketARN = a});
sduRoleARN :: Lens' S3DestinationUpdate (Maybe Text)
sduRoleARN = lens _sduRoleARN (\ s a -> s{_sduRoleARN = a});
instance ToJSON S3DestinationUpdate where
toJSON S3DestinationUpdate'{..}
= object
(catMaybes
[("Prefix" .=) <$> _sduPrefix,
("EncryptionConfiguration" .=) <$>
_sduEncryptionConfiguration,
("CompressionFormat" .=) <$> _sduCompressionFormat,
("BufferingHints" .=) <$> _sduBufferingHints,
("BucketARN" .=) <$> _sduBucketARN,
("RoleARN" .=) <$> _sduRoleARN])