"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const cdk = require("@aws-cdk/cdk");
const logs_generated_1 = require("./logs.generated");
/**
 * A new Log Stream in a Log Group
 */
class LogStream extends cdk.Construct {
    constructor(parent, id, props) {
        super(parent, id);
        const resource = new logs_generated_1.cloudformation.LogStreamResource(this, 'Resource', {
            logGroupName: props.logGroup.logGroupName,
            logStreamName: props.logStreamName
        });
        if (props.retainLogStream !== false) {
            resource.options.deletionPolicy = cdk.DeletionPolicy.Retain;
        }
        this.logStreamName = resource.ref;
    }
}
exports.LogStream = LogStream;
/**
 * The name of a log stream
 */
class LogStreamName extends cdk.Token {
}
exports.LogStreamName = LogStreamName;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nLXN0cmVhbS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImxvZy1zdHJlYW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxvQ0FBcUM7QUFFckMscURBQWtEO0FBa0NsRDs7R0FFRztBQUNILE1BQWEsU0FBVSxTQUFRLEdBQUcsQ0FBQyxTQUFTO0lBTXhDLFlBQVksTUFBcUIsRUFBRSxFQUFVLEVBQUUsS0FBcUI7UUFDaEUsS0FBSyxDQUFDLE1BQU0sRUFBRSxFQUFFLENBQUMsQ0FBQztRQUVsQixNQUFNLFFBQVEsR0FBRyxJQUFJLCtCQUFjLENBQUMsaUJBQWlCLENBQUMsSUFBSSxFQUFFLFVBQVUsRUFBRTtZQUNwRSxZQUFZLEVBQUUsS0FBSyxDQUFDLFFBQVEsQ0FBQyxZQUFZO1lBQ3pDLGFBQWEsRUFBRSxLQUFLLENBQUMsYUFBYTtTQUNyQyxDQUFDLENBQUM7UUFFSCxJQUFJLEtBQUssQ0FBQyxlQUFlLEtBQUssS0FBSyxFQUFFO1lBQ2pDLFFBQVEsQ0FBQyxPQUFPLENBQUMsY0FBYyxHQUFHLEdBQUcsQ0FBQyxjQUFjLENBQUMsTUFBTSxDQUFDO1NBQy9EO1FBRUQsSUFBSSxDQUFDLGFBQWEsR0FBRyxRQUFRLENBQUMsR0FBRyxDQUFDO0lBQ3RDLENBQUM7Q0FDSjtBQXBCRCw4QkFvQkM7QUFFRDs7R0FFRztBQUNILE1BQWEsYUFBYyxTQUFRLEdBQUcsQ0FBQyxLQUFLO0NBQzNDO0FBREQsc0NBQ0MifQ==