@cdktf/provider-azurerm
Version:
Prebuilt azurerm Provider for Terraform CDK (cdktf)
1,079 lines • 164 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataProtectionBackupPolicyKubernetesCluster = exports.DataProtectionBackupPolicyKubernetesClusterTimeoutsOutputReference = exports.dataProtectionBackupPolicyKubernetesClusterTimeoutsToHclTerraform = exports.dataProtectionBackupPolicyKubernetesClusterTimeoutsToTerraform = exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleList = exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleOutputReference = exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleToHclTerraform = exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleToTerraform = exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleList = exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleOutputReference = exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToHclTerraform = exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToTerraform = exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaOutputReference = exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToHclTerraform = exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToTerraform = exports.DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleOutputReference = exports.dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToHclTerraform = exports.dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToTerraform = exports.DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleList = exports.DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleOutputReference = exports.dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToHclTerraform = exports.dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToTerraform(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 {
data_store_type: cdktf.stringToTerraform(struct.dataStoreType),
duration: cdktf.stringToTerraform(struct.duration),
};
}
exports.dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToTerraform = dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToTerraform;
function dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToHclTerraform(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 = {
data_store_type: {
value: cdktf.stringToHclTerraform(struct.dataStoreType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
duration: {
value: cdktf.stringToHclTerraform(struct.duration),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToHclTerraform = dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToHclTerraform;
class DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleOutputReference 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._dataStoreType !== undefined) {
hasAnyValues = true;
internalValueResult.dataStoreType = this._dataStoreType;
}
if (this._duration !== undefined) {
hasAnyValues = true;
internalValueResult.duration = this._duration;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._dataStoreType = undefined;
this._duration = 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._dataStoreType = value.dataStoreType;
this._duration = value.duration;
}
}
get dataStoreType() {
return this.getStringAttribute('data_store_type');
}
set dataStoreType(value) {
this._dataStoreType = value;
}
// Temporarily expose input value. Use with caution.
get dataStoreTypeInput() {
return this._dataStoreType;
}
get duration() {
return this.getStringAttribute('duration');
}
set duration(value) {
this._duration = value;
}
// Temporarily expose input value. Use with caution.
get durationInput() {
return this._duration;
}
}
exports.DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleOutputReference = DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleOutputReference;
_a = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleOutputReference[_a] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleOutputReference", version: "12.27.0" };
class DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleList 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 DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleList = DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleList;
_b = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleList[_b] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleList", version: "12.27.0" };
function dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToTerraform(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 {
life_cycle: cdktf.listMapper(dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToTerraform, true)(struct.lifeCycle),
};
}
exports.dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToTerraform = dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToTerraform;
function dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToHclTerraform(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 = {
life_cycle: {
value: cdktf.listMapperHcl(dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleToHclTerraform, true)(struct.lifeCycle),
isBlock: true,
type: "list",
storageClassType: "DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToHclTerraform = dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToHclTerraform;
class DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleOutputReference 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;
// life_cycle - computed: false, optional: false, required: true
this._lifeCycle = new DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleLifeCycleList(this, "life_cycle", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._lifeCycle?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.lifeCycle = this._lifeCycle?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._lifeCycle.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._lifeCycle.internalValue = value.lifeCycle;
}
}
get lifeCycle() {
return this._lifeCycle;
}
putLifeCycle(value) {
this._lifeCycle.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get lifeCycleInput() {
return this._lifeCycle.internalValue;
}
}
exports.DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleOutputReference = DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleOutputReference;
_c = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleOutputReference[_c] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleOutputReference", version: "12.27.0" };
function dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToTerraform(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 {
absolute_criteria: cdktf.stringToTerraform(struct.absoluteCriteria),
days_of_week: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.daysOfWeek),
months_of_year: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.monthsOfYear),
scheduled_backup_times: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.scheduledBackupTimes),
weeks_of_month: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.weeksOfMonth),
};
}
exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToTerraform = dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToTerraform;
function dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToHclTerraform(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 = {
absolute_criteria: {
value: cdktf.stringToHclTerraform(struct.absoluteCriteria),
isBlock: false,
type: "simple",
storageClassType: "string",
},
days_of_week: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.daysOfWeek),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
months_of_year: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.monthsOfYear),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
scheduled_backup_times: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.scheduledBackupTimes),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
weeks_of_month: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.weeksOfMonth),
isBlock: false,
type: "set",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToHclTerraform = dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToHclTerraform;
class DataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaOutputReference 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._absoluteCriteria !== undefined) {
hasAnyValues = true;
internalValueResult.absoluteCriteria = this._absoluteCriteria;
}
if (this._daysOfWeek !== undefined) {
hasAnyValues = true;
internalValueResult.daysOfWeek = this._daysOfWeek;
}
if (this._monthsOfYear !== undefined) {
hasAnyValues = true;
internalValueResult.monthsOfYear = this._monthsOfYear;
}
if (this._scheduledBackupTimes !== undefined) {
hasAnyValues = true;
internalValueResult.scheduledBackupTimes = this._scheduledBackupTimes;
}
if (this._weeksOfMonth !== undefined) {
hasAnyValues = true;
internalValueResult.weeksOfMonth = this._weeksOfMonth;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._absoluteCriteria = undefined;
this._daysOfWeek = undefined;
this._monthsOfYear = undefined;
this._scheduledBackupTimes = undefined;
this._weeksOfMonth = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._absoluteCriteria = value.absoluteCriteria;
this._daysOfWeek = value.daysOfWeek;
this._monthsOfYear = value.monthsOfYear;
this._scheduledBackupTimes = value.scheduledBackupTimes;
this._weeksOfMonth = value.weeksOfMonth;
}
}
get absoluteCriteria() {
return this.getStringAttribute('absolute_criteria');
}
set absoluteCriteria(value) {
this._absoluteCriteria = value;
}
resetAbsoluteCriteria() {
this._absoluteCriteria = undefined;
}
// Temporarily expose input value. Use with caution.
get absoluteCriteriaInput() {
return this._absoluteCriteria;
}
get daysOfWeek() {
return cdktf.Fn.tolist(this.getListAttribute('days_of_week'));
}
set daysOfWeek(value) {
this._daysOfWeek = value;
}
resetDaysOfWeek() {
this._daysOfWeek = undefined;
}
// Temporarily expose input value. Use with caution.
get daysOfWeekInput() {
return this._daysOfWeek;
}
get monthsOfYear() {
return cdktf.Fn.tolist(this.getListAttribute('months_of_year'));
}
set monthsOfYear(value) {
this._monthsOfYear = value;
}
resetMonthsOfYear() {
this._monthsOfYear = undefined;
}
// Temporarily expose input value. Use with caution.
get monthsOfYearInput() {
return this._monthsOfYear;
}
get scheduledBackupTimes() {
return cdktf.Fn.tolist(this.getListAttribute('scheduled_backup_times'));
}
set scheduledBackupTimes(value) {
this._scheduledBackupTimes = value;
}
resetScheduledBackupTimes() {
this._scheduledBackupTimes = undefined;
}
// Temporarily expose input value. Use with caution.
get scheduledBackupTimesInput() {
return this._scheduledBackupTimes;
}
get weeksOfMonth() {
return cdktf.Fn.tolist(this.getListAttribute('weeks_of_month'));
}
set weeksOfMonth(value) {
this._weeksOfMonth = value;
}
resetWeeksOfMonth() {
this._weeksOfMonth = undefined;
}
// Temporarily expose input value. Use with caution.
get weeksOfMonthInput() {
return this._weeksOfMonth;
}
}
exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaOutputReference = DataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaOutputReference;
_d = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaOutputReference[_d] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaOutputReference", version: "12.27.0" };
function dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToTerraform(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 {
data_store_type: cdktf.stringToTerraform(struct.dataStoreType),
duration: cdktf.stringToTerraform(struct.duration),
};
}
exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToTerraform = dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToTerraform;
function dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToHclTerraform(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 = {
data_store_type: {
value: cdktf.stringToHclTerraform(struct.dataStoreType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
duration: {
value: cdktf.stringToHclTerraform(struct.duration),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToHclTerraform = dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToHclTerraform;
class DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleOutputReference 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._dataStoreType !== undefined) {
hasAnyValues = true;
internalValueResult.dataStoreType = this._dataStoreType;
}
if (this._duration !== undefined) {
hasAnyValues = true;
internalValueResult.duration = this._duration;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._dataStoreType = undefined;
this._duration = 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._dataStoreType = value.dataStoreType;
this._duration = value.duration;
}
}
get dataStoreType() {
return this.getStringAttribute('data_store_type');
}
set dataStoreType(value) {
this._dataStoreType = value;
}
// Temporarily expose input value. Use with caution.
get dataStoreTypeInput() {
return this._dataStoreType;
}
get duration() {
return this.getStringAttribute('duration');
}
set duration(value) {
this._duration = value;
}
// Temporarily expose input value. Use with caution.
get durationInput() {
return this._duration;
}
}
exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleOutputReference = DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleOutputReference;
_e = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleOutputReference[_e] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleOutputReference", version: "12.27.0" };
class DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleList 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 DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleList = DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleList;
_f = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleList[_f] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleList", version: "12.27.0" };
function dataProtectionBackupPolicyKubernetesClusterRetentionRuleToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
priority: cdktf.numberToTerraform(struct.priority),
criteria: dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToTerraform(struct.criteria),
life_cycle: cdktf.listMapper(dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToTerraform, true)(struct.lifeCycle),
};
}
exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleToTerraform = dataProtectionBackupPolicyKubernetesClusterRetentionRuleToTerraform;
function dataProtectionBackupPolicyKubernetesClusterRetentionRuleToHclTerraform(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 = {
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
priority: {
value: cdktf.numberToHclTerraform(struct.priority),
isBlock: false,
type: "simple",
storageClassType: "number",
},
criteria: {
value: dataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaToHclTerraform(struct.criteria),
isBlock: true,
type: "list",
storageClassType: "DataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaList",
},
life_cycle: {
value: cdktf.listMapperHcl(dataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleToHclTerraform, true)(struct.lifeCycle),
isBlock: true,
type: "list",
storageClassType: "DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dataProtectionBackupPolicyKubernetesClusterRetentionRuleToHclTerraform = dataProtectionBackupPolicyKubernetesClusterRetentionRuleToHclTerraform;
class DataProtectionBackupPolicyKubernetesClusterRetentionRuleOutputReference 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;
// criteria - computed: false, optional: false, required: true
this._criteria = new DataProtectionBackupPolicyKubernetesClusterRetentionRuleCriteriaOutputReference(this, "criteria");
// life_cycle - computed: false, optional: false, required: true
this._lifeCycle = new DataProtectionBackupPolicyKubernetesClusterRetentionRuleLifeCycleList(this, "life_cycle", false);
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._priority !== undefined) {
hasAnyValues = true;
internalValueResult.priority = this._priority;
}
if (this._criteria?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.criteria = this._criteria?.internalValue;
}
if (this._lifeCycle?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.lifeCycle = this._lifeCycle?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._name = undefined;
this._priority = undefined;
this._criteria.internalValue = undefined;
this._lifeCycle.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._name = value.name;
this._priority = value.priority;
this._criteria.internalValue = value.criteria;
this._lifeCycle.internalValue = value.lifeCycle;
}
}
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 priority() {
return this.getNumberAttribute('priority');
}
set priority(value) {
this._priority = value;
}
// Temporarily expose input value. Use with caution.
get priorityInput() {
return this._priority;
}
get criteria() {
return this._criteria;
}
putCriteria(value) {
this._criteria.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get criteriaInput() {
return this._criteria.internalValue;
}
get lifeCycle() {
return this._lifeCycle;
}
putLifeCycle(value) {
this._lifeCycle.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get lifeCycleInput() {
return this._lifeCycle.internalValue;
}
}
exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleOutputReference = DataProtectionBackupPolicyKubernetesClusterRetentionRuleOutputReference;
_g = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesClusterRetentionRuleOutputReference[_g] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesClusterRetentionRuleOutputReference", version: "12.27.0" };
class DataProtectionBackupPolicyKubernetesClusterRetentionRuleList 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 DataProtectionBackupPolicyKubernetesClusterRetentionRuleOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DataProtectionBackupPolicyKubernetesClusterRetentionRuleList = DataProtectionBackupPolicyKubernetesClusterRetentionRuleList;
_h = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesClusterRetentionRuleList[_h] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesClusterRetentionRuleList", version: "12.27.0" };
function dataProtectionBackupPolicyKubernetesClusterTimeoutsToTerraform(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),
read: cdktf.stringToTerraform(struct.read),
};
}
exports.dataProtectionBackupPolicyKubernetesClusterTimeoutsToTerraform = dataProtectionBackupPolicyKubernetesClusterTimeoutsToTerraform;
function dataProtectionBackupPolicyKubernetesClusterTimeoutsToHclTerraform(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",
},
read: {
value: cdktf.stringToHclTerraform(struct.read),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dataProtectionBackupPolicyKubernetesClusterTimeoutsToHclTerraform = dataProtectionBackupPolicyKubernetesClusterTimeoutsToHclTerraform;
class DataProtectionBackupPolicyKubernetesClusterTimeoutsOutputReference 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._read !== undefined) {
hasAnyValues = true;
internalValueResult.read = this._read;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._create = undefined;
this._delete = undefined;
this._read = 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._read = value.read;
}
}
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 read() {
return this.getStringAttribute('read');
}
set read(value) {
this._read = value;
}
resetRead() {
this._read = undefined;
}
// Temporarily expose input value. Use with caution.
get readInput() {
return this._read;
}
}
exports.DataProtectionBackupPolicyKubernetesClusterTimeoutsOutputReference = DataProtectionBackupPolicyKubernetesClusterTimeoutsOutputReference;
_j = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesClusterTimeoutsOutputReference[_j] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesClusterTimeoutsOutputReference", version: "12.27.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/data_protection_backup_policy_kubernetes_cluster azurerm_data_protection_backup_policy_kubernetes_cluster}
*/
class DataProtectionBackupPolicyKubernetesCluster extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a DataProtectionBackupPolicyKubernetesCluster 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 DataProtectionBackupPolicyKubernetesCluster to import
* @param importFromId The id of the existing DataProtectionBackupPolicyKubernetesCluster that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/data_protection_backup_policy_kubernetes_cluster#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the DataProtectionBackupPolicyKubernetesCluster to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "azurerm_data_protection_backup_policy_kubernetes_cluster", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/azurerm/3.116.0/docs/resources/data_protection_backup_policy_kubernetes_cluster azurerm_data_protection_backup_policy_kubernetes_cluster} 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 DataProtectionBackupPolicyKubernetesClusterConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'azurerm_data_protection_backup_policy_kubernetes_cluster',
terraformGeneratorMetadata: {
providerName: 'azurerm',
providerVersion: '3.116.0',
providerVersionConstraint: '~> 3.10'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// default_retention_rule - computed: false, optional: false, required: true
this._defaultRetentionRule = new DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleOutputReference(this, "default_retention_rule");
// retention_rule - computed: false, optional: true, required: false
this._retentionRule = new DataProtectionBackupPolicyKubernetesClusterRetentionRuleList(this, "retention_rule", false);
// timeouts - computed: false, optional: true, required: false
this._timeouts = new DataProtectionBackupPolicyKubernetesClusterTimeoutsOutputReference(this, "timeouts");
this._backupRepeatingTimeIntervals = config.backupRepeatingTimeIntervals;
this._id = config.id;
this._name = config.name;
this._resourceGroupName = config.resourceGroupName;
this._timeZone = config.timeZone;
this._vaultName = config.vaultName;
this._defaultRetentionRule.internalValue = config.defaultRetentionRule;
this._retentionRule.internalValue = config.retentionRule;
this._timeouts.internalValue = config.timeouts;
}
get backupRepeatingTimeIntervals() {
return this.getListAttribute('backup_repeating_time_intervals');
}
set backupRepeatingTimeIntervals(value) {
this._backupRepeatingTimeIntervals = value;
}
// Temporarily expose input value. Use with caution.
get backupRepeatingTimeIntervalsInput() {
return this._backupRepeatingTimeIntervals;
}
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 name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get resourceGroupName() {
return this.getStringAttribute('resource_group_name');
}
set resourceGroupName(value) {
this._resourceGroupName = value;
}
// Temporarily expose input value. Use with caution.
get resourceGroupNameInput() {
return this._resourceGroupName;
}
get timeZone() {
return this.getStringAttribute('time_zone');
}
set timeZone(value) {
this._timeZone = value;
}
resetTimeZone() {
this._timeZone = undefined;
}
// Temporarily expose input value. Use with caution.
get timeZoneInput() {
return this._timeZone;
}
get vaultName() {
return this.getStringAttribute('vault_name');
}
set vaultName(value) {
this._vaultName = value;
}
// Temporarily expose input value. Use with caution.
get vaultNameInput() {
return this._vaultName;
}
get defaultRetentionRule() {
return this._defaultRetentionRule;
}
putDefaultRetentionRule(value) {
this._defaultRetentionRule.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get defaultRetentionRuleInput() {
return this._defaultRetentionRule.internalValue;
}
get retentionRule() {
return this._retentionRule;
}
putRetentionRule(value) {
this._retentionRule.internalValue = value;
}
resetRetentionRule() {
this._retentionRule.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get retentionRuleInput() {
return this._retentionRule.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 {
backup_repeating_time_intervals: cdktf.listMapper(cdktf.stringToTerraform, false)(this._backupRepeatingTimeIntervals),
id: cdktf.stringToTerraform(this._id),
name: cdktf.stringToTerraform(this._name),
resource_group_name: cdktf.stringToTerraform(this._resourceGroupName),
time_zone: cdktf.stringToTerraform(this._timeZone),
vault_name: cdktf.stringToTerraform(this._vaultName),
default_retention_rule: dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToTerraform(this._defaultRetentionRule.internalValue),
retention_rule: cdktf.listMapper(dataProtectionBackupPolicyKubernetesClusterRetentionRuleToTerraform, true)(this._retentionRule.internalValue),
timeouts: dataProtectionBackupPolicyKubernetesClusterTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
backup_repeating_time_intervals: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(this._backupRepeatingTimeIntervals),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
resource_group_name: {
value: cdktf.stringToHclTerraform(this._resourceGroupName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
time_zone: {
value: cdktf.stringToHclTerraform(this._timeZone),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vault_name: {
value: cdktf.stringToHclTerraform(this._vaultName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
default_retention_rule: {
value: dataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleToHclTerraform(this._defaultRetentionRule.internalValue),
isBlock: true,
type: "list",
storageClassType: "DataProtectionBackupPolicyKubernetesClusterDefaultRetentionRuleList",
},
retention_rule: {
value: cdktf.listMapperHcl(dataProtectionBackupPolicyKubernetesClusterRetentionRuleToHclTerraform, true)(this._retentionRule.internalValue),
isBlock: true,
type: "list",
storageClassType: "DataProtectionBackupPolicyKubernetesClusterRetentionRuleList",
},
timeouts: {
value: dataProtectionBackupPolicyKubernetesClusterTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "DataProtectionBackupPolicyKubernetesClusterTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.DataProtectionBackupPolicyKubernetesCluster = DataProtectionBackupPolicyKubernetesCluster;
_k = JSII_RTTI_SYMBOL_1;
DataProtectionBackupPolicyKubernetesCluster[_k] = { fqn: "@cdktf/provider-azurerm.dataProtectionBackupPolicyKubernetesCluster.DataProtectionBackupPolicyKubernetesCluster", version: "12.27.0" };
// =================
// STATIC PROPERTIES
// ==