rhizo-co-terraform-provider-oci
Version:
Prebuilt oci Provider for Terraform CDK (cdktf)
1,166 lines • 174 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CoreNetworkSecurityGroupSecurityRule = exports.CoreNetworkSecurityGroupSecurityRuleUdpOptionsOutputReference = exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsToHclTerraform = exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsToTerraform = exports.CoreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeOutputReference = exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToHclTerraform = exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToTerraform = exports.CoreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeOutputReference = exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToHclTerraform = exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToTerraform = exports.CoreNetworkSecurityGroupSecurityRuleTimeoutsOutputReference = exports.coreNetworkSecurityGroupSecurityRuleTimeoutsToHclTerraform = exports.coreNetworkSecurityGroupSecurityRuleTimeoutsToTerraform = exports.CoreNetworkSecurityGroupSecurityRuleTcpOptionsOutputReference = exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsToHclTerraform = exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsToTerraform = exports.CoreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeOutputReference = exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToHclTerraform = exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToTerraform = exports.CoreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeOutputReference = exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToHclTerraform = exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToTerraform = exports.CoreNetworkSecurityGroupSecurityRuleIcmpOptionsOutputReference = exports.coreNetworkSecurityGroupSecurityRuleIcmpOptionsToHclTerraform = exports.coreNetworkSecurityGroupSecurityRuleIcmpOptionsToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function coreNetworkSecurityGroupSecurityRuleIcmpOptionsToTerraform(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 {
code: cdktf.numberToTerraform(struct.code),
type: cdktf.numberToTerraform(struct.type),
};
}
exports.coreNetworkSecurityGroupSecurityRuleIcmpOptionsToTerraform = coreNetworkSecurityGroupSecurityRuleIcmpOptionsToTerraform;
function coreNetworkSecurityGroupSecurityRuleIcmpOptionsToHclTerraform(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 = {
code: {
value: cdktf.numberToHclTerraform(struct.code),
isBlock: false,
type: "simple",
storageClassType: "number",
},
type: {
value: cdktf.numberToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.coreNetworkSecurityGroupSecurityRuleIcmpOptionsToHclTerraform = coreNetworkSecurityGroupSecurityRuleIcmpOptionsToHclTerraform;
class CoreNetworkSecurityGroupSecurityRuleIcmpOptionsOutputReference 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._code !== undefined) {
hasAnyValues = true;
internalValueResult.code = this._code;
}
if (this._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._code = undefined;
this._type = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._code = value.code;
this._type = value.type;
}
}
get code() {
return this.getNumberAttribute('code');
}
set code(value) {
this._code = value;
}
resetCode() {
this._code = undefined;
}
// Temporarily expose input value. Use with caution.
get codeInput() {
return this._code;
}
get type() {
return this.getNumberAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.CoreNetworkSecurityGroupSecurityRuleIcmpOptionsOutputReference = CoreNetworkSecurityGroupSecurityRuleIcmpOptionsOutputReference;
_a = JSII_RTTI_SYMBOL_1;
CoreNetworkSecurityGroupSecurityRuleIcmpOptionsOutputReference[_a] = { fqn: "rhizo-co-terraform-provider-oci.coreNetworkSecurityGroupSecurityRule.CoreNetworkSecurityGroupSecurityRuleIcmpOptionsOutputReference", version: "1.0.0" };
function coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToTerraform(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 {
max: cdktf.numberToTerraform(struct.max),
min: cdktf.numberToTerraform(struct.min),
};
}
exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToTerraform = coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToTerraform;
function coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToHclTerraform(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 = {
max: {
value: cdktf.numberToHclTerraform(struct.max),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min: {
value: cdktf.numberToHclTerraform(struct.min),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToHclTerraform = coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToHclTerraform;
class CoreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeOutputReference 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._max !== undefined) {
hasAnyValues = true;
internalValueResult.max = this._max;
}
if (this._min !== undefined) {
hasAnyValues = true;
internalValueResult.min = this._min;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._max = undefined;
this._min = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._max = value.max;
this._min = value.min;
}
}
get max() {
return this.getNumberAttribute('max');
}
set max(value) {
this._max = value;
}
// Temporarily expose input value. Use with caution.
get maxInput() {
return this._max;
}
get min() {
return this.getNumberAttribute('min');
}
set min(value) {
this._min = value;
}
// Temporarily expose input value. Use with caution.
get minInput() {
return this._min;
}
}
exports.CoreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeOutputReference = CoreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeOutputReference;
_b = JSII_RTTI_SYMBOL_1;
CoreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeOutputReference[_b] = { fqn: "rhizo-co-terraform-provider-oci.coreNetworkSecurityGroupSecurityRule.CoreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeOutputReference", version: "1.0.0" };
function coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToTerraform(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 {
max: cdktf.numberToTerraform(struct.max),
min: cdktf.numberToTerraform(struct.min),
};
}
exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToTerraform = coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToTerraform;
function coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToHclTerraform(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 = {
max: {
value: cdktf.numberToHclTerraform(struct.max),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min: {
value: cdktf.numberToHclTerraform(struct.min),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToHclTerraform = coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToHclTerraform;
class CoreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeOutputReference 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._max !== undefined) {
hasAnyValues = true;
internalValueResult.max = this._max;
}
if (this._min !== undefined) {
hasAnyValues = true;
internalValueResult.min = this._min;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._max = undefined;
this._min = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._max = value.max;
this._min = value.min;
}
}
get max() {
return this.getNumberAttribute('max');
}
set max(value) {
this._max = value;
}
// Temporarily expose input value. Use with caution.
get maxInput() {
return this._max;
}
get min() {
return this.getNumberAttribute('min');
}
set min(value) {
this._min = value;
}
// Temporarily expose input value. Use with caution.
get minInput() {
return this._min;
}
}
exports.CoreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeOutputReference = CoreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeOutputReference;
_c = JSII_RTTI_SYMBOL_1;
CoreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeOutputReference[_c] = { fqn: "rhizo-co-terraform-provider-oci.coreNetworkSecurityGroupSecurityRule.CoreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeOutputReference", version: "1.0.0" };
function coreNetworkSecurityGroupSecurityRuleTcpOptionsToTerraform(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 {
destination_port_range: coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToTerraform(struct.destinationPortRange),
source_port_range: coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToTerraform(struct.sourcePortRange),
};
}
exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsToTerraform = coreNetworkSecurityGroupSecurityRuleTcpOptionsToTerraform;
function coreNetworkSecurityGroupSecurityRuleTcpOptionsToHclTerraform(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 = {
destination_port_range: {
value: coreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeToHclTerraform(struct.destinationPortRange),
isBlock: true,
type: "list",
storageClassType: "CoreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeList",
},
source_port_range: {
value: coreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeToHclTerraform(struct.sourcePortRange),
isBlock: true,
type: "list",
storageClassType: "CoreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.coreNetworkSecurityGroupSecurityRuleTcpOptionsToHclTerraform = coreNetworkSecurityGroupSecurityRuleTcpOptionsToHclTerraform;
class CoreNetworkSecurityGroupSecurityRuleTcpOptionsOutputReference 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;
// destination_port_range - computed: false, optional: true, required: false
this._destinationPortRange = new CoreNetworkSecurityGroupSecurityRuleTcpOptionsDestinationPortRangeOutputReference(this, "destination_port_range");
// source_port_range - computed: false, optional: true, required: false
this._sourcePortRange = new CoreNetworkSecurityGroupSecurityRuleTcpOptionsSourcePortRangeOutputReference(this, "source_port_range");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._destinationPortRange?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.destinationPortRange = this._destinationPortRange?.internalValue;
}
if (this._sourcePortRange?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.sourcePortRange = this._sourcePortRange?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._destinationPortRange.internalValue = undefined;
this._sourcePortRange.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._destinationPortRange.internalValue = value.destinationPortRange;
this._sourcePortRange.internalValue = value.sourcePortRange;
}
}
get destinationPortRange() {
return this._destinationPortRange;
}
putDestinationPortRange(value) {
this._destinationPortRange.internalValue = value;
}
resetDestinationPortRange() {
this._destinationPortRange.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get destinationPortRangeInput() {
return this._destinationPortRange.internalValue;
}
get sourcePortRange() {
return this._sourcePortRange;
}
putSourcePortRange(value) {
this._sourcePortRange.internalValue = value;
}
resetSourcePortRange() {
this._sourcePortRange.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get sourcePortRangeInput() {
return this._sourcePortRange.internalValue;
}
}
exports.CoreNetworkSecurityGroupSecurityRuleTcpOptionsOutputReference = CoreNetworkSecurityGroupSecurityRuleTcpOptionsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
CoreNetworkSecurityGroupSecurityRuleTcpOptionsOutputReference[_d] = { fqn: "rhizo-co-terraform-provider-oci.coreNetworkSecurityGroupSecurityRule.CoreNetworkSecurityGroupSecurityRuleTcpOptionsOutputReference", version: "1.0.0" };
function coreNetworkSecurityGroupSecurityRuleTimeoutsToTerraform(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.coreNetworkSecurityGroupSecurityRuleTimeoutsToTerraform = coreNetworkSecurityGroupSecurityRuleTimeoutsToTerraform;
function coreNetworkSecurityGroupSecurityRuleTimeoutsToHclTerraform(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.coreNetworkSecurityGroupSecurityRuleTimeoutsToHclTerraform = coreNetworkSecurityGroupSecurityRuleTimeoutsToHclTerraform;
class CoreNetworkSecurityGroupSecurityRuleTimeoutsOutputReference 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.CoreNetworkSecurityGroupSecurityRuleTimeoutsOutputReference = CoreNetworkSecurityGroupSecurityRuleTimeoutsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
CoreNetworkSecurityGroupSecurityRuleTimeoutsOutputReference[_e] = { fqn: "rhizo-co-terraform-provider-oci.coreNetworkSecurityGroupSecurityRule.CoreNetworkSecurityGroupSecurityRuleTimeoutsOutputReference", version: "1.0.0" };
function coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToTerraform(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 {
max: cdktf.numberToTerraform(struct.max),
min: cdktf.numberToTerraform(struct.min),
};
}
exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToTerraform = coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToTerraform;
function coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToHclTerraform(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 = {
max: {
value: cdktf.numberToHclTerraform(struct.max),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min: {
value: cdktf.numberToHclTerraform(struct.min),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToHclTerraform = coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToHclTerraform;
class CoreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeOutputReference 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._max !== undefined) {
hasAnyValues = true;
internalValueResult.max = this._max;
}
if (this._min !== undefined) {
hasAnyValues = true;
internalValueResult.min = this._min;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._max = undefined;
this._min = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._max = value.max;
this._min = value.min;
}
}
get max() {
return this.getNumberAttribute('max');
}
set max(value) {
this._max = value;
}
// Temporarily expose input value. Use with caution.
get maxInput() {
return this._max;
}
get min() {
return this.getNumberAttribute('min');
}
set min(value) {
this._min = value;
}
// Temporarily expose input value. Use with caution.
get minInput() {
return this._min;
}
}
exports.CoreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeOutputReference = CoreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeOutputReference;
_f = JSII_RTTI_SYMBOL_1;
CoreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeOutputReference[_f] = { fqn: "rhizo-co-terraform-provider-oci.coreNetworkSecurityGroupSecurityRule.CoreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeOutputReference", version: "1.0.0" };
function coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToTerraform(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 {
max: cdktf.numberToTerraform(struct.max),
min: cdktf.numberToTerraform(struct.min),
};
}
exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToTerraform = coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToTerraform;
function coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToHclTerraform(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 = {
max: {
value: cdktf.numberToHclTerraform(struct.max),
isBlock: false,
type: "simple",
storageClassType: "number",
},
min: {
value: cdktf.numberToHclTerraform(struct.min),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToHclTerraform = coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToHclTerraform;
class CoreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeOutputReference 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._max !== undefined) {
hasAnyValues = true;
internalValueResult.max = this._max;
}
if (this._min !== undefined) {
hasAnyValues = true;
internalValueResult.min = this._min;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._max = undefined;
this._min = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._max = value.max;
this._min = value.min;
}
}
get max() {
return this.getNumberAttribute('max');
}
set max(value) {
this._max = value;
}
// Temporarily expose input value. Use with caution.
get maxInput() {
return this._max;
}
get min() {
return this.getNumberAttribute('min');
}
set min(value) {
this._min = value;
}
// Temporarily expose input value. Use with caution.
get minInput() {
return this._min;
}
}
exports.CoreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeOutputReference = CoreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeOutputReference;
_g = JSII_RTTI_SYMBOL_1;
CoreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeOutputReference[_g] = { fqn: "rhizo-co-terraform-provider-oci.coreNetworkSecurityGroupSecurityRule.CoreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeOutputReference", version: "1.0.0" };
function coreNetworkSecurityGroupSecurityRuleUdpOptionsToTerraform(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 {
destination_port_range: coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToTerraform(struct.destinationPortRange),
source_port_range: coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToTerraform(struct.sourcePortRange),
};
}
exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsToTerraform = coreNetworkSecurityGroupSecurityRuleUdpOptionsToTerraform;
function coreNetworkSecurityGroupSecurityRuleUdpOptionsToHclTerraform(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 = {
destination_port_range: {
value: coreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeToHclTerraform(struct.destinationPortRange),
isBlock: true,
type: "list",
storageClassType: "CoreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeList",
},
source_port_range: {
value: coreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeToHclTerraform(struct.sourcePortRange),
isBlock: true,
type: "list",
storageClassType: "CoreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.coreNetworkSecurityGroupSecurityRuleUdpOptionsToHclTerraform = coreNetworkSecurityGroupSecurityRuleUdpOptionsToHclTerraform;
class CoreNetworkSecurityGroupSecurityRuleUdpOptionsOutputReference 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;
// destination_port_range - computed: false, optional: true, required: false
this._destinationPortRange = new CoreNetworkSecurityGroupSecurityRuleUdpOptionsDestinationPortRangeOutputReference(this, "destination_port_range");
// source_port_range - computed: false, optional: true, required: false
this._sourcePortRange = new CoreNetworkSecurityGroupSecurityRuleUdpOptionsSourcePortRangeOutputReference(this, "source_port_range");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._destinationPortRange?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.destinationPortRange = this._destinationPortRange?.internalValue;
}
if (this._sourcePortRange?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.sourcePortRange = this._sourcePortRange?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._destinationPortRange.internalValue = undefined;
this._sourcePortRange.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._destinationPortRange.internalValue = value.destinationPortRange;
this._sourcePortRange.internalValue = value.sourcePortRange;
}
}
get destinationPortRange() {
return this._destinationPortRange;
}
putDestinationPortRange(value) {
this._destinationPortRange.internalValue = value;
}
resetDestinationPortRange() {
this._destinationPortRange.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get destinationPortRangeInput() {
return this._destinationPortRange.internalValue;
}
get sourcePortRange() {
return this._sourcePortRange;
}
putSourcePortRange(value) {
this._sourcePortRange.internalValue = value;
}
resetSourcePortRange() {
this._sourcePortRange.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get sourcePortRangeInput() {
return this._sourcePortRange.internalValue;
}
}
exports.CoreNetworkSecurityGroupSecurityRuleUdpOptionsOutputReference = CoreNetworkSecurityGroupSecurityRuleUdpOptionsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
CoreNetworkSecurityGroupSecurityRuleUdpOptionsOutputReference[_h] = { fqn: "rhizo-co-terraform-provider-oci.coreNetworkSecurityGroupSecurityRule.CoreNetworkSecurityGroupSecurityRuleUdpOptionsOutputReference", version: "1.0.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/oracle/oci/6.18.0/docs/resources/core_network_security_group_security_rule oci_core_network_security_group_security_rule}
*/
class CoreNetworkSecurityGroupSecurityRule extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a CoreNetworkSecurityGroupSecurityRule 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 CoreNetworkSecurityGroupSecurityRule to import
* @param importFromId The id of the existing CoreNetworkSecurityGroupSecurityRule that should be imported. Refer to the {@link https://registry.terraform.io/providers/oracle/oci/6.18.0/docs/resources/core_network_security_group_security_rule#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the CoreNetworkSecurityGroupSecurityRule to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "oci_core_network_security_group_security_rule", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/oracle/oci/6.18.0/docs/resources/core_network_security_group_security_rule oci_core_network_security_group_security_rule} 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 CoreNetworkSecurityGroupSecurityRuleConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'oci_core_network_security_group_security_rule',
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
});
// icmp_options - computed: false, optional: true, required: false
this._icmpOptions = new CoreNetworkSecurityGroupSecurityRuleIcmpOptionsOutputReference(this, "icmp_options");
// tcp_options - computed: false, optional: true, required: false
this._tcpOptions = new CoreNetworkSecurityGroupSecurityRuleTcpOptionsOutputReference(this, "tcp_options");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new CoreNetworkSecurityGroupSecurityRuleTimeoutsOutputReference(this, "timeouts");
// udp_options - computed: false, optional: true, required: false
this._udpOptions = new CoreNetworkSecurityGroupSecurityRuleUdpOptionsOutputReference(this, "udp_options");
this._description = config.description;
this._destination = config.destination;
this._destinationType = config.destinationType;
this._direction = config.direction;
this._id = config.id;
this._networkSecurityGroupId = config.networkSecurityGroupId;
this._protocol = config.protocol;
this._source = config.source;
this._sourceType = config.sourceType;
this._stateless = config.stateless;
this._icmpOptions.internalValue = config.icmpOptions;
this._tcpOptions.internalValue = config.tcpOptions;
this._timeouts.internalValue = config.timeouts;
this._udpOptions.internalValue = config.udpOptions;
}
get description() {
return this.getStringAttribute('description');
}
set description(value) {
this._description = value;
}
resetDescription() {
this._description = undefined;
}
// Temporarily expose input value. Use with caution.
get descriptionInput() {
return this._description;
}
get destination() {
return this.getStringAttribute('destination');
}
set destination(value) {
this._destination = value;
}
resetDestination() {
this._destination = undefined;
}
// Temporarily expose input value. Use with caution.
get destinationInput() {
return this._destination;
}
get destinationType() {
return this.getStringAttribute('destination_type');
}
set destinationType(value) {
this._destinationType = value;
}
resetDestinationType() {
this._destinationType = undefined;
}
// Temporarily expose input value. Use with caution.
get destinationTypeInput() {
return this._destinationType;
}
get direction() {
return this.getStringAttribute('direction');
}
set direction(value) {
this._direction = value;
}
// Temporarily expose input value. Use with caution.
get directionInput() {
return this._direction;
}
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;
}
// is_valid - computed: true, optional: false, required: false
get isValid() {
return this.getBooleanAttribute('is_valid');
}
get networkSecurityGroupId() {
return this.getStringAttribute('network_security_group_id');
}
set networkSecurityGroupId(value) {
this._networkSecurityGroupId = value;
}
// Temporarily expose input value. Use with caution.
get networkSecurityGroupIdInput() {
return this._networkSecurityGroupId;
}
get protocol() {
return this.getStringAttribute('protocol');
}
set protocol(value) {
this._protocol = value;
}
// Temporarily expose input value. Use with caution.
get protocolInput() {
return this._protocol;
}
get source() {
return this.getStringAttribute('source');
}
set source(value) {
this._source = value;
}
resetSource() {
this._source = undefined;
}
// Temporarily expose input value. Use with caution.
get sourceInput() {
return this._source;
}
get sourceType() {
return this.getStringAttribute('source_type');
}
set sourceType(value) {
this._sourceType = value;
}
resetSourceType() {
this._sourceType = undefined;
}
// Temporarily expose input value. Use with caution.
get sourceTypeInput() {
return this._sourceType;
}
get stateless() {
return this.getBooleanAttribute('stateless');
}
set stateless(value) {
this._stateless = value;
}
resetStateless() {
this._stateless = undefined;
}
// Temporarily expose input value. Use with caution.
get statelessInput() {
return this._stateless;
}
// time_created - computed: true, optional: false, required: false
get timeCreated() {
return this.getStringAttribute('time_created');
}
get icmpOptions() {
return this._icmpOptions;
}
putIcmpOptions(value) {
this._icmpOptions.internalValue = value;
}
resetIcmpOptions() {
this._icmpOptions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get icmpOptionsInput() {
return this._icmpOptions.internalValue;
}
get tcpOptions() {
return this._tcpOptions;
}
putTcpOptions(value) {
this._tcpOptions.internalValue = value;
}
resetTcpOptions() {
this._tcpOptions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get tcpOptionsInput() {
return this._tcpOptions.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 udpOptions() {
return this._udpOptions;
}
putUdpOptions(value) {
this._udpOptions.internalValue = value;
}
resetUdpOptions() {
this._udpOptions.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get udpOptionsInput() {
return this._udpOptions.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
description: cdktf.stringToTerraform(this._description),
destination: cdktf.stringToTerraform(this._destination),
destination_type: cdktf.stringToTerraform(this._destinationType),
direction: cdktf.stringToTerraform(this._direction),
id: cdktf.stringToTerraform(this._id),
network_security_group_id: cdktf.stringToTerraform(this._networkSecurityGroupId),
protocol: cdktf.stringToTerraform(this._protocol),
source: cdktf.stringToTerraform(this._source),
source_type: cdktf.stringToTerraform(this._sourceType),
stateless: cdktf.booleanToTerraform(this._stateless),
icmp_options: coreNetworkSecurityGroupSecurityRuleIcmpOptionsToTerraform(this._icmpOptions.internalValue),
tcp_options: coreNetworkSecurityGroupSecurityRuleTcpOptionsToTerraform(this._tcpOptions.internalValue),
timeouts: coreNetworkSecurityGroupSecurityRuleTimeoutsToTerraform(this._timeouts.internalValue),
udp_options: coreNetworkSecurityGroupSecurityRuleUdpOptionsToTerraform(this._udpOptions.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
destination: {
value: cdktf.stringToHclTerraform(this._destination),
isBlock: false,
type: "simple",
storageClassType: "string",
},
destination_type: {
value: cdktf.stringToHclTerraform(this._destinationType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
direction: {
value: cdktf.stringToHclTerraform(this._direction),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
network_security_group_id: {
value: cdktf.stringToHclTerraform(this._networkSecurityGroupId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
protocol: {
value: cdktf.stringToHclTerraform(this._protocol),
isBlock: false,
type: "simple",
storageClassType: "string",
},
source: {
value: cdktf.stringToHclTerraform(this._source),
isBlock: false,
type: "simple",
storageClassType: "string",
},
source_type: {
value: cdktf.stringToHclTerraform(this._sourceType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
stateless: {
value: cdktf.booleanToHclTerraform(this._stateless),
isBlock: false,
type: "simpl