// generated from terraform resource schema
import * as cdktf from 'cdktf';
export class AmplifyAppProductionBranch extends cdktf.ComplexComputedList {
    // branch_name - computed: true, optional: false, required: false
    get branchName() {
        return this.getStringAttribute('branch_name');
    }
    // last_deploy_time - computed: true, optional: false, required: false
    get lastDeployTime() {
        return this.getStringAttribute('last_deploy_time');
    }
    // status - computed: true, optional: false, required: false
    get status() {
        return this.getStringAttribute('status');
    }
    // thumbnail_url - computed: true, optional: false, required: false
    get thumbnailUrl() {
        return this.getStringAttribute('thumbnail_url');
    }
}
export function amplifyAppAutoBranchCreationConfigToTerraform(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 {
        basic_auth_credentials: cdktf.stringToTerraform(struct.basicAuthCredentials),
        build_spec: cdktf.stringToTerraform(struct.buildSpec),
        enable_auto_build: cdktf.booleanToTerraform(struct.enableAutoBuild),
        enable_basic_auth: cdktf.booleanToTerraform(struct.enableBasicAuth),
        enable_performance_mode: cdktf.booleanToTerraform(struct.enablePerformanceMode),
        enable_pull_request_preview: cdktf.booleanToTerraform(struct.enablePullRequestPreview),
        environment_variables: cdktf.hashMapper(cdktf.stringToTerraform)(struct.environmentVariables),
        framework: cdktf.stringToTerraform(struct.framework),
        pull_request_environment_name: cdktf.stringToTerraform(struct.pullRequestEnvironmentName),
        stage: cdktf.stringToTerraform(struct.stage),
    };
}
export class AmplifyAppAutoBranchCreationConfigOutputReference 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._basicAuthCredentials !== undefined) {
            hasAnyValues = true;
            internalValueResult.basicAuthCredentials = this._basicAuthCredentials;
        }
        if (this._buildSpec !== undefined) {
            hasAnyValues = true;
            internalValueResult.buildSpec = this._buildSpec;
        }
        if (this._enableAutoBuild !== undefined) {
            hasAnyValues = true;
            internalValueResult.enableAutoBuild = this._enableAutoBuild;
        }
        if (this._enableBasicAuth !== undefined) {
            hasAnyValues = true;
            internalValueResult.enableBasicAuth = this._enableBasicAuth;
        }
        if (this._enablePerformanceMode !== undefined) {
            hasAnyValues = true;
            internalValueResult.enablePerformanceMode = this._enablePerformanceMode;
        }
        if (this._enablePullRequestPreview !== undefined) {
            hasAnyValues = true;
            internalValueResult.enablePullRequestPreview = this._enablePullRequestPreview;
        }
        if (this._environmentVariables !== undefined) {
            hasAnyValues = true;
            internalValueResult.environmentVariables = this._environmentVariables;
        }
        if (this._framework !== undefined) {
            hasAnyValues = true;
            internalValueResult.framework = this._framework;
        }
        if (this._pullRequestEnvironmentName !== undefined) {
            hasAnyValues = true;
            internalValueResult.pullRequestEnvironmentName = this._pullRequestEnvironmentName;
        }
        if (this._stage !== undefined) {
            hasAnyValues = true;
            internalValueResult.stage = this._stage;
        }
        return hasAnyValues ? internalValueResult : undefined;
    }
    set internalValue(value) {
        if (value === undefined) {
            this.isEmptyObject = false;
            this._basicAuthCredentials = undefined;
            this._buildSpec = undefined;
            this._enableAutoBuild = undefined;
            this._enableBasicAuth = undefined;
            this._enablePerformanceMode = undefined;
            this._enablePullRequestPreview = undefined;
            this._environmentVariables = undefined;
            this._framework = undefined;
            this._pullRequestEnvironmentName = undefined;
            this._stage = undefined;
        }
        else {
            this.isEmptyObject = Object.keys(value).length === 0;
            this._basicAuthCredentials = value.basicAuthCredentials;
            this._buildSpec = value.buildSpec;
            this._enableAutoBuild = value.enableAutoBuild;
            this._enableBasicAuth = value.enableBasicAuth;
            this._enablePerformanceMode = value.enablePerformanceMode;
            this._enablePullRequestPreview = value.enablePullRequestPreview;
            this._environmentVariables = value.environmentVariables;
            this._framework = value.framework;
            this._pullRequestEnvironmentName = value.pullRequestEnvironmentName;
            this._stage = value.stage;
        }
    }
    // basic_auth_credentials - computed: false, optional: true, required: false
    _basicAuthCredentials;
    get basicAuthCredentials() {
        return this.getStringAttribute('basic_auth_credentials');
    }
    set basicAuthCredentials(value) {
        this._basicAuthCredentials = value;
    }
    resetBasicAuthCredentials() {
        this._basicAuthCredentials = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get basicAuthCredentialsInput() {
        return this._basicAuthCredentials;
    }
    // build_spec - computed: false, optional: true, required: false
    _buildSpec;
    get buildSpec() {
        return this.getStringAttribute('build_spec');
    }
    set buildSpec(value) {
        this._buildSpec = value;
    }
    resetBuildSpec() {
        this._buildSpec = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get buildSpecInput() {
        return this._buildSpec;
    }
    // enable_auto_build - computed: false, optional: true, required: false
    _enableAutoBuild;
    get enableAutoBuild() {
        return this.getBooleanAttribute('enable_auto_build');
    }
    set enableAutoBuild(value) {
        this._enableAutoBuild = value;
    }
    resetEnableAutoBuild() {
        this._enableAutoBuild = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableAutoBuildInput() {
        return this._enableAutoBuild;
    }
    // enable_basic_auth - computed: false, optional: true, required: false
    _enableBasicAuth;
    get enableBasicAuth() {
        return this.getBooleanAttribute('enable_basic_auth');
    }
    set enableBasicAuth(value) {
        this._enableBasicAuth = value;
    }
    resetEnableBasicAuth() {
        this._enableBasicAuth = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableBasicAuthInput() {
        return this._enableBasicAuth;
    }
    // enable_performance_mode - computed: false, optional: true, required: false
    _enablePerformanceMode;
    get enablePerformanceMode() {
        return this.getBooleanAttribute('enable_performance_mode');
    }
    set enablePerformanceMode(value) {
        this._enablePerformanceMode = value;
    }
    resetEnablePerformanceMode() {
        this._enablePerformanceMode = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enablePerformanceModeInput() {
        return this._enablePerformanceMode;
    }
    // enable_pull_request_preview - computed: false, optional: true, required: false
    _enablePullRequestPreview;
    get enablePullRequestPreview() {
        return this.getBooleanAttribute('enable_pull_request_preview');
    }
    set enablePullRequestPreview(value) {
        this._enablePullRequestPreview = value;
    }
    resetEnablePullRequestPreview() {
        this._enablePullRequestPreview = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enablePullRequestPreviewInput() {
        return this._enablePullRequestPreview;
    }
    // environment_variables - computed: false, optional: true, required: false
    _environmentVariables;
    get environmentVariables() {
        return this.getStringMapAttribute('environment_variables');
    }
    set environmentVariables(value) {
        this._environmentVariables = value;
    }
    resetEnvironmentVariables() {
        this._environmentVariables = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get environmentVariablesInput() {
        return this._environmentVariables;
    }
    // framework - computed: false, optional: true, required: false
    _framework;
    get framework() {
        return this.getStringAttribute('framework');
    }
    set framework(value) {
        this._framework = value;
    }
    resetFramework() {
        this._framework = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get frameworkInput() {
        return this._framework;
    }
    // pull_request_environment_name - computed: false, optional: true, required: false
    _pullRequestEnvironmentName;
    get pullRequestEnvironmentName() {
        return this.getStringAttribute('pull_request_environment_name');
    }
    set pullRequestEnvironmentName(value) {
        this._pullRequestEnvironmentName = value;
    }
    resetPullRequestEnvironmentName() {
        this._pullRequestEnvironmentName = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get pullRequestEnvironmentNameInput() {
        return this._pullRequestEnvironmentName;
    }
    // stage - computed: false, optional: true, required: false
    _stage;
    get stage() {
        return this.getStringAttribute('stage');
    }
    set stage(value) {
        this._stage = value;
    }
    resetStage() {
        this._stage = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get stageInput() {
        return this._stage;
    }
}
export function amplifyAppCustomRuleToTerraform(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 {
        condition: cdktf.stringToTerraform(struct.condition),
        source: cdktf.stringToTerraform(struct.source),
        status: cdktf.stringToTerraform(struct.status),
        target: cdktf.stringToTerraform(struct.target),
    };
}
/**
* Represents a {@link https://www.terraform.io/docs/providers/aws/r/amplify_app aws_amplify_app}
*/
export class AmplifyApp extends cdktf.TerraformResource {
    // =================
    // STATIC PROPERTIES
    // =================
    static tfResourceType = "aws_amplify_app";
    // ===========
    // INITIALIZER
    // ===========
    /**
    * Create a new {@link https://www.terraform.io/docs/providers/aws/r/amplify_app aws_amplify_app} 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 AmplifyAppConfig
    */
    constructor(scope, id, config) {
        super(scope, id, {
            terraformResourceType: 'aws_amplify_app',
            terraformGeneratorMetadata: {
                providerName: 'aws'
            },
            provider: config.provider,
            dependsOn: config.dependsOn,
            count: config.count,
            lifecycle: config.lifecycle
        });
        this._accessToken = config.accessToken;
        this._autoBranchCreationPatterns = config.autoBranchCreationPatterns;
        this._basicAuthCredentials = config.basicAuthCredentials;
        this._buildSpec = config.buildSpec;
        this._description = config.description;
        this._enableAutoBranchCreation = config.enableAutoBranchCreation;
        this._enableBasicAuth = config.enableBasicAuth;
        this._enableBranchAutoBuild = config.enableBranchAutoBuild;
        this._enableBranchAutoDeletion = config.enableBranchAutoDeletion;
        this._environmentVariables = config.environmentVariables;
        this._iamServiceRoleArn = config.iamServiceRoleArn;
        this._name = config.name;
        this._oauthToken = config.oauthToken;
        this._platform = config.platform;
        this._repository = config.repository;
        this._tags = config.tags;
        this._tagsAll = config.tagsAll;
        this._autoBranchCreationConfig.internalValue = config.autoBranchCreationConfig;
        this._customRule = config.customRule;
    }
    // ==========
    // ATTRIBUTES
    // ==========
    // access_token - computed: false, optional: true, required: false
    _accessToken;
    get accessToken() {
        return this.getStringAttribute('access_token');
    }
    set accessToken(value) {
        this._accessToken = value;
    }
    resetAccessToken() {
        this._accessToken = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get accessTokenInput() {
        return this._accessToken;
    }
    // arn - computed: true, optional: false, required: false
    get arn() {
        return this.getStringAttribute('arn');
    }
    // auto_branch_creation_patterns - computed: false, optional: true, required: false
    _autoBranchCreationPatterns;
    get autoBranchCreationPatterns() {
        return cdktf.Fn.tolist(this.getListAttribute('auto_branch_creation_patterns'));
    }
    set autoBranchCreationPatterns(value) {
        this._autoBranchCreationPatterns = value;
    }
    resetAutoBranchCreationPatterns() {
        this._autoBranchCreationPatterns = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoBranchCreationPatternsInput() {
        return this._autoBranchCreationPatterns;
    }
    // basic_auth_credentials - computed: false, optional: true, required: false
    _basicAuthCredentials;
    get basicAuthCredentials() {
        return this.getStringAttribute('basic_auth_credentials');
    }
    set basicAuthCredentials(value) {
        this._basicAuthCredentials = value;
    }
    resetBasicAuthCredentials() {
        this._basicAuthCredentials = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get basicAuthCredentialsInput() {
        return this._basicAuthCredentials;
    }
    // build_spec - computed: true, optional: true, required: false
    _buildSpec;
    get buildSpec() {
        return this.getStringAttribute('build_spec');
    }
    set buildSpec(value) {
        this._buildSpec = value;
    }
    resetBuildSpec() {
        this._buildSpec = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get buildSpecInput() {
        return this._buildSpec;
    }
    // default_domain - computed: true, optional: false, required: false
    get defaultDomain() {
        return this.getStringAttribute('default_domain');
    }
    // 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;
    }
    // enable_auto_branch_creation - computed: false, optional: true, required: false
    _enableAutoBranchCreation;
    get enableAutoBranchCreation() {
        return this.getBooleanAttribute('enable_auto_branch_creation');
    }
    set enableAutoBranchCreation(value) {
        this._enableAutoBranchCreation = value;
    }
    resetEnableAutoBranchCreation() {
        this._enableAutoBranchCreation = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableAutoBranchCreationInput() {
        return this._enableAutoBranchCreation;
    }
    // enable_basic_auth - computed: false, optional: true, required: false
    _enableBasicAuth;
    get enableBasicAuth() {
        return this.getBooleanAttribute('enable_basic_auth');
    }
    set enableBasicAuth(value) {
        this._enableBasicAuth = value;
    }
    resetEnableBasicAuth() {
        this._enableBasicAuth = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableBasicAuthInput() {
        return this._enableBasicAuth;
    }
    // enable_branch_auto_build - computed: false, optional: true, required: false
    _enableBranchAutoBuild;
    get enableBranchAutoBuild() {
        return this.getBooleanAttribute('enable_branch_auto_build');
    }
    set enableBranchAutoBuild(value) {
        this._enableBranchAutoBuild = value;
    }
    resetEnableBranchAutoBuild() {
        this._enableBranchAutoBuild = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableBranchAutoBuildInput() {
        return this._enableBranchAutoBuild;
    }
    // enable_branch_auto_deletion - computed: false, optional: true, required: false
    _enableBranchAutoDeletion;
    get enableBranchAutoDeletion() {
        return this.getBooleanAttribute('enable_branch_auto_deletion');
    }
    set enableBranchAutoDeletion(value) {
        this._enableBranchAutoDeletion = value;
    }
    resetEnableBranchAutoDeletion() {
        this._enableBranchAutoDeletion = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get enableBranchAutoDeletionInput() {
        return this._enableBranchAutoDeletion;
    }
    // environment_variables - computed: false, optional: true, required: false
    _environmentVariables;
    get environmentVariables() {
        return this.getStringMapAttribute('environment_variables');
    }
    set environmentVariables(value) {
        this._environmentVariables = value;
    }
    resetEnvironmentVariables() {
        this._environmentVariables = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get environmentVariablesInput() {
        return this._environmentVariables;
    }
    // iam_service_role_arn - computed: false, optional: true, required: false
    _iamServiceRoleArn;
    get iamServiceRoleArn() {
        return this.getStringAttribute('iam_service_role_arn');
    }
    set iamServiceRoleArn(value) {
        this._iamServiceRoleArn = value;
    }
    resetIamServiceRoleArn() {
        this._iamServiceRoleArn = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get iamServiceRoleArnInput() {
        return this._iamServiceRoleArn;
    }
    // id - computed: true, optional: true, required: false
    get id() {
        return this.getStringAttribute('id');
    }
    // name - computed: false, optional: false, required: true
    _name;
    get name() {
        return this.getStringAttribute('name');
    }
    set name(value) {
        this._name = value;
    }
    // Temporarily expose input value. Use with caution.
    get nameInput() {
        return this._name;
    }
    // oauth_token - computed: false, optional: true, required: false
    _oauthToken;
    get oauthToken() {
        return this.getStringAttribute('oauth_token');
    }
    set oauthToken(value) {
        this._oauthToken = value;
    }
    resetOauthToken() {
        this._oauthToken = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get oauthTokenInput() {
        return this._oauthToken;
    }
    // platform - computed: false, optional: true, required: false
    _platform;
    get platform() {
        return this.getStringAttribute('platform');
    }
    set platform(value) {
        this._platform = value;
    }
    resetPlatform() {
        this._platform = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get platformInput() {
        return this._platform;
    }
    // production_branch - computed: true, optional: false, required: false
    productionBranch(index) {
        return new AmplifyAppProductionBranch(this, 'production_branch', index, false);
    }
    // repository - computed: false, optional: true, required: false
    _repository;
    get repository() {
        return this.getStringAttribute('repository');
    }
    set repository(value) {
        this._repository = value;
    }
    resetRepository() {
        this._repository = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get repositoryInput() {
        return this._repository;
    }
    // tags - computed: false, optional: true, required: false
    _tags;
    get tags() {
        return this.getStringMapAttribute('tags');
    }
    set tags(value) {
        this._tags = value;
    }
    resetTags() {
        this._tags = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsInput() {
        return this._tags;
    }
    // tags_all - computed: true, optional: true, required: false
    _tagsAll;
    get tagsAll() {
        return this.getStringMapAttribute('tags_all');
    }
    set tagsAll(value) {
        this._tagsAll = value;
    }
    resetTagsAll() {
        this._tagsAll = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get tagsAllInput() {
        return this._tagsAll;
    }
    // auto_branch_creation_config - computed: false, optional: true, required: false
    _autoBranchCreationConfig = new AmplifyAppAutoBranchCreationConfigOutputReference(this, "auto_branch_creation_config", true);
    get autoBranchCreationConfig() {
        return this._autoBranchCreationConfig;
    }
    putAutoBranchCreationConfig(value) {
        this._autoBranchCreationConfig.internalValue = value;
    }
    resetAutoBranchCreationConfig() {
        this._autoBranchCreationConfig.internalValue = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get autoBranchCreationConfigInput() {
        return this._autoBranchCreationConfig.internalValue;
    }
    // custom_rule - computed: false, optional: true, required: false
    _customRule;
    get customRule() {
        // Getting the computed value is not yet implemented
        return this.interpolationForAttribute('custom_rule');
    }
    set customRule(value) {
        this._customRule = value;
    }
    resetCustomRule() {
        this._customRule = undefined;
    }
    // Temporarily expose input value. Use with caution.
    get customRuleInput() {
        return this._customRule;
    }
    // =========
    // SYNTHESIS
    // =========
    synthesizeAttributes() {
        return {
            access_token: cdktf.stringToTerraform(this._accessToken),
            auto_branch_creation_patterns: cdktf.listMapper(cdktf.stringToTerraform)(this._autoBranchCreationPatterns),
            basic_auth_credentials: cdktf.stringToTerraform(this._basicAuthCredentials),
            build_spec: cdktf.stringToTerraform(this._buildSpec),
            description: cdktf.stringToTerraform(this._description),
            enable_auto_branch_creation: cdktf.booleanToTerraform(this._enableAutoBranchCreation),
            enable_basic_auth: cdktf.booleanToTerraform(this._enableBasicAuth),
            enable_branch_auto_build: cdktf.booleanToTerraform(this._enableBranchAutoBuild),
            enable_branch_auto_deletion: cdktf.booleanToTerraform(this._enableBranchAutoDeletion),
            environment_variables: cdktf.hashMapper(cdktf.stringToTerraform)(this._environmentVariables),
            iam_service_role_arn: cdktf.stringToTerraform(this._iamServiceRoleArn),
            name: cdktf.stringToTerraform(this._name),
            oauth_token: cdktf.stringToTerraform(this._oauthToken),
            platform: cdktf.stringToTerraform(this._platform),
            repository: cdktf.stringToTerraform(this._repository),
            tags: cdktf.hashMapper(cdktf.stringToTerraform)(this._tags),
            tags_all: cdktf.hashMapper(cdktf.stringToTerraform)(this._tagsAll),
            auto_branch_creation_config: amplifyAppAutoBranchCreationConfigToTerraform(this._autoBranchCreationConfig.internalValue),
            custom_rule: cdktf.listMapper(amplifyAppCustomRuleToTerraform)(this._customRule),
        };
    }
}
//# sourceMappingURL=amplify-app.js.map