@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,191 lines • 179 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DatabaseMigrationServiceMigrationJob = exports.DatabaseMigrationServiceMigrationJobVpcPeeringConnectivityOutputReference = exports.DatabaseMigrationServiceMigrationJobTimeoutsOutputReference = exports.DatabaseMigrationServiceMigrationJobStaticIpConnectivityOutputReference = exports.DatabaseMigrationServiceMigrationJobReverseSshConnectivityOutputReference = exports.DatabaseMigrationServiceMigrationJobPerformanceConfigOutputReference = exports.DatabaseMigrationServiceMigrationJobDumpFlagsOutputReference = exports.DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsList = exports.DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsOutputReference = exports.DatabaseMigrationServiceMigrationJobErrorList = exports.DatabaseMigrationServiceMigrationJobErrorOutputReference = void 0;
exports.databaseMigrationServiceMigrationJobErrorToTerraform = databaseMigrationServiceMigrationJobErrorToTerraform;
exports.databaseMigrationServiceMigrationJobErrorToHclTerraform = databaseMigrationServiceMigrationJobErrorToHclTerraform;
exports.databaseMigrationServiceMigrationJobDumpFlagsDumpFlagsToTerraform = databaseMigrationServiceMigrationJobDumpFlagsDumpFlagsToTerraform;
exports.databaseMigrationServiceMigrationJobDumpFlagsDumpFlagsToHclTerraform = databaseMigrationServiceMigrationJobDumpFlagsDumpFlagsToHclTerraform;
exports.databaseMigrationServiceMigrationJobDumpFlagsToTerraform = databaseMigrationServiceMigrationJobDumpFlagsToTerraform;
exports.databaseMigrationServiceMigrationJobDumpFlagsToHclTerraform = databaseMigrationServiceMigrationJobDumpFlagsToHclTerraform;
exports.databaseMigrationServiceMigrationJobPerformanceConfigToTerraform = databaseMigrationServiceMigrationJobPerformanceConfigToTerraform;
exports.databaseMigrationServiceMigrationJobPerformanceConfigToHclTerraform = databaseMigrationServiceMigrationJobPerformanceConfigToHclTerraform;
exports.databaseMigrationServiceMigrationJobReverseSshConnectivityToTerraform = databaseMigrationServiceMigrationJobReverseSshConnectivityToTerraform;
exports.databaseMigrationServiceMigrationJobReverseSshConnectivityToHclTerraform = databaseMigrationServiceMigrationJobReverseSshConnectivityToHclTerraform;
exports.databaseMigrationServiceMigrationJobStaticIpConnectivityToTerraform = databaseMigrationServiceMigrationJobStaticIpConnectivityToTerraform;
exports.databaseMigrationServiceMigrationJobStaticIpConnectivityToHclTerraform = databaseMigrationServiceMigrationJobStaticIpConnectivityToHclTerraform;
exports.databaseMigrationServiceMigrationJobTimeoutsToTerraform = databaseMigrationServiceMigrationJobTimeoutsToTerraform;
exports.databaseMigrationServiceMigrationJobTimeoutsToHclTerraform = databaseMigrationServiceMigrationJobTimeoutsToHclTerraform;
exports.databaseMigrationServiceMigrationJobVpcPeeringConnectivityToTerraform = databaseMigrationServiceMigrationJobVpcPeeringConnectivityToTerraform;
exports.databaseMigrationServiceMigrationJobVpcPeeringConnectivityToHclTerraform = databaseMigrationServiceMigrationJobVpcPeeringConnectivityToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function databaseMigrationServiceMigrationJobErrorToTerraform(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 databaseMigrationServiceMigrationJobErrorToHclTerraform(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 DatabaseMigrationServiceMigrationJobErrorOutputReference 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;
// details - computed: true, optional: false, required: false
this._details = new cdktf.StringMapList(this, "details", 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;
}
}
// code - computed: true, optional: false, required: false
get code() {
return this.getNumberAttribute('code');
}
get details() {
return this._details;
}
// message - computed: true, optional: false, required: false
get message() {
return this.getStringAttribute('message');
}
}
exports.DatabaseMigrationServiceMigrationJobErrorOutputReference = DatabaseMigrationServiceMigrationJobErrorOutputReference;
_a = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobErrorOutputReference[_a] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobErrorOutputReference", version: "14.35.1" };
class DatabaseMigrationServiceMigrationJobErrorList 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 DatabaseMigrationServiceMigrationJobErrorOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DatabaseMigrationServiceMigrationJobErrorList = DatabaseMigrationServiceMigrationJobErrorList;
_b = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobErrorList[_b] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobErrorList", version: "14.35.1" };
function databaseMigrationServiceMigrationJobDumpFlagsDumpFlagsToTerraform(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 databaseMigrationServiceMigrationJobDumpFlagsDumpFlagsToHclTerraform(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 DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsOutputReference 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.DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsOutputReference = DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsOutputReference[_c] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsOutputReference", version: "14.35.1" };
class DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsList 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 DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsList = DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsList;
_d = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsList[_d] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsList", version: "14.35.1" };
function databaseMigrationServiceMigrationJobDumpFlagsToTerraform(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 {
dump_flags: cdktf.listMapper(databaseMigrationServiceMigrationJobDumpFlagsDumpFlagsToTerraform, true)(struct.dumpFlags),
};
}
function databaseMigrationServiceMigrationJobDumpFlagsToHclTerraform(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 = {
dump_flags: {
value: cdktf.listMapperHcl(databaseMigrationServiceMigrationJobDumpFlagsDumpFlagsToHclTerraform, true)(struct.dumpFlags),
isBlock: true,
type: "list",
storageClassType: "DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DatabaseMigrationServiceMigrationJobDumpFlagsOutputReference 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;
// dump_flags - computed: false, optional: true, required: false
this._dumpFlags = new DatabaseMigrationServiceMigrationJobDumpFlagsDumpFlagsList(this, "dump_flags", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._dumpFlags?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.dumpFlags = this._dumpFlags?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dumpFlags.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dumpFlags.internalValue = value.dumpFlags;
}
}
get dumpFlags() {
return this._dumpFlags;
}
putDumpFlags(value) {
this._dumpFlags.internalValue = value;
}
resetDumpFlags() {
this._dumpFlags.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get dumpFlagsInput() {
return this._dumpFlags.internalValue;
}
}
exports.DatabaseMigrationServiceMigrationJobDumpFlagsOutputReference = DatabaseMigrationServiceMigrationJobDumpFlagsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobDumpFlagsOutputReference[_e] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobDumpFlagsOutputReference", version: "14.35.1" };
function databaseMigrationServiceMigrationJobPerformanceConfigToTerraform(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 {
dump_parallel_level: cdktf.stringToTerraform(struct.dumpParallelLevel),
};
}
function databaseMigrationServiceMigrationJobPerformanceConfigToHclTerraform(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 = {
dump_parallel_level: {
value: cdktf.stringToHclTerraform(struct.dumpParallelLevel),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DatabaseMigrationServiceMigrationJobPerformanceConfigOutputReference 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._dumpParallelLevel !== undefined) {
hasAnyValues = true;
internalValueResult.dumpParallelLevel = this._dumpParallelLevel;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dumpParallelLevel = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dumpParallelLevel = value.dumpParallelLevel;
}
}
get dumpParallelLevel() {
return this.getStringAttribute('dump_parallel_level');
}
set dumpParallelLevel(value) {
this._dumpParallelLevel = value;
}
resetDumpParallelLevel() {
this._dumpParallelLevel = undefined;
}
// Temporarily expose input value. Use with caution.
get dumpParallelLevelInput() {
return this._dumpParallelLevel;
}
}
exports.DatabaseMigrationServiceMigrationJobPerformanceConfigOutputReference = DatabaseMigrationServiceMigrationJobPerformanceConfigOutputReference;
_f = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobPerformanceConfigOutputReference[_f] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobPerformanceConfigOutputReference", version: "14.35.1" };
function databaseMigrationServiceMigrationJobReverseSshConnectivityToTerraform(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 {
vm: cdktf.stringToTerraform(struct.vm),
vm_ip: cdktf.stringToTerraform(struct.vmIp),
vm_port: cdktf.numberToTerraform(struct.vmPort),
vpc: cdktf.stringToTerraform(struct.vpc),
};
}
function databaseMigrationServiceMigrationJobReverseSshConnectivityToHclTerraform(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 = {
vm: {
value: cdktf.stringToHclTerraform(struct.vm),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vm_ip: {
value: cdktf.stringToHclTerraform(struct.vmIp),
isBlock: false,
type: "simple",
storageClassType: "string",
},
vm_port: {
value: cdktf.numberToHclTerraform(struct.vmPort),
isBlock: false,
type: "simple",
storageClassType: "number",
},
vpc: {
value: cdktf.stringToHclTerraform(struct.vpc),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DatabaseMigrationServiceMigrationJobReverseSshConnectivityOutputReference 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._vm !== undefined) {
hasAnyValues = true;
internalValueResult.vm = this._vm;
}
if (this._vmIp !== undefined) {
hasAnyValues = true;
internalValueResult.vmIp = this._vmIp;
}
if (this._vmPort !== undefined) {
hasAnyValues = true;
internalValueResult.vmPort = this._vmPort;
}
if (this._vpc !== undefined) {
hasAnyValues = true;
internalValueResult.vpc = this._vpc;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._vm = undefined;
this._vmIp = undefined;
this._vmPort = undefined;
this._vpc = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._vm = value.vm;
this._vmIp = value.vmIp;
this._vmPort = value.vmPort;
this._vpc = value.vpc;
}
}
get vm() {
return this.getStringAttribute('vm');
}
set vm(value) {
this._vm = value;
}
resetVm() {
this._vm = undefined;
}
// Temporarily expose input value. Use with caution.
get vmInput() {
return this._vm;
}
get vmIp() {
return this.getStringAttribute('vm_ip');
}
set vmIp(value) {
this._vmIp = value;
}
resetVmIp() {
this._vmIp = undefined;
}
// Temporarily expose input value. Use with caution.
get vmIpInput() {
return this._vmIp;
}
get vmPort() {
return this.getNumberAttribute('vm_port');
}
set vmPort(value) {
this._vmPort = value;
}
resetVmPort() {
this._vmPort = undefined;
}
// Temporarily expose input value. Use with caution.
get vmPortInput() {
return this._vmPort;
}
get vpc() {
return this.getStringAttribute('vpc');
}
set vpc(value) {
this._vpc = value;
}
resetVpc() {
this._vpc = undefined;
}
// Temporarily expose input value. Use with caution.
get vpcInput() {
return this._vpc;
}
}
exports.DatabaseMigrationServiceMigrationJobReverseSshConnectivityOutputReference = DatabaseMigrationServiceMigrationJobReverseSshConnectivityOutputReference;
_g = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobReverseSshConnectivityOutputReference[_g] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobReverseSshConnectivityOutputReference", version: "14.35.1" };
function databaseMigrationServiceMigrationJobStaticIpConnectivityToTerraform(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 databaseMigrationServiceMigrationJobStaticIpConnectivityToHclTerraform(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 DatabaseMigrationServiceMigrationJobStaticIpConnectivityOutputReference 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.DatabaseMigrationServiceMigrationJobStaticIpConnectivityOutputReference = DatabaseMigrationServiceMigrationJobStaticIpConnectivityOutputReference;
_h = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobStaticIpConnectivityOutputReference[_h] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobStaticIpConnectivityOutputReference", version: "14.35.1" };
function databaseMigrationServiceMigrationJobTimeoutsToTerraform(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 databaseMigrationServiceMigrationJobTimeoutsToHclTerraform(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 DatabaseMigrationServiceMigrationJobTimeoutsOutputReference 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.DatabaseMigrationServiceMigrationJobTimeoutsOutputReference = DatabaseMigrationServiceMigrationJobTimeoutsOutputReference;
_j = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobTimeoutsOutputReference[_j] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobTimeoutsOutputReference", version: "14.35.1" };
function databaseMigrationServiceMigrationJobVpcPeeringConnectivityToTerraform(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 {
vpc: cdktf.stringToTerraform(struct.vpc),
};
}
function databaseMigrationServiceMigrationJobVpcPeeringConnectivityToHclTerraform(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 = {
vpc: {
value: cdktf.stringToHclTerraform(struct.vpc),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class DatabaseMigrationServiceMigrationJobVpcPeeringConnectivityOutputReference 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._vpc !== undefined) {
hasAnyValues = true;
internalValueResult.vpc = this._vpc;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._vpc = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._vpc = value.vpc;
}
}
get vpc() {
return this.getStringAttribute('vpc');
}
set vpc(value) {
this._vpc = value;
}
resetVpc() {
this._vpc = undefined;
}
// Temporarily expose input value. Use with caution.
get vpcInput() {
return this._vpc;
}
}
exports.DatabaseMigrationServiceMigrationJobVpcPeeringConnectivityOutputReference = DatabaseMigrationServiceMigrationJobVpcPeeringConnectivityOutputReference;
_k = JSII_RTTI_SYMBOL_1;
DatabaseMigrationServiceMigrationJobVpcPeeringConnectivityOutputReference[_k] = { fqn: "@cdktf/provider-google.databaseMigrationServiceMigrationJob.DatabaseMigrationServiceMigrationJobVpcPeeringConnectivityOutputReference", version: "14.35.1" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/database_migration_service_migration_job google_database_migration_service_migration_job}
*/
class DatabaseMigrationServiceMigrationJob extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a DatabaseMigrationServiceMigrationJob 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 DatabaseMigrationServiceMigrationJob to import
* @param importFromId The id of the existing DatabaseMigrationServiceMigrationJob that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/database_migration_service_migration_job#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the DatabaseMigrationServiceMigrationJob to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_database_migration_service_migration_job", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/database_migration_service_migration_job google_database_migration_service_migration_job} 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 DatabaseMigrationServiceMigrationJobConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_database_migration_service_migration_job',
terraformGeneratorMetadata: {
providerName: 'google',
providerVersion: '6.36.1',
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");
// error - computed: true, optional: false, required: false
this._error = new DatabaseMigrationServiceMigrationJobErrorList(this, "error", false);
// terraform_labels - computed: true, optional: false, required: false
this._terraformLabels = new cdktf.StringMap(this, "terraform_labels");
// dump_flags - computed: false, optional: true, required: false
this._dumpFlags = new DatabaseMigrationServiceMigrationJobDumpFlagsOutputReference(this, "dump_flags");
// performance_config - computed: false, optional: true, required: false
this._performanceConfig = new DatabaseMigrationServiceMigrationJobPerformanceConfigOutputReference(this, "performance_config");
// reverse_ssh_connectivity - computed: false, optional: true, required: false
this._reverseSshConnectivity = new DatabaseMigrationServiceMigrationJobReverseSshConnectivityOutputReference(this, "reverse_ssh_connectivity");
// static_ip_connectivity - computed: false, optional: true, required: false
this._staticIpConnectivity = new DatabaseMigrationServiceMigrationJobStaticIpConnectivityOutputReference(this, "static_ip_connectivity");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new DatabaseMigrationServiceMigrationJobTimeoutsOutputReference(this, "timeouts");
// vpc_peering_connectivity - computed: false, optional: true, required: false
this._vpcPeeringConnectivity = new DatabaseMigrationServiceMigrationJobVpcPeeringConnectivityOutputReference(this, "vpc_peering_connectivity");
this._destination = config.destination;
this._displayName = config.displayName;
this._dumpPath = config.dumpPath;
this._dumpType = config.dumpType;
this._id = config.id;
this._labels = config.labels;
this._location = config.location;
this._migrationJobId = config.migrationJobId;
this._project = config.project;
this._source = config.source;
this._type = config.type;
this._dumpFlags.internalValue = config.dumpFlags;
this._performanceConfig.internalValue = config.performanceConfig;
this._reverseSshConnectivity.internalValue = config.reverseSshConnectivity;
this._staticIpConnectivity.internalValue = config.staticIpConnectivity;
this._timeouts.internalValue = config.timeouts;
this._vpcPeeringConnectivity.internalValue = config.vpcPeeringConnectivity;
}
// ==========
// ATTRIBUTES
// ==========
// create_time - computed: true, optional: false, required: false
get createTime() {
return this.getStringAttribute('create_time');
}
get destination() {
return this.getStringAttribute('destination');
}
set destination(value) {
this._destination = value;
}
// Temporarily expose input value. Use with caution.
get destinationInput() {
return this._destination;
}
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 dumpPath() {
return this.getStringAttribute('dump_path');
}
set dumpPath(value) {
this._dumpPath = value;
}
resetDumpPath() {
this._dumpPath = undefined;
}
// Temporarily expose input value. Use with caution.
get dumpPathInput() {
return this._dumpPath;
}
get dumpType() {
return this.getStringAttribute('dump_type');
}
set dumpType(value) {
this._dumpType = value;
}
resetDumpType() {
this._dumpType = undefined;
}
// Temporarily expose input value. Use with caution.
get dumpTypeInput() {
return this._dumpType;
}
get effectiveLabels() {
return this._effectiveLabels;
}
get error() {
return this._error;
}
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 migrationJobId() {
return this.getStringAttribute('migration_job_id');
}
set migrationJobId(value) {
this._migrationJobId = value;
}
// Temporarily expose input value. Use with caution.
get migrationJobIdInput() {
return this._migrationJobId;
}
// name - computed: true, optional: false, required: false
get name() {
return this.getStringAttribute('name');
}
// phase - computed: true, optional: false, required: false
get phase() {
return this.getStringAttribute('phase');
}
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 source() {
return this.getStringAttribute('source');
}
set source(value) {
this._source = value;
}
// Temporarily expose input value. Use with caution.
get sourceInput() {
return this._source;
}
// state - computed: true, optional: false, required: false
get state() {
return this.getStringAttribute('state');
}
get terraformLabels() {
return this._terraformLabels;
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
get dumpFlags() {
return this._dumpFlags;
}
putDumpFlags(value) {
this._dumpFlags.internalValue = value;
}
resetDumpFlags() {
this._dumpFlags.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get dumpFlagsInput() {
return this._dumpFlags.internalValue;
}
get performanceConfig() {
return this._performanceConfig;
}
putPerformanceConfig(value) {
this._performanceConfig.internalValue = value;
}
resetPerformanceConfig() {
this._performanceConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get performanceConfigInput() {
return this._performanceConfig.internalValue;
}
get reverseSshConnectivity() {
return this._reverseSshConnectivity;
}
putReverseSshConnectivity(value) {
this._reverseSshConnectivity.internalValue = value;
}
resetReverseSshConnectivity() {
this._reverseSshConnectivity.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get reverseSshConnectivityInput() {
return this._reverseSshConnectivity.internalValue;
}
get staticIpConnectivity() {
return this._staticIpConnectivity;
}
putStaticIpConnectivity(value) {
this._staticIpConnectivity.internalValue = value;
}
resetStaticIpConnectivity() {
this._staticIpConnectivity.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get staticIpConnectivityInput() {
return this._staticIpConnectivity.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 vpcPeeringConnectivity() {
return this._vpcPeeringConnectivity;
}
putVpcPeeringConnectivity(value) {
this._vpcPeeringConnectivity.internalValue = value;
}
resetVpcPeeringConnectivity() {
this._vpcPeeringConnectivity.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get vpcPeeringConnectivityInput() {
return this._vpcPeeringConnectivity.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
destination: cdktf.stringToTerraform(this._destination),
display_name: cdktf.stringToTerraform(this._displayName),
dump_path: cdktf.stringToTerraform(this._dumpPath),
dump_type: cdktf.stringToTerraform(this._dumpType),
id: cdktf.stringToTerraform(this._id),
labels: cdktf.hashMapper(cdktf.stringToTerraform)(this._labels),
location: cdktf.stringToTerraform(this._location),
migration_job_id: cdktf.stringToTerraform(this._migrationJobId),
project: cdktf.stringToTerraform(this._project),
source: cdktf.stringToTerraform(this._source),
type: cdktf.stringToTerraform(this._type),
dump_flags: databaseMigrationServiceMigrationJobDumpFlagsToTerraform(this._dumpFlags.internalValue),
performance_config: databaseMigrationServiceMigrationJobPerformanceConfigToTerraform(this._performanceConfig.internalValue),
reverse_ssh_connectivity: databaseMigrationServiceMigrationJobReverseSshConnectivityToTerraform(this._reverseSshConnectivity.internalValue),
static_ip_connectivity: databaseMigrationServiceMigrationJobStaticIpConnectivityToTerraform(this._staticIpConnectivity.internalValue),
timeouts: databaseMigrationServiceMigrationJobTimeoutsToTerraform(this._timeouts.internalValue),
vpc_peering_connectivity: databaseMigrationServiceMigrationJobVpcPeeringConnectivityToTerraform(this._vpcPeeringConnectivity.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
destination: {
value: cdktf.stringToHclTerraform(this._destination),
isBlock: false,
type: "simple",
storageClassType: "string",
},
display_name: {
value: cdktf.stringToHclTerraform(this._displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
dump_path: {
value: cdktf.stringToHclTerraform(this._dumpPath),
isBlock: false,
type: "simple",
storageClassType: "string",
},
dump_type: {
value: cdktf.stringToHclTerraform(this._dumpType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
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",
},
migration_job_id: {
value: cdktf.stringToHclTerraform(this._migrationJobId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
project: {
value: cdktf.stringToHclTerraform(this._project),
isBlock: false,
type: "simple",
storageClassType: "string",
},
source: {
value: cdktf.stringToHclTerraform(t