@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,098 lines • 261 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AlloydbInstance = exports.AlloydbInstanceTimeoutsOutputReference = exports.AlloydbInstanceReadPoolConfigOutputReference = exports.AlloydbInstanceQueryInsightsConfigOutputReference = exports.AlloydbInstancePscInstanceConfigOutputReference = exports.AlloydbInstancePscInstanceConfigPscInterfaceConfigsList = exports.AlloydbInstancePscInstanceConfigPscInterfaceConfigsOutputReference = exports.AlloydbInstancePscInstanceConfigPscAutoConnectionsList = exports.AlloydbInstancePscInstanceConfigPscAutoConnectionsOutputReference = exports.AlloydbInstanceNetworkConfigOutputReference = exports.AlloydbInstanceNetworkConfigAuthorizedExternalNetworksList = exports.AlloydbInstanceNetworkConfigAuthorizedExternalNetworksOutputReference = exports.AlloydbInstanceMachineConfigOutputReference = exports.AlloydbInstanceClientConnectionConfigOutputReference = exports.AlloydbInstanceClientConnectionConfigSslConfigOutputReference = void 0;
exports.alloydbInstanceClientConnectionConfigSslConfigToTerraform = alloydbInstanceClientConnectionConfigSslConfigToTerraform;
exports.alloydbInstanceClientConnectionConfigSslConfigToHclTerraform = alloydbInstanceClientConnectionConfigSslConfigToHclTerraform;
exports.alloydbInstanceClientConnectionConfigToTerraform = alloydbInstanceClientConnectionConfigToTerraform;
exports.alloydbInstanceClientConnectionConfigToHclTerraform = alloydbInstanceClientConnectionConfigToHclTerraform;
exports.alloydbInstanceMachineConfigToTerraform = alloydbInstanceMachineConfigToTerraform;
exports.alloydbInstanceMachineConfigToHclTerraform = alloydbInstanceMachineConfigToHclTerraform;
exports.alloydbInstanceNetworkConfigAuthorizedExternalNetworksToTerraform = alloydbInstanceNetworkConfigAuthorizedExternalNetworksToTerraform;
exports.alloydbInstanceNetworkConfigAuthorizedExternalNetworksToHclTerraform = alloydbInstanceNetworkConfigAuthorizedExternalNetworksToHclTerraform;
exports.alloydbInstanceNetworkConfigToTerraform = alloydbInstanceNetworkConfigToTerraform;
exports.alloydbInstanceNetworkConfigToHclTerraform = alloydbInstanceNetworkConfigToHclTerraform;
exports.alloydbInstancePscInstanceConfigPscAutoConnectionsToTerraform = alloydbInstancePscInstanceConfigPscAutoConnectionsToTerraform;
exports.alloydbInstancePscInstanceConfigPscAutoConnectionsToHclTerraform = alloydbInstancePscInstanceConfigPscAutoConnectionsToHclTerraform;
exports.alloydbInstancePscInstanceConfigPscInterfaceConfigsToTerraform = alloydbInstancePscInstanceConfigPscInterfaceConfigsToTerraform;
exports.alloydbInstancePscInstanceConfigPscInterfaceConfigsToHclTerraform = alloydbInstancePscInstanceConfigPscInterfaceConfigsToHclTerraform;
exports.alloydbInstancePscInstanceConfigToTerraform = alloydbInstancePscInstanceConfigToTerraform;
exports.alloydbInstancePscInstanceConfigToHclTerraform = alloydbInstancePscInstanceConfigToHclTerraform;
exports.alloydbInstanceQueryInsightsConfigToTerraform = alloydbInstanceQueryInsightsConfigToTerraform;
exports.alloydbInstanceQueryInsightsConfigToHclTerraform = alloydbInstanceQueryInsightsConfigToHclTerraform;
exports.alloydbInstanceReadPoolConfigToTerraform = alloydbInstanceReadPoolConfigToTerraform;
exports.alloydbInstanceReadPoolConfigToHclTerraform = alloydbInstanceReadPoolConfigToHclTerraform;
exports.alloydbInstanceTimeoutsToTerraform = alloydbInstanceTimeoutsToTerraform;
exports.alloydbInstanceTimeoutsToHclTerraform = alloydbInstanceTimeoutsToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function alloydbInstanceClientConnectionConfigSslConfigToTerraform(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 {
ssl_mode: cdktf.stringToTerraform(struct.sslMode),
};
}
function alloydbInstanceClientConnectionConfigSslConfigToHclTerraform(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 = {
ssl_mode: {
value: cdktf.stringToHclTerraform(struct.sslMode),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlloydbInstanceClientConnectionConfigSslConfigOutputReference 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._sslMode !== undefined) {
hasAnyValues = true;
internalValueResult.sslMode = this._sslMode;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._sslMode = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._sslMode = value.sslMode;
}
}
get sslMode() {
return this.getStringAttribute('ssl_mode');
}
set sslMode(value) {
this._sslMode = value;
}
resetSslMode() {
this._sslMode = undefined;
}
// Temporarily expose input value. Use with caution.
get sslModeInput() {
return this._sslMode;
}
}
exports.AlloydbInstanceClientConnectionConfigSslConfigOutputReference = AlloydbInstanceClientConnectionConfigSslConfigOutputReference;
_a = JSII_RTTI_SYMBOL_1;
AlloydbInstanceClientConnectionConfigSslConfigOutputReference[_a] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstanceClientConnectionConfigSslConfigOutputReference", version: "14.35.0" };
function alloydbInstanceClientConnectionConfigToTerraform(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 {
require_connectors: cdktf.booleanToTerraform(struct.requireConnectors),
ssl_config: alloydbInstanceClientConnectionConfigSslConfigToTerraform(struct.sslConfig),
};
}
function alloydbInstanceClientConnectionConfigToHclTerraform(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 = {
require_connectors: {
value: cdktf.booleanToHclTerraform(struct.requireConnectors),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
ssl_config: {
value: alloydbInstanceClientConnectionConfigSslConfigToHclTerraform(struct.sslConfig),
isBlock: true,
type: "list",
storageClassType: "AlloydbInstanceClientConnectionConfigSslConfigList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlloydbInstanceClientConnectionConfigOutputReference 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;
// ssl_config - computed: false, optional: true, required: false
this._sslConfig = new AlloydbInstanceClientConnectionConfigSslConfigOutputReference(this, "ssl_config");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._requireConnectors !== undefined) {
hasAnyValues = true;
internalValueResult.requireConnectors = this._requireConnectors;
}
if (this._sslConfig?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.sslConfig = this._sslConfig?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._requireConnectors = undefined;
this._sslConfig.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._requireConnectors = value.requireConnectors;
this._sslConfig.internalValue = value.sslConfig;
}
}
get requireConnectors() {
return this.getBooleanAttribute('require_connectors');
}
set requireConnectors(value) {
this._requireConnectors = value;
}
resetRequireConnectors() {
this._requireConnectors = undefined;
}
// Temporarily expose input value. Use with caution.
get requireConnectorsInput() {
return this._requireConnectors;
}
get sslConfig() {
return this._sslConfig;
}
putSslConfig(value) {
this._sslConfig.internalValue = value;
}
resetSslConfig() {
this._sslConfig.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get sslConfigInput() {
return this._sslConfig.internalValue;
}
}
exports.AlloydbInstanceClientConnectionConfigOutputReference = AlloydbInstanceClientConnectionConfigOutputReference;
_b = JSII_RTTI_SYMBOL_1;
AlloydbInstanceClientConnectionConfigOutputReference[_b] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstanceClientConnectionConfigOutputReference", version: "14.35.0" };
function alloydbInstanceMachineConfigToTerraform(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 {
cpu_count: cdktf.numberToTerraform(struct.cpuCount),
machine_type: cdktf.stringToTerraform(struct.machineType),
};
}
function alloydbInstanceMachineConfigToHclTerraform(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 = {
cpu_count: {
value: cdktf.numberToHclTerraform(struct.cpuCount),
isBlock: false,
type: "simple",
storageClassType: "number",
},
machine_type: {
value: cdktf.stringToHclTerraform(struct.machineType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlloydbInstanceMachineConfigOutputReference 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._cpuCount !== undefined) {
hasAnyValues = true;
internalValueResult.cpuCount = this._cpuCount;
}
if (this._machineType !== undefined) {
hasAnyValues = true;
internalValueResult.machineType = this._machineType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._cpuCount = undefined;
this._machineType = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._cpuCount = value.cpuCount;
this._machineType = value.machineType;
}
}
get cpuCount() {
return this.getNumberAttribute('cpu_count');
}
set cpuCount(value) {
this._cpuCount = value;
}
resetCpuCount() {
this._cpuCount = undefined;
}
// Temporarily expose input value. Use with caution.
get cpuCountInput() {
return this._cpuCount;
}
get machineType() {
return this.getStringAttribute('machine_type');
}
set machineType(value) {
this._machineType = value;
}
resetMachineType() {
this._machineType = undefined;
}
// Temporarily expose input value. Use with caution.
get machineTypeInput() {
return this._machineType;
}
}
exports.AlloydbInstanceMachineConfigOutputReference = AlloydbInstanceMachineConfigOutputReference;
_c = JSII_RTTI_SYMBOL_1;
AlloydbInstanceMachineConfigOutputReference[_c] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstanceMachineConfigOutputReference", version: "14.35.0" };
function alloydbInstanceNetworkConfigAuthorizedExternalNetworksToTerraform(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 {
cidr_range: cdktf.stringToTerraform(struct.cidrRange),
};
}
function alloydbInstanceNetworkConfigAuthorizedExternalNetworksToHclTerraform(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 = {
cidr_range: {
value: cdktf.stringToHclTerraform(struct.cidrRange),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlloydbInstanceNetworkConfigAuthorizedExternalNetworksOutputReference 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._cidrRange !== undefined) {
hasAnyValues = true;
internalValueResult.cidrRange = this._cidrRange;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._cidrRange = 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._cidrRange = value.cidrRange;
}
}
get cidrRange() {
return this.getStringAttribute('cidr_range');
}
set cidrRange(value) {
this._cidrRange = value;
}
resetCidrRange() {
this._cidrRange = undefined;
}
// Temporarily expose input value. Use with caution.
get cidrRangeInput() {
return this._cidrRange;
}
}
exports.AlloydbInstanceNetworkConfigAuthorizedExternalNetworksOutputReference = AlloydbInstanceNetworkConfigAuthorizedExternalNetworksOutputReference;
_d = JSII_RTTI_SYMBOL_1;
AlloydbInstanceNetworkConfigAuthorizedExternalNetworksOutputReference[_d] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstanceNetworkConfigAuthorizedExternalNetworksOutputReference", version: "14.35.0" };
class AlloydbInstanceNetworkConfigAuthorizedExternalNetworksList 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 AlloydbInstanceNetworkConfigAuthorizedExternalNetworksOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AlloydbInstanceNetworkConfigAuthorizedExternalNetworksList = AlloydbInstanceNetworkConfigAuthorizedExternalNetworksList;
_e = JSII_RTTI_SYMBOL_1;
AlloydbInstanceNetworkConfigAuthorizedExternalNetworksList[_e] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstanceNetworkConfigAuthorizedExternalNetworksList", version: "14.35.0" };
function alloydbInstanceNetworkConfigToTerraform(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_outbound_public_ip: cdktf.booleanToTerraform(struct.enableOutboundPublicIp),
enable_public_ip: cdktf.booleanToTerraform(struct.enablePublicIp),
authorized_external_networks: cdktf.listMapper(alloydbInstanceNetworkConfigAuthorizedExternalNetworksToTerraform, true)(struct.authorizedExternalNetworks),
};
}
function alloydbInstanceNetworkConfigToHclTerraform(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_outbound_public_ip: {
value: cdktf.booleanToHclTerraform(struct.enableOutboundPublicIp),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
enable_public_ip: {
value: cdktf.booleanToHclTerraform(struct.enablePublicIp),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
authorized_external_networks: {
value: cdktf.listMapperHcl(alloydbInstanceNetworkConfigAuthorizedExternalNetworksToHclTerraform, true)(struct.authorizedExternalNetworks),
isBlock: true,
type: "list",
storageClassType: "AlloydbInstanceNetworkConfigAuthorizedExternalNetworksList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlloydbInstanceNetworkConfigOutputReference 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;
// authorized_external_networks - computed: false, optional: true, required: false
this._authorizedExternalNetworks = new AlloydbInstanceNetworkConfigAuthorizedExternalNetworksList(this, "authorized_external_networks", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._enableOutboundPublicIp !== undefined) {
hasAnyValues = true;
internalValueResult.enableOutboundPublicIp = this._enableOutboundPublicIp;
}
if (this._enablePublicIp !== undefined) {
hasAnyValues = true;
internalValueResult.enablePublicIp = this._enablePublicIp;
}
if (this._authorizedExternalNetworks?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.authorizedExternalNetworks = this._authorizedExternalNetworks?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enableOutboundPublicIp = undefined;
this._enablePublicIp = undefined;
this._authorizedExternalNetworks.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enableOutboundPublicIp = value.enableOutboundPublicIp;
this._enablePublicIp = value.enablePublicIp;
this._authorizedExternalNetworks.internalValue = value.authorizedExternalNetworks;
}
}
get enableOutboundPublicIp() {
return this.getBooleanAttribute('enable_outbound_public_ip');
}
set enableOutboundPublicIp(value) {
this._enableOutboundPublicIp = value;
}
resetEnableOutboundPublicIp() {
this._enableOutboundPublicIp = undefined;
}
// Temporarily expose input value. Use with caution.
get enableOutboundPublicIpInput() {
return this._enableOutboundPublicIp;
}
get enablePublicIp() {
return this.getBooleanAttribute('enable_public_ip');
}
set enablePublicIp(value) {
this._enablePublicIp = value;
}
resetEnablePublicIp() {
this._enablePublicIp = undefined;
}
// Temporarily expose input value. Use with caution.
get enablePublicIpInput() {
return this._enablePublicIp;
}
get authorizedExternalNetworks() {
return this._authorizedExternalNetworks;
}
putAuthorizedExternalNetworks(value) {
this._authorizedExternalNetworks.internalValue = value;
}
resetAuthorizedExternalNetworks() {
this._authorizedExternalNetworks.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get authorizedExternalNetworksInput() {
return this._authorizedExternalNetworks.internalValue;
}
}
exports.AlloydbInstanceNetworkConfigOutputReference = AlloydbInstanceNetworkConfigOutputReference;
_f = JSII_RTTI_SYMBOL_1;
AlloydbInstanceNetworkConfigOutputReference[_f] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstanceNetworkConfigOutputReference", version: "14.35.0" };
function alloydbInstancePscInstanceConfigPscAutoConnectionsToTerraform(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 {
consumer_network: cdktf.stringToTerraform(struct.consumerNetwork),
consumer_project: cdktf.stringToTerraform(struct.consumerProject),
};
}
function alloydbInstancePscInstanceConfigPscAutoConnectionsToHclTerraform(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 = {
consumer_network: {
value: cdktf.stringToHclTerraform(struct.consumerNetwork),
isBlock: false,
type: "simple",
storageClassType: "string",
},
consumer_project: {
value: cdktf.stringToHclTerraform(struct.consumerProject),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlloydbInstancePscInstanceConfigPscAutoConnectionsOutputReference 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._consumerNetwork !== undefined) {
hasAnyValues = true;
internalValueResult.consumerNetwork = this._consumerNetwork;
}
if (this._consumerProject !== undefined) {
hasAnyValues = true;
internalValueResult.consumerProject = this._consumerProject;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._consumerNetwork = undefined;
this._consumerProject = 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._consumerNetwork = value.consumerNetwork;
this._consumerProject = value.consumerProject;
}
}
get consumerNetwork() {
return this.getStringAttribute('consumer_network');
}
set consumerNetwork(value) {
this._consumerNetwork = value;
}
resetConsumerNetwork() {
this._consumerNetwork = undefined;
}
// Temporarily expose input value. Use with caution.
get consumerNetworkInput() {
return this._consumerNetwork;
}
// consumer_network_status - computed: true, optional: false, required: false
get consumerNetworkStatus() {
return this.getStringAttribute('consumer_network_status');
}
get consumerProject() {
return this.getStringAttribute('consumer_project');
}
set consumerProject(value) {
this._consumerProject = value;
}
resetConsumerProject() {
this._consumerProject = undefined;
}
// Temporarily expose input value. Use with caution.
get consumerProjectInput() {
return this._consumerProject;
}
// ip_address - computed: true, optional: false, required: false
get ipAddress() {
return this.getStringAttribute('ip_address');
}
// status - computed: true, optional: false, required: false
get status() {
return this.getStringAttribute('status');
}
}
exports.AlloydbInstancePscInstanceConfigPscAutoConnectionsOutputReference = AlloydbInstancePscInstanceConfigPscAutoConnectionsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
AlloydbInstancePscInstanceConfigPscAutoConnectionsOutputReference[_g] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstancePscInstanceConfigPscAutoConnectionsOutputReference", version: "14.35.0" };
class AlloydbInstancePscInstanceConfigPscAutoConnectionsList 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 AlloydbInstancePscInstanceConfigPscAutoConnectionsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AlloydbInstancePscInstanceConfigPscAutoConnectionsList = AlloydbInstancePscInstanceConfigPscAutoConnectionsList;
_h = JSII_RTTI_SYMBOL_1;
AlloydbInstancePscInstanceConfigPscAutoConnectionsList[_h] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstancePscInstanceConfigPscAutoConnectionsList", version: "14.35.0" };
function alloydbInstancePscInstanceConfigPscInterfaceConfigsToTerraform(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 {
network_attachment_resource: cdktf.stringToTerraform(struct.networkAttachmentResource),
};
}
function alloydbInstancePscInstanceConfigPscInterfaceConfigsToHclTerraform(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 = {
network_attachment_resource: {
value: cdktf.stringToHclTerraform(struct.networkAttachmentResource),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlloydbInstancePscInstanceConfigPscInterfaceConfigsOutputReference 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._networkAttachmentResource !== undefined) {
hasAnyValues = true;
internalValueResult.networkAttachmentResource = this._networkAttachmentResource;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._networkAttachmentResource = 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._networkAttachmentResource = value.networkAttachmentResource;
}
}
get networkAttachmentResource() {
return this.getStringAttribute('network_attachment_resource');
}
set networkAttachmentResource(value) {
this._networkAttachmentResource = value;
}
resetNetworkAttachmentResource() {
this._networkAttachmentResource = undefined;
}
// Temporarily expose input value. Use with caution.
get networkAttachmentResourceInput() {
return this._networkAttachmentResource;
}
}
exports.AlloydbInstancePscInstanceConfigPscInterfaceConfigsOutputReference = AlloydbInstancePscInstanceConfigPscInterfaceConfigsOutputReference;
_j = JSII_RTTI_SYMBOL_1;
AlloydbInstancePscInstanceConfigPscInterfaceConfigsOutputReference[_j] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstancePscInstanceConfigPscInterfaceConfigsOutputReference", version: "14.35.0" };
class AlloydbInstancePscInstanceConfigPscInterfaceConfigsList 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 AlloydbInstancePscInstanceConfigPscInterfaceConfigsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.AlloydbInstancePscInstanceConfigPscInterfaceConfigsList = AlloydbInstancePscInstanceConfigPscInterfaceConfigsList;
_k = JSII_RTTI_SYMBOL_1;
AlloydbInstancePscInstanceConfigPscInterfaceConfigsList[_k] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstancePscInstanceConfigPscInterfaceConfigsList", version: "14.35.0" };
function alloydbInstancePscInstanceConfigToTerraform(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 {
allowed_consumer_projects: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.allowedConsumerProjects),
psc_auto_connections: cdktf.listMapper(alloydbInstancePscInstanceConfigPscAutoConnectionsToTerraform, true)(struct.pscAutoConnections),
psc_interface_configs: cdktf.listMapper(alloydbInstancePscInstanceConfigPscInterfaceConfigsToTerraform, true)(struct.pscInterfaceConfigs),
};
}
function alloydbInstancePscInstanceConfigToHclTerraform(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 = {
allowed_consumer_projects: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.allowedConsumerProjects),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
psc_auto_connections: {
value: cdktf.listMapperHcl(alloydbInstancePscInstanceConfigPscAutoConnectionsToHclTerraform, true)(struct.pscAutoConnections),
isBlock: true,
type: "list",
storageClassType: "AlloydbInstancePscInstanceConfigPscAutoConnectionsList",
},
psc_interface_configs: {
value: cdktf.listMapperHcl(alloydbInstancePscInstanceConfigPscInterfaceConfigsToHclTerraform, true)(struct.pscInterfaceConfigs),
isBlock: true,
type: "list",
storageClassType: "AlloydbInstancePscInstanceConfigPscInterfaceConfigsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlloydbInstancePscInstanceConfigOutputReference 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;
// psc_auto_connections - computed: false, optional: true, required: false
this._pscAutoConnections = new AlloydbInstancePscInstanceConfigPscAutoConnectionsList(this, "psc_auto_connections", false);
// psc_interface_configs - computed: false, optional: true, required: false
this._pscInterfaceConfigs = new AlloydbInstancePscInstanceConfigPscInterfaceConfigsList(this, "psc_interface_configs", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._allowedConsumerProjects !== undefined) {
hasAnyValues = true;
internalValueResult.allowedConsumerProjects = this._allowedConsumerProjects;
}
if (this._pscAutoConnections?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.pscAutoConnections = this._pscAutoConnections?.internalValue;
}
if (this._pscInterfaceConfigs?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.pscInterfaceConfigs = this._pscInterfaceConfigs?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allowedConsumerProjects = undefined;
this._pscAutoConnections.internalValue = undefined;
this._pscInterfaceConfigs.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allowedConsumerProjects = value.allowedConsumerProjects;
this._pscAutoConnections.internalValue = value.pscAutoConnections;
this._pscInterfaceConfigs.internalValue = value.pscInterfaceConfigs;
}
}
get allowedConsumerProjects() {
return this.getListAttribute('allowed_consumer_projects');
}
set allowedConsumerProjects(value) {
this._allowedConsumerProjects = value;
}
resetAllowedConsumerProjects() {
this._allowedConsumerProjects = undefined;
}
// Temporarily expose input value. Use with caution.
get allowedConsumerProjectsInput() {
return this._allowedConsumerProjects;
}
// psc_dns_name - computed: true, optional: false, required: false
get pscDnsName() {
return this.getStringAttribute('psc_dns_name');
}
// service_attachment_link - computed: true, optional: false, required: false
get serviceAttachmentLink() {
return this.getStringAttribute('service_attachment_link');
}
get pscAutoConnections() {
return this._pscAutoConnections;
}
putPscAutoConnections(value) {
this._pscAutoConnections.internalValue = value;
}
resetPscAutoConnections() {
this._pscAutoConnections.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get pscAutoConnectionsInput() {
return this._pscAutoConnections.internalValue;
}
get pscInterfaceConfigs() {
return this._pscInterfaceConfigs;
}
putPscInterfaceConfigs(value) {
this._pscInterfaceConfigs.internalValue = value;
}
resetPscInterfaceConfigs() {
this._pscInterfaceConfigs.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get pscInterfaceConfigsInput() {
return this._pscInterfaceConfigs.internalValue;
}
}
exports.AlloydbInstancePscInstanceConfigOutputReference = AlloydbInstancePscInstanceConfigOutputReference;
_l = JSII_RTTI_SYMBOL_1;
AlloydbInstancePscInstanceConfigOutputReference[_l] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstancePscInstanceConfigOutputReference", version: "14.35.0" };
function alloydbInstanceQueryInsightsConfigToTerraform(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 {
query_plans_per_minute: cdktf.numberToTerraform(struct.queryPlansPerMinute),
query_string_length: cdktf.numberToTerraform(struct.queryStringLength),
record_application_tags: cdktf.booleanToTerraform(struct.recordApplicationTags),
record_client_address: cdktf.booleanToTerraform(struct.recordClientAddress),
};
}
function alloydbInstanceQueryInsightsConfigToHclTerraform(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 = {
query_plans_per_minute: {
value: cdktf.numberToHclTerraform(struct.queryPlansPerMinute),
isBlock: false,
type: "simple",
storageClassType: "number",
},
query_string_length: {
value: cdktf.numberToHclTerraform(struct.queryStringLength),
isBlock: false,
type: "simple",
storageClassType: "number",
},
record_application_tags: {
value: cdktf.booleanToHclTerraform(struct.recordApplicationTags),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
record_client_address: {
value: cdktf.booleanToHclTerraform(struct.recordClientAddress),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class AlloydbInstanceQueryInsightsConfigOutputReference 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._queryPlansPerMinute !== undefined) {
hasAnyValues = true;
internalValueResult.queryPlansPerMinute = this._queryPlansPerMinute;
}
if (this._queryStringLength !== undefined) {
hasAnyValues = true;
internalValueResult.queryStringLength = this._queryStringLength;
}
if (this._recordApplicationTags !== undefined) {
hasAnyValues = true;
internalValueResult.recordApplicationTags = this._recordApplicationTags;
}
if (this._recordClientAddress !== undefined) {
hasAnyValues = true;
internalValueResult.recordClientAddress = this._recordClientAddress;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._queryPlansPerMinute = undefined;
this._queryStringLength = undefined;
this._recordApplicationTags = undefined;
this._recordClientAddress = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._queryPlansPerMinute = value.queryPlansPerMinute;
this._queryStringLength = value.queryStringLength;
this._recordApplicationTags = value.recordApplicationTags;
this._recordClientAddress = value.recordClientAddress;
}
}
get queryPlansPerMinute() {
return this.getNumberAttribute('query_plans_per_minute');
}
set queryPlansPerMinute(value) {
this._queryPlansPerMinute = value;
}
resetQueryPlansPerMinute() {
this._queryPlansPerMinute = undefined;
}
// Temporarily expose input value. Use with caution.
get queryPlansPerMinuteInput() {
return this._queryPlansPerMinute;
}
get queryStringLength() {
return this.getNumberAttribute('query_string_length');
}
set queryStringLength(value) {
this._queryStringLength = value;
}
resetQueryStringLength() {
this._queryStringLength = undefined;
}
// Temporarily expose input value. Use with caution.
get queryStringLengthInput() {
return this._queryStringLength;
}
get recordApplicationTags() {
return this.getBooleanAttribute('record_application_tags');
}
set recordApplicationTags(value) {
this._recordApplicationTags = value;
}
resetRecordApplicationTags() {
this._recordApplicationTags = undefined;
}
// Temporarily expose input value. Use with caution.
get recordApplicationTagsInput() {
return this._recordApplicationTags;
}
get recordClientAddress() {
return this.getBooleanAttribute('record_client_address');
}
set recordClientAddress(value) {
this._recordClientAddress = value;
}
resetRecordClientAddress() {
this._recordClientAddress = undefined;
}
// Temporarily expose input value. Use with caution.
get recordClientAddressInput() {
return this._recordClientAddress;
}
}
exports.AlloydbInstanceQueryInsightsConfigOutputReference = AlloydbInstanceQueryInsightsConfigOutputReference;
_m = JSII_RTTI_SYMBOL_1;
AlloydbInstanceQueryInsightsConfigOutputReference[_m] = { fqn: "@cdktf/provider-google.alloydbInstance.AlloydbInstanceQueryInsightsConfigOutputReference", version: "14.35.0" };
function alloydbInstanceReadPoolConfigToTerraform(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 {
node_count: cdktf.numberToTerraform(struct.nodeCount),
};
}
function alloydbInstanceReadPoolConfigToHclTerraform(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