@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,061 lines • 295 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GkeBackupBackupPlan = exports.GkeBackupBackupPlanTimeoutsOutputReference = exports.gkeBackupBackupPlanTimeoutsToHclTerraform = exports.gkeBackupBackupPlanTimeoutsToTerraform = exports.GkeBackupBackupPlanRetentionPolicyOutputReference = exports.gkeBackupBackupPlanRetentionPolicyToHclTerraform = exports.gkeBackupBackupPlanRetentionPolicyToTerraform = exports.GkeBackupBackupPlanBackupScheduleOutputReference = exports.gkeBackupBackupPlanBackupScheduleToHclTerraform = exports.gkeBackupBackupPlanBackupScheduleToTerraform = exports.GkeBackupBackupPlanBackupScheduleRpoConfigOutputReference = exports.gkeBackupBackupPlanBackupScheduleRpoConfigToHclTerraform = exports.gkeBackupBackupPlanBackupScheduleRpoConfigToTerraform = exports.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsList = exports.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsOutputReference = exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsToHclTerraform = exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsToTerraform = exports.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeOutputReference = exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToHclTerraform = exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToTerraform = exports.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateOutputReference = exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToHclTerraform = exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToTerraform = exports.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekOutputReference = exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToHclTerraform = exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToTerraform = exports.GkeBackupBackupPlanBackupConfigOutputReference = exports.gkeBackupBackupPlanBackupConfigToHclTerraform = exports.gkeBackupBackupPlanBackupConfigToTerraform = exports.GkeBackupBackupPlanBackupConfigSelectedNamespacesOutputReference = exports.gkeBackupBackupPlanBackupConfigSelectedNamespacesToHclTerraform = exports.gkeBackupBackupPlanBackupConfigSelectedNamespacesToTerraform = exports.GkeBackupBackupPlanBackupConfigSelectedApplicationsOutputReference = exports.gkeBackupBackupPlanBackupConfigSelectedApplicationsToHclTerraform = exports.gkeBackupBackupPlanBackupConfigSelectedApplicationsToTerraform = exports.GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesList = exports.GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesOutputReference = exports.gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToHclTerraform = exports.gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToTerraform = exports.GkeBackupBackupPlanBackupConfigEncryptionKeyOutputReference = exports.gkeBackupBackupPlanBackupConfigEncryptionKeyToHclTerraform = exports.gkeBackupBackupPlanBackupConfigEncryptionKeyToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function gkeBackupBackupPlanBackupConfigEncryptionKeyToTerraform(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 {
gcp_kms_encryption_key: cdktf.stringToTerraform(struct.gcpKmsEncryptionKey),
};
}
exports.gkeBackupBackupPlanBackupConfigEncryptionKeyToTerraform = gkeBackupBackupPlanBackupConfigEncryptionKeyToTerraform;
function gkeBackupBackupPlanBackupConfigEncryptionKeyToHclTerraform(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 = {
gcp_kms_encryption_key: {
value: cdktf.stringToHclTerraform(struct.gcpKmsEncryptionKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeBackupBackupPlanBackupConfigEncryptionKeyToHclTerraform = gkeBackupBackupPlanBackupConfigEncryptionKeyToHclTerraform;
class GkeBackupBackupPlanBackupConfigEncryptionKeyOutputReference 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._gcpKmsEncryptionKey !== undefined) {
hasAnyValues = true;
internalValueResult.gcpKmsEncryptionKey = this._gcpKmsEncryptionKey;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._gcpKmsEncryptionKey = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._gcpKmsEncryptionKey = value.gcpKmsEncryptionKey;
}
}
get gcpKmsEncryptionKey() {
return this.getStringAttribute('gcp_kms_encryption_key');
}
set gcpKmsEncryptionKey(value) {
this._gcpKmsEncryptionKey = value;
}
// Temporarily expose input value. Use with caution.
get gcpKmsEncryptionKeyInput() {
return this._gcpKmsEncryptionKey;
}
}
exports.GkeBackupBackupPlanBackupConfigEncryptionKeyOutputReference = GkeBackupBackupPlanBackupConfigEncryptionKeyOutputReference;
_a = JSII_RTTI_SYMBOL_1;
GkeBackupBackupPlanBackupConfigEncryptionKeyOutputReference[_a] = { fqn: "@cdktf/provider-google.gkeBackupBackupPlan.GkeBackupBackupPlanBackupConfigEncryptionKeyOutputReference", version: "14.12.0" };
function gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToTerraform(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),
namespace: cdktf.stringToTerraform(struct.namespace),
};
}
exports.gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToTerraform = gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToTerraform;
function gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToHclTerraform(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",
},
namespace: {
value: cdktf.stringToHclTerraform(struct.namespace),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToHclTerraform = gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToHclTerraform;
class GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesOutputReference 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._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._namespace !== undefined) {
hasAnyValues = true;
internalValueResult.namespace = this._namespace;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._name = undefined;
this._namespace = 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._namespace = value.namespace;
}
}
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 namespace() {
return this.getStringAttribute('namespace');
}
set namespace(value) {
this._namespace = value;
}
// Temporarily expose input value. Use with caution.
get namespaceInput() {
return this._namespace;
}
}
exports.GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesOutputReference = GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesOutputReference;
_b = JSII_RTTI_SYMBOL_1;
GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesOutputReference[_b] = { fqn: "@cdktf/provider-google.gkeBackupBackupPlan.GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesOutputReference", version: "14.12.0" };
class GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesList 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 GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesList = GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesList;
_c = JSII_RTTI_SYMBOL_1;
GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesList[_c] = { fqn: "@cdktf/provider-google.gkeBackupBackupPlan.GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesList", version: "14.12.0" };
function gkeBackupBackupPlanBackupConfigSelectedApplicationsToTerraform(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 {
namespaced_names: cdktf.listMapper(gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToTerraform, true)(struct.namespacedNames),
};
}
exports.gkeBackupBackupPlanBackupConfigSelectedApplicationsToTerraform = gkeBackupBackupPlanBackupConfigSelectedApplicationsToTerraform;
function gkeBackupBackupPlanBackupConfigSelectedApplicationsToHclTerraform(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 = {
namespaced_names: {
value: cdktf.listMapperHcl(gkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesToHclTerraform, true)(struct.namespacedNames),
isBlock: true,
type: "list",
storageClassType: "GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeBackupBackupPlanBackupConfigSelectedApplicationsToHclTerraform = gkeBackupBackupPlanBackupConfigSelectedApplicationsToHclTerraform;
class GkeBackupBackupPlanBackupConfigSelectedApplicationsOutputReference 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;
// namespaced_names - computed: false, optional: false, required: true
this._namespacedNames = new GkeBackupBackupPlanBackupConfigSelectedApplicationsNamespacedNamesList(this, "namespaced_names", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._namespacedNames?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.namespacedNames = this._namespacedNames?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._namespacedNames.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._namespacedNames.internalValue = value.namespacedNames;
}
}
get namespacedNames() {
return this._namespacedNames;
}
putNamespacedNames(value) {
this._namespacedNames.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get namespacedNamesInput() {
return this._namespacedNames.internalValue;
}
}
exports.GkeBackupBackupPlanBackupConfigSelectedApplicationsOutputReference = GkeBackupBackupPlanBackupConfigSelectedApplicationsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
GkeBackupBackupPlanBackupConfigSelectedApplicationsOutputReference[_d] = { fqn: "@cdktf/provider-google.gkeBackupBackupPlan.GkeBackupBackupPlanBackupConfigSelectedApplicationsOutputReference", version: "14.12.0" };
function gkeBackupBackupPlanBackupConfigSelectedNamespacesToTerraform(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 {
namespaces: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.namespaces),
};
}
exports.gkeBackupBackupPlanBackupConfigSelectedNamespacesToTerraform = gkeBackupBackupPlanBackupConfigSelectedNamespacesToTerraform;
function gkeBackupBackupPlanBackupConfigSelectedNamespacesToHclTerraform(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 = {
namespaces: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.namespaces),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeBackupBackupPlanBackupConfigSelectedNamespacesToHclTerraform = gkeBackupBackupPlanBackupConfigSelectedNamespacesToHclTerraform;
class GkeBackupBackupPlanBackupConfigSelectedNamespacesOutputReference 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._namespaces !== undefined) {
hasAnyValues = true;
internalValueResult.namespaces = this._namespaces;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._namespaces = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._namespaces = value.namespaces;
}
}
get namespaces() {
return this.getListAttribute('namespaces');
}
set namespaces(value) {
this._namespaces = value;
}
// Temporarily expose input value. Use with caution.
get namespacesInput() {
return this._namespaces;
}
}
exports.GkeBackupBackupPlanBackupConfigSelectedNamespacesOutputReference = GkeBackupBackupPlanBackupConfigSelectedNamespacesOutputReference;
_e = JSII_RTTI_SYMBOL_1;
GkeBackupBackupPlanBackupConfigSelectedNamespacesOutputReference[_e] = { fqn: "@cdktf/provider-google.gkeBackupBackupPlan.GkeBackupBackupPlanBackupConfigSelectedNamespacesOutputReference", version: "14.12.0" };
function gkeBackupBackupPlanBackupConfigToTerraform(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 {
all_namespaces: cdktf.booleanToTerraform(struct.allNamespaces),
include_secrets: cdktf.booleanToTerraform(struct.includeSecrets),
include_volume_data: cdktf.booleanToTerraform(struct.includeVolumeData),
permissive_mode: cdktf.booleanToTerraform(struct.permissiveMode),
encryption_key: gkeBackupBackupPlanBackupConfigEncryptionKeyToTerraform(struct.encryptionKey),
selected_applications: gkeBackupBackupPlanBackupConfigSelectedApplicationsToTerraform(struct.selectedApplications),
selected_namespaces: gkeBackupBackupPlanBackupConfigSelectedNamespacesToTerraform(struct.selectedNamespaces),
};
}
exports.gkeBackupBackupPlanBackupConfigToTerraform = gkeBackupBackupPlanBackupConfigToTerraform;
function gkeBackupBackupPlanBackupConfigToHclTerraform(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 = {
all_namespaces: {
value: cdktf.booleanToHclTerraform(struct.allNamespaces),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
include_secrets: {
value: cdktf.booleanToHclTerraform(struct.includeSecrets),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
include_volume_data: {
value: cdktf.booleanToHclTerraform(struct.includeVolumeData),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
permissive_mode: {
value: cdktf.booleanToHclTerraform(struct.permissiveMode),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
encryption_key: {
value: gkeBackupBackupPlanBackupConfigEncryptionKeyToHclTerraform(struct.encryptionKey),
isBlock: true,
type: "list",
storageClassType: "GkeBackupBackupPlanBackupConfigEncryptionKeyList",
},
selected_applications: {
value: gkeBackupBackupPlanBackupConfigSelectedApplicationsToHclTerraform(struct.selectedApplications),
isBlock: true,
type: "list",
storageClassType: "GkeBackupBackupPlanBackupConfigSelectedApplicationsList",
},
selected_namespaces: {
value: gkeBackupBackupPlanBackupConfigSelectedNamespacesToHclTerraform(struct.selectedNamespaces),
isBlock: true,
type: "list",
storageClassType: "GkeBackupBackupPlanBackupConfigSelectedNamespacesList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeBackupBackupPlanBackupConfigToHclTerraform = gkeBackupBackupPlanBackupConfigToHclTerraform;
class GkeBackupBackupPlanBackupConfigOutputReference 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;
// encryption_key - computed: false, optional: true, required: false
this._encryptionKey = new GkeBackupBackupPlanBackupConfigEncryptionKeyOutputReference(this, "encryption_key");
// selected_applications - computed: false, optional: true, required: false
this._selectedApplications = new GkeBackupBackupPlanBackupConfigSelectedApplicationsOutputReference(this, "selected_applications");
// selected_namespaces - computed: false, optional: true, required: false
this._selectedNamespaces = new GkeBackupBackupPlanBackupConfigSelectedNamespacesOutputReference(this, "selected_namespaces");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._allNamespaces !== undefined) {
hasAnyValues = true;
internalValueResult.allNamespaces = this._allNamespaces;
}
if (this._includeSecrets !== undefined) {
hasAnyValues = true;
internalValueResult.includeSecrets = this._includeSecrets;
}
if (this._includeVolumeData !== undefined) {
hasAnyValues = true;
internalValueResult.includeVolumeData = this._includeVolumeData;
}
if (this._permissiveMode !== undefined) {
hasAnyValues = true;
internalValueResult.permissiveMode = this._permissiveMode;
}
if (this._encryptionKey?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.encryptionKey = this._encryptionKey?.internalValue;
}
if (this._selectedApplications?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.selectedApplications = this._selectedApplications?.internalValue;
}
if (this._selectedNamespaces?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.selectedNamespaces = this._selectedNamespaces?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allNamespaces = undefined;
this._includeSecrets = undefined;
this._includeVolumeData = undefined;
this._permissiveMode = undefined;
this._encryptionKey.internalValue = undefined;
this._selectedApplications.internalValue = undefined;
this._selectedNamespaces.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allNamespaces = value.allNamespaces;
this._includeSecrets = value.includeSecrets;
this._includeVolumeData = value.includeVolumeData;
this._permissiveMode = value.permissiveMode;
this._encryptionKey.internalValue = value.encryptionKey;
this._selectedApplications.internalValue = value.selectedApplications;
this._selectedNamespaces.internalValue = value.selectedNamespaces;
}
}
get allNamespaces() {
return this.getBooleanAttribute('all_namespaces');
}
set allNamespaces(value) {
this._allNamespaces = value;
}
resetAllNamespaces() {
this._allNamespaces = undefined;
}
// Temporarily expose input value. Use with caution.
get allNamespacesInput() {
return this._allNamespaces;
}
get includeSecrets() {
return this.getBooleanAttribute('include_secrets');
}
set includeSecrets(value) {
this._includeSecrets = value;
}
resetIncludeSecrets() {
this._includeSecrets = undefined;
}
// Temporarily expose input value. Use with caution.
get includeSecretsInput() {
return this._includeSecrets;
}
get includeVolumeData() {
return this.getBooleanAttribute('include_volume_data');
}
set includeVolumeData(value) {
this._includeVolumeData = value;
}
resetIncludeVolumeData() {
this._includeVolumeData = undefined;
}
// Temporarily expose input value. Use with caution.
get includeVolumeDataInput() {
return this._includeVolumeData;
}
get permissiveMode() {
return this.getBooleanAttribute('permissive_mode');
}
set permissiveMode(value) {
this._permissiveMode = value;
}
resetPermissiveMode() {
this._permissiveMode = undefined;
}
// Temporarily expose input value. Use with caution.
get permissiveModeInput() {
return this._permissiveMode;
}
get encryptionKey() {
return this._encryptionKey;
}
putEncryptionKey(value) {
this._encryptionKey.internalValue = value;
}
resetEncryptionKey() {
this._encryptionKey.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get encryptionKeyInput() {
return this._encryptionKey.internalValue;
}
get selectedApplications() {
return this._selectedApplications;
}
putSelectedApplications(value) {
this._selectedApplications.internalValue = value;
}
resetSelectedApplications() {
this._selectedApplications.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get selectedApplicationsInput() {
return this._selectedApplications.internalValue;
}
get selectedNamespaces() {
return this._selectedNamespaces;
}
putSelectedNamespaces(value) {
this._selectedNamespaces.internalValue = value;
}
resetSelectedNamespaces() {
this._selectedNamespaces.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get selectedNamespacesInput() {
return this._selectedNamespaces.internalValue;
}
}
exports.GkeBackupBackupPlanBackupConfigOutputReference = GkeBackupBackupPlanBackupConfigOutputReference;
_f = JSII_RTTI_SYMBOL_1;
GkeBackupBackupPlanBackupConfigOutputReference[_f] = { fqn: "@cdktf/provider-google.gkeBackupBackupPlan.GkeBackupBackupPlanBackupConfigOutputReference", version: "14.12.0" };
function gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToTerraform(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 {
days_of_week: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.daysOfWeek),
};
}
exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToTerraform = gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToTerraform;
function gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToHclTerraform(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 = {
days_of_week: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.daysOfWeek),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToHclTerraform = gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToHclTerraform;
class GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekOutputReference 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._daysOfWeek !== undefined) {
hasAnyValues = true;
internalValueResult.daysOfWeek = this._daysOfWeek;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._daysOfWeek = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._daysOfWeek = value.daysOfWeek;
}
}
get daysOfWeek() {
return 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;
}
}
exports.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekOutputReference = GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekOutputReference;
_g = JSII_RTTI_SYMBOL_1;
GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekOutputReference[_g] = { fqn: "@cdktf/provider-google.gkeBackupBackupPlan.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekOutputReference", version: "14.12.0" };
function gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToTerraform(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 {
day: cdktf.numberToTerraform(struct.day),
month: cdktf.numberToTerraform(struct.month),
year: cdktf.numberToTerraform(struct.year),
};
}
exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToTerraform = gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToTerraform;
function gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToHclTerraform(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 = {
day: {
value: cdktf.numberToHclTerraform(struct.day),
isBlock: false,
type: "simple",
storageClassType: "number",
},
month: {
value: cdktf.numberToHclTerraform(struct.month),
isBlock: false,
type: "simple",
storageClassType: "number",
},
year: {
value: cdktf.numberToHclTerraform(struct.year),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToHclTerraform = gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToHclTerraform;
class GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateOutputReference 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._day !== undefined) {
hasAnyValues = true;
internalValueResult.day = this._day;
}
if (this._month !== undefined) {
hasAnyValues = true;
internalValueResult.month = this._month;
}
if (this._year !== undefined) {
hasAnyValues = true;
internalValueResult.year = this._year;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._day = undefined;
this._month = undefined;
this._year = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._day = value.day;
this._month = value.month;
this._year = value.year;
}
}
get day() {
return this.getNumberAttribute('day');
}
set day(value) {
this._day = value;
}
resetDay() {
this._day = undefined;
}
// Temporarily expose input value. Use with caution.
get dayInput() {
return this._day;
}
get month() {
return this.getNumberAttribute('month');
}
set month(value) {
this._month = value;
}
resetMonth() {
this._month = undefined;
}
// Temporarily expose input value. Use with caution.
get monthInput() {
return this._month;
}
get year() {
return this.getNumberAttribute('year');
}
set year(value) {
this._year = value;
}
resetYear() {
this._year = undefined;
}
// Temporarily expose input value. Use with caution.
get yearInput() {
return this._year;
}
}
exports.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateOutputReference = GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateOutputReference;
_h = JSII_RTTI_SYMBOL_1;
GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateOutputReference[_h] = { fqn: "@cdktf/provider-google.gkeBackupBackupPlan.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateOutputReference", version: "14.12.0" };
function gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToTerraform(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 {
hours: cdktf.numberToTerraform(struct.hours),
minutes: cdktf.numberToTerraform(struct.minutes),
nanos: cdktf.numberToTerraform(struct.nanos),
seconds: cdktf.numberToTerraform(struct.seconds),
};
}
exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToTerraform = gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToTerraform;
function gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToHclTerraform(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 = {
hours: {
value: cdktf.numberToHclTerraform(struct.hours),
isBlock: false,
type: "simple",
storageClassType: "number",
},
minutes: {
value: cdktf.numberToHclTerraform(struct.minutes),
isBlock: false,
type: "simple",
storageClassType: "number",
},
nanos: {
value: cdktf.numberToHclTerraform(struct.nanos),
isBlock: false,
type: "simple",
storageClassType: "number",
},
seconds: {
value: cdktf.numberToHclTerraform(struct.seconds),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToHclTerraform = gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToHclTerraform;
class GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeOutputReference 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._hours !== undefined) {
hasAnyValues = true;
internalValueResult.hours = this._hours;
}
if (this._minutes !== undefined) {
hasAnyValues = true;
internalValueResult.minutes = this._minutes;
}
if (this._nanos !== undefined) {
hasAnyValues = true;
internalValueResult.nanos = this._nanos;
}
if (this._seconds !== undefined) {
hasAnyValues = true;
internalValueResult.seconds = this._seconds;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._hours = undefined;
this._minutes = undefined;
this._nanos = undefined;
this._seconds = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._hours = value.hours;
this._minutes = value.minutes;
this._nanos = value.nanos;
this._seconds = value.seconds;
}
}
get hours() {
return this.getNumberAttribute('hours');
}
set hours(value) {
this._hours = value;
}
resetHours() {
this._hours = undefined;
}
// Temporarily expose input value. Use with caution.
get hoursInput() {
return this._hours;
}
get minutes() {
return this.getNumberAttribute('minutes');
}
set minutes(value) {
this._minutes = value;
}
resetMinutes() {
this._minutes = undefined;
}
// Temporarily expose input value. Use with caution.
get minutesInput() {
return this._minutes;
}
get nanos() {
return this.getNumberAttribute('nanos');
}
set nanos(value) {
this._nanos = value;
}
resetNanos() {
this._nanos = undefined;
}
// Temporarily expose input value. Use with caution.
get nanosInput() {
return this._nanos;
}
get seconds() {
return this.getNumberAttribute('seconds');
}
set seconds(value) {
this._seconds = value;
}
resetSeconds() {
this._seconds = undefined;
}
// Temporarily expose input value. Use with caution.
get secondsInput() {
return this._seconds;
}
}
exports.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeOutputReference = GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeOutputReference;
_j = JSII_RTTI_SYMBOL_1;
GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeOutputReference[_j] = { fqn: "@cdktf/provider-google.gkeBackupBackupPlan.GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeOutputReference", version: "14.12.0" };
function gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsToTerraform(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 {
daily: cdktf.booleanToTerraform(struct.daily),
duration: cdktf.stringToTerraform(struct.duration),
days_of_week: gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToTerraform(struct.daysOfWeek),
single_occurrence_date: gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToTerraform(struct.singleOccurrenceDate),
start_time: gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToTerraform(struct.startTime),
};
}
exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsToTerraform = gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsToTerraform;
function gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsToHclTerraform(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 = {
daily: {
value: cdktf.booleanToHclTerraform(struct.daily),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
duration: {
value: cdktf.stringToHclTerraform(struct.duration),
isBlock: false,
type: "simple",
storageClassType: "string",
},
days_of_week: {
value: gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekToHclTerraform(struct.daysOfWeek),
isBlock: true,
type: "list",
storageClassType: "GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekList",
},
single_occurrence_date: {
value: gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateToHclTerraform(struct.singleOccurrenceDate),
isBlock: true,
type: "list",
storageClassType: "GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateList",
},
start_time: {
value: gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeToHclTerraform(struct.startTime),
isBlock: true,
type: "list",
storageClassType: "GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsToHclTerraform = gkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsToHclTerraform;
class GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsOutputReference 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;
// days_of_week - computed: false, optional: true, required: false
this._daysOfWeek = new GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsDaysOfWeekOutputReference(this, "days_of_week");
// single_occurrence_date - computed: false, optional: true, required: false
this._singleOccurrenceDate = new GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsSingleOccurrenceDateOutputReference(this, "single_occurrence_date");
// start_time - computed: false, optional: false, required: true
this._startTime = new GkeBackupBackupPlanBackupScheduleRpoConfigExclusionWindowsStartTimeOutputReference(this, "start_time");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._daily !== undefined) {
hasAnyValues = true;
internalValueResult.daily = this._daily;
}
if (this._duration !== undefined) {
hasAnyValues = true;
internalValueResult.duration = this._duration;
}
if (this._daysOfWeek?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.daysOfWeek = this._daysOfWeek?.internalValue;
}
if (this._singleOccurrenceDate?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.singleOccurrenceDate = this._singleOccurrenceDate?.internalValue;
}
if (this._startTime?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.startTime = this._startTime?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._da