rhizo-co-terraform-provider-oci
Version:
Prebuilt oci Provider for Terraform CDK (cdktf)
1,296 lines (1,295 loc) • 206 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OpsiDatabaseInsight = exports.OpsiDatabaseInsightTimeoutsOutputReference = exports.opsiDatabaseInsightTimeoutsToHclTerraform = exports.opsiDatabaseInsightTimeoutsToTerraform = exports.OpsiDatabaseInsightCredentialDetailsOutputReference = exports.opsiDatabaseInsightCredentialDetailsToHclTerraform = exports.opsiDatabaseInsightCredentialDetailsToTerraform = exports.OpsiDatabaseInsightConnectionDetailsOutputReference = exports.opsiDatabaseInsightConnectionDetailsToHclTerraform = exports.opsiDatabaseInsightConnectionDetailsToTerraform = exports.OpsiDatabaseInsightConnectionDetailsHostsList = exports.OpsiDatabaseInsightConnectionDetailsHostsOutputReference = exports.opsiDatabaseInsightConnectionDetailsHostsToHclTerraform = exports.opsiDatabaseInsightConnectionDetailsHostsToTerraform = exports.OpsiDatabaseInsightConnectionCredentialDetailsOutputReference = exports.opsiDatabaseInsightConnectionCredentialDetailsToHclTerraform = exports.opsiDatabaseInsightConnectionCredentialDetailsToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function opsiDatabaseInsightConnectionCredentialDetailsToTerraform(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 {
credential_source_name: cdktf.stringToTerraform(struct.credentialSourceName),
credential_type: cdktf.stringToTerraform(struct.credentialType),
password_secret_id: cdktf.stringToTerraform(struct.passwordSecretId),
role: cdktf.stringToTerraform(struct.role),
user_name: cdktf.stringToTerraform(struct.userName),
};
}
exports.opsiDatabaseInsightConnectionCredentialDetailsToTerraform = opsiDatabaseInsightConnectionCredentialDetailsToTerraform;
function opsiDatabaseInsightConnectionCredentialDetailsToHclTerraform(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 = {
credential_source_name: {
value: cdktf.stringToHclTerraform(struct.credentialSourceName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
credential_type: {
value: cdktf.stringToHclTerraform(struct.credentialType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
password_secret_id: {
value: cdktf.stringToHclTerraform(struct.passwordSecretId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
role: {
value: cdktf.stringToHclTerraform(struct.role),
isBlock: false,
type: "simple",
storageClassType: "string",
},
user_name: {
value: cdktf.stringToHclTerraform(struct.userName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opsiDatabaseInsightConnectionCredentialDetailsToHclTerraform = opsiDatabaseInsightConnectionCredentialDetailsToHclTerraform;
class OpsiDatabaseInsightConnectionCredentialDetailsOutputReference 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._credentialSourceName !== undefined) {
hasAnyValues = true;
internalValueResult.credentialSourceName = this._credentialSourceName;
}
if (this._credentialType !== undefined) {
hasAnyValues = true;
internalValueResult.credentialType = this._credentialType;
}
if (this._passwordSecretId !== undefined) {
hasAnyValues = true;
internalValueResult.passwordSecretId = this._passwordSecretId;
}
if (this._role !== undefined) {
hasAnyValues = true;
internalValueResult.role = this._role;
}
if (this._userName !== undefined) {
hasAnyValues = true;
internalValueResult.userName = this._userName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._credentialSourceName = undefined;
this._credentialType = undefined;
this._passwordSecretId = undefined;
this._role = undefined;
this._userName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._credentialSourceName = value.credentialSourceName;
this._credentialType = value.credentialType;
this._passwordSecretId = value.passwordSecretId;
this._role = value.role;
this._userName = value.userName;
}
}
get credentialSourceName() {
return this.getStringAttribute('credential_source_name');
}
set credentialSourceName(value) {
this._credentialSourceName = value;
}
resetCredentialSourceName() {
this._credentialSourceName = undefined;
}
// Temporarily expose input value. Use with caution.
get credentialSourceNameInput() {
return this._credentialSourceName;
}
get credentialType() {
return this.getStringAttribute('credential_type');
}
set credentialType(value) {
this._credentialType = value;
}
// Temporarily expose input value. Use with caution.
get credentialTypeInput() {
return this._credentialType;
}
get passwordSecretId() {
return this.getStringAttribute('password_secret_id');
}
set passwordSecretId(value) {
this._passwordSecretId = value;
}
resetPasswordSecretId() {
this._passwordSecretId = undefined;
}
// Temporarily expose input value. Use with caution.
get passwordSecretIdInput() {
return this._passwordSecretId;
}
get role() {
return this.getStringAttribute('role');
}
set role(value) {
this._role = value;
}
resetRole() {
this._role = undefined;
}
// Temporarily expose input value. Use with caution.
get roleInput() {
return this._role;
}
get userName() {
return this.getStringAttribute('user_name');
}
set userName(value) {
this._userName = value;
}
resetUserName() {
this._userName = undefined;
}
// Temporarily expose input value. Use with caution.
get userNameInput() {
return this._userName;
}
}
exports.OpsiDatabaseInsightConnectionCredentialDetailsOutputReference = OpsiDatabaseInsightConnectionCredentialDetailsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
OpsiDatabaseInsightConnectionCredentialDetailsOutputReference[_a] = { fqn: "rhizo-co-terraform-provider-oci.opsiDatabaseInsight.OpsiDatabaseInsightConnectionCredentialDetailsOutputReference", version: "1.0.0" };
function opsiDatabaseInsightConnectionDetailsHostsToTerraform(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 {
host_ip: cdktf.stringToTerraform(struct.hostIp),
port: cdktf.numberToTerraform(struct.port),
};
}
exports.opsiDatabaseInsightConnectionDetailsHostsToTerraform = opsiDatabaseInsightConnectionDetailsHostsToTerraform;
function opsiDatabaseInsightConnectionDetailsHostsToHclTerraform(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 = {
host_ip: {
value: cdktf.stringToHclTerraform(struct.hostIp),
isBlock: false,
type: "simple",
storageClassType: "string",
},
port: {
value: cdktf.numberToHclTerraform(struct.port),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opsiDatabaseInsightConnectionDetailsHostsToHclTerraform = opsiDatabaseInsightConnectionDetailsHostsToHclTerraform;
class OpsiDatabaseInsightConnectionDetailsHostsOutputReference 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._hostIp !== undefined) {
hasAnyValues = true;
internalValueResult.hostIp = this._hostIp;
}
if (this._port !== undefined) {
hasAnyValues = true;
internalValueResult.port = this._port;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._hostIp = undefined;
this._port = 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._hostIp = value.hostIp;
this._port = value.port;
}
}
get hostIp() {
return this.getStringAttribute('host_ip');
}
set hostIp(value) {
this._hostIp = value;
}
resetHostIp() {
this._hostIp = undefined;
}
// Temporarily expose input value. Use with caution.
get hostIpInput() {
return this._hostIp;
}
get port() {
return this.getNumberAttribute('port');
}
set port(value) {
this._port = value;
}
resetPort() {
this._port = undefined;
}
// Temporarily expose input value. Use with caution.
get portInput() {
return this._port;
}
}
exports.OpsiDatabaseInsightConnectionDetailsHostsOutputReference = OpsiDatabaseInsightConnectionDetailsHostsOutputReference;
_b = JSII_RTTI_SYMBOL_1;
OpsiDatabaseInsightConnectionDetailsHostsOutputReference[_b] = { fqn: "rhizo-co-terraform-provider-oci.opsiDatabaseInsight.OpsiDatabaseInsightConnectionDetailsHostsOutputReference", version: "1.0.0" };
class OpsiDatabaseInsightConnectionDetailsHostsList 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 OpsiDatabaseInsightConnectionDetailsHostsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.OpsiDatabaseInsightConnectionDetailsHostsList = OpsiDatabaseInsightConnectionDetailsHostsList;
_c = JSII_RTTI_SYMBOL_1;
OpsiDatabaseInsightConnectionDetailsHostsList[_c] = { fqn: "rhizo-co-terraform-provider-oci.opsiDatabaseInsight.OpsiDatabaseInsightConnectionDetailsHostsList", version: "1.0.0" };
function opsiDatabaseInsightConnectionDetailsToTerraform(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 {
host_name: cdktf.stringToTerraform(struct.hostName),
port: cdktf.numberToTerraform(struct.port),
protocol: cdktf.stringToTerraform(struct.protocol),
service_name: cdktf.stringToTerraform(struct.serviceName),
hosts: cdktf.listMapper(opsiDatabaseInsightConnectionDetailsHostsToTerraform, true)(struct.hosts),
};
}
exports.opsiDatabaseInsightConnectionDetailsToTerraform = opsiDatabaseInsightConnectionDetailsToTerraform;
function opsiDatabaseInsightConnectionDetailsToHclTerraform(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 = {
host_name: {
value: cdktf.stringToHclTerraform(struct.hostName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
port: {
value: cdktf.numberToHclTerraform(struct.port),
isBlock: false,
type: "simple",
storageClassType: "number",
},
protocol: {
value: cdktf.stringToHclTerraform(struct.protocol),
isBlock: false,
type: "simple",
storageClassType: "string",
},
service_name: {
value: cdktf.stringToHclTerraform(struct.serviceName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
hosts: {
value: cdktf.listMapperHcl(opsiDatabaseInsightConnectionDetailsHostsToHclTerraform, true)(struct.hosts),
isBlock: true,
type: "list",
storageClassType: "OpsiDatabaseInsightConnectionDetailsHostsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opsiDatabaseInsightConnectionDetailsToHclTerraform = opsiDatabaseInsightConnectionDetailsToHclTerraform;
class OpsiDatabaseInsightConnectionDetailsOutputReference 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;
// hosts - computed: false, optional: true, required: false
this._hosts = new OpsiDatabaseInsightConnectionDetailsHostsList(this, "hosts", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._hostName !== undefined) {
hasAnyValues = true;
internalValueResult.hostName = this._hostName;
}
if (this._port !== undefined) {
hasAnyValues = true;
internalValueResult.port = this._port;
}
if (this._protocol !== undefined) {
hasAnyValues = true;
internalValueResult.protocol = this._protocol;
}
if (this._serviceName !== undefined) {
hasAnyValues = true;
internalValueResult.serviceName = this._serviceName;
}
if (this._hosts?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.hosts = this._hosts?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._hostName = undefined;
this._port = undefined;
this._protocol = undefined;
this._serviceName = undefined;
this._hosts.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._hostName = value.hostName;
this._port = value.port;
this._protocol = value.protocol;
this._serviceName = value.serviceName;
this._hosts.internalValue = value.hosts;
}
}
get hostName() {
return this.getStringAttribute('host_name');
}
set hostName(value) {
this._hostName = value;
}
resetHostName() {
this._hostName = undefined;
}
// Temporarily expose input value. Use with caution.
get hostNameInput() {
return this._hostName;
}
get port() {
return this.getNumberAttribute('port');
}
set port(value) {
this._port = value;
}
resetPort() {
this._port = undefined;
}
// Temporarily expose input value. Use with caution.
get portInput() {
return this._port;
}
get protocol() {
return this.getStringAttribute('protocol');
}
set protocol(value) {
this._protocol = value;
}
resetProtocol() {
this._protocol = undefined;
}
// Temporarily expose input value. Use with caution.
get protocolInput() {
return this._protocol;
}
get serviceName() {
return this.getStringAttribute('service_name');
}
set serviceName(value) {
this._serviceName = value;
}
resetServiceName() {
this._serviceName = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceNameInput() {
return this._serviceName;
}
get hosts() {
return this._hosts;
}
putHosts(value) {
this._hosts.internalValue = value;
}
resetHosts() {
this._hosts.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get hostsInput() {
return this._hosts.internalValue;
}
}
exports.OpsiDatabaseInsightConnectionDetailsOutputReference = OpsiDatabaseInsightConnectionDetailsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
OpsiDatabaseInsightConnectionDetailsOutputReference[_d] = { fqn: "rhizo-co-terraform-provider-oci.opsiDatabaseInsight.OpsiDatabaseInsightConnectionDetailsOutputReference", version: "1.0.0" };
function opsiDatabaseInsightCredentialDetailsToTerraform(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 {
credential_source_name: cdktf.stringToTerraform(struct.credentialSourceName),
credential_type: cdktf.stringToTerraform(struct.credentialType),
password_secret_id: cdktf.stringToTerraform(struct.passwordSecretId),
role: cdktf.stringToTerraform(struct.role),
user_name: cdktf.stringToTerraform(struct.userName),
wallet_secret_id: cdktf.stringToTerraform(struct.walletSecretId),
};
}
exports.opsiDatabaseInsightCredentialDetailsToTerraform = opsiDatabaseInsightCredentialDetailsToTerraform;
function opsiDatabaseInsightCredentialDetailsToHclTerraform(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 = {
credential_source_name: {
value: cdktf.stringToHclTerraform(struct.credentialSourceName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
credential_type: {
value: cdktf.stringToHclTerraform(struct.credentialType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
password_secret_id: {
value: cdktf.stringToHclTerraform(struct.passwordSecretId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
role: {
value: cdktf.stringToHclTerraform(struct.role),
isBlock: false,
type: "simple",
storageClassType: "string",
},
user_name: {
value: cdktf.stringToHclTerraform(struct.userName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
wallet_secret_id: {
value: cdktf.stringToHclTerraform(struct.walletSecretId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opsiDatabaseInsightCredentialDetailsToHclTerraform = opsiDatabaseInsightCredentialDetailsToHclTerraform;
class OpsiDatabaseInsightCredentialDetailsOutputReference 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._credentialSourceName !== undefined) {
hasAnyValues = true;
internalValueResult.credentialSourceName = this._credentialSourceName;
}
if (this._credentialType !== undefined) {
hasAnyValues = true;
internalValueResult.credentialType = this._credentialType;
}
if (this._passwordSecretId !== undefined) {
hasAnyValues = true;
internalValueResult.passwordSecretId = this._passwordSecretId;
}
if (this._role !== undefined) {
hasAnyValues = true;
internalValueResult.role = this._role;
}
if (this._userName !== undefined) {
hasAnyValues = true;
internalValueResult.userName = this._userName;
}
if (this._walletSecretId !== undefined) {
hasAnyValues = true;
internalValueResult.walletSecretId = this._walletSecretId;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._credentialSourceName = undefined;
this._credentialType = undefined;
this._passwordSecretId = undefined;
this._role = undefined;
this._userName = undefined;
this._walletSecretId = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._credentialSourceName = value.credentialSourceName;
this._credentialType = value.credentialType;
this._passwordSecretId = value.passwordSecretId;
this._role = value.role;
this._userName = value.userName;
this._walletSecretId = value.walletSecretId;
}
}
get credentialSourceName() {
return this.getStringAttribute('credential_source_name');
}
set credentialSourceName(value) {
this._credentialSourceName = value;
}
resetCredentialSourceName() {
this._credentialSourceName = undefined;
}
// Temporarily expose input value. Use with caution.
get credentialSourceNameInput() {
return this._credentialSourceName;
}
get credentialType() {
return this.getStringAttribute('credential_type');
}
set credentialType(value) {
this._credentialType = value;
}
// Temporarily expose input value. Use with caution.
get credentialTypeInput() {
return this._credentialType;
}
get passwordSecretId() {
return this.getStringAttribute('password_secret_id');
}
set passwordSecretId(value) {
this._passwordSecretId = value;
}
resetPasswordSecretId() {
this._passwordSecretId = undefined;
}
// Temporarily expose input value. Use with caution.
get passwordSecretIdInput() {
return this._passwordSecretId;
}
get role() {
return this.getStringAttribute('role');
}
set role(value) {
this._role = value;
}
resetRole() {
this._role = undefined;
}
// Temporarily expose input value. Use with caution.
get roleInput() {
return this._role;
}
get userName() {
return this.getStringAttribute('user_name');
}
set userName(value) {
this._userName = value;
}
resetUserName() {
this._userName = undefined;
}
// Temporarily expose input value. Use with caution.
get userNameInput() {
return this._userName;
}
get walletSecretId() {
return this.getStringAttribute('wallet_secret_id');
}
set walletSecretId(value) {
this._walletSecretId = value;
}
resetWalletSecretId() {
this._walletSecretId = undefined;
}
// Temporarily expose input value. Use with caution.
get walletSecretIdInput() {
return this._walletSecretId;
}
}
exports.OpsiDatabaseInsightCredentialDetailsOutputReference = OpsiDatabaseInsightCredentialDetailsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
OpsiDatabaseInsightCredentialDetailsOutputReference[_e] = { fqn: "rhizo-co-terraform-provider-oci.opsiDatabaseInsight.OpsiDatabaseInsightCredentialDetailsOutputReference", version: "1.0.0" };
function opsiDatabaseInsightTimeoutsToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
create: cdktf.stringToTerraform(struct.create),
delete: cdktf.stringToTerraform(struct.delete),
update: cdktf.stringToTerraform(struct.update),
};
}
exports.opsiDatabaseInsightTimeoutsToTerraform = opsiDatabaseInsightTimeoutsToTerraform;
function opsiDatabaseInsightTimeoutsToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
create: {
value: cdktf.stringToHclTerraform(struct.create),
isBlock: false,
type: "simple",
storageClassType: "string",
},
delete: {
value: cdktf.stringToHclTerraform(struct.delete),
isBlock: false,
type: "simple",
storageClassType: "string",
},
update: {
value: cdktf.stringToHclTerraform(struct.update),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.opsiDatabaseInsightTimeoutsToHclTerraform = opsiDatabaseInsightTimeoutsToHclTerraform;
class OpsiDatabaseInsightTimeoutsOutputReference 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.OpsiDatabaseInsightTimeoutsOutputReference = OpsiDatabaseInsightTimeoutsOutputReference;
_f = JSII_RTTI_SYMBOL_1;
OpsiDatabaseInsightTimeoutsOutputReference[_f] = { fqn: "rhizo-co-terraform-provider-oci.opsiDatabaseInsight.OpsiDatabaseInsightTimeoutsOutputReference", version: "1.0.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/oracle/oci/6.18.0/docs/resources/opsi_database_insight oci_opsi_database_insight}
*/
class OpsiDatabaseInsight extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a OpsiDatabaseInsight 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 OpsiDatabaseInsight to import
* @param importFromId The id of the existing OpsiDatabaseInsight that should be imported. Refer to the {@link https://registry.terraform.io/providers/oracle/oci/6.18.0/docs/resources/opsi_database_insight#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the OpsiDatabaseInsight to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "oci_opsi_database_insight", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/oracle/oci/6.18.0/docs/resources/opsi_database_insight oci_opsi_database_insight} 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 OpsiDatabaseInsightConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'oci_opsi_database_insight',
terraformGeneratorMetadata: {
providerName: 'oci',
providerVersion: '6.18.0',
providerVersionConstraint: '~> 6.18.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// system_tags - computed: true, optional: false, required: false
this._systemTags = new cdktf.StringMap(this, "system_tags");
// connection_credential_details - computed: false, optional: true, required: false
this._connectionCredentialDetails = new OpsiDatabaseInsightConnectionCredentialDetailsOutputReference(this, "connection_credential_details");
// connection_details - computed: false, optional: true, required: false
this._connectionDetails = new OpsiDatabaseInsightConnectionDetailsOutputReference(this, "connection_details");
// credential_details - computed: false, optional: true, required: false
this._credentialDetails = new OpsiDatabaseInsightCredentialDetailsOutputReference(this, "credential_details");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new OpsiDatabaseInsightTimeoutsOutputReference(this, "timeouts");
this._compartmentId = config.compartmentId;
this._connectorId = config.connectorId;
this._databaseConnectionStatusDetails = config.databaseConnectionStatusDetails;
this._databaseId = config.databaseId;
this._databaseResourceType = config.databaseResourceType;
this._dbmPrivateEndpointId = config.dbmPrivateEndpointId;
this._definedTags = config.definedTags;
this._deploymentType = config.deploymentType;
this._enterpriseManagerBridgeId = config.enterpriseManagerBridgeId;
this._enterpriseManagerEntityIdentifier = config.enterpriseManagerEntityIdentifier;
this._enterpriseManagerIdentifier = config.enterpriseManagerIdentifier;
this._entitySource = config.entitySource;
this._exadataInsightId = config.exadataInsightId;
this._freeformTags = config.freeformTags;
this._id = config.id;
this._isAdvancedFeaturesEnabled = config.isAdvancedFeaturesEnabled;
this._managementAgentId = config.managementAgentId;
this._opsiPrivateEndpointId = config.opsiPrivateEndpointId;
this._serviceName = config.serviceName;
this._status = config.status;
this._connectionCredentialDetails.internalValue = config.connectionCredentialDetails;
this._connectionDetails.internalValue = config.connectionDetails;
this._credentialDetails.internalValue = config.credentialDetails;
this._timeouts.internalValue = config.timeouts;
}
get compartmentId() {
return this.getStringAttribute('compartment_id');
}
set compartmentId(value) {
this._compartmentId = value;
}
// Temporarily expose input value. Use with caution.
get compartmentIdInput() {
return this._compartmentId;
}
get connectorId() {
return this.getStringAttribute('connector_id');
}
set connectorId(value) {
this._connectorId = value;
}
resetConnectorId() {
this._connectorId = undefined;
}
// Temporarily expose input value. Use with caution.
get connectorIdInput() {
return this._connectorId;
}
get databaseConnectionStatusDetails() {
return this.getStringAttribute('database_connection_status_details');
}
set databaseConnectionStatusDetails(value) {
this._databaseConnectionStatusDetails = value;
}
resetDatabaseConnectionStatusDetails() {
this._databaseConnectionStatusDetails = undefined;
}
// Temporarily expose input value. Use with caution.
get databaseConnectionStatusDetailsInput() {
return this._databaseConnectionStatusDetails;
}
// database_display_name - computed: true, optional: false, required: false
get databaseDisplayName() {
return this.getStringAttribute('database_display_name');
}
get databaseId() {
return this.getStringAttribute('database_id');
}
set databaseId(value) {
this._databaseId = value;
}
resetDatabaseId() {
this._databaseId = undefined;
}
// Temporarily expose input value. Use with caution.
get databaseIdInput() {
return this._databaseId;
}
// database_name - computed: true, optional: false, required: false
get databaseName() {
return this.getStringAttribute('database_name');
}
get databaseResourceType() {
return this.getStringAttribute('database_resource_type');
}
set databaseResourceType(value) {
this._databaseResourceType = value;
}
resetDatabaseResourceType() {
this._databaseResourceType = undefined;
}
// Temporarily expose input value. Use with caution.
get databaseResourceTypeInput() {
return this._databaseResourceType;
}
// database_type - computed: true, optional: false, required: false
get databaseType() {
return this.getStringAttribute('database_type');
}
// database_version - computed: true, optional: false, required: false
get databaseVersion() {
return this.getStringAttribute('database_version');
}
get dbmPrivateEndpointId() {
return this.getStringAttribute('dbm_private_endpoint_id');
}
set dbmPrivateEndpointId(value) {
this._dbmPrivateEndpointId = value;
}
resetDbmPrivateEndpointId() {
this._dbmPrivateEndpointId = undefined;
}
// Temporarily expose input value. Use with caution.
get dbmPrivateEndpointIdInput() {
return this._dbmPrivateEndpointId;
}
get definedTags() {
return this.getStringMapAttribute('defined_tags');
}
set definedTags(value) {
this._definedTags = value;
}
resetDefinedTags() {
this._definedTags = undefined;
}
// Temporarily expose input value. Use with caution.
get definedTagsInput() {
return this._definedTags;
}
get deploymentType() {
return this.getStringAttribute('deployment_type');
}
set deploymentType(value) {
this._deploymentType = value;
}
resetDeploymentType() {
this._deploymentType = undefined;
}
// Temporarily expose input value. Use with caution.
get deploymentTypeInput() {
return this._deploymentType;
}
get enterpriseManagerBridgeId() {
return this.getStringAttribute('enterprise_manager_bridge_id');
}
set enterpriseManagerBridgeId(value) {
this._enterpriseManagerBridgeId = value;
}
resetEnterpriseManagerBridgeId() {
this._enterpriseManagerBridgeId = undefined;
}
// Temporarily expose input value. Use with caution.
get enterpriseManagerBridgeIdInput() {
return this._enterpriseManagerBridgeId;
}
// enterprise_manager_entity_display_name - computed: true, optional: false, required: false
get enterpriseManagerEntityDisplayName() {
return this.getStringAttribute('enterprise_manager_entity_display_name');
}
get enterpriseManagerEntityIdentifier() {
return this.getStringAttribute('enterprise_manager_entity_identifier');
}
set enterpriseManagerEntityIdentifier(value) {
this._enterpriseManagerEntityIdentifier = value;
}
resetEnterpriseManagerEntityIdentifier() {
this._enterpriseManagerEntityIdentifier = undefined;
}
// Temporarily expose input value. Use with caution.
get enterpriseManagerEntityIdentifierInput() {
return this._enterpriseManagerEntityIdentifier;
}
// enterprise_manager_entity_name - computed: true, optional: false, required: false
get enterpriseManagerEntityName() {
return this.getStringAttribute('enterprise_manager_entity_name');
}
// enterprise_manager_entity_type - computed: true, optional: false, required: false
get enterpriseManagerEntityType() {
return this.getStringAttribute('enterprise_manager_entity_type');
}
get enterpriseManagerIdentifier() {
return this.getStringAttribute('enterprise_manager_identifier');
}
set enterpriseManagerIdentifier(value) {
this._enterpriseManagerIdentifier = value;
}
resetEnterpriseManagerIdentifier() {
this._enterpriseManagerIdentifier = undefined;
}
// Temporarily expose input value. Use with caution.
get enterpriseManagerIdentifierInput() {
return this._enterpriseManagerIdentifier;
}
get entitySource() {
return this.getStringAttribute('entity_source');
}
set entitySource(value) {
this._entitySource = value;
}
// Temporarily expose input value. Use with caution.
get entitySourceInput() {
return this._entitySource;
}
get exadataInsightId() {
return this.getStringAttribute('exadata_insight_id');
}
set exadataInsightId(value) {
this._exadataInsightId = value;
}
resetExadataInsightId() {
this._exadataInsightId = undefined;
}
// Temporarily expose input value. Use with caution.
get exadataInsightIdInput() {
return this._exadataInsightId;
}
get freeformTags() {
return this.getStringMapAttribute('freeform_tags');
}
set freeformTags(value) {
this._freeformTags = value;
}
resetFreeformTags() {
this._freeformTags = undefined;
}
// Temporarily expose input value. Use with caution.
get freeformTagsInput() {
return this._freeformTags;
}
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 isAdvancedFeaturesEnabled() {
return this.getBooleanAttribute('is_advanced_features_enabled');
}
set isAdvancedFeaturesEnabled(value) {
this._isAdvancedFeaturesEnabled = value;
}
resetIsAdvancedFeaturesEnabled() {
this._isAdvancedFeaturesEnabled = undefined;
}
// Temporarily expose input value. Use with caution.
get isAdvancedFeaturesEnabledInput() {
return this._isAdvancedFeaturesEnabled;
}
// is_heat_wave_cluster_attached - computed: true, optional: false, required: false
get isHeatWaveClusterAttached() {
return this.getBooleanAttribute('is_heat_wave_cluster_attached');
}
// is_highly_available - computed: true, optional: false, required: false
get isHighlyAvailable() {
return this.getBooleanAttribute('is_highly_available');
}
// lifecycle_details - computed: true, optional: false, required: false
get lifecycleDetails() {
return this.getStringAttribute('lifecycle_details');
}
get managementAgentId() {
return this.getStringAttribute('management_agent_id');
}
set managementAgentId(value) {
this._managementAgentId = value;
}
resetManagementAgentId() {
this._managementAgentId = undefined;
}
// Temporarily expose input value. Use with caution.
get managementAgentIdInput() {
return this._managementAgentId;
}
get opsiPrivateEndpointId() {
return this.getStringAttribute('opsi_private_endpoint_id');
}
set opsiPrivateEndpointId(value) {
this._opsiPrivateEndpointId = value;
}
resetOpsiPrivateEndpointId() {
this._opsiPrivateEndpointId = undefined;
}
// Temporarily expose input value. Use with caution.
get opsiPrivateEndpointIdInput() {
return this._opsiPrivateEndpointId;
}
// parent_id - computed: true, optional: false, required: false
get parentId() {
return this.getStringAttribute('parent_id');
}
// processor_count - computed: true, optional: false, required: false
get processorCount() {
return this.getNumberAttribute('processor_count');
}
// root_id - computed: true, optional: false, required: false
get rootId() {
return this.getStringAttribute('root_id');
}
get serviceName() {
return this.getStringAttribute('service_name');
}
set serviceName(value) {
this._serviceName = value;
}
resetServiceName() {
this._serviceName = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceNameInput() {
return this._serviceName;
}
// state - computed: true, optional: false, required: false
get state() {
return this.getStringAttribute('state');
}
get status() {
return this.getStringAttribute('status');
}
set status(value) {
this._status = value;
}
resetStatus() {
this._status = undefined;
}
// Temporarily expose input value. Use with caution.
get statusInput() {
return this._status;
}
get systemTags() {
return this._systemTags;
}
// time_created - computed: true, optional: false, required: false
get timeCreated() {
return this.getStringAttribute('time_created');
}
// time_updated - computed: true, optional: false, required: false
get timeUpdated() {
return this.getStringAttribute('time_updated');
}
get connectionCredentialDetails() {
return this._connectionCredentialDetails;
}
putConnectionCredentialDetails(value) {
this._connectionCredentialDetails.internalValue = value;
}
resetConnectionCredentialDetails() {
this._connectionCredentialDetails.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get connectionCredentialDetailsInput() {
return this._connectionCredentialDetails.internalValue;
}
get connectionDetails() {
return this._connectionDetails;
}
putConnectionDetails(value) {
this._connectionDetails.internalValue = value;
}
resetConnectionDetails() {
this._connectionDetails.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get connectionDetailsInput() {
return this._connectionDetails.internalValue;
}
get credentialDetails() {
return this._credentialDetails;
}
putCredentialDetails(value) {
this._credentialDetails.internalValue = value;
}
resetCredentialDetails() {
this._credentialDetails.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get credentialDetailsInput() {
return this._credentialDetails.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() {