@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,196 lines • 230 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ColabRuntimeTemplate = exports.ColabRuntimeTemplateTimeoutsOutputReference = exports.ColabRuntimeTemplateSoftwareConfigOutputReference = exports.ColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigOutputReference = exports.ColabRuntimeTemplateSoftwareConfigEnvList = exports.ColabRuntimeTemplateSoftwareConfigEnvOutputReference = exports.ColabRuntimeTemplateShieldedVmConfigOutputReference = exports.ColabRuntimeTemplateNetworkSpecOutputReference = exports.ColabRuntimeTemplateMachineSpecOutputReference = exports.ColabRuntimeTemplateIdleShutdownConfigOutputReference = exports.ColabRuntimeTemplateEucConfigOutputReference = exports.ColabRuntimeTemplateEncryptionSpecOutputReference = exports.ColabRuntimeTemplateDataPersistentDiskSpecOutputReference = void 0;
exports.colabRuntimeTemplateDataPersistentDiskSpecToTerraform = colabRuntimeTemplateDataPersistentDiskSpecToTerraform;
exports.colabRuntimeTemplateDataPersistentDiskSpecToHclTerraform = colabRuntimeTemplateDataPersistentDiskSpecToHclTerraform;
exports.colabRuntimeTemplateEncryptionSpecToTerraform = colabRuntimeTemplateEncryptionSpecToTerraform;
exports.colabRuntimeTemplateEncryptionSpecToHclTerraform = colabRuntimeTemplateEncryptionSpecToHclTerraform;
exports.colabRuntimeTemplateEucConfigToTerraform = colabRuntimeTemplateEucConfigToTerraform;
exports.colabRuntimeTemplateEucConfigToHclTerraform = colabRuntimeTemplateEucConfigToHclTerraform;
exports.colabRuntimeTemplateIdleShutdownConfigToTerraform = colabRuntimeTemplateIdleShutdownConfigToTerraform;
exports.colabRuntimeTemplateIdleShutdownConfigToHclTerraform = colabRuntimeTemplateIdleShutdownConfigToHclTerraform;
exports.colabRuntimeTemplateMachineSpecToTerraform = colabRuntimeTemplateMachineSpecToTerraform;
exports.colabRuntimeTemplateMachineSpecToHclTerraform = colabRuntimeTemplateMachineSpecToHclTerraform;
exports.colabRuntimeTemplateNetworkSpecToTerraform = colabRuntimeTemplateNetworkSpecToTerraform;
exports.colabRuntimeTemplateNetworkSpecToHclTerraform = colabRuntimeTemplateNetworkSpecToHclTerraform;
exports.colabRuntimeTemplateShieldedVmConfigToTerraform = colabRuntimeTemplateShieldedVmConfigToTerraform;
exports.colabRuntimeTemplateShieldedVmConfigToHclTerraform = colabRuntimeTemplateShieldedVmConfigToHclTerraform;
exports.colabRuntimeTemplateSoftwareConfigEnvToTerraform = colabRuntimeTemplateSoftwareConfigEnvToTerraform;
exports.colabRuntimeTemplateSoftwareConfigEnvToHclTerraform = colabRuntimeTemplateSoftwareConfigEnvToHclTerraform;
exports.colabRuntimeTemplateSoftwareConfigPostStartupScriptConfigToTerraform = colabRuntimeTemplateSoftwareConfigPostStartupScriptConfigToTerraform;
exports.colabRuntimeTemplateSoftwareConfigPostStartupScriptConfigToHclTerraform = colabRuntimeTemplateSoftwareConfigPostStartupScriptConfigToHclTerraform;
exports.colabRuntimeTemplateSoftwareConfigToTerraform = colabRuntimeTemplateSoftwareConfigToTerraform;
exports.colabRuntimeTemplateSoftwareConfigToHclTerraform = colabRuntimeTemplateSoftwareConfigToHclTerraform;
exports.colabRuntimeTemplateTimeoutsToTerraform = colabRuntimeTemplateTimeoutsToTerraform;
exports.colabRuntimeTemplateTimeoutsToHclTerraform = colabRuntimeTemplateTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function colabRuntimeTemplateDataPersistentDiskSpecToTerraform(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 {
disk_size_gb: cdktf.stringToTerraform(struct.diskSizeGb),
disk_type: cdktf.stringToTerraform(struct.diskType),
};
}
function colabRuntimeTemplateDataPersistentDiskSpecToHclTerraform(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 = {
disk_size_gb: {
value: cdktf.stringToHclTerraform(struct.diskSizeGb),
isBlock: false,
type: "simple",
storageClassType: "string",
},
disk_type: {
value: cdktf.stringToHclTerraform(struct.diskType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateDataPersistentDiskSpecOutputReference 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._diskSizeGb !== undefined) {
hasAnyValues = true;
internalValueResult.diskSizeGb = this._diskSizeGb;
}
if (this._diskType !== undefined) {
hasAnyValues = true;
internalValueResult.diskType = this._diskType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._diskSizeGb = undefined;
this._diskType = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._diskSizeGb = value.diskSizeGb;
this._diskType = value.diskType;
}
}
get diskSizeGb() {
return this.getStringAttribute('disk_size_gb');
}
set diskSizeGb(value) {
this._diskSizeGb = value;
}
resetDiskSizeGb() {
this._diskSizeGb = undefined;
}
// Temporarily expose input value. Use with caution.
get diskSizeGbInput() {
return this._diskSizeGb;
}
get diskType() {
return this.getStringAttribute('disk_type');
}
set diskType(value) {
this._diskType = value;
}
resetDiskType() {
this._diskType = undefined;
}
// Temporarily expose input value. Use with caution.
get diskTypeInput() {
return this._diskType;
}
}
exports.ColabRuntimeTemplateDataPersistentDiskSpecOutputReference = ColabRuntimeTemplateDataPersistentDiskSpecOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateDataPersistentDiskSpecOutputReference[_a] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateDataPersistentDiskSpecOutputReference", version: "14.35.1" };
function colabRuntimeTemplateEncryptionSpecToTerraform(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 {
kms_key_name: cdktf.stringToTerraform(struct.kmsKeyName),
};
}
function colabRuntimeTemplateEncryptionSpecToHclTerraform(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 = {
kms_key_name: {
value: cdktf.stringToHclTerraform(struct.kmsKeyName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateEncryptionSpecOutputReference 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._kmsKeyName !== undefined) {
hasAnyValues = true;
internalValueResult.kmsKeyName = this._kmsKeyName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._kmsKeyName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._kmsKeyName = value.kmsKeyName;
}
}
get kmsKeyName() {
return this.getStringAttribute('kms_key_name');
}
set kmsKeyName(value) {
this._kmsKeyName = value;
}
resetKmsKeyName() {
this._kmsKeyName = undefined;
}
// Temporarily expose input value. Use with caution.
get kmsKeyNameInput() {
return this._kmsKeyName;
}
}
exports.ColabRuntimeTemplateEncryptionSpecOutputReference = ColabRuntimeTemplateEncryptionSpecOutputReference;
_b = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateEncryptionSpecOutputReference[_b] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateEncryptionSpecOutputReference", version: "14.35.1" };
function colabRuntimeTemplateEucConfigToTerraform(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 {
euc_disabled: cdktf.booleanToTerraform(struct.eucDisabled),
};
}
function colabRuntimeTemplateEucConfigToHclTerraform(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 = {
euc_disabled: {
value: cdktf.booleanToHclTerraform(struct.eucDisabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateEucConfigOutputReference 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._eucDisabled !== undefined) {
hasAnyValues = true;
internalValueResult.eucDisabled = this._eucDisabled;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._eucDisabled = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._eucDisabled = value.eucDisabled;
}
}
get eucDisabled() {
return this.getBooleanAttribute('euc_disabled');
}
set eucDisabled(value) {
this._eucDisabled = value;
}
resetEucDisabled() {
this._eucDisabled = undefined;
}
// Temporarily expose input value. Use with caution.
get eucDisabledInput() {
return this._eucDisabled;
}
}
exports.ColabRuntimeTemplateEucConfigOutputReference = ColabRuntimeTemplateEucConfigOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateEucConfigOutputReference[_c] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateEucConfigOutputReference", version: "14.35.1" };
function colabRuntimeTemplateIdleShutdownConfigToTerraform(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 {
idle_timeout: cdktf.stringToTerraform(struct.idleTimeout),
};
}
function colabRuntimeTemplateIdleShutdownConfigToHclTerraform(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 = {
idle_timeout: {
value: cdktf.stringToHclTerraform(struct.idleTimeout),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateIdleShutdownConfigOutputReference 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._idleTimeout !== undefined) {
hasAnyValues = true;
internalValueResult.idleTimeout = this._idleTimeout;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._idleTimeout = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._idleTimeout = value.idleTimeout;
}
}
get idleTimeout() {
return this.getStringAttribute('idle_timeout');
}
set idleTimeout(value) {
this._idleTimeout = value;
}
resetIdleTimeout() {
this._idleTimeout = undefined;
}
// Temporarily expose input value. Use with caution.
get idleTimeoutInput() {
return this._idleTimeout;
}
}
exports.ColabRuntimeTemplateIdleShutdownConfigOutputReference = ColabRuntimeTemplateIdleShutdownConfigOutputReference;
_d = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateIdleShutdownConfigOutputReference[_d] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateIdleShutdownConfigOutputReference", version: "14.35.1" };
function colabRuntimeTemplateMachineSpecToTerraform(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 {
accelerator_count: cdktf.numberToTerraform(struct.acceleratorCount),
accelerator_type: cdktf.stringToTerraform(struct.acceleratorType),
machine_type: cdktf.stringToTerraform(struct.machineType),
};
}
function colabRuntimeTemplateMachineSpecToHclTerraform(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 = {
accelerator_count: {
value: cdktf.numberToHclTerraform(struct.acceleratorCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
accelerator_type: {
value: cdktf.stringToHclTerraform(struct.acceleratorType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
machine_type: {
value: cdktf.stringToHclTerraform(struct.machineType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateMachineSpecOutputReference 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._acceleratorCount !== undefined) {
hasAnyValues = true;
internalValueResult.acceleratorCount = this._acceleratorCount;
}
if (this._acceleratorType !== undefined) {
hasAnyValues = true;
internalValueResult.acceleratorType = this._acceleratorType;
}
if (this._machineType !== undefined) {
hasAnyValues = true;
internalValueResult.machineType = this._machineType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._acceleratorCount = undefined;
this._acceleratorType = undefined;
this._machineType = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._acceleratorCount = value.acceleratorCount;
this._acceleratorType = value.acceleratorType;
this._machineType = value.machineType;
}
}
get acceleratorCount() {
return this.getNumberAttribute('accelerator_count');
}
set acceleratorCount(value) {
this._acceleratorCount = value;
}
resetAcceleratorCount() {
this._acceleratorCount = undefined;
}
// Temporarily expose input value. Use with caution.
get acceleratorCountInput() {
return this._acceleratorCount;
}
get acceleratorType() {
return this.getStringAttribute('accelerator_type');
}
set acceleratorType(value) {
this._acceleratorType = value;
}
resetAcceleratorType() {
this._acceleratorType = undefined;
}
// Temporarily expose input value. Use with caution.
get acceleratorTypeInput() {
return this._acceleratorType;
}
get machineType() {
return this.getStringAttribute('machine_type');
}
set machineType(value) {
this._machineType = value;
}
resetMachineType() {
this._machineType = undefined;
}
// Temporarily expose input value. Use with caution.
get machineTypeInput() {
return this._machineType;
}
}
exports.ColabRuntimeTemplateMachineSpecOutputReference = ColabRuntimeTemplateMachineSpecOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateMachineSpecOutputReference[_e] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateMachineSpecOutputReference", version: "14.35.1" };
function colabRuntimeTemplateNetworkSpecToTerraform(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 {
enable_internet_access: cdktf.booleanToTerraform(struct.enableInternetAccess),
network: cdktf.stringToTerraform(struct.network),
subnetwork: cdktf.stringToTerraform(struct.subnetwork),
};
}
function colabRuntimeTemplateNetworkSpecToHclTerraform(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 = {
enable_internet_access: {
value: cdktf.booleanToHclTerraform(struct.enableInternetAccess),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
network: {
value: cdktf.stringToHclTerraform(struct.network),
isBlock: false,
type: "simple",
storageClassType: "string",
},
subnetwork: {
value: cdktf.stringToHclTerraform(struct.subnetwork),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateNetworkSpecOutputReference 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._enableInternetAccess !== undefined) {
hasAnyValues = true;
internalValueResult.enableInternetAccess = this._enableInternetAccess;
}
if (this._network !== undefined) {
hasAnyValues = true;
internalValueResult.network = this._network;
}
if (this._subnetwork !== undefined) {
hasAnyValues = true;
internalValueResult.subnetwork = this._subnetwork;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enableInternetAccess = undefined;
this._network = undefined;
this._subnetwork = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enableInternetAccess = value.enableInternetAccess;
this._network = value.network;
this._subnetwork = value.subnetwork;
}
}
get enableInternetAccess() {
return this.getBooleanAttribute('enable_internet_access');
}
set enableInternetAccess(value) {
this._enableInternetAccess = value;
}
resetEnableInternetAccess() {
this._enableInternetAccess = undefined;
}
// Temporarily expose input value. Use with caution.
get enableInternetAccessInput() {
return this._enableInternetAccess;
}
get network() {
return this.getStringAttribute('network');
}
set network(value) {
this._network = value;
}
resetNetwork() {
this._network = undefined;
}
// Temporarily expose input value. Use with caution.
get networkInput() {
return this._network;
}
get subnetwork() {
return this.getStringAttribute('subnetwork');
}
set subnetwork(value) {
this._subnetwork = value;
}
resetSubnetwork() {
this._subnetwork = undefined;
}
// Temporarily expose input value. Use with caution.
get subnetworkInput() {
return this._subnetwork;
}
}
exports.ColabRuntimeTemplateNetworkSpecOutputReference = ColabRuntimeTemplateNetworkSpecOutputReference;
_f = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateNetworkSpecOutputReference[_f] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateNetworkSpecOutputReference", version: "14.35.1" };
function colabRuntimeTemplateShieldedVmConfigToTerraform(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 {
enable_secure_boot: cdktf.booleanToTerraform(struct.enableSecureBoot),
};
}
function colabRuntimeTemplateShieldedVmConfigToHclTerraform(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 = {
enable_secure_boot: {
value: cdktf.booleanToHclTerraform(struct.enableSecureBoot),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateShieldedVmConfigOutputReference 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._enableSecureBoot !== undefined) {
hasAnyValues = true;
internalValueResult.enableSecureBoot = this._enableSecureBoot;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enableSecureBoot = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enableSecureBoot = value.enableSecureBoot;
}
}
get enableSecureBoot() {
return this.getBooleanAttribute('enable_secure_boot');
}
set enableSecureBoot(value) {
this._enableSecureBoot = value;
}
resetEnableSecureBoot() {
this._enableSecureBoot = undefined;
}
// Temporarily expose input value. Use with caution.
get enableSecureBootInput() {
return this._enableSecureBoot;
}
}
exports.ColabRuntimeTemplateShieldedVmConfigOutputReference = ColabRuntimeTemplateShieldedVmConfigOutputReference;
_g = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateShieldedVmConfigOutputReference[_g] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateShieldedVmConfigOutputReference", version: "14.35.1" };
function colabRuntimeTemplateSoftwareConfigEnvToTerraform(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),
value: cdktf.stringToTerraform(struct.value),
};
}
function colabRuntimeTemplateSoftwareConfigEnvToHclTerraform(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",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateSoftwareConfigEnvOutputReference 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._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._name = undefined;
this._value = 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._value = value.value;
}
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
resetValue() {
this._value = undefined;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.ColabRuntimeTemplateSoftwareConfigEnvOutputReference = ColabRuntimeTemplateSoftwareConfigEnvOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateSoftwareConfigEnvOutputReference[_h] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateSoftwareConfigEnvOutputReference", version: "14.35.1" };
class ColabRuntimeTemplateSoftwareConfigEnvList 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 ColabRuntimeTemplateSoftwareConfigEnvOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ColabRuntimeTemplateSoftwareConfigEnvList = ColabRuntimeTemplateSoftwareConfigEnvList;
_j = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateSoftwareConfigEnvList[_j] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateSoftwareConfigEnvList", version: "14.35.1" };
function colabRuntimeTemplateSoftwareConfigPostStartupScriptConfigToTerraform(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 {
post_startup_script: cdktf.stringToTerraform(struct.postStartupScript),
post_startup_script_behavior: cdktf.stringToTerraform(struct.postStartupScriptBehavior),
post_startup_script_url: cdktf.stringToTerraform(struct.postStartupScriptUrl),
};
}
function colabRuntimeTemplateSoftwareConfigPostStartupScriptConfigToHclTerraform(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 = {
post_startup_script: {
value: cdktf.stringToHclTerraform(struct.postStartupScript),
isBlock: false,
type: "simple",
storageClassType: "string",
},
post_startup_script_behavior: {
value: cdktf.stringToHclTerraform(struct.postStartupScriptBehavior),
isBlock: false,
type: "simple",
storageClassType: "string",
},
post_startup_script_url: {
value: cdktf.stringToHclTerraform(struct.postStartupScriptUrl),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigOutputReference 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._postStartupScript !== undefined) {
hasAnyValues = true;
internalValueResult.postStartupScript = this._postStartupScript;
}
if (this._postStartupScriptBehavior !== undefined) {
hasAnyValues = true;
internalValueResult.postStartupScriptBehavior = this._postStartupScriptBehavior;
}
if (this._postStartupScriptUrl !== undefined) {
hasAnyValues = true;
internalValueResult.postStartupScriptUrl = this._postStartupScriptUrl;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._postStartupScript = undefined;
this._postStartupScriptBehavior = undefined;
this._postStartupScriptUrl = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._postStartupScript = value.postStartupScript;
this._postStartupScriptBehavior = value.postStartupScriptBehavior;
this._postStartupScriptUrl = value.postStartupScriptUrl;
}
}
get postStartupScript() {
return this.getStringAttribute('post_startup_script');
}
set postStartupScript(value) {
this._postStartupScript = value;
}
resetPostStartupScript() {
this._postStartupScript = undefined;
}
// Temporarily expose input value. Use with caution.
get postStartupScriptInput() {
return this._postStartupScript;
}
get postStartupScriptBehavior() {
return this.getStringAttribute('post_startup_script_behavior');
}
set postStartupScriptBehavior(value) {
this._postStartupScriptBehavior = value;
}
resetPostStartupScriptBehavior() {
this._postStartupScriptBehavior = undefined;
}
// Temporarily expose input value. Use with caution.
get postStartupScriptBehaviorInput() {
return this._postStartupScriptBehavior;
}
get postStartupScriptUrl() {
return this.getStringAttribute('post_startup_script_url');
}
set postStartupScriptUrl(value) {
this._postStartupScriptUrl = value;
}
resetPostStartupScriptUrl() {
this._postStartupScriptUrl = undefined;
}
// Temporarily expose input value. Use with caution.
get postStartupScriptUrlInput() {
return this._postStartupScriptUrl;
}
}
exports.ColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigOutputReference = ColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigOutputReference;
_k = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigOutputReference[_k] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigOutputReference", version: "14.35.1" };
function colabRuntimeTemplateSoftwareConfigToTerraform(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 {
env: cdktf.listMapper(colabRuntimeTemplateSoftwareConfigEnvToTerraform, true)(struct.env),
post_startup_script_config: colabRuntimeTemplateSoftwareConfigPostStartupScriptConfigToTerraform(struct.postStartupScriptConfig),
};
}
function colabRuntimeTemplateSoftwareConfigToHclTerraform(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 = {
env: {
value: cdktf.listMapperHcl(colabRuntimeTemplateSoftwareConfigEnvToHclTerraform, true)(struct.env),
isBlock: true,
type: "list",
storageClassType: "ColabRuntimeTemplateSoftwareConfigEnvList",
},
post_startup_script_config: {
value: colabRuntimeTemplateSoftwareConfigPostStartupScriptConfigToHclTerraform(struct.postStartupScriptConfig),
isBlock: true,
type: "list",
storageClassType: "ColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class ColabRuntimeTemplateSoftwareConfigOutputReference 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;
// env - computed: false, optional: true, required: false
this._env = new ColabRuntimeTemplateSoftwareConfigEnvList(this, "env", false);
// post_startup_script_config - computed: false, optional: true, required: false
this._postStartupScriptConfig = new ColabRuntimeTemplateSoftwareConfigPostStartupScriptConfigOutputReference(this, "post_startup_script_config");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._env?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.env = this._env?.internalValue;
}
if (this._postStartupScriptConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.postStartupScriptConfig = this._postStartupScriptConfig?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._env.internalValue = undefined;
this._postStartupScriptConfig.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._env.internalValue = value.env;
this._postStartupScriptConfig.internalValue = value.postStartupScriptConfig;
}
}
get env() {
return this._env;
}
putEnv(value) {
this._env.internalValue = value;
}
resetEnv() {
this._env.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get envInput() {
return this._env.internalValue;
}
get postStartupScriptConfig() {
return this._postStartupScriptConfig;
}
putPostStartupScriptConfig(value) {
this._postStartupScriptConfig.internalValue = value;
}
resetPostStartupScriptConfig() {
this._postStartupScriptConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get postStartupScriptConfigInput() {
return this._postStartupScriptConfig.internalValue;
}
}
exports.ColabRuntimeTemplateSoftwareConfigOutputReference = ColabRuntimeTemplateSoftwareConfigOutputReference;
_l = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateSoftwareConfigOutputReference[_l] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateSoftwareConfigOutputReference", version: "14.35.1" };
function colabRuntimeTemplateTimeoutsToTerraform(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),
};
}
function colabRuntimeTemplateTimeoutsToHclTerraform(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));
}
class ColabRuntimeTemplateTimeoutsOutputReference 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.ColabRuntimeTemplateTimeoutsOutputReference = ColabRuntimeTemplateTimeoutsOutputReference;
_m = JSII_RTTI_SYMBOL_1;
ColabRuntimeTemplateTimeoutsOutputReference[_m] = { fqn: "@cdktf/provider-google.colabRuntimeTemplate.ColabRuntimeTemplateTimeoutsOutputReference", version: "14.35.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/colab_runtime_template google_colab_runtime_template}
*/
class ColabRuntimeTemplate extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ColabRuntimeTemplate 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 ColabRuntimeTemplate to import
* @param importFromId The id of the existing ColabRuntimeTemplate that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/colab_runtime_template#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ColabRuntimeTemplate to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_colab_runtime_template", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https:/