@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,329 lines • 217 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.NotebooksInstance = exports.NotebooksInstanceVmImageOutputReference = exports.notebooksInstanceVmImageToHclTerraform = exports.notebooksInstanceVmImageToTerraform = exports.NotebooksInstanceTimeoutsOutputReference = exports.notebooksInstanceTimeoutsToHclTerraform = exports.notebooksInstanceTimeoutsToTerraform = exports.NotebooksInstanceShieldedInstanceConfigOutputReference = exports.notebooksInstanceShieldedInstanceConfigToHclTerraform = exports.notebooksInstanceShieldedInstanceConfigToTerraform = exports.NotebooksInstanceReservationAffinityOutputReference = exports.notebooksInstanceReservationAffinityToHclTerraform = exports.notebooksInstanceReservationAffinityToTerraform = exports.NotebooksInstanceContainerImageOutputReference = exports.notebooksInstanceContainerImageToHclTerraform = exports.notebooksInstanceContainerImageToTerraform = exports.NotebooksInstanceAcceleratorConfigOutputReference = exports.notebooksInstanceAcceleratorConfigToHclTerraform = exports.notebooksInstanceAcceleratorConfigToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function notebooksInstanceAcceleratorConfigToTerraform(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 {
core_count: cdktf.numberToTerraform(struct.coreCount),
type: cdktf.stringToTerraform(struct.type),
};
}
exports.notebooksInstanceAcceleratorConfigToTerraform = notebooksInstanceAcceleratorConfigToTerraform;
function notebooksInstanceAcceleratorConfigToHclTerraform(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 = {
core_count: {
value: cdktf.numberToHclTerraform(struct.coreCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.notebooksInstanceAcceleratorConfigToHclTerraform = notebooksInstanceAcceleratorConfigToHclTerraform;
class NotebooksInstanceAcceleratorConfigOutputReference 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._coreCount !== undefined) {
hasAnyValues = true;
internalValueResult.coreCount = this._coreCount;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._coreCount = undefined;
this._type = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._coreCount = value.coreCount;
this._type = value.type;
}
}
get coreCount() {
return this.getNumberAttribute('core_count');
}
set coreCount(value) {
this._coreCount = value;
}
// Temporarily expose input value. Use with caution.
get coreCountInput() {
return this._coreCount;
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.NotebooksInstanceAcceleratorConfigOutputReference = NotebooksInstanceAcceleratorConfigOutputReference;
_a = JSII_RTTI_SYMBOL_1;
NotebooksInstanceAcceleratorConfigOutputReference[_a] = { fqn: "@cdktf/provider-google.notebooksInstance.NotebooksInstanceAcceleratorConfigOutputReference", version: "14.12.0" };
function notebooksInstanceContainerImageToTerraform(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 {
repository: cdktf.stringToTerraform(struct.repository),
tag: cdktf.stringToTerraform(struct.tag),
};
}
exports.notebooksInstanceContainerImageToTerraform = notebooksInstanceContainerImageToTerraform;
function notebooksInstanceContainerImageToHclTerraform(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 = {
repository: {
value: cdktf.stringToHclTerraform(struct.repository),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tag: {
value: cdktf.stringToHclTerraform(struct.tag),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.notebooksInstanceContainerImageToHclTerraform = notebooksInstanceContainerImageToHclTerraform;
class NotebooksInstanceContainerImageOutputReference 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._repository !== undefined) {
hasAnyValues = true;
internalValueResult.repository = this._repository;
}
if (this._tag !== undefined) {
hasAnyValues = true;
internalValueResult.tag = this._tag;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._repository = undefined;
this._tag = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._repository = value.repository;
this._tag = value.tag;
}
}
get repository() {
return this.getStringAttribute('repository');
}
set repository(value) {
this._repository = value;
}
// Temporarily expose input value. Use with caution.
get repositoryInput() {
return this._repository;
}
get tag() {
return this.getStringAttribute('tag');
}
set tag(value) {
this._tag = value;
}
resetTag() {
this._tag = undefined;
}
// Temporarily expose input value. Use with caution.
get tagInput() {
return this._tag;
}
}
exports.NotebooksInstanceContainerImageOutputReference = NotebooksInstanceContainerImageOutputReference;
_b = JSII_RTTI_SYMBOL_1;
NotebooksInstanceContainerImageOutputReference[_b] = { fqn: "@cdktf/provider-google.notebooksInstance.NotebooksInstanceContainerImageOutputReference", version: "14.12.0" };
function notebooksInstanceReservationAffinityToTerraform(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 {
consume_reservation_type: cdktf.stringToTerraform(struct.consumeReservationType),
key: cdktf.stringToTerraform(struct.key),
values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.values),
};
}
exports.notebooksInstanceReservationAffinityToTerraform = notebooksInstanceReservationAffinityToTerraform;
function notebooksInstanceReservationAffinityToHclTerraform(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 = {
consume_reservation_type: {
value: cdktf.stringToHclTerraform(struct.consumeReservationType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
key: {
value: cdktf.stringToHclTerraform(struct.key),
isBlock: false,
type: "simple",
storageClassType: "string",
},
values: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.values),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.notebooksInstanceReservationAffinityToHclTerraform = notebooksInstanceReservationAffinityToHclTerraform;
class NotebooksInstanceReservationAffinityOutputReference 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._consumeReservationType !== undefined) {
hasAnyValues = true;
internalValueResult.consumeReservationType = this._consumeReservationType;
}
if (this._key !== undefined) {
hasAnyValues = true;
internalValueResult.key = this._key;
}
if (this._values !== undefined) {
hasAnyValues = true;
internalValueResult.values = this._values;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._consumeReservationType = undefined;
this._key = undefined;
this._values = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._consumeReservationType = value.consumeReservationType;
this._key = value.key;
this._values = value.values;
}
}
get consumeReservationType() {
return this.getStringAttribute('consume_reservation_type');
}
set consumeReservationType(value) {
this._consumeReservationType = value;
}
// Temporarily expose input value. Use with caution.
get consumeReservationTypeInput() {
return this._consumeReservationType;
}
get key() {
return this.getStringAttribute('key');
}
set key(value) {
this._key = value;
}
resetKey() {
this._key = undefined;
}
// Temporarily expose input value. Use with caution.
get keyInput() {
return this._key;
}
get values() {
return this.getListAttribute('values');
}
set values(value) {
this._values = value;
}
resetValues() {
this._values = undefined;
}
// Temporarily expose input value. Use with caution.
get valuesInput() {
return this._values;
}
}
exports.NotebooksInstanceReservationAffinityOutputReference = NotebooksInstanceReservationAffinityOutputReference;
_c = JSII_RTTI_SYMBOL_1;
NotebooksInstanceReservationAffinityOutputReference[_c] = { fqn: "@cdktf/provider-google.notebooksInstance.NotebooksInstanceReservationAffinityOutputReference", version: "14.12.0" };
function notebooksInstanceShieldedInstanceConfigToTerraform(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_integrity_monitoring: cdktf.booleanToTerraform(struct.enableIntegrityMonitoring),
enable_secure_boot: cdktf.booleanToTerraform(struct.enableSecureBoot),
enable_vtpm: cdktf.booleanToTerraform(struct.enableVtpm),
};
}
exports.notebooksInstanceShieldedInstanceConfigToTerraform = notebooksInstanceShieldedInstanceConfigToTerraform;
function notebooksInstanceShieldedInstanceConfigToHclTerraform(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_integrity_monitoring: {
value: cdktf.booleanToHclTerraform(struct.enableIntegrityMonitoring),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_secure_boot: {
value: cdktf.booleanToHclTerraform(struct.enableSecureBoot),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_vtpm: {
value: cdktf.booleanToHclTerraform(struct.enableVtpm),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.notebooksInstanceShieldedInstanceConfigToHclTerraform = notebooksInstanceShieldedInstanceConfigToHclTerraform;
class NotebooksInstanceShieldedInstanceConfigOutputReference 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._enableIntegrityMonitoring !== undefined) {
hasAnyValues = true;
internalValueResult.enableIntegrityMonitoring = this._enableIntegrityMonitoring;
}
if (this._enableSecureBoot !== undefined) {
hasAnyValues = true;
internalValueResult.enableSecureBoot = this._enableSecureBoot;
}
if (this._enableVtpm !== undefined) {
hasAnyValues = true;
internalValueResult.enableVtpm = this._enableVtpm;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enableIntegrityMonitoring = undefined;
this._enableSecureBoot = undefined;
this._enableVtpm = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enableIntegrityMonitoring = value.enableIntegrityMonitoring;
this._enableSecureBoot = value.enableSecureBoot;
this._enableVtpm = value.enableVtpm;
}
}
get enableIntegrityMonitoring() {
return this.getBooleanAttribute('enable_integrity_monitoring');
}
set enableIntegrityMonitoring(value) {
this._enableIntegrityMonitoring = value;
}
resetEnableIntegrityMonitoring() {
this._enableIntegrityMonitoring = undefined;
}
// Temporarily expose input value. Use with caution.
get enableIntegrityMonitoringInput() {
return this._enableIntegrityMonitoring;
}
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;
}
get enableVtpm() {
return this.getBooleanAttribute('enable_vtpm');
}
set enableVtpm(value) {
this._enableVtpm = value;
}
resetEnableVtpm() {
this._enableVtpm = undefined;
}
// Temporarily expose input value. Use with caution.
get enableVtpmInput() {
return this._enableVtpm;
}
}
exports.NotebooksInstanceShieldedInstanceConfigOutputReference = NotebooksInstanceShieldedInstanceConfigOutputReference;
_d = JSII_RTTI_SYMBOL_1;
NotebooksInstanceShieldedInstanceConfigOutputReference[_d] = { fqn: "@cdktf/provider-google.notebooksInstance.NotebooksInstanceShieldedInstanceConfigOutputReference", version: "14.12.0" };
function notebooksInstanceTimeoutsToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
create: cdktf.stringToTerraform(struct.create),
delete: cdktf.stringToTerraform(struct.delete),
update: cdktf.stringToTerraform(struct.update),
};
}
exports.notebooksInstanceTimeoutsToTerraform = notebooksInstanceTimeoutsToTerraform;
function notebooksInstanceTimeoutsToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
create: {
value: cdktf.stringToHclTerraform(struct.create),
isBlock: false,
type: "simple",
storageClassType: "string",
},
delete: {
value: cdktf.stringToHclTerraform(struct.delete),
isBlock: false,
type: "simple",
storageClassType: "string",
},
update: {
value: cdktf.stringToHclTerraform(struct.update),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.notebooksInstanceTimeoutsToHclTerraform = notebooksInstanceTimeoutsToHclTerraform;
class NotebooksInstanceTimeoutsOutputReference 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.NotebooksInstanceTimeoutsOutputReference = NotebooksInstanceTimeoutsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
NotebooksInstanceTimeoutsOutputReference[_e] = { fqn: "@cdktf/provider-google.notebooksInstance.NotebooksInstanceTimeoutsOutputReference", version: "14.12.0" };
function notebooksInstanceVmImageToTerraform(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 {
image_family: cdktf.stringToTerraform(struct.imageFamily),
image_name: cdktf.stringToTerraform(struct.imageName),
project: cdktf.stringToTerraform(struct.project),
};
}
exports.notebooksInstanceVmImageToTerraform = notebooksInstanceVmImageToTerraform;
function notebooksInstanceVmImageToHclTerraform(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 = {
image_family: {
value: cdktf.stringToHclTerraform(struct.imageFamily),
isBlock: false,
type: "simple",
storageClassType: "string",
},
image_name: {
value: cdktf.stringToHclTerraform(struct.imageName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
project: {
value: cdktf.stringToHclTerraform(struct.project),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.notebooksInstanceVmImageToHclTerraform = notebooksInstanceVmImageToHclTerraform;
class NotebooksInstanceVmImageOutputReference 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._imageFamily !== undefined) {
hasAnyValues = true;
internalValueResult.imageFamily = this._imageFamily;
}
if (this._imageName !== undefined) {
hasAnyValues = true;
internalValueResult.imageName = this._imageName;
}
if (this._project !== undefined) {
hasAnyValues = true;
internalValueResult.project = this._project;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._imageFamily = undefined;
this._imageName = undefined;
this._project = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._imageFamily = value.imageFamily;
this._imageName = value.imageName;
this._project = value.project;
}
}
get imageFamily() {
return this.getStringAttribute('image_family');
}
set imageFamily(value) {
this._imageFamily = value;
}
resetImageFamily() {
this._imageFamily = undefined;
}
// Temporarily expose input value. Use with caution.
get imageFamilyInput() {
return this._imageFamily;
}
get imageName() {
return this.getStringAttribute('image_name');
}
set imageName(value) {
this._imageName = value;
}
resetImageName() {
this._imageName = undefined;
}
// Temporarily expose input value. Use with caution.
get imageNameInput() {
return this._imageName;
}
get project() {
return this.getStringAttribute('project');
}
set project(value) {
this._project = value;
}
// Temporarily expose input value. Use with caution.
get projectInput() {
return this._project;
}
}
exports.NotebooksInstanceVmImageOutputReference = NotebooksInstanceVmImageOutputReference;
_f = JSII_RTTI_SYMBOL_1;
NotebooksInstanceVmImageOutputReference[_f] = { fqn: "@cdktf/provider-google.notebooksInstance.NotebooksInstanceVmImageOutputReference", version: "14.12.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/notebooks_instance google_notebooks_instance}
*/
class NotebooksInstance extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a NotebooksInstance 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 NotebooksInstance to import
* @param importFromId The id of the existing NotebooksInstance that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/notebooks_instance#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the NotebooksInstance to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_notebooks_instance", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/notebooks_instance google_notebooks_instance} 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 NotebooksInstanceConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_notebooks_instance',
terraformGeneratorMetadata: {
providerName: 'google',
providerVersion: '6.13.0',
providerVersionConstraint: '~> 6.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// effective_labels - computed: true, optional: false, required: false
this._effectiveLabels = new cdktf.StringMap(this, "effective_labels");
// terraform_labels - computed: true, optional: false, required: false
this._terraformLabels = new cdktf.StringMap(this, "terraform_labels");
// accelerator_config - computed: false, optional: true, required: false
this._acceleratorConfig = new NotebooksInstanceAcceleratorConfigOutputReference(this, "accelerator_config");
// container_image - computed: false, optional: true, required: false
this._containerImage = new NotebooksInstanceContainerImageOutputReference(this, "container_image");
// reservation_affinity - computed: false, optional: true, required: false
this._reservationAffinity = new NotebooksInstanceReservationAffinityOutputReference(this, "reservation_affinity");
// shielded_instance_config - computed: false, optional: true, required: false
this._shieldedInstanceConfig = new NotebooksInstanceShieldedInstanceConfigOutputReference(this, "shielded_instance_config");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new NotebooksInstanceTimeoutsOutputReference(this, "timeouts");
// vm_image - computed: false, optional: true, required: false
this._vmImage = new NotebooksInstanceVmImageOutputReference(this, "vm_image");
this._bootDiskSizeGb = config.bootDiskSizeGb;
this._bootDiskType = config.bootDiskType;
this._createTime = config.createTime;
this._customGpuDriverPath = config.customGpuDriverPath;
this._dataDiskSizeGb = config.dataDiskSizeGb;
this._dataDiskType = config.dataDiskType;
this._desiredState = config.desiredState;
this._diskEncryption = config.diskEncryption;
this._id = config.id;
this._installGpuDriver = config.installGpuDriver;
this._instanceOwners = config.instanceOwners;
this._kmsKey = config.kmsKey;
this._labels = config.labels;
this._location = config.location;
this._machineType = config.machineType;
this._metadata = config.metadata;
this._name = config.name;
this._network = config.network;
this._nicType = config.nicType;
this._noProxyAccess = config.noProxyAccess;
this._noPublicIp = config.noPublicIp;
this._noRemoveDataDisk = config.noRemoveDataDisk;
this._postStartupScript = config.postStartupScript;
this._project = config.project;
this._serviceAccount = config.serviceAccount;
this._serviceAccountScopes = config.serviceAccountScopes;
this._subnet = config.subnet;
this._tags = config.tags;
this._updateTime = config.updateTime;
this._acceleratorConfig.internalValue = config.acceleratorConfig;
this._containerImage.internalValue = config.containerImage;
this._reservationAffinity.internalValue = config.reservationAffinity;
this._shieldedInstanceConfig.internalValue = config.shieldedInstanceConfig;
this._timeouts.internalValue = config.timeouts;
this._vmImage.internalValue = config.vmImage;
}
get bootDiskSizeGb() {
return this.getNumberAttribute('boot_disk_size_gb');
}
set bootDiskSizeGb(value) {
this._bootDiskSizeGb = value;
}
resetBootDiskSizeGb() {
this._bootDiskSizeGb = undefined;
}
// Temporarily expose input value. Use with caution.
get bootDiskSizeGbInput() {
return this._bootDiskSizeGb;
}
get bootDiskType() {
return this.getStringAttribute('boot_disk_type');
}
set bootDiskType(value) {
this._bootDiskType = value;
}
resetBootDiskType() {
this._bootDiskType = undefined;
}
// Temporarily expose input value. Use with caution.
get bootDiskTypeInput() {
return this._bootDiskType;
}
get createTime() {
return this.getStringAttribute('create_time');
}
set createTime(value) {
this._createTime = value;
}
resetCreateTime() {
this._createTime = undefined;
}
// Temporarily expose input value. Use with caution.
get createTimeInput() {
return this._createTime;
}
get customGpuDriverPath() {
return this.getStringAttribute('custom_gpu_driver_path');
}
set customGpuDriverPath(value) {
this._customGpuDriverPath = value;
}
resetCustomGpuDriverPath() {
this._customGpuDriverPath = undefined;
}
// Temporarily expose input value. Use with caution.
get customGpuDriverPathInput() {
return this._customGpuDriverPath;
}
get dataDiskSizeGb() {
return this.getNumberAttribute('data_disk_size_gb');
}
set dataDiskSizeGb(value) {
this._dataDiskSizeGb = value;
}
resetDataDiskSizeGb() {
this._dataDiskSizeGb = undefined;
}
// Temporarily expose input value. Use with caution.
get dataDiskSizeGbInput() {
return this._dataDiskSizeGb;
}
get dataDiskType() {
return this.getStringAttribute('data_disk_type');
}
set dataDiskType(value) {
this._dataDiskType = value;
}
resetDataDiskType() {
this._dataDiskType = undefined;
}
// Temporarily expose input value. Use with caution.
get dataDiskTypeInput() {
return this._dataDiskType;
}
get desiredState() {
return this.getStringAttribute('desired_state');
}
set desiredState(value) {
this._desiredState = value;
}
resetDesiredState() {
this._desiredState = undefined;
}
// Temporarily expose input value. Use with caution.
get desiredStateInput() {
return this._desiredState;
}
get diskEncryption() {
return this.getStringAttribute('disk_encryption');
}
set diskEncryption(value) {
this._diskEncryption = value;
}
resetDiskEncryption() {
this._diskEncryption = undefined;
}
// Temporarily expose input value. Use with caution.
get diskEncryptionInput() {
return this._diskEncryption;
}
get effectiveLabels() {
return this._effectiveLabels;
}
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 installGpuDriver() {
return this.getBooleanAttribute('install_gpu_driver');
}
set installGpuDriver(value) {
this._installGpuDriver = value;
}
resetInstallGpuDriver() {
this._installGpuDriver = undefined;
}
// Temporarily expose input value. Use with caution.
get installGpuDriverInput() {
return this._installGpuDriver;
}
get instanceOwners() {
return this.getListAttribute('instance_owners');
}
set instanceOwners(value) {
this._instanceOwners = value;
}
resetInstanceOwners() {
this._instanceOwners = undefined;
}
// Temporarily expose input value. Use with caution.
get instanceOwnersInput() {
return this._instanceOwners;
}
get kmsKey() {
return this.getStringAttribute('kms_key');
}
set kmsKey(value) {
this._kmsKey = value;
}
resetKmsKey() {
this._kmsKey = undefined;
}
// Temporarily expose input value. Use with caution.
get kmsKeyInput() {
return this._kmsKey;
}
get labels() {
return this.getStringMapAttribute('labels');
}
set labels(value) {
this._labels = value;
}
resetLabels() {
this._labels = undefined;
}
// Temporarily expose input value. Use with caution.
get labelsInput() {
return this._labels;
}
get location() {
return this.getStringAttribute('location');
}
set location(value) {
this._location = value;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;
}
get machineType() {
return this.getStringAttribute('machine_type');
}
set machineType(value) {
this._machineType = value;
}
// Temporarily expose input value. Use with caution.
get machineTypeInput() {
return this._machineType;
}
get metadata() {
return this.getStringMapAttribute('metadata');
}
set metadata(value) {
this._metadata = value;
}
resetMetadata() {
this._metadata = undefined;
}
// Temporarily expose input value. Use with caution.
get metadataInput() {
return this._metadata;
}
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 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 nicType() {
return this.getStringAttribute('nic_type');
}
set nicType(value) {
this._nicType = value;
}
resetNicType() {
this._nicType = undefined;
}
// Temporarily expose input value. Use with caution.
get nicTypeInput() {
return this._nicType;
}
get noProxyAccess() {
return this.getBooleanAttribute('no_proxy_access');
}
set noProxyAccess(value) {
this._noProxyAccess = value;
}
resetNoProxyAccess() {
this._noProxyAccess = undefined;
}
// Temporarily expose input value. Use with caution.
get noProxyAccessInput() {
return this._noProxyAccess;
}
get noPublicIp() {
return this.getBooleanAttribute('no_public_ip');
}
set noPublicIp(value) {
this._noPublicIp = value;
}
resetNoPublicIp() {
this._noPublicIp = undefined;
}
// Temporarily expose input value. Use with caution.
get noPublicIpInput() {
return this._noPublicIp;
}
get noRemoveDataDisk() {
return this.getBooleanAttribute('no_remove_data_disk');
}
set noRemoveDataDisk(value) {
this._noRemoveDataDisk = value;
}
resetNoRemoveDataDisk() {
this._noRemoveDataDisk = undefined;
}
// Temporarily expose input value. Use with caution.
get noRemoveDataDiskInput() {
return this._noRemoveDataDisk;
}
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 project() {
return this.getStringAttribute('project');
}
set project(value) {
this._project = value;
}
resetProject() {
this._project = undefined;
}
// Temporarily expose input value. Use with caution.
get projectInput() {
return this._project;
}
// proxy_uri - computed: true, optional: false, required: false
get proxyUri() {
return this.getStringAttribute('proxy_uri');
}
get serviceAccount() {
return this.getStringAttribute('service_account');
}
set serviceAccount(value) {
this._serviceAccount = value;
}
resetServiceAccount() {
this._serviceAccount = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceAccountInput() {
return this._serviceAccount;
}
get serviceAccountScopes() {
return this.getListAttribute('service_account_scopes');
}
set serviceAccountScopes(value) {
this._serviceAccountScopes = value;
}
resetServiceAccountScopes() {
this._serviceAccountScopes = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceAccountScopesInput() {
return this._serviceAccountScopes;
}
// state - computed: true, optional: false, required: false
get state() {
return this.getStringAttribute('state');
}
get subnet() {
return this.getStringAttribute('subnet');
}
set subnet(value) {
this._subnet = value;
}
resetSubnet() {
this._subnet = undefined;
}
// Temporarily expose input value. Use with caution.
get subnetInput() {
return this._subnet;
}
get tags() {
return this.getListAttribute('tags');
}
set tags(value) {
this._tags = value;
}
resetTags() {
this._tags = undefined;
}
// Temporarily expose input value. Use with caution.
get tagsInput() {
return this._tags;
}
get terraformLabels() {
return this._terraformLabels;
}
get updateTime() {
return this.getStringAttribute('update_time');
}
set updateTime(value) {
this._updateTime = value;
}
resetUpdateTime() {
this._updateTime = undefined;
}
// Temporarily expose input value. Use with caution.
get updateTimeInput() {
return this._updateTime;
}
get acceleratorConfig() {
return this._acceleratorConfig;
}
putAcceleratorConfig(value) {
this._acceleratorConfig.internalValue = value;
}
resetAcceleratorConfig() {
this._acceleratorConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get acceleratorConfigInput() {
return this._acceleratorConfig.internalValue;
}
get containerImage() {
return this._containerImage;
}
putContainerImage(value) {
this._containerImage.internalValue = value;
}
resetContainerImage() {
this._containerImage.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get containerImageInput() {
return this._containerImage.internalValue;
}
get reservationAffinity() {
return this._reservationAffinity;
}
putReservationAffinity(value) {
this._reservationAffinity.internalValue = value;
}
resetReservationAffinity() {
this._reservationAffinity.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get reservationAffinityInput() {
return this._reservationAffinity.internalValue;
}
get shieldedInstanceConfig() {
return this._shieldedInstanceConfig;
}
putShieldedInstanceConfig(value) {
this._shieldedInstanceConfig.internalValue = value;
}
resetShieldedInstanceConfig() {
this._shieldedInstanceConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get shieldedInstanceConfigInput() {
return this._shieldedInstanceConfig.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;
}
get vmImage() {
return this._vmImage;
}
putVmImage(value) {
this._vmImage.internalValue = value;
}
resetVmImage() {
this._vmImage.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get vmImageInput() {
return this._vmImage.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
boot_disk_size_gb: cdktf.numberToTerraform(this._bootDiskSizeGb),
boot_disk_type: cdktf.stringToTerraform(this._bootDiskType),
create_time: cdktf.stringToTerraform(this._createTime),
custom_gpu_driver_path: cdktf.stringToTerraform(this._customGpuDriverPath),
data_disk_size_gb: cdktf.numberToTerraform(this._dataDiskSizeGb),
data_disk_type: cdktf.stringToTerraform(this._dataDiskType),
desired_state: cdktf.stringToTerraform(this._desiredState),
disk_encryption: cdktf.stringToTerraform(this._diskEncryption),
id: cdktf.stringToTerraform(this._id),
install_gpu_driver: cdktf.booleanToTerraform(this._installGpuDriver),
instance_owners: cdktf.listMapper(cdktf.stringToTerraform, false)(this._instanceOwners),
kms_key: cdktf.stringToTerraform(this._kmsKey),
labels: cdktf.hashMapper(cdktf.stringToTerraform)(this._labels),
location: cdktf.stringToTerraform(this._location),
machine_type: cdktf.stringToTerraform(this._machineType),
metadata: cdktf.hashMapper(cdktf.stringToTerraform)(this._metadata),
name: cdktf.stringToTerraform(this._name),
network: cdktf.stringToTerraform(this._network),
nic_type: cdktf.stringToTerraform(this._nicType),
no_proxy_access: cdktf.booleanToTerraform(this._noProxyAccess),
no_public_ip: cdktf.booleanToTerraform(this._noPublicIp),
no_remove_data_disk: cdktf.booleanToTerraform(this._noRemoveDataDisk),
post_startup_script: cdktf.stringToTerraform(this._postStartupScript),
project: cdktf.stringToTerraform(this._project),
service_account: cdktf.stringToTerraform(this._serviceAccount),
service_account_scopes: cdktf.listMapper(cdktf.stringToTerraform, false)(this._serviceAccountScopes),
subnet: cdktf.stringToTerraform(this._subnet),
tags: cdktf.listMapper(cdktf.stringToTerraform, false)(this._tags),
update_time: cdktf.stringToTerraform(this._updateTime),
accelerator_config: notebooksInstanceAcceleratorConfigToTerraform(this._acceleratorConfig.internalValue),
container_image: notebooksInstanceContainerImageToTerraform(this._containerImage.internalValue),
reservation_affinity: notebooksInstanceReservationAffinityToTerraform(this._reservationAffinity.internalValue),
shielded_instance_config: notebooksInstanceShieldedInstanceConfigToTerraform(this._shieldedInstanceConfig.internalValue),
timeouts: notebooksInstanceTimeoutsToTerraform(this._timeouts.internalValue),
vm_image: notebooksInstanceVmImageToTerraform(this._vmImage.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
boot_disk_size_gb: {
value: cdktf.numberToHclTerraform(this._bootDiskSizeGb),
isBlock: false,
type: "simple",
storageClassType: "number",
},
boot_disk_type: {
value: cdktf.stringToHclTerraform(this._bootDiskType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
create_time: {
value: cdkt