@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,256 lines (1,255 loc) • 214 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OrgPolicyPolicy = exports.OrgPolicyPolicyTimeoutsOutputReference = exports.orgPolicyPolicyTimeoutsToHclTerraform = exports.orgPolicyPolicyTimeoutsToTerraform = exports.OrgPolicyPolicySpecOutputReference = exports.orgPolicyPolicySpecToHclTerraform = exports.orgPolicyPolicySpecToTerraform = exports.OrgPolicyPolicySpecRulesList = exports.OrgPolicyPolicySpecRulesOutputReference = exports.orgPolicyPolicySpecRulesToHclTerraform = exports.orgPolicyPolicySpecRulesToTerraform = exports.OrgPolicyPolicySpecRulesValuesOutputReference = exports.orgPolicyPolicySpecRulesValuesToHclTerraform = exports.orgPolicyPolicySpecRulesValuesToTerraform = exports.OrgPolicyPolicySpecRulesConditionOutputReference = exports.orgPolicyPolicySpecRulesConditionToHclTerraform = exports.orgPolicyPolicySpecRulesConditionToTerraform = exports.OrgPolicyPolicyDryRunSpecOutputReference = exports.orgPolicyPolicyDryRunSpecToHclTerraform = exports.orgPolicyPolicyDryRunSpecToTerraform = exports.OrgPolicyPolicyDryRunSpecRulesList = exports.OrgPolicyPolicyDryRunSpecRulesOutputReference = exports.orgPolicyPolicyDryRunSpecRulesToHclTerraform = exports.orgPolicyPolicyDryRunSpecRulesToTerraform = exports.OrgPolicyPolicyDryRunSpecRulesValuesOutputReference = exports.orgPolicyPolicyDryRunSpecRulesValuesToHclTerraform = exports.orgPolicyPolicyDryRunSpecRulesValuesToTerraform = exports.OrgPolicyPolicyDryRunSpecRulesConditionOutputReference = exports.orgPolicyPolicyDryRunSpecRulesConditionToHclTerraform = exports.orgPolicyPolicyDryRunSpecRulesConditionToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function orgPolicyPolicyDryRunSpecRulesConditionToTerraform(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 {
description: cdktf.stringToTerraform(struct.description),
expression: cdktf.stringToTerraform(struct.expression),
location: cdktf.stringToTerraform(struct.location),
title: cdktf.stringToTerraform(struct.title),
};
}
exports.orgPolicyPolicyDryRunSpecRulesConditionToTerraform = orgPolicyPolicyDryRunSpecRulesConditionToTerraform;
function orgPolicyPolicyDryRunSpecRulesConditionToHclTerraform(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 = {
description: {
value: cdktf.stringToHclTerraform(struct.description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
expression: {
value: cdktf.stringToHclTerraform(struct.expression),
isBlock: false,
type: "simple",
storageClassType: "string",
},
location: {
value: cdktf.stringToHclTerraform(struct.location),
isBlock: false,
type: "simple",
storageClassType: "string",
},
title: {
value: cdktf.stringToHclTerraform(struct.title),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.orgPolicyPolicyDryRunSpecRulesConditionToHclTerraform = orgPolicyPolicyDryRunSpecRulesConditionToHclTerraform;
class OrgPolicyPolicyDryRunSpecRulesConditionOutputReference 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._description !== undefined) {
hasAnyValues = true;
internalValueResult.description = this._description;
}
if (this._expression !== undefined) {
hasAnyValues = true;
internalValueResult.expression = this._expression;
}
if (this._location !== undefined) {
hasAnyValues = true;
internalValueResult.location = this._location;
}
if (this._title !== undefined) {
hasAnyValues = true;
internalValueResult.title = this._title;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._description = undefined;
this._expression = undefined;
this._location = undefined;
this._title = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._description = value.description;
this._expression = value.expression;
this._location = value.location;
this._title = value.title;
}
}
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 expression() {
return this.getStringAttribute('expression');
}
set expression(value) {
this._expression = value;
}
resetExpression() {
this._expression = undefined;
}
// Temporarily expose input value. Use with caution.
get expressionInput() {
return this._expression;
}
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 title() {
return this.getStringAttribute('title');
}
set title(value) {
this._title = value;
}
resetTitle() {
this._title = undefined;
}
// Temporarily expose input value. Use with caution.
get titleInput() {
return this._title;
}
}
exports.OrgPolicyPolicyDryRunSpecRulesConditionOutputReference = OrgPolicyPolicyDryRunSpecRulesConditionOutputReference;
_a = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicyDryRunSpecRulesConditionOutputReference[_a] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicyDryRunSpecRulesConditionOutputReference", version: "14.12.0" };
function orgPolicyPolicyDryRunSpecRulesValuesToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
allowed_values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.allowedValues),
denied_values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.deniedValues),
};
}
exports.orgPolicyPolicyDryRunSpecRulesValuesToTerraform = orgPolicyPolicyDryRunSpecRulesValuesToTerraform;
function orgPolicyPolicyDryRunSpecRulesValuesToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
allowed_values: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.allowedValues),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
denied_values: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.deniedValues),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.orgPolicyPolicyDryRunSpecRulesValuesToHclTerraform = orgPolicyPolicyDryRunSpecRulesValuesToHclTerraform;
class OrgPolicyPolicyDryRunSpecRulesValuesOutputReference 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._allowedValues !== undefined) {
hasAnyValues = true;
internalValueResult.allowedValues = this._allowedValues;
}
if (this._deniedValues !== undefined) {
hasAnyValues = true;
internalValueResult.deniedValues = this._deniedValues;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allowedValues = undefined;
this._deniedValues = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allowedValues = value.allowedValues;
this._deniedValues = value.deniedValues;
}
}
get allowedValues() {
return this.getListAttribute('allowed_values');
}
set allowedValues(value) {
this._allowedValues = value;
}
resetAllowedValues() {
this._allowedValues = undefined;
}
// Temporarily expose input value. Use with caution.
get allowedValuesInput() {
return this._allowedValues;
}
get deniedValues() {
return this.getListAttribute('denied_values');
}
set deniedValues(value) {
this._deniedValues = value;
}
resetDeniedValues() {
this._deniedValues = undefined;
}
// Temporarily expose input value. Use with caution.
get deniedValuesInput() {
return this._deniedValues;
}
}
exports.OrgPolicyPolicyDryRunSpecRulesValuesOutputReference = OrgPolicyPolicyDryRunSpecRulesValuesOutputReference;
_b = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicyDryRunSpecRulesValuesOutputReference[_b] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicyDryRunSpecRulesValuesOutputReference", version: "14.12.0" };
function orgPolicyPolicyDryRunSpecRulesToTerraform(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 {
allow_all: cdktf.stringToTerraform(struct.allowAll),
deny_all: cdktf.stringToTerraform(struct.denyAll),
enforce: cdktf.stringToTerraform(struct.enforce),
condition: orgPolicyPolicyDryRunSpecRulesConditionToTerraform(struct.condition),
values: orgPolicyPolicyDryRunSpecRulesValuesToTerraform(struct.values),
};
}
exports.orgPolicyPolicyDryRunSpecRulesToTerraform = orgPolicyPolicyDryRunSpecRulesToTerraform;
function orgPolicyPolicyDryRunSpecRulesToHclTerraform(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 = {
allow_all: {
value: cdktf.stringToHclTerraform(struct.allowAll),
isBlock: false,
type: "simple",
storageClassType: "string",
},
deny_all: {
value: cdktf.stringToHclTerraform(struct.denyAll),
isBlock: false,
type: "simple",
storageClassType: "string",
},
enforce: {
value: cdktf.stringToHclTerraform(struct.enforce),
isBlock: false,
type: "simple",
storageClassType: "string",
},
condition: {
value: orgPolicyPolicyDryRunSpecRulesConditionToHclTerraform(struct.condition),
isBlock: true,
type: "list",
storageClassType: "OrgPolicyPolicyDryRunSpecRulesConditionList",
},
values: {
value: orgPolicyPolicyDryRunSpecRulesValuesToHclTerraform(struct.values),
isBlock: true,
type: "list",
storageClassType: "OrgPolicyPolicyDryRunSpecRulesValuesList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.orgPolicyPolicyDryRunSpecRulesToHclTerraform = orgPolicyPolicyDryRunSpecRulesToHclTerraform;
class OrgPolicyPolicyDryRunSpecRulesOutputReference 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;
// condition - computed: false, optional: true, required: false
this._condition = new OrgPolicyPolicyDryRunSpecRulesConditionOutputReference(this, "condition");
// values - computed: false, optional: true, required: false
this._values = new OrgPolicyPolicyDryRunSpecRulesValuesOutputReference(this, "values");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._allowAll !== undefined) {
hasAnyValues = true;
internalValueResult.allowAll = this._allowAll;
}
if (this._denyAll !== undefined) {
hasAnyValues = true;
internalValueResult.denyAll = this._denyAll;
}
if (this._enforce !== undefined) {
hasAnyValues = true;
internalValueResult.enforce = this._enforce;
}
if (this._condition?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.condition = this._condition?.internalValue;
}
if (this._values?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.values = this._values?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._allowAll = undefined;
this._denyAll = undefined;
this._enforce = undefined;
this._condition.internalValue = undefined;
this._values.internalValue = 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._allowAll = value.allowAll;
this._denyAll = value.denyAll;
this._enforce = value.enforce;
this._condition.internalValue = value.condition;
this._values.internalValue = value.values;
}
}
get allowAll() {
return this.getStringAttribute('allow_all');
}
set allowAll(value) {
this._allowAll = value;
}
resetAllowAll() {
this._allowAll = undefined;
}
// Temporarily expose input value. Use with caution.
get allowAllInput() {
return this._allowAll;
}
get denyAll() {
return this.getStringAttribute('deny_all');
}
set denyAll(value) {
this._denyAll = value;
}
resetDenyAll() {
this._denyAll = undefined;
}
// Temporarily expose input value. Use with caution.
get denyAllInput() {
return this._denyAll;
}
get enforce() {
return this.getStringAttribute('enforce');
}
set enforce(value) {
this._enforce = value;
}
resetEnforce() {
this._enforce = undefined;
}
// Temporarily expose input value. Use with caution.
get enforceInput() {
return this._enforce;
}
get condition() {
return this._condition;
}
putCondition(value) {
this._condition.internalValue = value;
}
resetCondition() {
this._condition.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get conditionInput() {
return this._condition.internalValue;
}
get values() {
return this._values;
}
putValues(value) {
this._values.internalValue = value;
}
resetValues() {
this._values.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get valuesInput() {
return this._values.internalValue;
}
}
exports.OrgPolicyPolicyDryRunSpecRulesOutputReference = OrgPolicyPolicyDryRunSpecRulesOutputReference;
_c = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicyDryRunSpecRulesOutputReference[_c] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicyDryRunSpecRulesOutputReference", version: "14.12.0" };
class OrgPolicyPolicyDryRunSpecRulesList 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 OrgPolicyPolicyDryRunSpecRulesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.OrgPolicyPolicyDryRunSpecRulesList = OrgPolicyPolicyDryRunSpecRulesList;
_d = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicyDryRunSpecRulesList[_d] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicyDryRunSpecRulesList", version: "14.12.0" };
function orgPolicyPolicyDryRunSpecToTerraform(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 {
inherit_from_parent: cdktf.booleanToTerraform(struct.inheritFromParent),
reset: cdktf.booleanToTerraform(struct.reset),
rules: cdktf.listMapper(orgPolicyPolicyDryRunSpecRulesToTerraform, true)(struct.rules),
};
}
exports.orgPolicyPolicyDryRunSpecToTerraform = orgPolicyPolicyDryRunSpecToTerraform;
function orgPolicyPolicyDryRunSpecToHclTerraform(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 = {
inherit_from_parent: {
value: cdktf.booleanToHclTerraform(struct.inheritFromParent),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
reset: {
value: cdktf.booleanToHclTerraform(struct.reset),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
rules: {
value: cdktf.listMapperHcl(orgPolicyPolicyDryRunSpecRulesToHclTerraform, true)(struct.rules),
isBlock: true,
type: "list",
storageClassType: "OrgPolicyPolicyDryRunSpecRulesList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.orgPolicyPolicyDryRunSpecToHclTerraform = orgPolicyPolicyDryRunSpecToHclTerraform;
class OrgPolicyPolicyDryRunSpecOutputReference 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;
// rules - computed: false, optional: true, required: false
this._rules = new OrgPolicyPolicyDryRunSpecRulesList(this, "rules", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._inheritFromParent !== undefined) {
hasAnyValues = true;
internalValueResult.inheritFromParent = this._inheritFromParent;
}
if (this._reset !== undefined) {
hasAnyValues = true;
internalValueResult.reset = this._reset;
}
if (this._rules?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.rules = this._rules?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._inheritFromParent = undefined;
this._reset = undefined;
this._rules.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._inheritFromParent = value.inheritFromParent;
this._reset = value.reset;
this._rules.internalValue = value.rules;
}
}
// etag - computed: true, optional: false, required: false
get etag() {
return this.getStringAttribute('etag');
}
get inheritFromParent() {
return this.getBooleanAttribute('inherit_from_parent');
}
set inheritFromParent(value) {
this._inheritFromParent = value;
}
resetInheritFromParent() {
this._inheritFromParent = undefined;
}
// Temporarily expose input value. Use with caution.
get inheritFromParentInput() {
return this._inheritFromParent;
}
get reset() {
return this.getBooleanAttribute('reset');
}
set reset(value) {
this._reset = value;
}
resetReset() {
this._reset = undefined;
}
// Temporarily expose input value. Use with caution.
get resetInput() {
return this._reset;
}
// update_time - computed: true, optional: false, required: false
get updateTime() {
return this.getStringAttribute('update_time');
}
get rules() {
return this._rules;
}
putRules(value) {
this._rules.internalValue = value;
}
resetRules() {
this._rules.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get rulesInput() {
return this._rules.internalValue;
}
}
exports.OrgPolicyPolicyDryRunSpecOutputReference = OrgPolicyPolicyDryRunSpecOutputReference;
_e = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicyDryRunSpecOutputReference[_e] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicyDryRunSpecOutputReference", version: "14.12.0" };
function orgPolicyPolicySpecRulesConditionToTerraform(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 {
description: cdktf.stringToTerraform(struct.description),
expression: cdktf.stringToTerraform(struct.expression),
location: cdktf.stringToTerraform(struct.location),
title: cdktf.stringToTerraform(struct.title),
};
}
exports.orgPolicyPolicySpecRulesConditionToTerraform = orgPolicyPolicySpecRulesConditionToTerraform;
function orgPolicyPolicySpecRulesConditionToHclTerraform(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 = {
description: {
value: cdktf.stringToHclTerraform(struct.description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
expression: {
value: cdktf.stringToHclTerraform(struct.expression),
isBlock: false,
type: "simple",
storageClassType: "string",
},
location: {
value: cdktf.stringToHclTerraform(struct.location),
isBlock: false,
type: "simple",
storageClassType: "string",
},
title: {
value: cdktf.stringToHclTerraform(struct.title),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.orgPolicyPolicySpecRulesConditionToHclTerraform = orgPolicyPolicySpecRulesConditionToHclTerraform;
class OrgPolicyPolicySpecRulesConditionOutputReference 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._description !== undefined) {
hasAnyValues = true;
internalValueResult.description = this._description;
}
if (this._expression !== undefined) {
hasAnyValues = true;
internalValueResult.expression = this._expression;
}
if (this._location !== undefined) {
hasAnyValues = true;
internalValueResult.location = this._location;
}
if (this._title !== undefined) {
hasAnyValues = true;
internalValueResult.title = this._title;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._description = undefined;
this._expression = undefined;
this._location = undefined;
this._title = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._description = value.description;
this._expression = value.expression;
this._location = value.location;
this._title = value.title;
}
}
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 expression() {
return this.getStringAttribute('expression');
}
set expression(value) {
this._expression = value;
}
resetExpression() {
this._expression = undefined;
}
// Temporarily expose input value. Use with caution.
get expressionInput() {
return this._expression;
}
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 title() {
return this.getStringAttribute('title');
}
set title(value) {
this._title = value;
}
resetTitle() {
this._title = undefined;
}
// Temporarily expose input value. Use with caution.
get titleInput() {
return this._title;
}
}
exports.OrgPolicyPolicySpecRulesConditionOutputReference = OrgPolicyPolicySpecRulesConditionOutputReference;
_f = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicySpecRulesConditionOutputReference[_f] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicySpecRulesConditionOutputReference", version: "14.12.0" };
function orgPolicyPolicySpecRulesValuesToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
allowed_values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.allowedValues),
denied_values: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.deniedValues),
};
}
exports.orgPolicyPolicySpecRulesValuesToTerraform = orgPolicyPolicySpecRulesValuesToTerraform;
function orgPolicyPolicySpecRulesValuesToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
allowed_values: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.allowedValues),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
denied_values: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.deniedValues),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.orgPolicyPolicySpecRulesValuesToHclTerraform = orgPolicyPolicySpecRulesValuesToHclTerraform;
class OrgPolicyPolicySpecRulesValuesOutputReference 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._allowedValues !== undefined) {
hasAnyValues = true;
internalValueResult.allowedValues = this._allowedValues;
}
if (this._deniedValues !== undefined) {
hasAnyValues = true;
internalValueResult.deniedValues = this._deniedValues;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._allowedValues = undefined;
this._deniedValues = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._allowedValues = value.allowedValues;
this._deniedValues = value.deniedValues;
}
}
get allowedValues() {
return this.getListAttribute('allowed_values');
}
set allowedValues(value) {
this._allowedValues = value;
}
resetAllowedValues() {
this._allowedValues = undefined;
}
// Temporarily expose input value. Use with caution.
get allowedValuesInput() {
return this._allowedValues;
}
get deniedValues() {
return this.getListAttribute('denied_values');
}
set deniedValues(value) {
this._deniedValues = value;
}
resetDeniedValues() {
this._deniedValues = undefined;
}
// Temporarily expose input value. Use with caution.
get deniedValuesInput() {
return this._deniedValues;
}
}
exports.OrgPolicyPolicySpecRulesValuesOutputReference = OrgPolicyPolicySpecRulesValuesOutputReference;
_g = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicySpecRulesValuesOutputReference[_g] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicySpecRulesValuesOutputReference", version: "14.12.0" };
function orgPolicyPolicySpecRulesToTerraform(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 {
allow_all: cdktf.stringToTerraform(struct.allowAll),
deny_all: cdktf.stringToTerraform(struct.denyAll),
enforce: cdktf.stringToTerraform(struct.enforce),
condition: orgPolicyPolicySpecRulesConditionToTerraform(struct.condition),
values: orgPolicyPolicySpecRulesValuesToTerraform(struct.values),
};
}
exports.orgPolicyPolicySpecRulesToTerraform = orgPolicyPolicySpecRulesToTerraform;
function orgPolicyPolicySpecRulesToHclTerraform(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 = {
allow_all: {
value: cdktf.stringToHclTerraform(struct.allowAll),
isBlock: false,
type: "simple",
storageClassType: "string",
},
deny_all: {
value: cdktf.stringToHclTerraform(struct.denyAll),
isBlock: false,
type: "simple",
storageClassType: "string",
},
enforce: {
value: cdktf.stringToHclTerraform(struct.enforce),
isBlock: false,
type: "simple",
storageClassType: "string",
},
condition: {
value: orgPolicyPolicySpecRulesConditionToHclTerraform(struct.condition),
isBlock: true,
type: "list",
storageClassType: "OrgPolicyPolicySpecRulesConditionList",
},
values: {
value: orgPolicyPolicySpecRulesValuesToHclTerraform(struct.values),
isBlock: true,
type: "list",
storageClassType: "OrgPolicyPolicySpecRulesValuesList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.orgPolicyPolicySpecRulesToHclTerraform = orgPolicyPolicySpecRulesToHclTerraform;
class OrgPolicyPolicySpecRulesOutputReference 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;
// condition - computed: false, optional: true, required: false
this._condition = new OrgPolicyPolicySpecRulesConditionOutputReference(this, "condition");
// values - computed: false, optional: true, required: false
this._values = new OrgPolicyPolicySpecRulesValuesOutputReference(this, "values");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._allowAll !== undefined) {
hasAnyValues = true;
internalValueResult.allowAll = this._allowAll;
}
if (this._denyAll !== undefined) {
hasAnyValues = true;
internalValueResult.denyAll = this._denyAll;
}
if (this._enforce !== undefined) {
hasAnyValues = true;
internalValueResult.enforce = this._enforce;
}
if (this._condition?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.condition = this._condition?.internalValue;
}
if (this._values?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.values = this._values?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._allowAll = undefined;
this._denyAll = undefined;
this._enforce = undefined;
this._condition.internalValue = undefined;
this._values.internalValue = 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._allowAll = value.allowAll;
this._denyAll = value.denyAll;
this._enforce = value.enforce;
this._condition.internalValue = value.condition;
this._values.internalValue = value.values;
}
}
get allowAll() {
return this.getStringAttribute('allow_all');
}
set allowAll(value) {
this._allowAll = value;
}
resetAllowAll() {
this._allowAll = undefined;
}
// Temporarily expose input value. Use with caution.
get allowAllInput() {
return this._allowAll;
}
get denyAll() {
return this.getStringAttribute('deny_all');
}
set denyAll(value) {
this._denyAll = value;
}
resetDenyAll() {
this._denyAll = undefined;
}
// Temporarily expose input value. Use with caution.
get denyAllInput() {
return this._denyAll;
}
get enforce() {
return this.getStringAttribute('enforce');
}
set enforce(value) {
this._enforce = value;
}
resetEnforce() {
this._enforce = undefined;
}
// Temporarily expose input value. Use with caution.
get enforceInput() {
return this._enforce;
}
get condition() {
return this._condition;
}
putCondition(value) {
this._condition.internalValue = value;
}
resetCondition() {
this._condition.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get conditionInput() {
return this._condition.internalValue;
}
get values() {
return this._values;
}
putValues(value) {
this._values.internalValue = value;
}
resetValues() {
this._values.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get valuesInput() {
return this._values.internalValue;
}
}
exports.OrgPolicyPolicySpecRulesOutputReference = OrgPolicyPolicySpecRulesOutputReference;
_h = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicySpecRulesOutputReference[_h] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicySpecRulesOutputReference", version: "14.12.0" };
class OrgPolicyPolicySpecRulesList 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 OrgPolicyPolicySpecRulesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.OrgPolicyPolicySpecRulesList = OrgPolicyPolicySpecRulesList;
_j = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicySpecRulesList[_j] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicySpecRulesList", version: "14.12.0" };
function orgPolicyPolicySpecToTerraform(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 {
inherit_from_parent: cdktf.booleanToTerraform(struct.inheritFromParent),
reset: cdktf.booleanToTerraform(struct.reset),
rules: cdktf.listMapper(orgPolicyPolicySpecRulesToTerraform, true)(struct.rules),
};
}
exports.orgPolicyPolicySpecToTerraform = orgPolicyPolicySpecToTerraform;
function orgPolicyPolicySpecToHclTerraform(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 = {
inherit_from_parent: {
value: cdktf.booleanToHclTerraform(struct.inheritFromParent),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
reset: {
value: cdktf.booleanToHclTerraform(struct.reset),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
rules: {
value: cdktf.listMapperHcl(orgPolicyPolicySpecRulesToHclTerraform, true)(struct.rules),
isBlock: true,
type: "list",
storageClassType: "OrgPolicyPolicySpecRulesList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.orgPolicyPolicySpecToHclTerraform = orgPolicyPolicySpecToHclTerraform;
class OrgPolicyPolicySpecOutputReference 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;
// rules - computed: false, optional: true, required: false
this._rules = new OrgPolicyPolicySpecRulesList(this, "rules", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._inheritFromParent !== undefined) {
hasAnyValues = true;
internalValueResult.inheritFromParent = this._inheritFromParent;
}
if (this._reset !== undefined) {
hasAnyValues = true;
internalValueResult.reset = this._reset;
}
if (this._rules?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.rules = this._rules?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._inheritFromParent = undefined;
this._reset = undefined;
this._rules.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._inheritFromParent = value.inheritFromParent;
this._reset = value.reset;
this._rules.internalValue = value.rules;
}
}
// etag - computed: true, optional: false, required: false
get etag() {
return this.getStringAttribute('etag');
}
get inheritFromParent() {
return this.getBooleanAttribute('inherit_from_parent');
}
set inheritFromParent(value) {
this._inheritFromParent = value;
}
resetInheritFromParent() {
this._inheritFromParent = undefined;
}
// Temporarily expose input value. Use with caution.
get inheritFromParentInput() {
return this._inheritFromParent;
}
get reset() {
return this.getBooleanAttribute('reset');
}
set reset(value) {
this._reset = value;
}
resetReset() {
this._reset = undefined;
}
// Temporarily expose input value. Use with caution.
get resetInput() {
return this._reset;
}
// update_time - computed: true, optional: false, required: false
get updateTime() {
return this.getStringAttribute('update_time');
}
get rules() {
return this._rules;
}
putRules(value) {
this._rules.internalValue = value;
}
resetRules() {
this._rules.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get rulesInput() {
return this._rules.internalValue;
}
}
exports.OrgPolicyPolicySpecOutputReference = OrgPolicyPolicySpecOutputReference;
_k = JSII_RTTI_SYMBOL_1;
OrgPolicyPolicySpecOutputReference[_k] = { fqn: "@cdktf/provider-google.orgPolicyPolicy.OrgPolicyPolicySpecOutputReference", version: "14.12.0" };
function orgPolicyPolicyTimeoutsToTerraform(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.orgPolicyPolicyTimeoutsToTerraform = orgPolicyPolicyTimeoutsToTerraform;
function orgPolicyPolicyTimeoutsToHclTerraform(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",