// generated from terraform resource schema
import * as cdktf from 'cdktf';
export function ecrpublicRepositoryCatalogDataToTerraform(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 {
        about_text: cdktf.stringToTerraform(struct.aboutText),
        architectures: cdktf.listMapper(cdktf.stringToTerraform)(struct.architectures),
        description: cdktf.stringToTerraform(struct.description),
        logo_image_blob: cdktf.stringToTerraform(struct.logoImageBlob),
        operating_systems: cdktf.listMapper(cdktf.stringToTerraform)(struct.operatingSystems),
        usage_text: cdktf.stringToTerraform(struct.usageText),
    };
}
export class EcrpublicRepositoryCatalogDataOutputReference 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._aboutText !== undefined) {
            hasAnyValues = true;
            internalValueResult.aboutText = this._aboutText;
        }
        if (this._architectures !== undefined) {
            hasAnyValues = true;
            internalValueResult.architectures = this._architectures;
        }
        if (this._description !== undefined) {
            hasAnyValues = true;
            internalValueResult.description = this._description;
        }
        if (this._logoImageBlob !== undefined) {
            hasAnyValues = true;
            internalValueResult.logoImageBlob = this._logoImageBlob;
        }
        if (this._operatingSystems !== undefined) {
            hasAnyValues = true;
            internalValueResult.operatingSystems = this._operatingSystems;
        }
        if (this._usageText !== undefined) {
            hasAnyValues = true;
            internalValueResult.usageText = this._usageText;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._aboutText = undefined;
            this._architectures = undefined;
            this._description = undefined;
            this._logoImageBlob = undefined;
            this._operatingSystems = undefined;
            this._usageText = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._aboutText = value.aboutText;
            this._architectures = value.architectures;
            this._description = value.description;
            this._logoImageBlob = value.logoImageBlob;
            this._operatingSystems = value.operatingSystems;
            this._usageText = value.usageText;
        }
    }
    // about_text - computed: false, optional: true, required: false
    _aboutText;
    get aboutText() {
        return this.getStringAttribute('about_text');
    }
    set aboutText(value) {
        this._aboutText = value;
    }
    resetAboutText() {
        this._aboutText = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get aboutTextInput() {
        return this._aboutText;
    }
    // architectures - computed: false, optional: true, required: false
    _architectures;
    get architectures() {
        return cdktf.Fn.tolist(this.getListAttribute('architectures'));
    }
    set architectures(value) {
        this._architectures = value;
    }
    resetArchitectures() {
        this._architectures = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get architecturesInput() {
        return this._architectures;
    }
    // description - computed: false, optional: true, required: false
    _description;
    get description() {
        return this.getStringAttribute('description');
    }
    set description(value) {
        this._description = value;
    }
    resetDescription() {
        this._description = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get descriptionInput() {
        return this._description;
    }
    // logo_image_blob - computed: true, optional: true, required: false
    _logoImageBlob;
    get logoImageBlob() {
        return this.getStringAttribute('logo_image_blob');
    }
    set logoImageBlob(value) {
        this._logoImageBlob = value;
    }
    resetLogoImageBlob() {
        this._logoImageBlob = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get logoImageBlobInput() {
        return this._logoImageBlob;
    }
    // operating_systems - computed: false, optional: true, required: false
    _operatingSystems;
    get operatingSystems() {
        return cdktf.Fn.tolist(this.getListAttribute('operating_systems'));
    }
    set operatingSystems(value) {
        this._operatingSystems = value;
    }
    resetOperatingSystems() {
        this._operatingSystems = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get operatingSystemsInput() {
        return this._operatingSystems;
    }
    // usage_text - computed: false, optional: true, required: false
    _usageText;
    get usageText() {
        return this.getStringAttribute('usage_text');
    }
    set usageText(value) {
        this._usageText = value;
    }
    resetUsageText() {
        this._usageText = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get usageTextInput() {
        return this._usageText;
    }
}
export function ecrpublicRepositoryTimeoutsToTerraform(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 {
        delete: cdktf.stringToTerraform(struct.delete),
    };
}
export class EcrpublicRepositoryTimeoutsOutputReference 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._delete !== undefined) {
            hasAnyValues = true;
            internalValueResult.delete = this._delete;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._delete = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._delete = value.delete;
        }
    }
    // delete - computed: false, optional: true, required: false
    _delete;
    get delete() {
        return this.getStringAttribute('delete');
    }
    set delete(value) {
        this._delete = value;
    }
    resetDelete() {
        this._delete = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get deleteInput() {
        return this._delete;
    }
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/ecrpublic_repository aws_ecrpublic_repository}
*/
export class EcrpublicRepository extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_ecrpublic_repository";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/ecrpublic_repository aws_ecrpublic_repository} 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 EcrpublicRepositoryConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_ecrpublic_repository',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._forceDestroy = config.forceDestroy;
        this._repositoryName = config.repositoryName;
        this._catalogData.internalValue = config.catalogData;
        this._timeouts.internalValue = config.timeouts;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // force_destroy - computed: false, optional: true, required: false
    _forceDestroy;
    get forceDestroy() {
        return this.getBooleanAttribute('force_destroy');
    }
    set forceDestroy(value) {
        this._forceDestroy = value;
    }
    resetForceDestroy() {
        this._forceDestroy = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get forceDestroyInput() {
        return this._forceDestroy;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // registry_id - computed: true, optional: false, required: false
    get registryId() {
        return this.getStringAttribute('registry_id');
    }
    // repository_name - computed: false, optional: false, required: true
    _repositoryName;
    get repositoryName() {
        return this.getStringAttribute('repository_name');
    }
    set repositoryName(value) {
        this._repositoryName = value;
    }
    // Temporarily expose input value. Use with caution.
    get repositoryNameInput() {
        return this._repositoryName;
    }
    // repository_uri - computed: true, optional: false, required: false
    get repositoryUri() {
        return this.getStringAttribute('repository_uri');
    }
    // catalog_data - computed: false, optional: true, required: false
    _catalogData = new EcrpublicRepositoryCatalogDataOutputReference(this, "catalog_data", true);
    get catalogData() {
        return this._catalogData;
    }
    putCatalogData(value) {
        this._catalogData.internalValue = value;
    }
    resetCatalogData() {
        this._catalogData.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get catalogDataInput() {
        return this._catalogData.internalValue;
    }
    // timeouts - computed: false, optional: true, required: false
    _timeouts = new EcrpublicRepositoryTimeoutsOutputReference(this, "timeouts", true);
    get timeouts() {
        return this._timeouts;
    }
    putTimeouts(value) {
        this._timeouts.internalValue = value;
    }
    resetTimeouts() {
        this._timeouts.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get timeoutsInput() {
        return this._timeouts.internalValue;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            force_destroy: cdktf.booleanToTerraform(this._forceDestroy),
            repository_name: cdktf.stringToTerraform(this._repositoryName),
            catalog_data: ecrpublicRepositoryCatalogDataToTerraform(this._catalogData.internalValue),
            timeouts: ecrpublicRepositoryTimeoutsToTerraform(this._timeouts.internalValue),
        };
    }
}
//# sourceMappingURL=ecrpublic-repository.js.map