@cdktf/provider-upcloud
Version:
Prebuilt upcloud Provider for Terraform CDK (cdktf)
984 lines (983 loc) • 717 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LoadbalancerFrontendRuleMatchersUrlParamList = exports.LoadbalancerFrontendRuleMatchersUrlParamOutputReference = exports.LoadbalancerFrontendRuleMatchersUrlList = exports.LoadbalancerFrontendRuleMatchersUrlOutputReference = exports.LoadbalancerFrontendRuleMatchersSrcPortRangeList = exports.LoadbalancerFrontendRuleMatchersSrcPortRangeOutputReference = exports.LoadbalancerFrontendRuleMatchersSrcPortList = exports.LoadbalancerFrontendRuleMatchersSrcPortOutputReference = exports.LoadbalancerFrontendRuleMatchersSrcIpList = exports.LoadbalancerFrontendRuleMatchersSrcIpOutputReference = exports.LoadbalancerFrontendRuleMatchersResponseHeaderList = exports.LoadbalancerFrontendRuleMatchersResponseHeaderOutputReference = exports.LoadbalancerFrontendRuleMatchersRequestHeaderList = exports.LoadbalancerFrontendRuleMatchersRequestHeaderOutputReference = exports.LoadbalancerFrontendRuleMatchersPathList = exports.LoadbalancerFrontendRuleMatchersPathOutputReference = exports.LoadbalancerFrontendRuleMatchersNumMembersUpList = exports.LoadbalancerFrontendRuleMatchersNumMembersUpOutputReference = exports.LoadbalancerFrontendRuleMatchersHttpStatusRangeList = exports.LoadbalancerFrontendRuleMatchersHttpStatusRangeOutputReference = exports.LoadbalancerFrontendRuleMatchersHttpStatusList = exports.LoadbalancerFrontendRuleMatchersHttpStatusOutputReference = exports.LoadbalancerFrontendRuleMatchersHttpMethodList = exports.LoadbalancerFrontendRuleMatchersHttpMethodOutputReference = exports.LoadbalancerFrontendRuleMatchersHostList = exports.LoadbalancerFrontendRuleMatchersHostOutputReference = exports.LoadbalancerFrontendRuleMatchersHeaderList = exports.LoadbalancerFrontendRuleMatchersHeaderOutputReference = exports.LoadbalancerFrontendRuleMatchersCookieList = exports.LoadbalancerFrontendRuleMatchersCookieOutputReference = exports.LoadbalancerFrontendRuleMatchersBodySizeRangeList = exports.LoadbalancerFrontendRuleMatchersBodySizeRangeOutputReference = exports.LoadbalancerFrontendRuleMatchersBodySizeList = exports.LoadbalancerFrontendRuleMatchersBodySizeOutputReference = exports.LoadbalancerFrontendRuleActionsList = exports.LoadbalancerFrontendRuleActionsOutputReference = exports.LoadbalancerFrontendRuleActionsUseBackendList = exports.LoadbalancerFrontendRuleActionsUseBackendOutputReference = exports.LoadbalancerFrontendRuleActionsTcpRejectList = exports.LoadbalancerFrontendRuleActionsTcpRejectOutputReference = exports.LoadbalancerFrontendRuleActionsSetResponseHeaderList = exports.LoadbalancerFrontendRuleActionsSetResponseHeaderOutputReference = exports.LoadbalancerFrontendRuleActionsSetRequestHeaderList = exports.LoadbalancerFrontendRuleActionsSetRequestHeaderOutputReference = exports.LoadbalancerFrontendRuleActionsSetForwardedHeadersList = exports.LoadbalancerFrontendRuleActionsSetForwardedHeadersOutputReference = exports.LoadbalancerFrontendRuleActionsHttpReturnList = exports.LoadbalancerFrontendRuleActionsHttpReturnOutputReference = exports.LoadbalancerFrontendRuleActionsHttpRedirectList = exports.LoadbalancerFrontendRuleActionsHttpRedirectOutputReference = void 0;
exports.LoadbalancerFrontendRule = exports.LoadbalancerFrontendRuleMatchersList = exports.LoadbalancerFrontendRuleMatchersOutputReference = exports.LoadbalancerFrontendRuleMatchersUrlQueryList = exports.LoadbalancerFrontendRuleMatchersUrlQueryOutputReference = void 0;
exports.loadbalancerFrontendRuleActionsHttpRedirectToTerraform = loadbalancerFrontendRuleActionsHttpRedirectToTerraform;
exports.loadbalancerFrontendRuleActionsHttpRedirectToHclTerraform = loadbalancerFrontendRuleActionsHttpRedirectToHclTerraform;
exports.loadbalancerFrontendRuleActionsHttpReturnToTerraform = loadbalancerFrontendRuleActionsHttpReturnToTerraform;
exports.loadbalancerFrontendRuleActionsHttpReturnToHclTerraform = loadbalancerFrontendRuleActionsHttpReturnToHclTerraform;
exports.loadbalancerFrontendRuleActionsSetForwardedHeadersToTerraform = loadbalancerFrontendRuleActionsSetForwardedHeadersToTerraform;
exports.loadbalancerFrontendRuleActionsSetForwardedHeadersToHclTerraform = loadbalancerFrontendRuleActionsSetForwardedHeadersToHclTerraform;
exports.loadbalancerFrontendRuleActionsSetRequestHeaderToTerraform = loadbalancerFrontendRuleActionsSetRequestHeaderToTerraform;
exports.loadbalancerFrontendRuleActionsSetRequestHeaderToHclTerraform = loadbalancerFrontendRuleActionsSetRequestHeaderToHclTerraform;
exports.loadbalancerFrontendRuleActionsSetResponseHeaderToTerraform = loadbalancerFrontendRuleActionsSetResponseHeaderToTerraform;
exports.loadbalancerFrontendRuleActionsSetResponseHeaderToHclTerraform = loadbalancerFrontendRuleActionsSetResponseHeaderToHclTerraform;
exports.loadbalancerFrontendRuleActionsTcpRejectToTerraform = loadbalancerFrontendRuleActionsTcpRejectToTerraform;
exports.loadbalancerFrontendRuleActionsTcpRejectToHclTerraform = loadbalancerFrontendRuleActionsTcpRejectToHclTerraform;
exports.loadbalancerFrontendRuleActionsUseBackendToTerraform = loadbalancerFrontendRuleActionsUseBackendToTerraform;
exports.loadbalancerFrontendRuleActionsUseBackendToHclTerraform = loadbalancerFrontendRuleActionsUseBackendToHclTerraform;
exports.loadbalancerFrontendRuleActionsToTerraform = loadbalancerFrontendRuleActionsToTerraform;
exports.loadbalancerFrontendRuleActionsToHclTerraform = loadbalancerFrontendRuleActionsToHclTerraform;
exports.loadbalancerFrontendRuleMatchersBodySizeToTerraform = loadbalancerFrontendRuleMatchersBodySizeToTerraform;
exports.loadbalancerFrontendRuleMatchersBodySizeToHclTerraform = loadbalancerFrontendRuleMatchersBodySizeToHclTerraform;
exports.loadbalancerFrontendRuleMatchersBodySizeRangeToTerraform = loadbalancerFrontendRuleMatchersBodySizeRangeToTerraform;
exports.loadbalancerFrontendRuleMatchersBodySizeRangeToHclTerraform = loadbalancerFrontendRuleMatchersBodySizeRangeToHclTerraform;
exports.loadbalancerFrontendRuleMatchersCookieToTerraform = loadbalancerFrontendRuleMatchersCookieToTerraform;
exports.loadbalancerFrontendRuleMatchersCookieToHclTerraform = loadbalancerFrontendRuleMatchersCookieToHclTerraform;
exports.loadbalancerFrontendRuleMatchersHeaderToTerraform = loadbalancerFrontendRuleMatchersHeaderToTerraform;
exports.loadbalancerFrontendRuleMatchersHeaderToHclTerraform = loadbalancerFrontendRuleMatchersHeaderToHclTerraform;
exports.loadbalancerFrontendRuleMatchersHostToTerraform = loadbalancerFrontendRuleMatchersHostToTerraform;
exports.loadbalancerFrontendRuleMatchersHostToHclTerraform = loadbalancerFrontendRuleMatchersHostToHclTerraform;
exports.loadbalancerFrontendRuleMatchersHttpMethodToTerraform = loadbalancerFrontendRuleMatchersHttpMethodToTerraform;
exports.loadbalancerFrontendRuleMatchersHttpMethodToHclTerraform = loadbalancerFrontendRuleMatchersHttpMethodToHclTerraform;
exports.loadbalancerFrontendRuleMatchersHttpStatusToTerraform = loadbalancerFrontendRuleMatchersHttpStatusToTerraform;
exports.loadbalancerFrontendRuleMatchersHttpStatusToHclTerraform = loadbalancerFrontendRuleMatchersHttpStatusToHclTerraform;
exports.loadbalancerFrontendRuleMatchersHttpStatusRangeToTerraform = loadbalancerFrontendRuleMatchersHttpStatusRangeToTerraform;
exports.loadbalancerFrontendRuleMatchersHttpStatusRangeToHclTerraform = loadbalancerFrontendRuleMatchersHttpStatusRangeToHclTerraform;
exports.loadbalancerFrontendRuleMatchersNumMembersUpToTerraform = loadbalancerFrontendRuleMatchersNumMembersUpToTerraform;
exports.loadbalancerFrontendRuleMatchersNumMembersUpToHclTerraform = loadbalancerFrontendRuleMatchersNumMembersUpToHclTerraform;
exports.loadbalancerFrontendRuleMatchersPathToTerraform = loadbalancerFrontendRuleMatchersPathToTerraform;
exports.loadbalancerFrontendRuleMatchersPathToHclTerraform = loadbalancerFrontendRuleMatchersPathToHclTerraform;
exports.loadbalancerFrontendRuleMatchersRequestHeaderToTerraform = loadbalancerFrontendRuleMatchersRequestHeaderToTerraform;
exports.loadbalancerFrontendRuleMatchersRequestHeaderToHclTerraform = loadbalancerFrontendRuleMatchersRequestHeaderToHclTerraform;
exports.loadbalancerFrontendRuleMatchersResponseHeaderToTerraform = loadbalancerFrontendRuleMatchersResponseHeaderToTerraform;
exports.loadbalancerFrontendRuleMatchersResponseHeaderToHclTerraform = loadbalancerFrontendRuleMatchersResponseHeaderToHclTerraform;
exports.loadbalancerFrontendRuleMatchersSrcIpToTerraform = loadbalancerFrontendRuleMatchersSrcIpToTerraform;
exports.loadbalancerFrontendRuleMatchersSrcIpToHclTerraform = loadbalancerFrontendRuleMatchersSrcIpToHclTerraform;
exports.loadbalancerFrontendRuleMatchersSrcPortToTerraform = loadbalancerFrontendRuleMatchersSrcPortToTerraform;
exports.loadbalancerFrontendRuleMatchersSrcPortToHclTerraform = loadbalancerFrontendRuleMatchersSrcPortToHclTerraform;
exports.loadbalancerFrontendRuleMatchersSrcPortRangeToTerraform = loadbalancerFrontendRuleMatchersSrcPortRangeToTerraform;
exports.loadbalancerFrontendRuleMatchersSrcPortRangeToHclTerraform = loadbalancerFrontendRuleMatchersSrcPortRangeToHclTerraform;
exports.loadbalancerFrontendRuleMatchersUrlToTerraform = loadbalancerFrontendRuleMatchersUrlToTerraform;
exports.loadbalancerFrontendRuleMatchersUrlToHclTerraform = loadbalancerFrontendRuleMatchersUrlToHclTerraform;
exports.loadbalancerFrontendRuleMatchersUrlParamToTerraform = loadbalancerFrontendRuleMatchersUrlParamToTerraform;
exports.loadbalancerFrontendRuleMatchersUrlParamToHclTerraform = loadbalancerFrontendRuleMatchersUrlParamToHclTerraform;
exports.loadbalancerFrontendRuleMatchersUrlQueryToTerraform = loadbalancerFrontendRuleMatchersUrlQueryToTerraform;
exports.loadbalancerFrontendRuleMatchersUrlQueryToHclTerraform = loadbalancerFrontendRuleMatchersUrlQueryToHclTerraform;
exports.loadbalancerFrontendRuleMatchersToTerraform = loadbalancerFrontendRuleMatchersToTerraform;
exports.loadbalancerFrontendRuleMatchersToHclTerraform = loadbalancerFrontendRuleMatchersToHclTerraform;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function loadbalancerFrontendRuleActionsHttpRedirectToTerraform(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 {
location: cdktf.stringToTerraform(struct.location),
scheme: cdktf.stringToTerraform(struct.scheme),
status: cdktf.numberToTerraform(struct.status),
};
}
function loadbalancerFrontendRuleActionsHttpRedirectToHclTerraform(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 = {
location: {
value: cdktf.stringToHclTerraform(struct.location),
isBlock: false,
type: "simple",
storageClassType: "string",
},
scheme: {
value: cdktf.stringToHclTerraform(struct.scheme),
isBlock: false,
type: "simple",
storageClassType: "string",
},
status: {
value: cdktf.numberToHclTerraform(struct.status),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class LoadbalancerFrontendRuleActionsHttpRedirectOutputReference 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._location !== undefined) {
hasAnyValues = true;
internalValueResult.location = this._location;
}
if (this._scheme !== undefined) {
hasAnyValues = true;
internalValueResult.scheme = this._scheme;
}
if (this._status !== undefined) {
hasAnyValues = true;
internalValueResult.status = this._status;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._location = undefined;
this._scheme = undefined;
this._status = 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._location = value.location;
this._scheme = value.scheme;
this._status = value.status;
}
}
get location() {
return this.getStringAttribute('location');
}
set location(value) {
this._location = value;
}
resetLocation() {
this._location = undefined;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;
}
get scheme() {
return this.getStringAttribute('scheme');
}
set scheme(value) {
this._scheme = value;
}
resetScheme() {
this._scheme = undefined;
}
// Temporarily expose input value. Use with caution.
get schemeInput() {
return this._scheme;
}
get status() {
return this.getNumberAttribute('status');
}
set status(value) {
this._status = value;
}
resetStatus() {
this._status = undefined;
}
// Temporarily expose input value. Use with caution.
get statusInput() {
return this._status;
}
}
exports.LoadbalancerFrontendRuleActionsHttpRedirectOutputReference = LoadbalancerFrontendRuleActionsHttpRedirectOutputReference;
_a = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsHttpRedirectOutputReference[_a] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsHttpRedirectOutputReference", version: "15.9.1" };
class LoadbalancerFrontendRuleActionsHttpRedirectList 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 LoadbalancerFrontendRuleActionsHttpRedirectOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LoadbalancerFrontendRuleActionsHttpRedirectList = LoadbalancerFrontendRuleActionsHttpRedirectList;
_b = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsHttpRedirectList[_b] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsHttpRedirectList", version: "15.9.1" };
function loadbalancerFrontendRuleActionsHttpReturnToTerraform(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 {
content_type: cdktf.stringToTerraform(struct.contentType),
payload: cdktf.stringToTerraform(struct.payload),
status: cdktf.numberToTerraform(struct.status),
};
}
function loadbalancerFrontendRuleActionsHttpReturnToHclTerraform(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 = {
content_type: {
value: cdktf.stringToHclTerraform(struct.contentType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
payload: {
value: cdktf.stringToHclTerraform(struct.payload),
isBlock: false,
type: "simple",
storageClassType: "string",
},
status: {
value: cdktf.numberToHclTerraform(struct.status),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class LoadbalancerFrontendRuleActionsHttpReturnOutputReference 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._contentType !== undefined) {
hasAnyValues = true;
internalValueResult.contentType = this._contentType;
}
if (this._payload !== undefined) {
hasAnyValues = true;
internalValueResult.payload = this._payload;
}
if (this._status !== undefined) {
hasAnyValues = true;
internalValueResult.status = this._status;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._contentType = undefined;
this._payload = undefined;
this._status = 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._contentType = value.contentType;
this._payload = value.payload;
this._status = value.status;
}
}
get contentType() {
return this.getStringAttribute('content_type');
}
set contentType(value) {
this._contentType = value;
}
// Temporarily expose input value. Use with caution.
get contentTypeInput() {
return this._contentType;
}
get payload() {
return this.getStringAttribute('payload');
}
set payload(value) {
this._payload = value;
}
// Temporarily expose input value. Use with caution.
get payloadInput() {
return this._payload;
}
get status() {
return this.getNumberAttribute('status');
}
set status(value) {
this._status = value;
}
// Temporarily expose input value. Use with caution.
get statusInput() {
return this._status;
}
}
exports.LoadbalancerFrontendRuleActionsHttpReturnOutputReference = LoadbalancerFrontendRuleActionsHttpReturnOutputReference;
_c = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsHttpReturnOutputReference[_c] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsHttpReturnOutputReference", version: "15.9.1" };
class LoadbalancerFrontendRuleActionsHttpReturnList 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 LoadbalancerFrontendRuleActionsHttpReturnOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LoadbalancerFrontendRuleActionsHttpReturnList = LoadbalancerFrontendRuleActionsHttpReturnList;
_d = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsHttpReturnList[_d] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsHttpReturnList", version: "15.9.1" };
function loadbalancerFrontendRuleActionsSetForwardedHeadersToTerraform(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 {
active: cdktf.booleanToTerraform(struct.active),
};
}
function loadbalancerFrontendRuleActionsSetForwardedHeadersToHclTerraform(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 = {
active: {
value: cdktf.booleanToHclTerraform(struct.active),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class LoadbalancerFrontendRuleActionsSetForwardedHeadersOutputReference 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._active !== undefined) {
hasAnyValues = true;
internalValueResult.active = this._active;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._active = 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._active = value.active;
}
}
get active() {
return this.getBooleanAttribute('active');
}
set active(value) {
this._active = value;
}
resetActive() {
this._active = undefined;
}
// Temporarily expose input value. Use with caution.
get activeInput() {
return this._active;
}
}
exports.LoadbalancerFrontendRuleActionsSetForwardedHeadersOutputReference = LoadbalancerFrontendRuleActionsSetForwardedHeadersOutputReference;
_e = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsSetForwardedHeadersOutputReference[_e] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsSetForwardedHeadersOutputReference", version: "15.9.1" };
class LoadbalancerFrontendRuleActionsSetForwardedHeadersList 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 LoadbalancerFrontendRuleActionsSetForwardedHeadersOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LoadbalancerFrontendRuleActionsSetForwardedHeadersList = LoadbalancerFrontendRuleActionsSetForwardedHeadersList;
_f = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsSetForwardedHeadersList[_f] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsSetForwardedHeadersList", version: "15.9.1" };
function loadbalancerFrontendRuleActionsSetRequestHeaderToTerraform(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 {
header: cdktf.stringToTerraform(struct.header),
value: cdktf.stringToTerraform(struct.value),
};
}
function loadbalancerFrontendRuleActionsSetRequestHeaderToHclTerraform(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 = {
header: {
value: cdktf.stringToHclTerraform(struct.header),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class LoadbalancerFrontendRuleActionsSetRequestHeaderOutputReference 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._header !== undefined) {
hasAnyValues = true;
internalValueResult.header = this._header;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._header = undefined;
this._value = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._header = value.header;
this._value = value.value;
}
}
get header() {
return this.getStringAttribute('header');
}
set header(value) {
this._header = value;
}
// Temporarily expose input value. Use with caution.
get headerInput() {
return this._header;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
resetValue() {
this._value = undefined;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.LoadbalancerFrontendRuleActionsSetRequestHeaderOutputReference = LoadbalancerFrontendRuleActionsSetRequestHeaderOutputReference;
_g = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsSetRequestHeaderOutputReference[_g] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsSetRequestHeaderOutputReference", version: "15.9.1" };
class LoadbalancerFrontendRuleActionsSetRequestHeaderList 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 LoadbalancerFrontendRuleActionsSetRequestHeaderOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LoadbalancerFrontendRuleActionsSetRequestHeaderList = LoadbalancerFrontendRuleActionsSetRequestHeaderList;
_h = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsSetRequestHeaderList[_h] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsSetRequestHeaderList", version: "15.9.1" };
function loadbalancerFrontendRuleActionsSetResponseHeaderToTerraform(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 {
header: cdktf.stringToTerraform(struct.header),
value: cdktf.stringToTerraform(struct.value),
};
}
function loadbalancerFrontendRuleActionsSetResponseHeaderToHclTerraform(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 = {
header: {
value: cdktf.stringToHclTerraform(struct.header),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value: {
value: cdktf.stringToHclTerraform(struct.value),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class LoadbalancerFrontendRuleActionsSetResponseHeaderOutputReference 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._header !== undefined) {
hasAnyValues = true;
internalValueResult.header = this._header;
}
if (this._value !== undefined) {
hasAnyValues = true;
internalValueResult.value = this._value;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._header = undefined;
this._value = undefined;
}
else if (cdktf.Tokenization.isResolvable(value)) {
this.isEmptyObject = false;
this.resolvableValue = value;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this.resolvableValue = undefined;
this._header = value.header;
this._value = value.value;
}
}
get header() {
return this.getStringAttribute('header');
}
set header(value) {
this._header = value;
}
// Temporarily expose input value. Use with caution.
get headerInput() {
return this._header;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
resetValue() {
this._value = undefined;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.LoadbalancerFrontendRuleActionsSetResponseHeaderOutputReference = LoadbalancerFrontendRuleActionsSetResponseHeaderOutputReference;
_j = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsSetResponseHeaderOutputReference[_j] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsSetResponseHeaderOutputReference", version: "15.9.1" };
class LoadbalancerFrontendRuleActionsSetResponseHeaderList 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 LoadbalancerFrontendRuleActionsSetResponseHeaderOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LoadbalancerFrontendRuleActionsSetResponseHeaderList = LoadbalancerFrontendRuleActionsSetResponseHeaderList;
_k = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsSetResponseHeaderList[_k] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsSetResponseHeaderList", version: "15.9.1" };
function loadbalancerFrontendRuleActionsTcpRejectToTerraform(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 {
active: cdktf.booleanToTerraform(struct.active),
};
}
function loadbalancerFrontendRuleActionsTcpRejectToHclTerraform(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 = {
active: {
value: cdktf.booleanToHclTerraform(struct.active),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class LoadbalancerFrontendRuleActionsTcpRejectOutputReference 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._active !== undefined) {
hasAnyValues = true;
internalValueResult.active = this._active;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._active = 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._active = value.active;
}
}
get active() {
return this.getBooleanAttribute('active');
}
set active(value) {
this._active = value;
}
resetActive() {
this._active = undefined;
}
// Temporarily expose input value. Use with caution.
get activeInput() {
return this._active;
}
}
exports.LoadbalancerFrontendRuleActionsTcpRejectOutputReference = LoadbalancerFrontendRuleActionsTcpRejectOutputReference;
_l = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsTcpRejectOutputReference[_l] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsTcpRejectOutputReference", version: "15.9.1" };
class LoadbalancerFrontendRuleActionsTcpRejectList 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 LoadbalancerFrontendRuleActionsTcpRejectOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LoadbalancerFrontendRuleActionsTcpRejectList = LoadbalancerFrontendRuleActionsTcpRejectList;
_m = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsTcpRejectList[_m] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsTcpRejectList", version: "15.9.1" };
function loadbalancerFrontendRuleActionsUseBackendToTerraform(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 {
backend_name: cdktf.stringToTerraform(struct.backendName),
};
}
function loadbalancerFrontendRuleActionsUseBackendToHclTerraform(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 = {
backend_name: {
value: cdktf.stringToHclTerraform(struct.backendName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
class LoadbalancerFrontendRuleActionsUseBackendOutputReference 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._backendName !== undefined) {
hasAnyValues = true;
internalValueResult.backendName = this._backendName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._backendName = 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._backendName = value.backendName;
}
}
get backendName() {
return this.getStringAttribute('backend_name');
}
set backendName(value) {
this._backendName = value;
}
// Temporarily expose input value. Use with caution.
get backendNameInput() {
return this._backendName;
}
}
exports.LoadbalancerFrontendRuleActionsUseBackendOutputReference = LoadbalancerFrontendRuleActionsUseBackendOutputReference;
_o = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsUseBackendOutputReference[_o] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsUseBackendOutputReference", version: "15.9.1" };
class LoadbalancerFrontendRuleActionsUseBackendList 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 LoadbalancerFrontendRuleActionsUseBackendOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.LoadbalancerFrontendRuleActionsUseBackendList = LoadbalancerFrontendRuleActionsUseBackendList;
_p = JSII_RTTI_SYMBOL_1;
LoadbalancerFrontendRuleActionsUseBackendList[_p] = { fqn: "@cdktf/provider-upcloud.loadbalancerFrontendRule.LoadbalancerFrontendRuleActionsUseBackendList", version: "15.9.1" };
function loadbalancerFrontendRuleActionsToTerraform(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 {
http_redirect: cdktf.listMapper(loadbalancerFrontendRuleActionsHttpRedirectToTerraform, true)(struct.httpRedirect),
http_return: cdktf.listMapper(loadbalancerFrontendRuleActionsHttpReturnToTerraform, true)(struct.httpReturn),
set_forwarded_headers: cdktf.listMapper(loadbalancerFrontendRuleActionsSetForwardedHeadersToTerraform, true)(struct.setForwardedHeaders),
set_request_header: cdktf.listMapper(loadbalancerFrontendRuleActionsSetRequestHeaderToTerraform, true)(struct.setRequestHeader),
set_response_header: cdktf.listMapper(loadbalancerFrontendRuleActionsSetResponseHeaderToTerraform, true)(struct.setResponseHeader),
tcp_reject: cdktf.listMapper(loadbalancerFrontendRuleActionsTcpRejectToTerraform, true)(struct.tcpReject),
use_backend: cdktf.listMapper(loadbalancerFrontendRuleActionsUseBackendToTerraform, true)(struct.useBackend),
};
}
function loadbalancerFrontendRuleActionsToHclTerraform(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 = {
http_redirect: {
value: cdktf.listMapperHcl(loadbalancerFrontendRuleActionsHttpRedirectToHclTerraform, true)(struct.httpRedirect),
isBlock: true,
type: "list",
storageClassType: "LoadbalancerFrontendRuleActionsHttpRedirectList",
},
http_return: {
value: cdktf.listMapperHcl(loadbalancerFrontendRuleActionsHttpReturnToHclTerraform, true)(struct.httpReturn),
isBlock: true,
type: "list",