UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,126 lines 161 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j; Object.defineProperty(exports, "__esModule", { value: true }); exports.ClouddeployAutomation = exports.ClouddeployAutomationTimeoutsOutputReference = exports.clouddeployAutomationTimeoutsToHclTerraform = exports.clouddeployAutomationTimeoutsToTerraform = exports.ClouddeployAutomationSelectorOutputReference = exports.clouddeployAutomationSelectorToHclTerraform = exports.clouddeployAutomationSelectorToTerraform = exports.ClouddeployAutomationSelectorTargetsList = exports.ClouddeployAutomationSelectorTargetsOutputReference = exports.clouddeployAutomationSelectorTargetsToHclTerraform = exports.clouddeployAutomationSelectorTargetsToTerraform = exports.ClouddeployAutomationRulesList = exports.ClouddeployAutomationRulesOutputReference = exports.clouddeployAutomationRulesToHclTerraform = exports.clouddeployAutomationRulesToTerraform = exports.ClouddeployAutomationRulesPromoteReleaseRuleOutputReference = exports.clouddeployAutomationRulesPromoteReleaseRuleToHclTerraform = exports.clouddeployAutomationRulesPromoteReleaseRuleToTerraform = exports.ClouddeployAutomationRulesAdvanceRolloutRuleOutputReference = exports.clouddeployAutomationRulesAdvanceRolloutRuleToHclTerraform = exports.clouddeployAutomationRulesAdvanceRolloutRuleToTerraform = void 0; 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), }; } exports.clouddeployAutomationRulesAdvanceRolloutRuleToTerraform = clouddeployAutomationRulesAdvanceRolloutRuleToTerraform; 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)); } exports.clouddeployAutomationRulesAdvanceRolloutRuleToHclTerraform = clouddeployAutomationRulesAdvanceRolloutRuleToHclTerraform; 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: "14.12.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), }; } exports.clouddeployAutomationRulesPromoteReleaseRuleToTerraform = clouddeployAutomationRulesPromoteReleaseRuleToTerraform; 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)); } exports.clouddeployAutomationRulesPromoteReleaseRuleToHclTerraform = clouddeployAutomationRulesPromoteReleaseRuleToHclTerraform; 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: "14.12.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), }; } exports.clouddeployAutomationRulesToTerraform = clouddeployAutomationRulesToTerraform; 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", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.clouddeployAutomationRulesToHclTerraform = clouddeployAutomationRulesToHclTerraform; 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"); } 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; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._advanceRolloutRule.internalValue = undefined; this._promoteReleaseRule.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; } } 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; } } exports.ClouddeployAutomationRulesOutputReference = ClouddeployAutomationRulesOutputReference; _c = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesOutputReference[_c] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesOutputReference", version: "14.12.0" }; class ClouddeployAutomationRulesList 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 ClouddeployAutomationRulesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ClouddeployAutomationRulesList = ClouddeployAutomationRulesList; _d = JSII_RTTI_SYMBOL_1; ClouddeployAutomationRulesList[_d] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationRulesList", version: "14.12.0" }; function clouddeployAutomationSelectorTargetsToTerraform(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), labels: cdktf.hashMapper(cdktf.stringToTerraform)(struct.labels), }; } exports.clouddeployAutomationSelectorTargetsToTerraform = clouddeployAutomationSelectorTargetsToTerraform; function clouddeployAutomationSelectorTargetsToHclTerraform(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", }, labels: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.labels), isBlock: false, type: "map", storageClassType: "stringMap", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.clouddeployAutomationSelectorTargetsToHclTerraform = clouddeployAutomationSelectorTargetsToHclTerraform; class ClouddeployAutomationSelectorTargetsOutputReference 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; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._id !== undefined) { hasAnyValues = true; internalValueResult.id = this._id; } if (this._labels !== undefined) { hasAnyValues = true; internalValueResult.labels = this._labels; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._id = undefined; this._labels = 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._id = value.id; this._labels = value.labels; } } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get labels() { return this.getStringMapAttribute('labels'); } set labels(value) { this._labels = value; } resetLabels() { this._labels = undefined; } // Temporarily expose input value. Use with caution. get labelsInput() { return this._labels; } } exports.ClouddeployAutomationSelectorTargetsOutputReference = ClouddeployAutomationSelectorTargetsOutputReference; _e = JSII_RTTI_SYMBOL_1; ClouddeployAutomationSelectorTargetsOutputReference[_e] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationSelectorTargetsOutputReference", version: "14.12.0" }; class ClouddeployAutomationSelectorTargetsList 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 ClouddeployAutomationSelectorTargetsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet); } } exports.ClouddeployAutomationSelectorTargetsList = ClouddeployAutomationSelectorTargetsList; _f = JSII_RTTI_SYMBOL_1; ClouddeployAutomationSelectorTargetsList[_f] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationSelectorTargetsList", version: "14.12.0" }; function clouddeployAutomationSelectorToTerraform(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 { targets: cdktf.listMapper(clouddeployAutomationSelectorTargetsToTerraform, true)(struct.targets), }; } exports.clouddeployAutomationSelectorToTerraform = clouddeployAutomationSelectorToTerraform; function clouddeployAutomationSelectorToHclTerraform(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 = { targets: { value: cdktf.listMapperHcl(clouddeployAutomationSelectorTargetsToHclTerraform, true)(struct.targets), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationSelectorTargetsList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.clouddeployAutomationSelectorToHclTerraform = clouddeployAutomationSelectorToHclTerraform; class ClouddeployAutomationSelectorOutputReference 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; // targets - computed: false, optional: false, required: true this._targets = new ClouddeployAutomationSelectorTargetsList(this, "targets", false); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._targets?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.targets = this._targets?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._targets.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._targets.internalValue = value.targets; } } get targets() { return this._targets; } putTargets(value) { this._targets.internalValue = value; } // Temporarily expose input value. Use with caution. get targetsInput() { return this._targets.internalValue; } } exports.ClouddeployAutomationSelectorOutputReference = ClouddeployAutomationSelectorOutputReference; _g = JSII_RTTI_SYMBOL_1; ClouddeployAutomationSelectorOutputReference[_g] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationSelectorOutputReference", version: "14.12.0" }; function clouddeployAutomationTimeoutsToTerraform(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 { create: cdktf.stringToTerraform(struct.create), delete: cdktf.stringToTerraform(struct.delete), update: cdktf.stringToTerraform(struct.update), }; } exports.clouddeployAutomationTimeoutsToTerraform = clouddeployAutomationTimeoutsToTerraform; function clouddeployAutomationTimeoutsToHclTerraform(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 = { create: { value: cdktf.stringToHclTerraform(struct.create), isBlock: false, type: "simple", storageClassType: "string", }, delete: { value: cdktf.stringToHclTerraform(struct.delete), isBlock: false, type: "simple", storageClassType: "string", }, update: { value: cdktf.stringToHclTerraform(struct.update), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } exports.clouddeployAutomationTimeoutsToHclTerraform = clouddeployAutomationTimeoutsToHclTerraform; class ClouddeployAutomationTimeoutsOutputReference 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); this.isEmptyObject = false; } get internalValue() { if (this.resolvableValue) { return this.resolvableValue; } let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._create !== undefined) { hasAnyValues = true; internalValueResult.create = this._create; } if (this._delete !== undefined) { hasAnyValues = true; internalValueResult.delete = this._delete; } if (this._update !== undefined) { hasAnyValues = true; internalValueResult.update = this._update; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this.resolvableValue = undefined; this._create = undefined; this._delete = undefined; this._update = 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._create = value.create; this._delete = value.delete; this._update = value.update; } } get create() { return this.getStringAttribute('create'); } set create(value) { this._create = value; } resetCreate() { this._create = undefined; } // Temporarily expose input value. Use with caution. get createInput() { return this._create; } 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; } get update() { return this.getStringAttribute('update'); } set update(value) { this._update = value; } resetUpdate() { this._update = undefined; } // Temporarily expose input value. Use with caution. get updateInput() { return this._update; } } exports.ClouddeployAutomationTimeoutsOutputReference = ClouddeployAutomationTimeoutsOutputReference; _h = JSII_RTTI_SYMBOL_1; ClouddeployAutomationTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomationTimeoutsOutputReference", version: "14.12.0" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/clouddeploy_automation google_clouddeploy_automation} */ class ClouddeployAutomation extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a ClouddeployAutomation resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the ClouddeployAutomation to import * @param importFromId The id of the existing ClouddeployAutomation that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/clouddeploy_automation#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the ClouddeployAutomation to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_clouddeploy_automation", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/clouddeploy_automation google_clouddeploy_automation} 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 ClouddeployAutomationConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_clouddeploy_automation', terraformGeneratorMetadata: { providerName: 'google', providerVersion: '6.13.0', providerVersionConstraint: '~> 6.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // effective_annotations - computed: true, optional: false, required: false this._effectiveAnnotations = new cdktf.StringMap(this, "effective_annotations"); // effective_labels - computed: true, optional: false, required: false this._effectiveLabels = new cdktf.StringMap(this, "effective_labels"); // terraform_labels - computed: true, optional: false, required: false this._terraformLabels = new cdktf.StringMap(this, "terraform_labels"); // rules - computed: false, optional: false, required: true this._rules = new ClouddeployAutomationRulesList(this, "rules", false); // selector - computed: false, optional: false, required: true this._selector = new ClouddeployAutomationSelectorOutputReference(this, "selector"); // timeouts - computed: false, optional: true, required: false this._timeouts = new ClouddeployAutomationTimeoutsOutputReference(this, "timeouts"); this._annotations = config.annotations; this._deliveryPipeline = config.deliveryPipeline; this._description = config.description; this._id = config.id; this._labels = config.labels; this._location = config.location; this._name = config.name; this._project = config.project; this._serviceAccount = config.serviceAccount; this._suspended = config.suspended; this._rules.internalValue = config.rules; this._selector.internalValue = config.selector; this._timeouts.internalValue = config.timeouts; } get annotations() { return this.getStringMapAttribute('annotations'); } set annotations(value) { this._annotations = value; } resetAnnotations() { this._annotations = undefined; } // Temporarily expose input value. Use with caution. get annotationsInput() { return this._annotations; } // create_time - computed: true, optional: false, required: false get createTime() { return this.getStringAttribute('create_time'); } get deliveryPipeline() { return this.getStringAttribute('delivery_pipeline'); } set deliveryPipeline(value) { this._deliveryPipeline = value; } // Temporarily expose input value. Use with caution. get deliveryPipelineInput() { return this._deliveryPipeline; } 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; } get effectiveAnnotations() { return this._effectiveAnnotations; } get effectiveLabels() { return this._effectiveLabels; } // etag - computed: true, optional: false, required: false get etag() { return this.getStringAttribute('etag'); } get id() { return this.getStringAttribute('id'); } set id(value) { this._id = value; } resetId() { this._id = undefined; } // Temporarily expose input value. Use with caution. get idInput() { return this._id; } get labels() { return this.getStringMapAttribute('labels'); } set labels(value) { this._labels = value; } resetLabels() { this._labels = undefined; } // Temporarily expose input value. Use with caution. get labelsInput() { return this._labels; } get location() { return this.getStringAttribute('location'); } set location(value) { this._location = value; } // Temporarily expose input value. Use with caution. get locationInput() { return this._location; } get name() { return this.getStringAttribute('name'); } set name(value) { this._name = value; } // Temporarily expose input value. Use with caution. get nameInput() { return this._name; } get project() { return this.getStringAttribute('project'); } set project(value) { this._project = value; } resetProject() { this._project = undefined; } // Temporarily expose input value. Use with caution. get projectInput() { return this._project; } get serviceAccount() { return this.getStringAttribute('service_account'); } set serviceAccount(value) { this._serviceAccount = value; } // Temporarily expose input value. Use with caution. get serviceAccountInput() { return this._serviceAccount; } get suspended() { return this.getBooleanAttribute('suspended'); } set suspended(value) { this._suspended = value; } resetSuspended() { this._suspended = undefined; } // Temporarily expose input value. Use with caution. get suspendedInput() { return this._suspended; } get terraformLabels() { return this._terraformLabels; } // uid - computed: true, optional: false, required: false get uid() { return this.getStringAttribute('uid'); } // update_time - computed: true, optional: false, required: false get updateTime() { return this.getStringAttribute('update_time'); } get rules() { return this._rules; } putRules(value) { this._rules.internalValue = value; } // Temporarily expose input value. Use with caution. get rulesInput() { return this._rules.internalValue; } get selector() { return this._selector; } putSelector(value) { this._selector.internalValue = value; } // Temporarily expose input value. Use with caution. get selectorInput() { return this._selector.internalValue; } 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 { annotations: cdktf.hashMapper(cdktf.stringToTerraform)(this._annotations), delivery_pipeline: cdktf.stringToTerraform(this._deliveryPipeline), description: cdktf.stringToTerraform(this._description), id: cdktf.stringToTerraform(this._id), labels: cdktf.hashMapper(cdktf.stringToTerraform)(this._labels), location: cdktf.stringToTerraform(this._location), name: cdktf.stringToTerraform(this._name), project: cdktf.stringToTerraform(this._project), service_account: cdktf.stringToTerraform(this._serviceAccount), suspended: cdktf.booleanToTerraform(this._suspended), rules: cdktf.listMapper(clouddeployAutomationRulesToTerraform, true)(this._rules.internalValue), selector: clouddeployAutomationSelectorToTerraform(this._selector.internalValue), timeouts: clouddeployAutomationTimeoutsToTerraform(this._timeouts.internalValue), }; } synthesizeHclAttributes() { const attrs = { annotations: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._annotations), isBlock: false, type: "map", storageClassType: "stringMap", }, delivery_pipeline: { value: cdktf.stringToHclTerraform(this._deliveryPipeline), isBlock: false, type: "simple", storageClassType: "string", }, description: { value: cdktf.stringToHclTerraform(this._description), isBlock: false, type: "simple", storageClassType: "string", }, id: { value: cdktf.stringToHclTerraform(this._id), isBlock: false, type: "simple", storageClassType: "string", }, labels: { value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._labels), isBlock: false, type: "map", storageClassType: "stringMap", }, location: { value: cdktf.stringToHclTerraform(this._location), isBlock: false, type: "simple", storageClassType: "string", }, name: { value: cdktf.stringToHclTerraform(this._name), isBlock: false, type: "simple", storageClassType: "string", }, project: { value: cdktf.stringToHclTerraform(this._project), isBlock: false, type: "simple", storageClassType: "string", }, service_account: { value: cdktf.stringToHclTerraform(this._serviceAccount), isBlock: false, type: "simple", storageClassType: "string", }, suspended: { value: cdktf.booleanToHclTerraform(this._suspended), isBlock: false, type: "simple", storageClassType: "boolean", }, rules: { value: cdktf.listMapperHcl(clouddeployAutomationRulesToHclTerraform, true)(this._rules.internalValue), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationRulesList", }, selector: { value: clouddeployAutomationSelectorToHclTerraform(this._selector.internalValue), isBlock: true, type: "list", storageClassType: "ClouddeployAutomationSelectorList", }, timeouts: { value: clouddeployAutomationTimeoutsToHclTerraform(this._timeouts.internalValue), isBlock: true, type: "struct", storageClassType: "ClouddeployAutomationTimeouts", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } } exports.ClouddeployAutomation = ClouddeployAutomation; _j = JSII_RTTI_SYMBOL_1; ClouddeployAutomation[_j] = { fqn: "@cdktf/provider-google.clouddeployAutomation.ClouddeployAutomation", version: "14.12.0" }; // ================= // STATIC PROPERTIES // ================= ClouddeployAutomation.tfResourceType = "google_clouddeploy_automation"; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMv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