@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,141 lines • 382 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Cloudfunctions2Function = exports.Cloudfunctions2FunctionTimeoutsOutputReference = exports.cloudfunctions2FunctionTimeoutsToHclTerraform = exports.cloudfunctions2FunctionTimeoutsToTerraform = exports.Cloudfunctions2FunctionServiceConfigOutputReference = exports.cloudfunctions2FunctionServiceConfigToHclTerraform = exports.cloudfunctions2FunctionServiceConfigToTerraform = exports.Cloudfunctions2FunctionServiceConfigSecretVolumesList = exports.Cloudfunctions2FunctionServiceConfigSecretVolumesOutputReference = exports.cloudfunctions2FunctionServiceConfigSecretVolumesToHclTerraform = exports.cloudfunctions2FunctionServiceConfigSecretVolumesToTerraform = exports.Cloudfunctions2FunctionServiceConfigSecretVolumesVersionsList = exports.Cloudfunctions2FunctionServiceConfigSecretVolumesVersionsOutputReference = exports.cloudfunctions2FunctionServiceConfigSecretVolumesVersionsToHclTerraform = exports.cloudfunctions2FunctionServiceConfigSecretVolumesVersionsToTerraform = exports.Cloudfunctions2FunctionServiceConfigSecretEnvironmentVariablesList = exports.Cloudfunctions2FunctionServiceConfigSecretEnvironmentVariablesOutputReference = exports.cloudfunctions2FunctionServiceConfigSecretEnvironmentVariablesToHclTerraform = exports.cloudfunctions2FunctionServiceConfigSecretEnvironmentVariablesToTerraform = exports.Cloudfunctions2FunctionEventTriggerOutputReference = exports.cloudfunctions2FunctionEventTriggerToHclTerraform = exports.cloudfunctions2FunctionEventTriggerToTerraform = exports.Cloudfunctions2FunctionEventTriggerEventFiltersList = exports.Cloudfunctions2FunctionEventTriggerEventFiltersOutputReference = exports.cloudfunctions2FunctionEventTriggerEventFiltersToHclTerraform = exports.cloudfunctions2FunctionEventTriggerEventFiltersToTerraform = exports.Cloudfunctions2FunctionBuildConfigOutputReference = exports.cloudfunctions2FunctionBuildConfigToHclTerraform = exports.cloudfunctions2FunctionBuildConfigToTerraform = exports.Cloudfunctions2FunctionBuildConfigSourceOutputReference = exports.cloudfunctions2FunctionBuildConfigSourceToHclTerraform = exports.cloudfunctions2FunctionBuildConfigSourceToTerraform = exports.Cloudfunctions2FunctionBuildConfigSourceStorageSourceOutputReference = exports.cloudfunctions2FunctionBuildConfigSourceStorageSourceToHclTerraform = exports.cloudfunctions2FunctionBuildConfigSourceStorageSourceToTerraform = exports.Cloudfunctions2FunctionBuildConfigSourceRepoSourceOutputReference = exports.cloudfunctions2FunctionBuildConfigSourceRepoSourceToHclTerraform = exports.cloudfunctions2FunctionBuildConfigSourceRepoSourceToTerraform = exports.Cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyOutputReference = exports.cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToHclTerraform = exports.cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToTerraform = exports.Cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyOutputReference = exports.cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToHclTerraform = exports.cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToTerraform(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 {};
}
exports.cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToTerraform = cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToTerraform;
function cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToHclTerraform(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 = {};
return attrs;
}
exports.cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToHclTerraform = cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToHclTerraform;
class Cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyOutputReference 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 = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
}
exports.Cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyOutputReference = Cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyOutputReference;
_a = JSII_RTTI_SYMBOL_1;
Cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyOutputReference[_a] = { fqn: "@cdktf/provider-google.cloudfunctions2Function.Cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyOutputReference", version: "14.12.0" };
function cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToTerraform(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 {};
}
exports.cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToTerraform = cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToTerraform;
function cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToHclTerraform(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 = {};
return attrs;
}
exports.cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToHclTerraform = cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToHclTerraform;
class Cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyOutputReference 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 = {};
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
}
}
// runtime_version - computed: true, optional: false, required: false
get runtimeVersion() {
return this.getStringAttribute('runtime_version');
}
}
exports.Cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyOutputReference = Cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyOutputReference;
_b = JSII_RTTI_SYMBOL_1;
Cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyOutputReference[_b] = { fqn: "@cdktf/provider-google.cloudfunctions2Function.Cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyOutputReference", version: "14.12.0" };
function cloudfunctions2FunctionBuildConfigSourceRepoSourceToTerraform(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 {
branch_name: cdktf.stringToTerraform(struct.branchName),
commit_sha: cdktf.stringToTerraform(struct.commitSha),
dir: cdktf.stringToTerraform(struct.dir),
invert_regex: cdktf.booleanToTerraform(struct.invertRegex),
project_id: cdktf.stringToTerraform(struct.projectId),
repo_name: cdktf.stringToTerraform(struct.repoName),
tag_name: cdktf.stringToTerraform(struct.tagName),
};
}
exports.cloudfunctions2FunctionBuildConfigSourceRepoSourceToTerraform = cloudfunctions2FunctionBuildConfigSourceRepoSourceToTerraform;
function cloudfunctions2FunctionBuildConfigSourceRepoSourceToHclTerraform(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 = {
branch_name: {
value: cdktf.stringToHclTerraform(struct.branchName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
commit_sha: {
value: cdktf.stringToHclTerraform(struct.commitSha),
isBlock: false,
type: "simple",
storageClassType: "string",
},
dir: {
value: cdktf.stringToHclTerraform(struct.dir),
isBlock: false,
type: "simple",
storageClassType: "string",
},
invert_regex: {
value: cdktf.booleanToHclTerraform(struct.invertRegex),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
project_id: {
value: cdktf.stringToHclTerraform(struct.projectId),
isBlock: false,
type: "simple",
storageClassType: "string",
},
repo_name: {
value: cdktf.stringToHclTerraform(struct.repoName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tag_name: {
value: cdktf.stringToHclTerraform(struct.tagName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.cloudfunctions2FunctionBuildConfigSourceRepoSourceToHclTerraform = cloudfunctions2FunctionBuildConfigSourceRepoSourceToHclTerraform;
class Cloudfunctions2FunctionBuildConfigSourceRepoSourceOutputReference 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._branchName !== undefined) {
hasAnyValues = true;
internalValueResult.branchName = this._branchName;
}
if (this._commitSha !== undefined) {
hasAnyValues = true;
internalValueResult.commitSha = this._commitSha;
}
if (this._dir !== undefined) {
hasAnyValues = true;
internalValueResult.dir = this._dir;
}
if (this._invertRegex !== undefined) {
hasAnyValues = true;
internalValueResult.invertRegex = this._invertRegex;
}
if (this._projectId !== undefined) {
hasAnyValues = true;
internalValueResult.projectId = this._projectId;
}
if (this._repoName !== undefined) {
hasAnyValues = true;
internalValueResult.repoName = this._repoName;
}
if (this._tagName !== undefined) {
hasAnyValues = true;
internalValueResult.tagName = this._tagName;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._branchName = undefined;
this._commitSha = undefined;
this._dir = undefined;
this._invertRegex = undefined;
this._projectId = undefined;
this._repoName = undefined;
this._tagName = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._branchName = value.branchName;
this._commitSha = value.commitSha;
this._dir = value.dir;
this._invertRegex = value.invertRegex;
this._projectId = value.projectId;
this._repoName = value.repoName;
this._tagName = value.tagName;
}
}
get branchName() {
return this.getStringAttribute('branch_name');
}
set branchName(value) {
this._branchName = value;
}
resetBranchName() {
this._branchName = undefined;
}
// Temporarily expose input value. Use with caution.
get branchNameInput() {
return this._branchName;
}
get commitSha() {
return this.getStringAttribute('commit_sha');
}
set commitSha(value) {
this._commitSha = value;
}
resetCommitSha() {
this._commitSha = undefined;
}
// Temporarily expose input value. Use with caution.
get commitShaInput() {
return this._commitSha;
}
get dir() {
return this.getStringAttribute('dir');
}
set dir(value) {
this._dir = value;
}
resetDir() {
this._dir = undefined;
}
// Temporarily expose input value. Use with caution.
get dirInput() {
return this._dir;
}
get invertRegex() {
return this.getBooleanAttribute('invert_regex');
}
set invertRegex(value) {
this._invertRegex = value;
}
resetInvertRegex() {
this._invertRegex = undefined;
}
// Temporarily expose input value. Use with caution.
get invertRegexInput() {
return this._invertRegex;
}
get projectId() {
return this.getStringAttribute('project_id');
}
set projectId(value) {
this._projectId = value;
}
resetProjectId() {
this._projectId = undefined;
}
// Temporarily expose input value. Use with caution.
get projectIdInput() {
return this._projectId;
}
get repoName() {
return this.getStringAttribute('repo_name');
}
set repoName(value) {
this._repoName = value;
}
resetRepoName() {
this._repoName = undefined;
}
// Temporarily expose input value. Use with caution.
get repoNameInput() {
return this._repoName;
}
get tagName() {
return this.getStringAttribute('tag_name');
}
set tagName(value) {
this._tagName = value;
}
resetTagName() {
this._tagName = undefined;
}
// Temporarily expose input value. Use with caution.
get tagNameInput() {
return this._tagName;
}
}
exports.Cloudfunctions2FunctionBuildConfigSourceRepoSourceOutputReference = Cloudfunctions2FunctionBuildConfigSourceRepoSourceOutputReference;
_c = JSII_RTTI_SYMBOL_1;
Cloudfunctions2FunctionBuildConfigSourceRepoSourceOutputReference[_c] = { fqn: "@cdktf/provider-google.cloudfunctions2Function.Cloudfunctions2FunctionBuildConfigSourceRepoSourceOutputReference", version: "14.12.0" };
function cloudfunctions2FunctionBuildConfigSourceStorageSourceToTerraform(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 {
bucket: cdktf.stringToTerraform(struct.bucket),
generation: cdktf.numberToTerraform(struct.generation),
object: cdktf.stringToTerraform(struct.object),
};
}
exports.cloudfunctions2FunctionBuildConfigSourceStorageSourceToTerraform = cloudfunctions2FunctionBuildConfigSourceStorageSourceToTerraform;
function cloudfunctions2FunctionBuildConfigSourceStorageSourceToHclTerraform(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 = {
bucket: {
value: cdktf.stringToHclTerraform(struct.bucket),
isBlock: false,
type: "simple",
storageClassType: "string",
},
generation: {
value: cdktf.numberToHclTerraform(struct.generation),
isBlock: false,
type: "simple",
storageClassType: "number",
},
object: {
value: cdktf.stringToHclTerraform(struct.object),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.cloudfunctions2FunctionBuildConfigSourceStorageSourceToHclTerraform = cloudfunctions2FunctionBuildConfigSourceStorageSourceToHclTerraform;
class Cloudfunctions2FunctionBuildConfigSourceStorageSourceOutputReference 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._bucket !== undefined) {
hasAnyValues = true;
internalValueResult.bucket = this._bucket;
}
if (this._generation !== undefined) {
hasAnyValues = true;
internalValueResult.generation = this._generation;
}
if (this._object !== undefined) {
hasAnyValues = true;
internalValueResult.object = this._object;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._bucket = undefined;
this._generation = undefined;
this._object = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._bucket = value.bucket;
this._generation = value.generation;
this._object = value.object;
}
}
get bucket() {
return this.getStringAttribute('bucket');
}
set bucket(value) {
this._bucket = value;
}
resetBucket() {
this._bucket = undefined;
}
// Temporarily expose input value. Use with caution.
get bucketInput() {
return this._bucket;
}
get generation() {
return this.getNumberAttribute('generation');
}
set generation(value) {
this._generation = value;
}
resetGeneration() {
this._generation = undefined;
}
// Temporarily expose input value. Use with caution.
get generationInput() {
return this._generation;
}
get object() {
return this.getStringAttribute('object');
}
set object(value) {
this._object = value;
}
resetObject() {
this._object = undefined;
}
// Temporarily expose input value. Use with caution.
get objectInput() {
return this._object;
}
}
exports.Cloudfunctions2FunctionBuildConfigSourceStorageSourceOutputReference = Cloudfunctions2FunctionBuildConfigSourceStorageSourceOutputReference;
_d = JSII_RTTI_SYMBOL_1;
Cloudfunctions2FunctionBuildConfigSourceStorageSourceOutputReference[_d] = { fqn: "@cdktf/provider-google.cloudfunctions2Function.Cloudfunctions2FunctionBuildConfigSourceStorageSourceOutputReference", version: "14.12.0" };
function cloudfunctions2FunctionBuildConfigSourceToTerraform(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 {
repo_source: cloudfunctions2FunctionBuildConfigSourceRepoSourceToTerraform(struct.repoSource),
storage_source: cloudfunctions2FunctionBuildConfigSourceStorageSourceToTerraform(struct.storageSource),
};
}
exports.cloudfunctions2FunctionBuildConfigSourceToTerraform = cloudfunctions2FunctionBuildConfigSourceToTerraform;
function cloudfunctions2FunctionBuildConfigSourceToHclTerraform(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 = {
repo_source: {
value: cloudfunctions2FunctionBuildConfigSourceRepoSourceToHclTerraform(struct.repoSource),
isBlock: true,
type: "list",
storageClassType: "Cloudfunctions2FunctionBuildConfigSourceRepoSourceList",
},
storage_source: {
value: cloudfunctions2FunctionBuildConfigSourceStorageSourceToHclTerraform(struct.storageSource),
isBlock: true,
type: "list",
storageClassType: "Cloudfunctions2FunctionBuildConfigSourceStorageSourceList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.cloudfunctions2FunctionBuildConfigSourceToHclTerraform = cloudfunctions2FunctionBuildConfigSourceToHclTerraform;
class Cloudfunctions2FunctionBuildConfigSourceOutputReference 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;
// repo_source - computed: false, optional: true, required: false
this._repoSource = new Cloudfunctions2FunctionBuildConfigSourceRepoSourceOutputReference(this, "repo_source");
// storage_source - computed: false, optional: true, required: false
this._storageSource = new Cloudfunctions2FunctionBuildConfigSourceStorageSourceOutputReference(this, "storage_source");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._repoSource?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.repoSource = this._repoSource?.internalValue;
}
if (this._storageSource?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.storageSource = this._storageSource?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._repoSource.internalValue = undefined;
this._storageSource.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._repoSource.internalValue = value.repoSource;
this._storageSource.internalValue = value.storageSource;
}
}
get repoSource() {
return this._repoSource;
}
putRepoSource(value) {
this._repoSource.internalValue = value;
}
resetRepoSource() {
this._repoSource.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get repoSourceInput() {
return this._repoSource.internalValue;
}
get storageSource() {
return this._storageSource;
}
putStorageSource(value) {
this._storageSource.internalValue = value;
}
resetStorageSource() {
this._storageSource.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get storageSourceInput() {
return this._storageSource.internalValue;
}
}
exports.Cloudfunctions2FunctionBuildConfigSourceOutputReference = Cloudfunctions2FunctionBuildConfigSourceOutputReference;
_e = JSII_RTTI_SYMBOL_1;
Cloudfunctions2FunctionBuildConfigSourceOutputReference[_e] = { fqn: "@cdktf/provider-google.cloudfunctions2Function.Cloudfunctions2FunctionBuildConfigSourceOutputReference", version: "14.12.0" };
function cloudfunctions2FunctionBuildConfigToTerraform(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 {
docker_repository: cdktf.stringToTerraform(struct.dockerRepository),
entry_point: cdktf.stringToTerraform(struct.entryPoint),
environment_variables: cdktf.hashMapper(cdktf.stringToTerraform)(struct.environmentVariables),
runtime: cdktf.stringToTerraform(struct.runtime),
service_account: cdktf.stringToTerraform(struct.serviceAccount),
worker_pool: cdktf.stringToTerraform(struct.workerPool),
automatic_update_policy: cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToTerraform(struct.automaticUpdatePolicy),
on_deploy_update_policy: cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToTerraform(struct.onDeployUpdatePolicy),
source: cloudfunctions2FunctionBuildConfigSourceToTerraform(struct.source),
};
}
exports.cloudfunctions2FunctionBuildConfigToTerraform = cloudfunctions2FunctionBuildConfigToTerraform;
function cloudfunctions2FunctionBuildConfigToHclTerraform(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 = {
docker_repository: {
value: cdktf.stringToHclTerraform(struct.dockerRepository),
isBlock: false,
type: "simple",
storageClassType: "string",
},
entry_point: {
value: cdktf.stringToHclTerraform(struct.entryPoint),
isBlock: false,
type: "simple",
storageClassType: "string",
},
environment_variables: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(struct.environmentVariables),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
runtime: {
value: cdktf.stringToHclTerraform(struct.runtime),
isBlock: false,
type: "simple",
storageClassType: "string",
},
service_account: {
value: cdktf.stringToHclTerraform(struct.serviceAccount),
isBlock: false,
type: "simple",
storageClassType: "string",
},
worker_pool: {
value: cdktf.stringToHclTerraform(struct.workerPool),
isBlock: false,
type: "simple",
storageClassType: "string",
},
automatic_update_policy: {
value: cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyToHclTerraform(struct.automaticUpdatePolicy),
isBlock: true,
type: "list",
storageClassType: "Cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyList",
},
on_deploy_update_policy: {
value: cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyToHclTerraform(struct.onDeployUpdatePolicy),
isBlock: true,
type: "list",
storageClassType: "Cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyList",
},
source: {
value: cloudfunctions2FunctionBuildConfigSourceToHclTerraform(struct.source),
isBlock: true,
type: "list",
storageClassType: "Cloudfunctions2FunctionBuildConfigSourceList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.cloudfunctions2FunctionBuildConfigToHclTerraform = cloudfunctions2FunctionBuildConfigToHclTerraform;
class Cloudfunctions2FunctionBuildConfigOutputReference 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;
// automatic_update_policy - computed: false, optional: true, required: false
this._automaticUpdatePolicy = new Cloudfunctions2FunctionBuildConfigAutomaticUpdatePolicyOutputReference(this, "automatic_update_policy");
// on_deploy_update_policy - computed: false, optional: true, required: false
this._onDeployUpdatePolicy = new Cloudfunctions2FunctionBuildConfigOnDeployUpdatePolicyOutputReference(this, "on_deploy_update_policy");
// source - computed: false, optional: true, required: false
this._source = new Cloudfunctions2FunctionBuildConfigSourceOutputReference(this, "source");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._dockerRepository !== undefined) {
hasAnyValues = true;
internalValueResult.dockerRepository = this._dockerRepository;
}
if (this._entryPoint !== undefined) {
hasAnyValues = true;
internalValueResult.entryPoint = this._entryPoint;
}
if (this._environmentVariables !== undefined) {
hasAnyValues = true;
internalValueResult.environmentVariables = this._environmentVariables;
}
if (this._runtime !== undefined) {
hasAnyValues = true;
internalValueResult.runtime = this._runtime;
}
if (this._serviceAccount !== undefined) {
hasAnyValues = true;
internalValueResult.serviceAccount = this._serviceAccount;
}
if (this._workerPool !== undefined) {
hasAnyValues = true;
internalValueResult.workerPool = this._workerPool;
}
if (this._automaticUpdatePolicy?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.automaticUpdatePolicy = this._automaticUpdatePolicy?.internalValue;
}
if (this._onDeployUpdatePolicy?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.onDeployUpdatePolicy = this._onDeployUpdatePolicy?.internalValue;
}
if (this._source?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.source = this._source?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._dockerRepository = undefined;
this._entryPoint = undefined;
this._environmentVariables = undefined;
this._runtime = undefined;
this._serviceAccount = undefined;
this._workerPool = undefined;
this._automaticUpdatePolicy.internalValue = undefined;
this._onDeployUpdatePolicy.internalValue = undefined;
this._source.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._dockerRepository = value.dockerRepository;
this._entryPoint = value.entryPoint;
this._environmentVariables = value.environmentVariables;
this._runtime = value.runtime;
this._serviceAccount = value.serviceAccount;
this._workerPool = value.workerPool;
this._automaticUpdatePolicy.internalValue = value.automaticUpdatePolicy;
this._onDeployUpdatePolicy.internalValue = value.onDeployUpdatePolicy;
this._source.internalValue = value.source;
}
}
// build - computed: true, optional: false, required: false
get buildAttribute() {
return this.getStringAttribute('build');
}
get dockerRepository() {
return this.getStringAttribute('docker_repository');
}
set dockerRepository(value) {
this._dockerRepository = value;
}
resetDockerRepository() {
this._dockerRepository = undefined;
}
// Temporarily expose input value. Use with caution.
get dockerRepositoryInput() {
return this._dockerRepository;
}
get entryPoint() {
return this.getStringAttribute('entry_point');
}
set entryPoint(value) {
this._entryPoint = value;
}
resetEntryPoint() {
this._entryPoint = undefined;
}
// Temporarily expose input value. Use with caution.
get entryPointInput() {
return this._entryPoint;
}
get environmentVariables() {
return this.getStringMapAttribute('environment_variables');
}
set environmentVariables(value) {
this._environmentVariables = value;
}
resetEnvironmentVariables() {
this._environmentVariables = undefined;
}
// Temporarily expose input value. Use with caution.
get environmentVariablesInput() {
return this._environmentVariables;
}
get runtime() {
return this.getStringAttribute('runtime');
}
set runtime(value) {
this._runtime = value;
}
resetRuntime() {
this._runtime = undefined;
}
// Temporarily expose input value. Use with caution.
get runtimeInput() {
return this._runtime;
}
get serviceAccount() {
return this.getStringAttribute('service_account');
}
set serviceAccount(value) {
this._serviceAccount = value;
}
resetServiceAccount() {
this._serviceAccount = undefined;
}
// Temporarily expose input value. Use with caution.
get serviceAccountInput() {
return this._serviceAccount;
}
get workerPool() {
return this.getStringAttribute('worker_pool');
}
set workerPool(value) {
this._workerPool = value;
}
resetWorkerPool() {
this._workerPool = undefined;
}
// Temporarily expose input value. Use with caution.
get workerPoolInput() {
return this._workerPool;
}
get automaticUpdatePolicy() {
return this._automaticUpdatePolicy;
}
putAutomaticUpdatePolicy(value) {
this._automaticUpdatePolicy.internalValue = value;
}
resetAutomaticUpdatePolicy() {
this._automaticUpdatePolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get automaticUpdatePolicyInput() {
return this._automaticUpdatePolicy.internalValue;
}
get onDeployUpdatePolicy() {
return this._onDeployUpdatePolicy;
}
putOnDeployUpdatePolicy(value) {
this._onDeployUpdatePolicy.internalValue = value;
}
resetOnDeployUpdatePolicy() {
this._onDeployUpdatePolicy.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get onDeployUpdatePolicyInput() {
return this._onDeployUpdatePolicy.internalValue;
}
get source() {
return this._source;
}
putSource(value) {
this._source.internalValue = value;
}
resetSource() {
this._source.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get sourceInput() {
return this._source.internalValue;
}
}
exports.Cloudfunctions2FunctionBuildConfigOutputReference = Cloudfunctions2FunctionBuildConfigOutputReference;
_f = JSII_RTTI_SYMBOL_1;
Cloudfunctions2FunctionBuildConfigOutputReference[_f] = { fqn: "@cdktf/provider-google.cloudfunctions2Function.Cloudfunctions2FunctionBuildConfigOutputReference", version: "14.12.0" };
function cloudfunctions2FunctionEventTriggerEventFiltersToTerraform(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 {
attribute: cdktf.stringToTerraform(struct.attribute),
operator: cdktf.stringToTerraform(struct.operator),
value: cdktf.stringToTerraform(struct.value),
};
}
exports.cloudfunctions2FunctionEventTriggerEventFiltersToTerraform = cloudfunctions2FunctionEventTriggerEventFiltersToTerraform;
function cloudfunctions2FunctionEventTriggerEventFiltersToHclTerraform(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 = {
attribute: {
value: cdktf.stringToHclTerraform(struct.attribute),
isBlock: false,
type: "simple",
storageClassType: "string",
},
operator: {
value: cdktf.stringToHclTerraform(struct.operator),
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));
}
exports.cloudfunctions2FunctionEventTriggerEventFiltersToHclTerraform = cloudfunctions2FunctionEventTriggerEventFiltersToHclTerraform;
class Cloudfunctions2FunctionEventTriggerEventFiltersOutputReference 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._attribute !== undefined) {
hasAnyValues = true;
internalValueResult.attribute = this._attribute;
}
if (this._operator !== undefined) {
hasAnyValues = true;
internalValueResult.operator = this._operator;
}
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._attribute = undefined;
this._operator = 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._attribute = value.attribute;
this._operator = value.operator;
this._value = value.value;
}
}
get attribute() {
return this.getStringAttribute('attribute');
}
set attribute(value) {
this._attribute = value;
}
// Temporarily expose input value. Use with caution.
get attributeInput() {
return this._attribute;
}
get operator() {
return this.getStringAttribute('operator');
}
set operator(value) {
this._operator = value;
}
resetOperator() {
this._operator = undefined;
}
// Temporarily expose input value. Use with caution.
get operatorInput() {
return this._operator;
}
get value() {
return this.getStringAttribute('value');
}
set value(value) {
this._value = value;
}
// Temporarily expose input value. Use with caution.
get valueInput() {
return this._value;
}
}
exports.Cloudfunctions2FunctionEventTriggerEventFiltersOutputReference = Cloudfunctions2FunctionEventTriggerEventFiltersOutputReference;
_g = JSII_RTTI_SYMBOL_1;
Cloudfunctions2FunctionEventTriggerEventFiltersOutputReference[_g] = { fqn: "@cdktf/provider-google.cloudfunctions2Function.Cloudfunctions2FunctionEventTriggerEventFiltersOutputReference", version: "14.12.0" };
class Cloudfunctions2FunctionEventTriggerEventFiltersList 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 Cloudfunctions2FunctionEventTriggerEventFiltersOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.Cloudfunctions2FunctionEventTriggerEventFiltersList = Cloudfunctions2FunctionEventTriggerEventFiltersList;
_h = JSII_RTTI_SYMBOL_1;
Cloudfunctions2FunctionEventTriggerEventFiltersList[_h] = { fqn: "@cdktf/provider-google.cloudfunctions2Function.Cloudfunctions2FunctionEventTriggerEventFiltersList", version: "14.12.0" };
function cloudfunctions2FunctionEventTriggerToTerraform(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 {
event_type: cdktf.stringToTerraform(struct.eventType),
pubsub_topic: cdktf.stringToTerraform(struct.pubsubTopic),
retry_policy: cdktf.stringToTerraform(struct.retryPolicy),
service_account_email: cdktf.stringToTerraform(struct.serviceAccountEmail),
trigger_region: cdktf.stringToTerraform(struct.triggerRegion),
event_filters: cdktf.listMapper(cloudfunctions2FunctionEventTriggerEventFiltersToTerraform, true)(struct.eventFilters),
};
}
exports.cloudfunctions2FunctionEventTriggerToTerraform = cloudfunctions2FunctionEventTriggerToTerraform;
function cloudfunctions2FunctionEventTriggerToHclTerraform(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 = {
event_type: {
value: cdktf.stringToHclTerraform(struct.eventType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
pubsub_topic: {
value: cdktf.stringToHclTerraform(struct.pubsubTopic),
isBlock: false,
type: "simple",
storageClassType: "string",
},
retry_policy: {
value: cdktf.stringToHclTerraform(struct.retryPolicy),
isBlock: false,
type: "simple",
storageClassType: "string",
},
service_account_email: {
value: cdktf.stringToHclTerraform(struct.serviceAccountEmail),
isBlock: false,
type: "simple",
storageClassType: "string",
},
trigger_region: {
value: cdktf.stringToHclTerraform(struct.triggerRegion),
isBlock: false,
type: "simple",
storageClassType: "string",
},
event_filters: {
value: cdktf.listMapperHcl(cloudfunctions2FunctionEventTriggerEventFiltersToHclTerraform, true)(struct.eventFilters),
isBlock: true,
type: "set",
storageClassType: "Cloudfunctions2FunctionEventTriggerEventFiltersList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.cloudfunctions2FunctionEventTriggerToHclTerraform = cloudfunctions2FunctionEventTriggerToHclTerraform;
class Cloudfunctions2FunctionEventTriggerOutputReference 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;
// event_filters - computed: false, optional: true, required: false
this._eventFilters = new Cloudfunctions2FunctionEventTriggerEventFiltersList(this, "event_filters", true);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._eventType !== undefined) {
hasAnyValues = true;
internalValueResult.eventType = this._eventType;
}
if (this._pubsubTopic !== undefined) {
hasAnyValues = true;
internalValueResult.pubsubTopic = this._pubsubTopic;
}
if (this._retryPolicy !== undefined) {
hasAnyValues = true;
internalValueResult.retryPolicy = this._retryPolicy;
}
if (this._serviceAccountEmail !== undefined) {
hasAnyValues = true;
internalValueResult.serviceAccountEmail = this._serviceAccountEmail;
}
if (this._triggerRegion !== undefined) {
hasAnyValues = true;
internalValueResult.triggerRegion = this._triggerRegion;
}
if (this._eventFilters?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.eventFilters = this._eventFilters?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._eventType = undefined;
this._pubsubTopic = undefined;
this._retryPolicy = undefined;
this._serviceAccountEmail = undefined;
this._triggerRegion = undefined;
this._eventFilters.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._eventType = value.eventType;
this._pubsubTopic = value.pubsubTopic;
this._retryPolicy = value.retryPolicy;
this._serviceAccountEma