@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,200 lines • 177 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataprocSessionTemplate = exports.DataprocSessionTemplateTimeoutsOutputReference = exports.DataprocSessionTemplateSparkConnectSessionOutputReference = exports.DataprocSessionTemplateRuntimeConfigOutputReference = exports.DataprocSessionTemplateJupyterSessionOutputReference = exports.DataprocSessionTemplateEnvironmentConfigOutputReference = exports.DataprocSessionTemplateEnvironmentConfigPeripheralsConfigOutputReference = exports.DataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigOutputReference = exports.DataprocSessionTemplateEnvironmentConfigExecutionConfigOutputReference = void 0;
exports.dataprocSessionTemplateEnvironmentConfigExecutionConfigToTerraform = dataprocSessionTemplateEnvironmentConfigExecutionConfigToTerraform;
exports.dataprocSessionTemplateEnvironmentConfigExecutionConfigToHclTerraform = dataprocSessionTemplateEnvironmentConfigExecutionConfigToHclTerraform;
exports.dataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigToTerraform = dataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigToTerraform;
exports.dataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigToHclTerraform = dataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigToHclTerraform;
exports.dataprocSessionTemplateEnvironmentConfigPeripheralsConfigToTerraform = dataprocSessionTemplateEnvironmentConfigPeripheralsConfigToTerraform;
exports.dataprocSessionTemplateEnvironmentConfigPeripheralsConfigToHclTerraform = dataprocSessionTemplateEnvironmentConfigPeripheralsConfigToHclTerraform;
exports.dataprocSessionTemplateEnvironmentConfigToTerraform = dataprocSessionTemplateEnvironmentConfigToTerraform;
exports.dataprocSessionTemplateEnvironmentConfigToHclTerraform = dataprocSessionTemplateEnvironmentConfigToHclTerraform;
exports.dataprocSessionTemplateJupyterSessionToTerraform = dataprocSessionTemplateJupyterSessionToTerraform;
exports.dataprocSessionTemplateJupyterSessionToHclTerraform = dataprocSessionTemplateJupyterSessionToHclTerraform;
exports.dataprocSessionTemplateRuntimeConfigToTerraform = dataprocSessionTemplateRuntimeConfigToTerraform;
exports.dataprocSessionTemplateRuntimeConfigToHclTerraform = dataprocSessionTemplateRuntimeConfigToHclTerraform;
exports.dataprocSessionTemplateSparkConnectSessionToTerraform = dataprocSessionTemplateSparkConnectSessionToTerraform;
exports.dataprocSessionTemplateSparkConnectSessionToHclTerraform = dataprocSessionTemplateSparkConnectSessionToHclTerraform;
exports.dataprocSessionTemplateTimeoutsToTerraform = dataprocSessionTemplateTimeoutsToTerraform;
exports.dataprocSessionTemplateTimeoutsToHclTerraform = dataprocSessionTemplateTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function dataprocSessionTemplateEnvironmentConfigExecutionConfigToTerraform(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: cdktf.stringToTerraform(struct.kmsKey),
network_tags: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.networkTags),
service_account: cdktf.stringToTerraform(struct.serviceAccount),
staging_bucket: cdktf.stringToTerraform(struct.stagingBucket),
subnetwork_uri: cdktf.stringToTerraform(struct.subnetworkUri),
ttl: cdktf.stringToTerraform(struct.ttl),
};
}
function dataprocSessionTemplateEnvironmentConfigExecutionConfigToHclTerraform(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: {
value: cdktf.stringToHclTerraform(struct.kmsKey),
isBlock: false,
type: "simple",
storageClassType: "string",
},
network_tags: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.networkTags),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
service_account: {
value: cdktf.stringToHclTerraform(struct.serviceAccount),
isBlock: false,
type: "simple",
storageClassType: "string",
},
staging_bucket: {
value: cdktf.stringToHclTerraform(struct.stagingBucket),
isBlock: false,
type: "simple",
storageClassType: "string",
},
subnetwork_uri: {
value: cdktf.stringToHclTerraform(struct.subnetworkUri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
ttl: {
value: cdktf.stringToHclTerraform(struct.ttl),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataprocSessionTemplateEnvironmentConfigExecutionConfigOutputReference 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._kmsKey !== undefined) {
hasAnyValues = true;
internalValueResult.kmsKey = this._kmsKey;
}
if (this._networkTags !== undefined) {
hasAnyValues = true;
internalValueResult.networkTags = this._networkTags;
}
if (this._serviceAccount !== undefined) {
hasAnyValues = true;
internalValueResult.serviceAccount = this._serviceAccount;
}
if (this._stagingBucket !== undefined) {
hasAnyValues = true;
internalValueResult.stagingBucket = this._stagingBucket;
}
if (this._subnetworkUri !== undefined) {
hasAnyValues = true;
internalValueResult.subnetworkUri = this._subnetworkUri;
}
if (this._ttl !== undefined) {
hasAnyValues = true;
internalValueResult.ttl = this._ttl;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._kmsKey = undefined;
this._networkTags = undefined;
this._serviceAccount = undefined;
this._stagingBucket = undefined;
this._subnetworkUri = undefined;
this._ttl = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._kmsKey = value.kmsKey;
this._networkTags = value.networkTags;
this._serviceAccount = value.serviceAccount;
this._stagingBucket = value.stagingBucket;
this._subnetworkUri = value.subnetworkUri;
this._ttl = value.ttl;
}
}
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 networkTags() {
return this.getListAttribute('network_tags');
}
set networkTags(value) {
this._networkTags = value;
}
resetNetworkTags() {
this._networkTags = undefined;
}
// Temporarily expose input value. Use with caution.
get networkTagsInput() {
return this._networkTags;
}
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 stagingBucket() {
return this.getStringAttribute('staging_bucket');
}
set stagingBucket(value) {
this._stagingBucket = value;
}
resetStagingBucket() {
this._stagingBucket = undefined;
}
// Temporarily expose input value. Use with caution.
get stagingBucketInput() {
return this._stagingBucket;
}
get subnetworkUri() {
return this.getStringAttribute('subnetwork_uri');
}
set subnetworkUri(value) {
this._subnetworkUri = value;
}
resetSubnetworkUri() {
this._subnetworkUri = undefined;
}
// Temporarily expose input value. Use with caution.
get subnetworkUriInput() {
return this._subnetworkUri;
}
get ttl() {
return this.getStringAttribute('ttl');
}
set ttl(value) {
this._ttl = value;
}
resetTtl() {
this._ttl = undefined;
}
// Temporarily expose input value. Use with caution.
get ttlInput() {
return this._ttl;
}
}
exports.DataprocSessionTemplateEnvironmentConfigExecutionConfigOutputReference = DataprocSessionTemplateEnvironmentConfigExecutionConfigOutputReference;
_a = JSII_RTTI_SYMBOL_1;
DataprocSessionTemplateEnvironmentConfigExecutionConfigOutputReference[_a] = { fqn: "@cdktf/provider-google.dataprocSessionTemplate.DataprocSessionTemplateEnvironmentConfigExecutionConfigOutputReference", version: "16.3.0" };
function dataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigToTerraform(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 {
dataproc_cluster: cdktf.stringToTerraform(struct.dataprocCluster),
};
}
function dataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigToHclTerraform(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 = {
dataproc_cluster: {
value: cdktf.stringToHclTerraform(struct.dataprocCluster),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigOutputReference 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._dataprocCluster !== undefined) {
hasAnyValues = true;
internalValueResult.dataprocCluster = this._dataprocCluster;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dataprocCluster = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dataprocCluster = value.dataprocCluster;
}
}
get dataprocCluster() {
return this.getStringAttribute('dataproc_cluster');
}
set dataprocCluster(value) {
this._dataprocCluster = value;
}
resetDataprocCluster() {
this._dataprocCluster = undefined;
}
// Temporarily expose input value. Use with caution.
get dataprocClusterInput() {
return this._dataprocCluster;
}
}
exports.DataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigOutputReference = DataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigOutputReference;
_b = JSII_RTTI_SYMBOL_1;
DataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigOutputReference[_b] = { fqn: "@cdktf/provider-google.dataprocSessionTemplate.DataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigOutputReference", version: "16.3.0" };
function dataprocSessionTemplateEnvironmentConfigPeripheralsConfigToTerraform(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 {
metastore_service: cdktf.stringToTerraform(struct.metastoreService),
spark_history_server_config: dataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigToTerraform(struct.sparkHistoryServerConfig),
};
}
function dataprocSessionTemplateEnvironmentConfigPeripheralsConfigToHclTerraform(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 = {
metastore_service: {
value: cdktf.stringToHclTerraform(struct.metastoreService),
isBlock: false,
type: "simple",
storageClassType: "string",
},
spark_history_server_config: {
value: dataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigToHclTerraform(struct.sparkHistoryServerConfig),
isBlock: true,
type: "list",
storageClassType: "DataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataprocSessionTemplateEnvironmentConfigPeripheralsConfigOutputReference 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;
// spark_history_server_config - computed: false, optional: true, required: false
this._sparkHistoryServerConfig = new DataprocSessionTemplateEnvironmentConfigPeripheralsConfigSparkHistoryServerConfigOutputReference(this, "spark_history_server_config");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._metastoreService !== undefined) {
hasAnyValues = true;
internalValueResult.metastoreService = this._metastoreService;
}
if (this._sparkHistoryServerConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.sparkHistoryServerConfig = this._sparkHistoryServerConfig?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._metastoreService = undefined;
this._sparkHistoryServerConfig.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._metastoreService = value.metastoreService;
this._sparkHistoryServerConfig.internalValue = value.sparkHistoryServerConfig;
}
}
get metastoreService() {
return this.getStringAttribute('metastore_service');
}
set metastoreService(value) {
this._metastoreService = value;
}
resetMetastoreService() {
this._metastoreService = undefined;
}
// Temporarily expose input value. Use with caution.
get metastoreServiceInput() {
return this._metastoreService;
}
get sparkHistoryServerConfig() {
return this._sparkHistoryServerConfig;
}
putSparkHistoryServerConfig(value) {
this._sparkHistoryServerConfig.internalValue = value;
}
resetSparkHistoryServerConfig() {
this._sparkHistoryServerConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get sparkHistoryServerConfigInput() {
return this._sparkHistoryServerConfig.internalValue;
}
}
exports.DataprocSessionTemplateEnvironmentConfigPeripheralsConfigOutputReference = DataprocSessionTemplateEnvironmentConfigPeripheralsConfigOutputReference;
_c = JSII_RTTI_SYMBOL_1;
DataprocSessionTemplateEnvironmentConfigPeripheralsConfigOutputReference[_c] = { fqn: "@cdktf/provider-google.dataprocSessionTemplate.DataprocSessionTemplateEnvironmentConfigPeripheralsConfigOutputReference", version: "16.3.0" };
function dataprocSessionTemplateEnvironmentConfigToTerraform(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 {
execution_config: dataprocSessionTemplateEnvironmentConfigExecutionConfigToTerraform(struct.executionConfig),
peripherals_config: dataprocSessionTemplateEnvironmentConfigPeripheralsConfigToTerraform(struct.peripheralsConfig),
};
}
function dataprocSessionTemplateEnvironmentConfigToHclTerraform(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 = {
execution_config: {
value: dataprocSessionTemplateEnvironmentConfigExecutionConfigToHclTerraform(struct.executionConfig),
isBlock: true,
type: "list",
storageClassType: "DataprocSessionTemplateEnvironmentConfigExecutionConfigList",
},
peripherals_config: {
value: dataprocSessionTemplateEnvironmentConfigPeripheralsConfigToHclTerraform(struct.peripheralsConfig),
isBlock: true,
type: "list",
storageClassType: "DataprocSessionTemplateEnvironmentConfigPeripheralsConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataprocSessionTemplateEnvironmentConfigOutputReference 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;
// execution_config - computed: false, optional: true, required: false
this._executionConfig = new DataprocSessionTemplateEnvironmentConfigExecutionConfigOutputReference(this, "execution_config");
// peripherals_config - computed: false, optional: true, required: false
this._peripheralsConfig = new DataprocSessionTemplateEnvironmentConfigPeripheralsConfigOutputReference(this, "peripherals_config");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._executionConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.executionConfig = this._executionConfig?.internalValue;
}
if (this._peripheralsConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.peripheralsConfig = this._peripheralsConfig?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._executionConfig.internalValue = undefined;
this._peripheralsConfig.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._executionConfig.internalValue = value.executionConfig;
this._peripheralsConfig.internalValue = value.peripheralsConfig;
}
}
get executionConfig() {
return this._executionConfig;
}
putExecutionConfig(value) {
this._executionConfig.internalValue = value;
}
resetExecutionConfig() {
this._executionConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get executionConfigInput() {
return this._executionConfig.internalValue;
}
get peripheralsConfig() {
return this._peripheralsConfig;
}
putPeripheralsConfig(value) {
this._peripheralsConfig.internalValue = value;
}
resetPeripheralsConfig() {
this._peripheralsConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get peripheralsConfigInput() {
return this._peripheralsConfig.internalValue;
}
}
exports.DataprocSessionTemplateEnvironmentConfigOutputReference = DataprocSessionTemplateEnvironmentConfigOutputReference;
_d = JSII_RTTI_SYMBOL_1;
DataprocSessionTemplateEnvironmentConfigOutputReference[_d] = { fqn: "@cdktf/provider-google.dataprocSessionTemplate.DataprocSessionTemplateEnvironmentConfigOutputReference", version: "16.3.0" };
function dataprocSessionTemplateJupyterSessionToTerraform(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 {
display_name: cdktf.stringToTerraform(struct.displayName),
kernel: cdktf.stringToTerraform(struct.kernel),
};
}
function dataprocSessionTemplateJupyterSessionToHclTerraform(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 = {
display_name: {
value: cdktf.stringToHclTerraform(struct.displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
kernel: {
value: cdktf.stringToHclTerraform(struct.kernel),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataprocSessionTemplateJupyterSessionOutputReference 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._displayName !== undefined) {
hasAnyValues = true;
internalValueResult.displayName = this._displayName;
}
if (this._kernel !== undefined) {
hasAnyValues = true;
internalValueResult.kernel = this._kernel;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._displayName = undefined;
this._kernel = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._displayName = value.displayName;
this._kernel = value.kernel;
}
}
get displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
resetDisplayName() {
this._displayName = undefined;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
get kernel() {
return this.getStringAttribute('kernel');
}
set kernel(value) {
this._kernel = value;
}
resetKernel() {
this._kernel = undefined;
}
// Temporarily expose input value. Use with caution.
get kernelInput() {
return this._kernel;
}
}
exports.DataprocSessionTemplateJupyterSessionOutputReference = DataprocSessionTemplateJupyterSessionOutputReference;
_e = JSII_RTTI_SYMBOL_1;
DataprocSessionTemplateJupyterSessionOutputReference[_e] = { fqn: "@cdktf/provider-google.dataprocSessionTemplate.DataprocSessionTemplateJupyterSessionOutputReference", version: "16.3.0" };
function dataprocSessionTemplateRuntimeConfigToTerraform(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 {
container_image: cdktf.stringToTerraform(struct.containerImage),
properties: cdktf.hashMapper(cdktf.stringToTerraform)(struct.properties),
version: cdktf.stringToTerraform(struct.version),
};
}
function dataprocSessionTemplateRuntimeConfigToHclTerraform(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 = {
container_image: {
value: cdktf.stringToHclTerraform(struct.containerImage),
isBlock: false,
type: "simple",
storageClassType: "string",
},
properties: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.properties),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
version: {
value: cdktf.stringToHclTerraform(struct.version),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DataprocSessionTemplateRuntimeConfigOutputReference 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;
// effective_properties - computed: true, optional: false, required: false
this._effectiveProperties = new cdktf.StringMap(this, "effective_properties");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._containerImage !== undefined) {
hasAnyValues = true;
internalValueResult.containerImage = this._containerImage;
}
if (this._properties !== undefined) {
hasAnyValues = true;
internalValueResult.properties = this._properties;
}
if (this._version !== undefined) {
hasAnyValues = true;
internalValueResult.version = this._version;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._containerImage = undefined;
this._properties = undefined;
this._version = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._containerImage = value.containerImage;
this._properties = value.properties;
this._version = value.version;
}
}
get containerImage() {
return this.getStringAttribute('container_image');
}
set containerImage(value) {
this._containerImage = value;
}
resetContainerImage() {
this._containerImage = undefined;
}
// Temporarily expose input value. Use with caution.
get containerImageInput() {
return this._containerImage;
}
get effectiveProperties() {
return this._effectiveProperties;
}
get properties() {
return this.getStringMapAttribute('properties');
}
set properties(value) {
this._properties = value;
}
resetProperties() {
this._properties = undefined;
}
// Temporarily expose input value. Use with caution.
get propertiesInput() {
return this._properties;
}
get version() {
return this.getStringAttribute('version');
}
set version(value) {
this._version = value;
}
resetVersion() {
this._version = undefined;
}
// Temporarily expose input value. Use with caution.
get versionInput() {
return this._version;
}
}
exports.DataprocSessionTemplateRuntimeConfigOutputReference = DataprocSessionTemplateRuntimeConfigOutputReference;
_f = JSII_RTTI_SYMBOL_1;
DataprocSessionTemplateRuntimeConfigOutputReference[_f] = { fqn: "@cdktf/provider-google.dataprocSessionTemplate.DataprocSessionTemplateRuntimeConfigOutputReference", version: "16.3.0" };
function dataprocSessionTemplateSparkConnectSessionToTerraform(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 {};
}
function dataprocSessionTemplateSparkConnectSessionToHclTerraform(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 = {};
return attrs;
}
class DataprocSessionTemplateSparkConnectSessionOutputReference 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 = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
}
exports.DataprocSessionTemplateSparkConnectSessionOutputReference = DataprocSessionTemplateSparkConnectSessionOutputReference;
_g = JSII_RTTI_SYMBOL_1;
DataprocSessionTemplateSparkConnectSessionOutputReference[_g] = { fqn: "@cdktf/provider-google.dataprocSessionTemplate.DataprocSessionTemplateSparkConnectSessionOutputReference", version: "16.3.0" };
function dataprocSessionTemplateTimeoutsToTerraform(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 dataprocSessionTemplateTimeoutsToHclTerraform(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 DataprocSessionTemplateTimeoutsOutputReference 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.DataprocSessionTemplateTimeoutsOutputReference = DataprocSessionTemplateTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
DataprocSessionTemplateTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.dataprocSessionTemplate.DataprocSessionTemplateTimeoutsOutputReference", version: "16.3.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.41.0/docs/resources/dataproc_session_template google_dataproc_session_template}
*/
class DataprocSessionTemplate extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a DataprocSessionTemplate 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 DataprocSessionTemplate to import
* @param importFromId The id of the existing DataprocSessionTemplate that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.41.0/docs/resources/dataproc_session_template#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the DataprocSessionTemplate to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_dataproc_session_template", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.41.0/docs/resources/dataproc_session_template google_dataproc_session_template} 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 DataprocSessionTemplateConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_dataproc_session_template',
terraformGeneratorMetadata: {
providerName: 'google',
providerVersion: '6.41.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");
// environment_config - computed: false, optional: true, required: false
this._environmentConfig = new DataprocSessionTemplateEnvironmentConfigOutputReference(this, "environment_config");
// jupyter_session - computed: false, optional: true, required: false
this._jupyterSession = new DataprocSessionTemplateJupyterSessionOutputReference(this, "jupyter_session");
// runtime_config - computed: false, optional: true, required: false
this._runtimeConfig = new DataprocSessionTemplateRuntimeConfigOutputReference(this, "runtime_config");
// spark_connect_session - computed: false, optional: true, required: false
this._sparkConnectSession = new DataprocSessionTemplateSparkConnectSessionOutputReference(this, "spark_connect_session");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new DataprocSessionTemplateTimeoutsOutputReference(this, "timeouts");
this._id = config.id;
this._labels = config.labels;
this._location = config.location;
this._name = config.name;
this._project = config.project;
this._environmentConfig.internalValue = config.environmentConfig;
this._jupyterSession.internalValue = config.jupyterSession;
this._runtimeConfig.internalValue = config.runtimeConfig;
this._sparkConnectSession.internalValue = config.sparkConnectSession;
this._timeouts.internalValue = config.timeouts;
}
// ==========
// ATTRIBUTES
// ==========
// create_time - computed: true, optional: false, required: false
get createTime() {
return this.getStringAttribute('create_time');
}
// creator - computed: true, optional: false, required: false
get creator() {
return this.getStringAttribute('creator');
}
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 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;
}
resetLocation() {
this._location = undefined;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get project() {
return this.getStringAttribute('project');
}
set project(value) {
this._project = value;
}
resetProject() {
this._project = undefined;
}
// Temporarily expose input value. Use with caution.
get projectInput() {
return this._project;
}
get terraformLabels() {
return this._terraformLabels;
}
// update_time - computed: true, optional: false, required: false
get updateTime() {
return this.getStringAttribute('update_time');
}
// uuid - computed: true, optional: false, required: false
get uuid() {
return this.getStringAttribute('uuid');
}
get environmentConfig() {
return this._environmentConfig;
}
putEnvironmentConfig(value) {
this._environmentConfig.internalValue = value;
}
resetEnvironmentConfig() {
this._environmentConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get environmentConfigInput() {
return this._environmentConfig.internalValue;
}
get jupyterSession() {
return this._jupyterSession;
}
putJupyterSession(value) {
this._jupyterSession.internalValue = value;
}
resetJupyterSession() {
this._jupyterSession.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get jupyterSessionInput() {
return this._jupyterSession.internalValue;
}
get runtimeConfig() {
return this._runtimeConfig;
}
putRuntimeConfig(value) {
this._runtimeConfig.internalValue = value;
}
resetRuntimeConfig() {
this._runtimeConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get runtimeConfigInput() {
return this._runtimeConfig.internalValue;
}
get sparkConnectSession() {
return this._sparkConnectSession;
}
putSparkConnectSession(value) {
this._sparkConnectSession.internalValue = value;
}
resetSparkConnectSession() {
this._sparkConnectSession.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get sparkConnectSessionInput() {
return this._sparkConnectSession.internalValue;
}
get timeouts() {
return this._timeouts;
}
putTimeouts(value) {
this._timeouts.internalValue = value;
}
resetTimeouts() {
this._timeouts.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutsInput() {
return this._timeouts.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
id: cdktf.stringToTerraform(this._id),
labels: cdktf.hashMapper(cdktf.stringToTerraform)(this._labels),
location: cdktf.stringToTerraform(this._location),
name: cdktf.stringToTerraform(this._name),
project: cdktf.stringToTerraform(this._project),
environment_config: dataprocSessionTemplateEnvironmentConfigToTerraform(this._environmentConfig.internalValue),
jupyter_session: dataprocSessionTemplateJupyterSessionToTerraform(this._jupyterSession.internalValue),
runtime_config: dataprocSessionTemplateRuntimeConfigToTerraform(this._runtimeConfig.internalValue),
spark_connect_session: dataprocSessionTemplateSparkConnectSessionToTerraform(this._sparkConnectSession.internalValue),
timeouts: dataprocSessionTemplateTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
labels: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._labels),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
location: {
value: cdktf.stringToHclTerraform(this._location),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
project: {
value: cdktf.stringToHclTerraform(this._project),
isBlock: false,
type: "simple",
storageClassType: "string",
},
environment_config: {
value: dataprocSessionTemplateEnvironmentConfigToHclTerraform(this._environmentConfig.internalValue),
isBlock: true,
type: "list",
storageClassType: "DataprocSessionTemplateEnvironmentConfigList",
},
jupyter_session: {
value: dataprocSessionTemplateJupyterSessionToHclTerraform(this._jupyterSession.internalValue),
isBlock: true,
type: "list",
storageClassType: "DataprocSessionTemplateJupyterSessionList",
},
runtime_config: {
value: dataprocSessionTemplateRuntimeConfigToHclTerraform(this._runtimeConfig.internalValue