private void setDestinationDescription()

in deliverystream/src/main/java/com/amazonaws/kinesisfirehose/deliverystream/ReadHandler.java [71:90]


    private void setDestinationDescription(final ResourceModel model, final List<DestinationDescription> descriptions) {
        descriptions.stream().forEach(destination -> {
            // If the delivery stream is created with extendedS3Destinations, when you query firehose to populate the state of the model, firehose populates both the
            // s3destination and extendedS3Destination. We need our model to truly reflect the state of the structure with which it was created which was only with extendedS3Destination.
            if (destination.extendedS3DestinationDescription() == null) {
                model.setS3DestinationConfiguration(
                    HandlerUtils.translateS3DestinationConfigurationToCfnModel(destination.s3DestinationDescription()));
            }
            model.setExtendedS3DestinationConfiguration(
                HandlerUtils.translateExtendedS3DestinationConfigurationToCfnModel(destination.extendedS3DestinationDescription()));
            model.setRedshiftDestinationConfiguration(
                HandlerUtils.translateRedshiftDestinationToCfnModel(destination.redshiftDestinationDescription()));
            model.setElasticsearchDestinationConfiguration(
                HandlerUtils.translateElasticsearchDestinationConfigurationToCfnModel(destination.elasticsearchDestinationDescription()));
            model.setSplunkDestinationConfiguration(
                HandlerUtils.translateSplunkDestinationConfigurationToCfnModel(destination.splunkDestinationDescription()));
            model.setHttpEndpointDestinationConfiguration(
                HandlerUtils.translateHttpEndpointDestinationConfigurationToCfnModel(destination.httpEndpointDestinationDescription()));
        });
    }