// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function elastictranscoderPipelineContentConfigToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        bucket: cdktf.stringToTerraform(struct.bucket),
        storage_class: cdktf.stringToTerraform(struct.storageClass),
    };
}
export class ElastictranscoderPipelineContentConfigOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._bucket !== undefined) {
            hasAnyValues = true;
            internalValueResult.bucket = this._bucket;
        }
        if (this._storageClass !== undefined) {
            hasAnyValues = true;
            internalValueResult.storageClass = this._storageClass;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._bucket = undefined;
            this._storageClass = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._bucket = value.bucket;
            this._storageClass = value.storageClass;
        }
    }
    // bucket - computed: true, optional: true, required: false
    _bucket;
    get bucket() {
        return this.getStringAttribute('bucket');
    }
    set bucket(value) {
        this._bucket = value;
    }
    resetBucket() {
        this._bucket = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get bucketInput() {
        return this._bucket;
    }
    // storage_class - computed: false, optional: true, required: false
    _storageClass;
    get storageClass() {
        return this.getStringAttribute('storage_class');
    }
    set storageClass(value) {
        this._storageClass = value;
    }
    resetStorageClass() {
        this._storageClass = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get storageClassInput() {
        return this._storageClass;
    }
}
export function elastictranscoderPipelineContentConfigPermissionsToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        access: cdktf.listMapper(cdktf.stringToTerraform)(struct.access),
        grantee: cdktf.stringToTerraform(struct.grantee),
        grantee_type: cdktf.stringToTerraform(struct.granteeType),
    };
}
export function elastictranscoderPipelineNotificationsToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        completed: cdktf.stringToTerraform(struct.completed),
        error: cdktf.stringToTerraform(struct.error),
        progressing: cdktf.stringToTerraform(struct.progressing),
        warning: cdktf.stringToTerraform(struct.warning),
    };
}
export class ElastictranscoderPipelineNotificationsOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._completed !== undefined) {
            hasAnyValues = true;
            internalValueResult.completed = this._completed;
        }
        if (this._error !== undefined) {
            hasAnyValues = true;
            internalValueResult.error = this._error;
        }
        if (this._progressing !== undefined) {
            hasAnyValues = true;
            internalValueResult.progressing = this._progressing;
        }
        if (this._warning !== undefined) {
            hasAnyValues = true;
            internalValueResult.warning = this._warning;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._completed = undefined;
            this._error = undefined;
            this._progressing = undefined;
            this._warning = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._completed = value.completed;
            this._error = value.error;
            this._progressing = value.progressing;
            this._warning = value.warning;
        }
    }
    // completed - computed: false, optional: true, required: false
    _completed;
    get completed() {
        return this.getStringAttribute('completed');
    }
    set completed(value) {
        this._completed = value;
    }
    resetCompleted() {
        this._completed = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get completedInput() {
        return this._completed;
    }
    // error - computed: false, optional: true, required: false
    _error;
    get error() {
        return this.getStringAttribute('error');
    }
    set error(value) {
        this._error = value;
    }
    resetError() {
        this._error = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get errorInput() {
        return this._error;
    }
    // progressing - computed: false, optional: true, required: false
    _progressing;
    get progressing() {
        return this.getStringAttribute('progressing');
    }
    set progressing(value) {
        this._progressing = value;
    }
    resetProgressing() {
        this._progressing = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get progressingInput() {
        return this._progressing;
    }
    // warning - computed: false, optional: true, required: false
    _warning;
    get warning() {
        return this.getStringAttribute('warning');
    }
    set warning(value) {
        this._warning = value;
    }
    resetWarning() {
        this._warning = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get warningInput() {
        return this._warning;
    }
}
export function elastictranscoderPipelineThumbnailConfigToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        bucket: cdktf.stringToTerraform(struct.bucket),
        storage_class: cdktf.stringToTerraform(struct.storageClass),
    };
}
export class ElastictranscoderPipelineThumbnailConfigOutputReference extends cdktf.ComplexObject {
    isEmptyObject = false;
    /**
    * @param terraformResource The parent resource
    * @param terraformAttribute The attribute on the parent resource this class is referencing
    * @param isSingleItem True if this is a block, false if it's a list
    */
    constructor(terraformResource, terraformAttribute, isSingleItem) {
        super(terraformResource, terraformAttribute, isSingleItem);
    }
    get internalValue() {
        let hasAnyValues = this.isEmptyObject;
        const internalValueResult = {};
        if (this._bucket !== undefined) {
            hasAnyValues = true;
            internalValueResult.bucket = this._bucket;
        }
        if (this._storageClass !== undefined) {
            hasAnyValues = true;
            internalValueResult.storageClass = this._storageClass;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._bucket = undefined;
            this._storageClass = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._bucket = value.bucket;
            this._storageClass = value.storageClass;
        }
    }
    // bucket - computed: true, optional: true, required: false
    _bucket;
    get bucket() {
        return this.getStringAttribute('bucket');
    }
    set bucket(value) {
        this._bucket = value;
    }
    resetBucket() {
        this._bucket = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get bucketInput() {
        return this._bucket;
    }
    // storage_class - computed: false, optional: true, required: false
    _storageClass;
    get storageClass() {
        return this.getStringAttribute('storage_class');
    }
    set storageClass(value) {
        this._storageClass = value;
    }
    resetStorageClass() {
        this._storageClass = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get storageClassInput() {
        return this._storageClass;
    }
}
export function elastictranscoderPipelineThumbnailConfigPermissionsToTerraform(struct) {
    if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
        return struct;
    }
    if (cdktf.isComplexElement(struct)) {
        throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
    }
    return {
        access: cdktf.listMapper(cdktf.stringToTerraform)(struct.access),
        grantee: cdktf.stringToTerraform(struct.grantee),
        grantee_type: cdktf.stringToTerraform(struct.granteeType),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/elastictranscoder_pipeline aws_elastictranscoder_pipeline}
*/
export class ElastictranscoderPipeline extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_elastictranscoder_pipeline";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/elastictranscoder_pipeline aws_elastictranscoder_pipeline} Resource
    *
    * @param scope The scope in which to define this construct
    * @param id The scoped construct ID. Must be unique amongst siblings in the same scope
    * @param options ElastictranscoderPipelineConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_elastictranscoder_pipeline',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._awsKmsKeyArn = config.awsKmsKeyArn;
        this._inputBucket = config.inputBucket;
        this._name = config.name;
        this._outputBucket = config.outputBucket;
        this._role = config.role;
        this._contentConfig.internalValue = config.contentConfig;
        this._contentConfigPermissions = config.contentConfigPermissions;
        this._notifications.internalValue = config.notifications;
        this._thumbnailConfig.internalValue = config.thumbnailConfig;
        this._thumbnailConfigPermissions = config.thumbnailConfigPermissions;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // aws_kms_key_arn - computed: false, optional: true, required: false
    _awsKmsKeyArn;
    get awsKmsKeyArn() {
        return this.getStringAttribute('aws_kms_key_arn');
    }
    set awsKmsKeyArn(value) {
        this._awsKmsKeyArn = value;
    }
    resetAwsKmsKeyArn() {
        this._awsKmsKeyArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get awsKmsKeyArnInput() {
        return this._awsKmsKeyArn;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // input_bucket - computed: false, optional: false, required: true
    _inputBucket;
    get inputBucket() {
        return this.getStringAttribute('input_bucket');
    }
    set inputBucket(value) {
        this._inputBucket = value;
    }
    // Temporarily expose input value. Use with caution.
    get inputBucketInput() {
        return this._inputBucket;
    }
    // name - computed: true, optional: true, required: false
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    resetName() {
        this._name = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // output_bucket - computed: true, optional: true, required: false
    _outputBucket;
    get outputBucket() {
        return this.getStringAttribute('output_bucket');
    }
    set outputBucket(value) {
        this._outputBucket = value;
    }
    resetOutputBucket() {
        this._outputBucket = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get outputBucketInput() {
        return this._outputBucket;
    }
    // role - computed: false, optional: false, required: true
    _role;
    get role() {
        return this.getStringAttribute('role');
    }
    set role(value) {
        this._role = value;
    }
    // Temporarily expose input value. Use with caution.
    get roleInput() {
        return this._role;
    }
    // content_config - computed: false, optional: true, required: false
    _contentConfig = new ElastictranscoderPipelineContentConfigOutputReference(this, "content_config", true);
    get contentConfig() {
        return this._contentConfig;
    }
    putContentConfig(value) {
        this._contentConfig.internalValue = value;
    }
    resetContentConfig() {
        this._contentConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get contentConfigInput() {
        return this._contentConfig.internalValue;
    }
    // content_config_permissions - computed: false, optional: true, required: false
    _contentConfigPermissions;
    get contentConfigPermissions() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('content_config_permissions')));
    }
    set contentConfigPermissions(value) {
        this._contentConfigPermissions = value;
    }
    resetContentConfigPermissions() {
        this._contentConfigPermissions = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get contentConfigPermissionsInput() {
        return this._contentConfigPermissions;
    }
    // notifications - computed: false, optional: true, required: false
    _notifications = new ElastictranscoderPipelineNotificationsOutputReference(this, "notifications", true);
    get notifications() {
        return this._notifications;
    }
    putNotifications(value) {
        this._notifications.internalValue = value;
    }
    resetNotifications() {
        this._notifications.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get notificationsInput() {
        return this._notifications.internalValue;
    }
    // thumbnail_config - computed: false, optional: true, required: false
    _thumbnailConfig = new ElastictranscoderPipelineThumbnailConfigOutputReference(this, "thumbnail_config", true);
    get thumbnailConfig() {
        return this._thumbnailConfig;
    }
    putThumbnailConfig(value) {
        this._thumbnailConfig.internalValue = value;
    }
    resetThumbnailConfig() {
        this._thumbnailConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get thumbnailConfigInput() {
        return this._thumbnailConfig.internalValue;
    }
    // thumbnail_config_permissions - computed: false, optional: true, required: false
    _thumbnailConfigPermissions;
    get thumbnailConfigPermissions() {
        // Getting the computed value is not yet implemented
        return cdktf.Token.asAny(cdktf.Fn.tolist(this.interpolationForAttribute('thumbnail_config_permissions')));
    }
    set thumbnailConfigPermissions(value) {
        this._thumbnailConfigPermissions = value;
    }
    resetThumbnailConfigPermissions() {
        this._thumbnailConfigPermissions = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get thumbnailConfigPermissionsInput() {
        return this._thumbnailConfigPermissions;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            aws_kms_key_arn: cdktf.stringToTerraform(this._awsKmsKeyArn),
            input_bucket: cdktf.stringToTerraform(this._inputBucket),
            name: cdktf.stringToTerraform(this._name),
            output_bucket: cdktf.stringToTerraform(this._outputBucket),
            role: cdktf.stringToTerraform(this._role),
            content_config: elastictranscoderPipelineContentConfigToTerraform(this._contentConfig.internalValue),
            content_config_permissions: cdktf.listMapper(elastictranscoderPipelineContentConfigPermissionsToTerraform)(this._contentConfigPermissions),
            notifications: elastictranscoderPipelineNotificationsToTerraform(this._notifications.internalValue),
            thumbnail_config: elastictranscoderPipelineThumbnailConfigToTerraform(this._thumbnailConfig.internalValue),
            thumbnail_config_permissions: cdktf.listMapper(elastictranscoderPipelineThumbnailConfigPermissionsToTerraform)(this._thumbnailConfigPermissions),
        };
    }
}
//# sourceMappingURL=elastictranscoder-pipeline.js.map