UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,156 lines (1,155 loc) 274 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q; Object.defineProperty(exports, "__esModule", { value: true }); exports.ClouddeployAutomation = exports.ClouddeployAutomationTimeoutsOutputReference = exports.ClouddeployAutomationSelectorOutputReference = exports.ClouddeployAutomationSelectorTargetsList = exports.ClouddeployAutomationSelectorTargetsOutputReference = exports.ClouddeployAutomationRulesList = exports.ClouddeployAutomationRulesOutputReference = exports.ClouddeployAutomationRulesTimedPromoteReleaseRuleOutputReference = exports.ClouddeployAutomationRulesRepairRolloutRuleOutputReference = exports.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesList = exports.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesOutputReference = exports.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackOutputReference = exports.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryOutputReference = exports.ClouddeployAutomationRulesPromoteReleaseRuleOutputReference = exports.ClouddeployAutomationRulesAdvanceRolloutRuleOutputReference = void 0; exports.clouddeployAutomationRulesAdvanceRolloutRuleToTerraform = clouddeployAutomationRulesAdvanceRolloutRuleToTerraform; exports.clouddeployAutomationRulesAdvanceRolloutRuleToHclTerraform = clouddeployAutomationRulesAdvanceRolloutRuleToHclTerraform; exports.clouddeployAutomationRulesPromoteReleaseRuleToTerraform = clouddeployAutomationRulesPromoteReleaseRuleToTerraform; exports.clouddeployAutomationRulesPromoteReleaseRuleToHclTerraform = clouddeployAutomationRulesPromoteReleaseRuleToHclTerraform; exports.clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryToTerraform = clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryToTerraform; exports.clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryToHclTerraform = clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryToHclTerraform; exports.clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackToTerraform = clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackToTerraform; exports.clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackToHclTerraform = clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackToHclTerraform; exports.clouddeployAutomationRulesRepairRolloutRuleRepairPhasesToTerraform = clouddeployAutomationRulesRepairRolloutRuleRepairPhasesToTerraform; exports.clouddeployAutomationRulesRepairRolloutRuleRepairPhasesToHclTerraform = clouddeployAutomationRulesRepairRolloutRuleRepairPhasesToHclTerraform; exports.clouddeployAutomationRulesRepairRolloutRuleToTerraform = clouddeployAutomationRulesRepairRolloutRuleToTerraform; exports.clouddeployAutomationRulesRepairRolloutRuleToHclTerraform = clouddeployAutomationRulesRepairRolloutRuleToHclTerraform; exports.clouddeployAutomationRulesTimedPromoteReleaseRuleToTerraform = clouddeployAutomationRulesTimedPromoteReleaseRuleToTerraform; exports.clouddeployAutomationRulesTimedPromoteReleaseRuleToHclTerraform = clouddeployAutomationRulesTimedPromoteReleaseRuleToHclTerraform; exports.clouddeployAutomationRulesToTerraform = clouddeployAutomationRulesToTerraform; exports.clouddeployAutomationRulesToHclTerraform = clouddeployAutomationRulesToHclTerraform; exports.clouddeployAutomationSelectorTargetsToTerraform = clouddeployAutomationSelectorTargetsToTerraform; exports.clouddeployAutomationSelectorTargetsToHclTerraform = clouddeployAutomationSelectorTargetsToHclTerraform; exports.clouddeployAutomationSelectorToTerraform = clouddeployAutomationSelectorToTerraform; exports.clouddeployAutomationSelectorToHclTerraform = clouddeployAutomationSelectorToHclTerraform; exports.clouddeployAutomationTimeoutsToTerraform = clouddeployAutomationTimeoutsToTerraform; exports.clouddeployAutomationTimeoutsToHclTerraform = clouddeployAutomationTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function clouddeployAutomationRulesAdvanceRolloutRuleToTerraform(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 { id: cdktf.stringToTerraform(struct.id), source_phases: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.sourcePhases), wait: cdktf.stringToTerraform(struct.wait), }; } function clouddeployAutomationRulesAdvanceRolloutRuleToHclTerraform(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"); } const attrs = { id: { value: cdktf.stringToHclTerraform(struct.id), isBlock: false, type: "simple", storageClassType: "string", }, source_phases: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.sourcePhases), isBlock: false, type: "list", storageClassType: "stringList", }, wait: { value: cdktf.stringToHclTerraform(struct.wait), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ClouddeployAutomationRulesAdvanceRolloutRuleOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._id !== undefined) { hasAnyValues = true; internalValueResult.id = this._id; } if (this._sourcePhases !== undefined) { hasAnyValues = true; internalValueResult.sourcePhases = this._sourcePhases; } if (this._wait !== undefined) { hasAnyValues = true; internalValueResult.wait = this._wait; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._id = undefined; this._sourcePhases = undefined; this._wait = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._id = value.id; this._sourcePhases = value.sourcePhases; this._wait = value.wait; } } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get sourcePhases() { return this.getListAttribute('source_phases'); } set sourcePhases(value) { this._sourcePhases = value; } resetSourcePhases() { this._sourcePhases = undefined; } // Temporarily expose input value. Use with caution. get sourcePhasesInput() { return this._sourcePhases; } get wait() { return this.getStringAttribute('wait'); } set wait(value) { this._wait = value; } resetWait() { this._wait = undefined; } // Temporarily expose input value. Use with caution. get waitInput() { return this._wait; } } exports.ClouddeployAutomationRulesAdvanceRolloutRuleOutputReference = ClouddeployAutomationRulesAdvanceRolloutRuleOutputReference; _a = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesAdvanceRolloutRuleOutputReference[_a] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesAdvanceRolloutRuleOutputReference", version: "16.3.0" }; function clouddeployAutomationRulesPromoteReleaseRuleToTerraform(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 { destination_phase: cdktf.stringToTerraform(struct.destinationPhase), destination_target_id: cdktf.stringToTerraform(struct.destinationTargetId), id: cdktf.stringToTerraform(struct.id), wait: cdktf.stringToTerraform(struct.wait), }; } function clouddeployAutomationRulesPromoteReleaseRuleToHclTerraform(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"); } const attrs = { destination_phase: { value: cdktf.stringToHclTerraform(struct.destinationPhase), isBlock: false, type: "simple", storageClassType: "string", }, destination_target_id: { value: cdktf.stringToHclTerraform(struct.destinationTargetId), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(struct.id), isBlock: false, type: "simple", storageClassType: "string", }, wait: { value: cdktf.stringToHclTerraform(struct.wait), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ClouddeployAutomationRulesPromoteReleaseRuleOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._destinationPhase !== undefined) { hasAnyValues = true; internalValueResult.destinationPhase = this._destinationPhase; } if (this._destinationTargetId !== undefined) { hasAnyValues = true; internalValueResult.destinationTargetId = this._destinationTargetId; } if (this._id !== undefined) { hasAnyValues = true; internalValueResult.id = this._id; } if (this._wait !== undefined) { hasAnyValues = true; internalValueResult.wait = this._wait; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._destinationPhase = undefined; this._destinationTargetId = undefined; this._id = undefined; this._wait = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._destinationPhase = value.destinationPhase; this._destinationTargetId = value.destinationTargetId; this._id = value.id; this._wait = value.wait; } } get destinationPhase() { return this.getStringAttribute('destination_phase'); } set destinationPhase(value) { this._destinationPhase = value; } resetDestinationPhase() { this._destinationPhase = undefined; } // Temporarily expose input value. Use with caution. get destinationPhaseInput() { return this._destinationPhase; } get destinationTargetId() { return this.getStringAttribute('destination_target_id'); } set destinationTargetId(value) { this._destinationTargetId = value; } resetDestinationTargetId() { this._destinationTargetId = undefined; } // Temporarily expose input value. Use with caution. get destinationTargetIdInput() { return this._destinationTargetId; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get wait() { return this.getStringAttribute('wait'); } set wait(value) { this._wait = value; } resetWait() { this._wait = undefined; } // Temporarily expose input value. Use with caution. get waitInput() { return this._wait; } } exports.ClouddeployAutomationRulesPromoteReleaseRuleOutputReference = ClouddeployAutomationRulesPromoteReleaseRuleOutputReference; _b = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesPromoteReleaseRuleOutputReference[_b] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesPromoteReleaseRuleOutputReference", version: "16.3.0" }; function clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryToTerraform(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 { attempts: cdktf.stringToTerraform(struct.attempts), backoff_mode: cdktf.stringToTerraform(struct.backoffMode), wait: cdktf.stringToTerraform(struct.wait), }; } function clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryToHclTerraform(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"); } const attrs = { attempts: { value: cdktf.stringToHclTerraform(struct.attempts), isBlock: false, type: "simple", storageClassType: "string", }, backoff_mode: { value: cdktf.stringToHclTerraform(struct.backoffMode), isBlock: false, type: "simple", storageClassType: "string", }, wait: { value: cdktf.stringToHclTerraform(struct.wait), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._attempts !== undefined) { hasAnyValues = true; internalValueResult.attempts = this._attempts; } if (this._backoffMode !== undefined) { hasAnyValues = true; internalValueResult.backoffMode = this._backoffMode; } if (this._wait !== undefined) { hasAnyValues = true; internalValueResult.wait = this._wait; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._attempts = undefined; this._backoffMode = undefined; this._wait = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._attempts = value.attempts; this._backoffMode = value.backoffMode; this._wait = value.wait; } } get attempts() { return this.getStringAttribute('attempts'); } set attempts(value) { this._attempts = value; } // Temporarily expose input value. Use with caution. get attemptsInput() { return this._attempts; } get backoffMode() { return this.getStringAttribute('backoff_mode'); } set backoffMode(value) { this._backoffMode = value; } resetBackoffMode() { this._backoffMode = undefined; } // Temporarily expose input value. Use with caution. get backoffModeInput() { return this._backoffMode; } get wait() { return this.getStringAttribute('wait'); } set wait(value) { this._wait = value; } resetWait() { this._wait = undefined; } // Temporarily expose input value. Use with caution. get waitInput() { return this._wait; } } exports.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryOutputReference = ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryOutputReference; _c = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryOutputReference[_c] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryOutputReference", version: "16.3.0" }; function clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackToTerraform(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 { destination_phase: cdktf.stringToTerraform(struct.destinationPhase), disable_rollback_if_rollout_pending: cdktf.booleanToTerraform(struct.disableRollbackIfRolloutPending), }; } function clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackToHclTerraform(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"); } const attrs = { destination_phase: { value: cdktf.stringToHclTerraform(struct.destinationPhase), isBlock: false, type: "simple", storageClassType: "string", }, disable_rollback_if_rollout_pending: { value: cdktf.booleanToHclTerraform(struct.disableRollbackIfRolloutPending), isBlock: false, type: "simple", storageClassType: "boolean", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._destinationPhase !== undefined) { hasAnyValues = true; internalValueResult.destinationPhase = this._destinationPhase; } if (this._disableRollbackIfRolloutPending !== undefined) { hasAnyValues = true; internalValueResult.disableRollbackIfRolloutPending = this._disableRollbackIfRolloutPending; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._destinationPhase = undefined; this._disableRollbackIfRolloutPending = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._destinationPhase = value.destinationPhase; this._disableRollbackIfRolloutPending = value.disableRollbackIfRolloutPending; } } get destinationPhase() { return this.getStringAttribute('destination_phase'); } set destinationPhase(value) { this._destinationPhase = value; } resetDestinationPhase() { this._destinationPhase = undefined; } // Temporarily expose input value. Use with caution. get destinationPhaseInput() { return this._destinationPhase; } get disableRollbackIfRolloutPending() { return this.getBooleanAttribute('disable_rollback_if_rollout_pending'); } set disableRollbackIfRolloutPending(value) { this._disableRollbackIfRolloutPending = value; } resetDisableRollbackIfRolloutPending() { this._disableRollbackIfRolloutPending = undefined; } // Temporarily expose input value. Use with caution. get disableRollbackIfRolloutPendingInput() { return this._disableRollbackIfRolloutPending; } } exports.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackOutputReference = ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackOutputReference; _d = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackOutputReference[_d] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackOutputReference", version: "16.3.0" }; function clouddeployAutomationRulesRepairRolloutRuleRepairPhasesToTerraform(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 { retry: clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryToTerraform(struct.retry), rollback: clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackToTerraform(struct.rollback), }; } function clouddeployAutomationRulesRepairRolloutRuleRepairPhasesToHclTerraform(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"); } const attrs = { retry: { value: clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryToHclTerraform(struct.retry), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryList", }, rollback: { value: clouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackToHclTerraform(struct.rollback), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; // retry - computed: false, optional: true, required: false this._retry = new ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRetryOutputReference(this, "retry"); // rollback - computed: false, optional: true, required: false this._rollback = new ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesRollbackOutputReference(this, "rollback"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._retry?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.retry = this._retry?.internalValue; } if (this._rollback?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.rollback = this._rollback?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._retry.internalValue = undefined; this._rollback.internalValue = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._retry.internalValue = value.retry; this._rollback.internalValue = value.rollback; } } get retry() { return this._retry; } putRetry(value) { this._retry.internalValue = value; } resetRetry() { this._retry.internalValue = undefined; } // Temporarily expose input value. Use with caution. get retryInput() { return this._retry.internalValue; } get rollback() { return this._rollback; } putRollback(value) { this._rollback.internalValue = value; } resetRollback() { this._rollback.internalValue = undefined; } // Temporarily expose input value. Use with caution. get rollbackInput() { return this._rollback.internalValue; } } exports.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesOutputReference = ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesOutputReference; _e = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesOutputReference[_e] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesOutputReference", version: "16.3.0" }; class ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, wrapsSet) { super(terraformResource, terraformAttribute, wrapsSet); this.terraformResource = terraformResource; this.terraformAttribute = terraformAttribute; this.wrapsSet = wrapsSet; } /** * @param index the index of the item to return */ get(index) { return new ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesList = ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesList; _f = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesList[_f] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesList", version: "16.3.0" }; function clouddeployAutomationRulesRepairRolloutRuleToTerraform(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 { id: cdktf.stringToTerraform(struct.id), jobs: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.jobs), phases: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.phases), repair_phases: cdktf.listMapper(clouddeployAutomationRulesRepairRolloutRuleRepairPhasesToTerraform, true)(struct.repairPhases), }; } function clouddeployAutomationRulesRepairRolloutRuleToHclTerraform(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"); } const attrs = { id: { value: cdktf.stringToHclTerraform(struct.id), isBlock: false, type: "simple", storageClassType: "string", }, jobs: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.jobs), isBlock: false, type: "list", storageClassType: "stringList", }, phases: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.phases), isBlock: false, type: "list", storageClassType: "stringList", }, repair_phases: { value: cdktf.listMapperHcl(clouddeployAutomationRulesRepairRolloutRuleRepairPhasesToHclTerraform, true)(struct.repairPhases), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ClouddeployAutomationRulesRepairRolloutRuleOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; // repair_phases - computed: false, optional: true, required: false this._repairPhases = new ClouddeployAutomationRulesRepairRolloutRuleRepairPhasesList(this, "repair_phases", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._id !== undefined) { hasAnyValues = true; internalValueResult.id = this._id; } if (this._jobs !== undefined) { hasAnyValues = true; internalValueResult.jobs = this._jobs; } if (this._phases !== undefined) { hasAnyValues = true; internalValueResult.phases = this._phases; } if (this._repairPhases?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.repairPhases = this._repairPhases?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._id = undefined; this._jobs = undefined; this._phases = undefined; this._repairPhases.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._id = value.id; this._jobs = value.jobs; this._phases = value.phases; this._repairPhases.internalValue = value.repairPhases; } } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get jobs() { return this.getListAttribute('jobs'); } set jobs(value) { this._jobs = value; } resetJobs() { this._jobs = undefined; } // Temporarily expose input value. Use with caution. get jobsInput() { return this._jobs; } get phases() { return this.getListAttribute('phases'); } set phases(value) { this._phases = value; } resetPhases() { this._phases = undefined; } // Temporarily expose input value. Use with caution. get phasesInput() { return this._phases; } get repairPhases() { return this._repairPhases; } putRepairPhases(value) { this._repairPhases.internalValue = value; } resetRepairPhases() { this._repairPhases.internalValue = undefined; } // Temporarily expose input value. Use with caution. get repairPhasesInput() { return this._repairPhases.internalValue; } } exports.ClouddeployAutomationRulesRepairRolloutRuleOutputReference = ClouddeployAutomationRulesRepairRolloutRuleOutputReference; _g = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesRepairRolloutRuleOutputReference[_g] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesRepairRolloutRuleOutputReference", version: "16.3.0" }; function clouddeployAutomationRulesTimedPromoteReleaseRuleToTerraform(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 { destination_phase: cdktf.stringToTerraform(struct.destinationPhase), destination_target_id: cdktf.stringToTerraform(struct.destinationTargetId), id: cdktf.stringToTerraform(struct.id), schedule: cdktf.stringToTerraform(struct.schedule), time_zone: cdktf.stringToTerraform(struct.timeZone), }; } function clouddeployAutomationRulesTimedPromoteReleaseRuleToHclTerraform(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"); } const attrs = { destination_phase: { value: cdktf.stringToHclTerraform(struct.destinationPhase), isBlock: false, type: "simple", storageClassType: "string", }, destination_target_id: { value: cdktf.stringToHclTerraform(struct.destinationTargetId), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(struct.id), isBlock: false, type: "simple", storageClassType: "string", }, schedule: { value: cdktf.stringToHclTerraform(struct.schedule), isBlock: false, type: "simple", storageClassType: "string", }, time_zone: { value: cdktf.stringToHclTerraform(struct.timeZone), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ClouddeployAutomationRulesTimedPromoteReleaseRuleOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._destinationPhase !== undefined) { hasAnyValues = true; internalValueResult.destinationPhase = this._destinationPhase; } if (this._destinationTargetId !== undefined) { hasAnyValues = true; internalValueResult.destinationTargetId = this._destinationTargetId; } if (this._id !== undefined) { hasAnyValues = true; internalValueResult.id = this._id; } if (this._schedule !== undefined) { hasAnyValues = true; internalValueResult.schedule = this._schedule; } if (this._timeZone !== undefined) { hasAnyValues = true; internalValueResult.timeZone = this._timeZone; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._destinationPhase = undefined; this._destinationTargetId = undefined; this._id = undefined; this._schedule = undefined; this._timeZone = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._destinationPhase = value.destinationPhase; this._destinationTargetId = value.destinationTargetId; this._id = value.id; this._schedule = value.schedule; this._timeZone = value.timeZone; } } get destinationPhase() { return this.getStringAttribute('destination_phase'); } set destinationPhase(value) { this._destinationPhase = value; } resetDestinationPhase() { this._destinationPhase = undefined; } // Temporarily expose input value. Use with caution. get destinationPhaseInput() { return this._destinationPhase; } get destinationTargetId() { return this.getStringAttribute('destination_target_id'); } set destinationTargetId(value) { this._destinationTargetId = value; } resetDestinationTargetId() { this._destinationTargetId = undefined; } // Temporarily expose input value. Use with caution. get destinationTargetIdInput() { return this._destinationTargetId; } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get schedule() { return this.getStringAttribute('schedule'); } set schedule(value) { this._schedule = value; } // Temporarily expose input value. Use with caution. get scheduleInput() { return this._schedule; } get timeZone() { return this.getStringAttribute('time_zone'); } set timeZone(value) { this._timeZone = value; } // Temporarily expose input value. Use with caution. get timeZoneInput() { return this._timeZone; } } exports.ClouddeployAutomationRulesTimedPromoteReleaseRuleOutputReference = ClouddeployAutomationRulesTimedPromoteReleaseRuleOutputReference; _h = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesTimedPromoteReleaseRuleOutputReference[_h] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesTimedPromoteReleaseRuleOutputReference", version: "16.3.0" }; function clouddeployAutomationRulesToTerraform(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 { advance_rollout_rule: clouddeployAutomationRulesAdvanceRolloutRuleToTerraform(struct.advanceRolloutRule), promote_release_rule: clouddeployAutomationRulesPromoteReleaseRuleToTerraform(struct.promoteReleaseRule), repair_rollout_rule: clouddeployAutomationRulesRepairRolloutRuleToTerraform(struct.repairRolloutRule), timed_promote_release_rule: clouddeployAutomationRulesTimedPromoteReleaseRuleToTerraform(struct.timedPromoteReleaseRule), }; } function clouddeployAutomationRulesToHclTerraform(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"); } const attrs = { advance_rollout_rule: { value: clouddeployAutomationRulesAdvanceRolloutRuleToHclTerraform(struct.advanceRolloutRule), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationRulesAdvanceRolloutRuleList", }, promote_release_rule: { value: clouddeployAutomationRulesPromoteReleaseRuleToHclTerraform(struct.promoteReleaseRule), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationRulesPromoteReleaseRuleList", }, repair_rollout_rule: { value: clouddeployAutomationRulesRepairRolloutRuleToHclTerraform(struct.repairRolloutRule), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationRulesRepairRolloutRuleList", }, timed_promote_release_rule: { value: clouddeployAutomationRulesTimedPromoteReleaseRuleToHclTerraform(struct.timedPromoteReleaseRule), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationRulesTimedPromoteReleaseRuleList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class ClouddeployAutomationRulesOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource, terraformAttribute, complexObjectIndex, complexObjectIsFromSet) { super(terraformResource, terraformAttribute, complexObjectIsFromSet, complexObjectIndex); this.isEmptyObject = false; // advance_rollout_rule - computed: false, optional: true, required: false this._advanceRolloutRule = new ClouddeployAutomationRulesAdvanceRolloutRuleOutputReference(this, "advance_rollout_rule"); // promote_release_rule - computed: false, optional: true, required: false this._promoteReleaseRule = new ClouddeployAutomationRulesPromoteReleaseRuleOutputReference(this, "promote_release_rule"); // repair_rollout_rule - computed: false, optional: true, required: false this._repairRolloutRule = new ClouddeployAutomationRulesRepairRolloutRuleOutputReference(this, "repair_rollout_rule"); // timed_promote_release_rule - computed: false, optional: true, required: false this._timedPromoteReleaseRule = new ClouddeployAutomationRulesTimedPromoteReleaseRuleOutputReference(this, "timed_promote_release_rule"); } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._advanceRolloutRule?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.advanceRolloutRule = this._advanceRolloutRule?.internalValue; } if (this._promoteReleaseRule?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.promoteReleaseRule = this._promoteReleaseRule?.internalValue; } if (this._repairRolloutRule?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.repairRolloutRule = this._repairRolloutRule?.internalValue; } if (this._timedPromoteReleaseRule?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.timedPromoteReleaseRule = this._timedPromoteReleaseRule?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._advanceRolloutRule.internalValue = undefined; this._promoteReleaseRule.internalValue = undefined; this._repairRolloutRule.internalValue = undefined; this._timedPromoteReleaseRule.internalValue = undefined; } else if (cdktf.Tokenization.isResolvable(value)) { this.isEmptyObject = false; this.resolvableValue = value; } else { this.isEmptyObject = Object.keys(value).length === 0; this.resolvableValue = undefined; this._advanceRolloutRule.internalValue = value.advanceRolloutRule; this._promoteReleaseRule.internalValue = value.promoteReleaseRule; this._repairRolloutRule.internalValue = value.repairRolloutRule; this._timedPromoteReleaseRule.internalValue = value.timedPromoteReleaseRule; } } get advanceRolloutRule() { return this._advanceRolloutRule; } putAdvanceRolloutRule(value) { this._advanceRolloutRule.internalValue = value; } resetAdvanceRolloutRule() { this._advanceRolloutRule.internalValue = undefined; } // Temporarily expose input value. Use with caution. get advanceRolloutRuleInput() { return this._advanceRolloutRule.internalValue; } get promoteReleaseRule() { return this._promoteReleaseRule; } putPromoteReleaseRule(value) { this._promoteReleaseRule.internalValue = value; } resetPromoteReleaseRule() { this._promoteReleaseRule.internalValue = undefined; } // Temporarily expose input value. Use with caution. get promoteReleaseRuleInput() { return this._promoteReleaseRule.internalValue; } get repairRolloutRule() { return this._repairRolloutRule; } putRepairRolloutRule(value) { this._repairRolloutRule.internalValue = value; } resetRepairRolloutRule() { this._repairRolloutRule.internalValue = undefined; } // Temporarily expose input value. Use with caution. get repairRolloutRuleInput() { return this._repairRolloutRule.internalValue; } get timedPromoteReleaseRule() { return this._timedPromoteReleaseRule; } putTimedPromoteReleaseRule(value) { this._timedPromoteReleaseRule.internalValue = value; } resetTimedPromoteReleaseRule() { this._timedPromoteReleaseRule.internalValue = undefined; } // Temporarily expose input value. Use with caution. get timedPromoteReleaseRuleInput() { return this._timedPromoteReleaseRule.internalValue; } } exports.ClouddeployAutomationRulesOutputReference = ClouddeployAutomationRulesOutputReference; _j = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesOutputReference[_j] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesOutputReference", version: "16.3.0" }; class ClouddeployAutomationRulesList extends cdktf.ComplexList { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing