@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,136 lines • 163 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.SccFolderCustomModule = exports.SccFolderCustomModuleTimeoutsOutputReference = exports.sccFolderCustomModuleTimeoutsToHclTerraform = exports.sccFolderCustomModuleTimeoutsToTerraform = exports.SccFolderCustomModuleCustomConfigOutputReference = exports.sccFolderCustomModuleCustomConfigToHclTerraform = exports.sccFolderCustomModuleCustomConfigToTerraform = exports.SccFolderCustomModuleCustomConfigResourceSelectorOutputReference = exports.sccFolderCustomModuleCustomConfigResourceSelectorToHclTerraform = exports.sccFolderCustomModuleCustomConfigResourceSelectorToTerraform = exports.SccFolderCustomModuleCustomConfigPredicateOutputReference = exports.sccFolderCustomModuleCustomConfigPredicateToHclTerraform = exports.sccFolderCustomModuleCustomConfigPredicateToTerraform = exports.SccFolderCustomModuleCustomConfigCustomOutputOutputReference = exports.sccFolderCustomModuleCustomConfigCustomOutputToHclTerraform = exports.sccFolderCustomModuleCustomConfigCustomOutputToTerraform = exports.SccFolderCustomModuleCustomConfigCustomOutputPropertiesList = exports.SccFolderCustomModuleCustomConfigCustomOutputPropertiesOutputReference = exports.sccFolderCustomModuleCustomConfigCustomOutputPropertiesToHclTerraform = exports.sccFolderCustomModuleCustomConfigCustomOutputPropertiesToTerraform = exports.SccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionOutputReference = exports.sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToHclTerraform = exports.sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToTerraform(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.sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToTerraform = sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToTerraform;
function sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToHclTerraform(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.sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToHclTerraform = sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToHclTerraform;
class SccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionOutputReference 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;
}
// 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.SccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionOutputReference = SccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionOutputReference;
_a = JSII_RTTI_SYMBOL_1;
SccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionOutputReference[_a] = { fqn: "@cdktf/provider-google.sccFolderCustomModule.SccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionOutputReference", version: "14.12.0" };
function sccFolderCustomModuleCustomConfigCustomOutputPropertiesToTerraform(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 {
name: cdktf.stringToTerraform(struct.name),
value_expression: sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToTerraform(struct.valueExpression),
};
}
exports.sccFolderCustomModuleCustomConfigCustomOutputPropertiesToTerraform = sccFolderCustomModuleCustomConfigCustomOutputPropertiesToTerraform;
function sccFolderCustomModuleCustomConfigCustomOutputPropertiesToHclTerraform(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 = {
name: {
value: cdktf.stringToHclTerraform(struct.name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
value_expression: {
value: sccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionToHclTerraform(struct.valueExpression),
isBlock: true,
type: "list",
storageClassType: "SccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.sccFolderCustomModuleCustomConfigCustomOutputPropertiesToHclTerraform = sccFolderCustomModuleCustomConfigCustomOutputPropertiesToHclTerraform;
class SccFolderCustomModuleCustomConfigCustomOutputPropertiesOutputReference 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;
// value_expression - computed: false, optional: true, required: false
this._valueExpression = new SccFolderCustomModuleCustomConfigCustomOutputPropertiesValueExpressionOutputReference(this, "value_expression");
}
get internalValue() {
if (this.resolvableValue) {
return this.resolvableValue;
}
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._name !== undefined) {
hasAnyValues = true;
internalValueResult.name = this._name;
}
if (this._valueExpression?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.valueExpression = this._valueExpression?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._name = undefined;
this._valueExpression.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._name = value.name;
this._valueExpression.internalValue = value.valueExpression;
}
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
resetName() {
this._name = undefined;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get valueExpression() {
return this._valueExpression;
}
putValueExpression(value) {
this._valueExpression.internalValue = value;
}
resetValueExpression() {
this._valueExpression.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get valueExpressionInput() {
return this._valueExpression.internalValue;
}
}
exports.SccFolderCustomModuleCustomConfigCustomOutputPropertiesOutputReference = SccFolderCustomModuleCustomConfigCustomOutputPropertiesOutputReference;
_b = JSII_RTTI_SYMBOL_1;
SccFolderCustomModuleCustomConfigCustomOutputPropertiesOutputReference[_b] = { fqn: "@cdktf/provider-google.sccFolderCustomModule.SccFolderCustomModuleCustomConfigCustomOutputPropertiesOutputReference", version: "14.12.0" };
class SccFolderCustomModuleCustomConfigCustomOutputPropertiesList 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 SccFolderCustomModuleCustomConfigCustomOutputPropertiesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.SccFolderCustomModuleCustomConfigCustomOutputPropertiesList = SccFolderCustomModuleCustomConfigCustomOutputPropertiesList;
_c = JSII_RTTI_SYMBOL_1;
SccFolderCustomModuleCustomConfigCustomOutputPropertiesList[_c] = { fqn: "@cdktf/provider-google.sccFolderCustomModule.SccFolderCustomModuleCustomConfigCustomOutputPropertiesList", version: "14.12.0" };
function sccFolderCustomModuleCustomConfigCustomOutputToTerraform(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 {
properties: cdktf.listMapper(sccFolderCustomModuleCustomConfigCustomOutputPropertiesToTerraform, true)(struct.properties),
};
}
exports.sccFolderCustomModuleCustomConfigCustomOutputToTerraform = sccFolderCustomModuleCustomConfigCustomOutputToTerraform;
function sccFolderCustomModuleCustomConfigCustomOutputToHclTerraform(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 = {
properties: {
value: cdktf.listMapperHcl(sccFolderCustomModuleCustomConfigCustomOutputPropertiesToHclTerraform, true)(struct.properties),
isBlock: true,
type: "list",
storageClassType: "SccFolderCustomModuleCustomConfigCustomOutputPropertiesList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.sccFolderCustomModuleCustomConfigCustomOutputToHclTerraform = sccFolderCustomModuleCustomConfigCustomOutputToHclTerraform;
class SccFolderCustomModuleCustomConfigCustomOutputOutputReference 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;
// properties - computed: false, optional: true, required: false
this._properties = new SccFolderCustomModuleCustomConfigCustomOutputPropertiesList(this, "properties", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._properties?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.properties = this._properties?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._properties.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._properties.internalValue = value.properties;
}
}
get properties() {
return this._properties;
}
putProperties(value) {
this._properties.internalValue = value;
}
resetProperties() {
this._properties.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get propertiesInput() {
return this._properties.internalValue;
}
}
exports.SccFolderCustomModuleCustomConfigCustomOutputOutputReference = SccFolderCustomModuleCustomConfigCustomOutputOutputReference;
_d = JSII_RTTI_SYMBOL_1;
SccFolderCustomModuleCustomConfigCustomOutputOutputReference[_d] = { fqn: "@cdktf/provider-google.sccFolderCustomModule.SccFolderCustomModuleCustomConfigCustomOutputOutputReference", version: "14.12.0" };
function sccFolderCustomModuleCustomConfigPredicateToTerraform(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.sccFolderCustomModuleCustomConfigPredicateToTerraform = sccFolderCustomModuleCustomConfigPredicateToTerraform;
function sccFolderCustomModuleCustomConfigPredicateToHclTerraform(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.sccFolderCustomModuleCustomConfigPredicateToHclTerraform = sccFolderCustomModuleCustomConfigPredicateToHclTerraform;
class SccFolderCustomModuleCustomConfigPredicateOutputReference 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;
}
// 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.SccFolderCustomModuleCustomConfigPredicateOutputReference = SccFolderCustomModuleCustomConfigPredicateOutputReference;
_e = JSII_RTTI_SYMBOL_1;
SccFolderCustomModuleCustomConfigPredicateOutputReference[_e] = { fqn: "@cdktf/provider-google.sccFolderCustomModule.SccFolderCustomModuleCustomConfigPredicateOutputReference", version: "14.12.0" };
function sccFolderCustomModuleCustomConfigResourceSelectorToTerraform(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 {
resource_types: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.resourceTypes),
};
}
exports.sccFolderCustomModuleCustomConfigResourceSelectorToTerraform = sccFolderCustomModuleCustomConfigResourceSelectorToTerraform;
function sccFolderCustomModuleCustomConfigResourceSelectorToHclTerraform(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 = {
resource_types: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.resourceTypes),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.sccFolderCustomModuleCustomConfigResourceSelectorToHclTerraform = sccFolderCustomModuleCustomConfigResourceSelectorToHclTerraform;
class SccFolderCustomModuleCustomConfigResourceSelectorOutputReference 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._resourceTypes !== undefined) {
hasAnyValues = true;
internalValueResult.resourceTypes = this._resourceTypes;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._resourceTypes = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._resourceTypes = value.resourceTypes;
}
}
get resourceTypes() {
return this.getListAttribute('resource_types');
}
set resourceTypes(value) {
this._resourceTypes = value;
}
// Temporarily expose input value. Use with caution.
get resourceTypesInput() {
return this._resourceTypes;
}
}
exports.SccFolderCustomModuleCustomConfigResourceSelectorOutputReference = SccFolderCustomModuleCustomConfigResourceSelectorOutputReference;
_f = JSII_RTTI_SYMBOL_1;
SccFolderCustomModuleCustomConfigResourceSelectorOutputReference[_f] = { fqn: "@cdktf/provider-google.sccFolderCustomModule.SccFolderCustomModuleCustomConfigResourceSelectorOutputReference", version: "14.12.0" };
function sccFolderCustomModuleCustomConfigToTerraform(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),
recommendation: cdktf.stringToTerraform(struct.recommendation),
severity: cdktf.stringToTerraform(struct.severity),
custom_output: sccFolderCustomModuleCustomConfigCustomOutputToTerraform(struct.customOutput),
predicate: sccFolderCustomModuleCustomConfigPredicateToTerraform(struct.predicate),
resource_selector: sccFolderCustomModuleCustomConfigResourceSelectorToTerraform(struct.resourceSelector),
};
}
exports.sccFolderCustomModuleCustomConfigToTerraform = sccFolderCustomModuleCustomConfigToTerraform;
function sccFolderCustomModuleCustomConfigToHclTerraform(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",
},
recommendation: {
value: cdktf.stringToHclTerraform(struct.recommendation),
isBlock: false,
type: "simple",
storageClassType: "string",
},
severity: {
value: cdktf.stringToHclTerraform(struct.severity),
isBlock: false,
type: "simple",
storageClassType: "string",
},
custom_output: {
value: sccFolderCustomModuleCustomConfigCustomOutputToHclTerraform(struct.customOutput),
isBlock: true,
type: "list",
storageClassType: "SccFolderCustomModuleCustomConfigCustomOutputList",
},
predicate: {
value: sccFolderCustomModuleCustomConfigPredicateToHclTerraform(struct.predicate),
isBlock: true,
type: "list",
storageClassType: "SccFolderCustomModuleCustomConfigPredicateList",
},
resource_selector: {
value: sccFolderCustomModuleCustomConfigResourceSelectorToHclTerraform(struct.resourceSelector),
isBlock: true,
type: "list",
storageClassType: "SccFolderCustomModuleCustomConfigResourceSelectorList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.sccFolderCustomModuleCustomConfigToHclTerraform = sccFolderCustomModuleCustomConfigToHclTerraform;
class SccFolderCustomModuleCustomConfigOutputReference 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;
// custom_output - computed: false, optional: true, required: false
this._customOutput = new SccFolderCustomModuleCustomConfigCustomOutputOutputReference(this, "custom_output");
// predicate - computed: false, optional: false, required: true
this._predicate = new SccFolderCustomModuleCustomConfigPredicateOutputReference(this, "predicate");
// resource_selector - computed: false, optional: false, required: true
this._resourceSelector = new SccFolderCustomModuleCustomConfigResourceSelectorOutputReference(this, "resource_selector");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._description !== undefined) {
hasAnyValues = true;
internalValueResult.description = this._description;
}
if (this._recommendation !== undefined) {
hasAnyValues = true;
internalValueResult.recommendation = this._recommendation;
}
if (this._severity !== undefined) {
hasAnyValues = true;
internalValueResult.severity = this._severity;
}
if (this._customOutput?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.customOutput = this._customOutput?.internalValue;
}
if (this._predicate?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.predicate = this._predicate?.internalValue;
}
if (this._resourceSelector?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.resourceSelector = this._resourceSelector?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._description = undefined;
this._recommendation = undefined;
this._severity = undefined;
this._customOutput.internalValue = undefined;
this._predicate.internalValue = undefined;
this._resourceSelector.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._description = value.description;
this._recommendation = value.recommendation;
this._severity = value.severity;
this._customOutput.internalValue = value.customOutput;
this._predicate.internalValue = value.predicate;
this._resourceSelector.internalValue = value.resourceSelector;
}
}
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 recommendation() {
return this.getStringAttribute('recommendation');
}
set recommendation(value) {
this._recommendation = value;
}
// Temporarily expose input value. Use with caution.
get recommendationInput() {
return this._recommendation;
}
get severity() {
return this.getStringAttribute('severity');
}
set severity(value) {
this._severity = value;
}
// Temporarily expose input value. Use with caution.
get severityInput() {
return this._severity;
}
get customOutput() {
return this._customOutput;
}
putCustomOutput(value) {
this._customOutput.internalValue = value;
}
resetCustomOutput() {
this._customOutput.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get customOutputInput() {
return this._customOutput.internalValue;
}
get predicate() {
return this._predicate;
}
putPredicate(value) {
this._predicate.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get predicateInput() {
return this._predicate.internalValue;
}
get resourceSelector() {
return this._resourceSelector;
}
putResourceSelector(value) {
this._resourceSelector.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get resourceSelectorInput() {
return this._resourceSelector.internalValue;
}
}
exports.SccFolderCustomModuleCustomConfigOutputReference = SccFolderCustomModuleCustomConfigOutputReference;
_g = JSII_RTTI_SYMBOL_1;
SccFolderCustomModuleCustomConfigOutputReference[_g] = { fqn: "@cdktf/provider-google.sccFolderCustomModule.SccFolderCustomModuleCustomConfigOutputReference", version: "14.12.0" };
function sccFolderCustomModuleTimeoutsToTerraform(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.sccFolderCustomModuleTimeoutsToTerraform = sccFolderCustomModuleTimeoutsToTerraform;
function sccFolderCustomModuleTimeoutsToHclTerraform(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.sccFolderCustomModuleTimeoutsToHclTerraform = sccFolderCustomModuleTimeoutsToHclTerraform;
class SccFolderCustomModuleTimeoutsOutputReference 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.SccFolderCustomModuleTimeoutsOutputReference = SccFolderCustomModuleTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
SccFolderCustomModuleTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.sccFolderCustomModule.SccFolderCustomModuleTimeoutsOutputReference", version: "14.12.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/scc_folder_custom_module google_scc_folder_custom_module}
*/
class SccFolderCustomModule extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a SccFolderCustomModule 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 SccFolderCustomModule to import
* @param importFromId The id of the existing SccFolderCustomModule that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/scc_folder_custom_module#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the SccFolderCustomModule to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_scc_folder_custom_module", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/scc_folder_custom_module google_scc_folder_custom_module} 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 SccFolderCustomModuleConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_scc_folder_custom_module',
terraformGeneratorMetadata: {
providerName: 'google',
providerVersion: '6.13.0',
providerVersionConstraint: '~> 6.0'
},
provider: config.provider,
dependsOn: config.dependsOn,
count: config.count,
lifecycle: config.lifecycle,
provisioners: config.provisioners,
connection: config.connection,
forEach: config.forEach
});
// custom_config - computed: false, optional: false, required: true
this._customConfig = new SccFolderCustomModuleCustomConfigOutputReference(this, "custom_config");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new SccFolderCustomModuleTimeoutsOutputReference(this, "timeouts");
this._displayName = config.displayName;
this._enablementState = config.enablementState;
this._folder = config.folder;
this._id = config.id;
this._customConfig.internalValue = config.customConfig;
this._timeouts.internalValue = config.timeouts;
}
// ==========
// ATTRIBUTES
// ==========
// ancestor_module - computed: true, optional: false, required: false
get ancestorModule() {
return this.getStringAttribute('ancestor_module');
}
get displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
get enablementState() {
return this.getStringAttribute('enablement_state');
}
set enablementState(value) {
this._enablementState = value;
}
// Temporarily expose input value. Use with caution.
get enablementStateInput() {
return this._enablementState;
}
get folder() {
return this.getStringAttribute('folder');
}
set folder(value) {
this._folder = value;
}
// Temporarily expose input value. Use with caution.
get folderInput() {
return this._folder;
}
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;
}
// last_editor - computed: true, optional: false, required: false
get lastEditor() {
return this.getStringAttribute('last_editor');
}
// name - computed: true, optional: false, required: false
get name() {
return this.getStringAttribute('name');
}
// update_time - computed: true, optional: false, required: false
get updateTime() {
return this.getStringAttribute('update_time');
}
get customConfig() {
return this._customConfig;
}
putCustomConfig(value) {
this._customConfig.internalValue = value;
}
// Temporarily expose input value. Use with caution.
get customConfigInput() {
return this._customConfig.internalValue;
}
get timeouts() {
return this._timeouts;
}
putTimeouts(value) {
this._timeouts.internalValue = value;
}
resetTimeouts() {
this._timeouts.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get timeoutsInput() {
return this._timeouts.internalValue;
}
// =========
// SYNTHESIS
// =========
synthesizeAttributes() {
return {
display_name: cdktf.stringToTerraform(this._displayName),
enablement_state: cdktf.stringToTerraform(this._enablementState),
folder: cdktf.stringToTerraform(this._folder),
id: cdktf.stringToTerraform(this._id),
custom_config: sccFolderCustomModuleCustomConfigToTerraform(this._customConfig.internalValue),
timeouts: sccFolderCustomModuleTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
display_name: {
value: cdktf.stringToHclTerraform(this._displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
enablement_state: {
value: cdktf.stringToHclTerraform(this._enablementState),
isBlock: false,
type: "simple",
storageClassType: "string",
},
folder: {
value: cdktf.stringToHclTerraform(this._folder),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
custom_config: {
value: sccFolderCustomModuleCustomConfigToHclTerraform(this._customConfig.internalValue),
isBlock: true,
type: "list",
storageClassType: "SccFolderCustomModuleCustomConfigList",
},
timeouts: {
value: sccFolderCustomModuleTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "SccFolderCustomModuleTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.SccFolderCustomModule = SccFolderCustomModule;
_j = JSII_RTTI_SYMBOL_1;
SccFolderCustomModule[_j] = { fqn: "@cdktf/provider-google.sccFolderCustomModule.SccFolderCustomModule", version: "14.12.0" };
// =================
// STATIC PROPERTIES
// =================
SccFolderCustomModule.tfResourceType = "google_scc_folder_custom_module";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2NjLWZvbGRlci1jdXN0b20tbW9kdWxlL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBU0EsK0JBQStCO0FBNkUvQixTQUFnQixpRkFBaUYsQ0FBQyxNQUF1SztJQUN2USxJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQUMsT0FBTyxNQUFNLENBQUM7SUFBQyxDQUFDO0lBQzVGLElBQUksS0FBSyxDQUFDLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFDbkMsTUFBTSxJQUFJLEtBQUssQ0FBQyxvSEFBb0gsQ0FBQyxDQUFDO0lBQ3hJLENBQUM7SUFDRCxPQUFPO1FBQ0wsV0FBVyxFQUFFLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQyxNQUFPLENBQUMsV0FBVyxDQUFDO1FBQ3pELFVBQVUsRUFBRSxLQUFLLENBQUMsaUJBQWlCLENBQUMsTUFBTyxDQUFDLFVBQVUsQ0FBQztRQUN2RCxRQUFRLEVBQUUsS0FBSyxDQUFDLGlCQUFpQixDQUFDLE1BQU8sQ0FBQyxRQUFRLENBQUM7UUFDbkQsS0FBSyxFQUFFLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQyxNQUFPLENBQUMsS0FBSyxDQUFDO0tBQzlDLENBQUE7QUFDSCxDQUFDO0FBWEQsOEtBV0M7QUFHRCxTQUFnQixvRkFBb0YsQ0FBQyxNQUF1SztJQUMxUSxJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQUMsT0FBTyxNQUFNLENBQUM7SUFBQyxDQUFDO0lBQzVGLElBQUksS0FBSyxDQUFDLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFDbkMsTUFBTSxJQUFJLEtBQUssQ0FBQyxvSEFBb0gsQ0FBQyxDQUFDO0lBQ3hJLENBQUM7SUFDRCxNQUFNLEtBQUssR0FBRztRQUNaLFdBQVcsRUFBRTtZQUNYLEtBQUssRUFBRSxLQUFLLENBQUMsb0JBQW9CLENBQUMsTUFBTyxDQUFDLFdBQVcsQ0FBQztZQUN0RCxPQUFPLEVBQUUsS0FBSztZQUNkLElBQUksRUFBRSxRQUFRO1lBQ2QsZ0JBQWdCLEVBQUUsUUFBUTtTQUMzQjtRQUNELFVBQVUsRUFBRTtZQUNWLEtBQUssRUFBRSxLQUFLLENBQUMsb0JBQW9CLENBQUMsTUFBTyxDQUFDLFVBQVUsQ0FBQztZQUNyRCxPQUFPLEVBQUUsS0FBSztZQUNkLElBQUksRUFBRSxRQUFRO1lBQ2QsZ0JBQWdCLEVBQUUsUUFBUTtTQUMzQjtRQUNELFFBQVEsRUFBRTtZQUNSLEtBQUssRUFBRSxLQUFLLENBQUMsb0JBQW9CLENBQUMsTUFBTyxDQUFDLFFBQVEsQ0FBQztZQUNuRCxPQUFPLEVBQUUsS0FBSztZQUNkLElBQUksRUFBRSxRQUFRO1lBQ2QsZ0JBQWdCLEVBQUUsUUFBUTtTQUMzQjtRQUNELEtBQUssRUFBRTtZQUNMLEtBQUssRUFBRSxLQUFLLENBQUMsb0JBQW9CLENB