@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,247 lines • 174 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ClouddeployTarget = exports.ClouddeployTargetTimeoutsOutputReference = exports.clouddeployTargetTimeoutsToHclTerraform = exports.clouddeployTargetTimeoutsToTerraform = exports.ClouddeployTargetRunOutputReference = exports.clouddeployTargetRunToHclTerraform = exports.clouddeployTargetRunToTerraform = exports.ClouddeployTargetMultiTargetOutputReference = exports.clouddeployTargetMultiTargetToHclTerraform = exports.clouddeployTargetMultiTargetToTerraform = exports.ClouddeployTargetGkeOutputReference = exports.clouddeployTargetGkeToHclTerraform = exports.clouddeployTargetGkeToTerraform = exports.ClouddeployTargetExecutionConfigsList = exports.ClouddeployTargetExecutionConfigsOutputReference = exports.clouddeployTargetExecutionConfigsToHclTerraform = exports.clouddeployTargetExecutionConfigsToTerraform = exports.ClouddeployTargetCustomTargetOutputReference = exports.clouddeployTargetCustomTargetToHclTerraform = exports.clouddeployTargetCustomTargetToTerraform = exports.ClouddeployTargetAnthosClusterOutputReference = exports.clouddeployTargetAnthosClusterToHclTerraform = exports.clouddeployTargetAnthosClusterToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function clouddeployTargetAnthosClusterToTerraform(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 {
membership: cdktf.stringToTerraform(struct.membership),
};
}
exports.clouddeployTargetAnthosClusterToTerraform = clouddeployTargetAnthosClusterToTerraform;
function clouddeployTargetAnthosClusterToHclTerraform(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 = {
membership: {
value: cdktf.stringToHclTerraform(struct.membership),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.clouddeployTargetAnthosClusterToHclTerraform = clouddeployTargetAnthosClusterToHclTerraform;
class ClouddeployTargetAnthosClusterOutputReference 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._membership !== undefined) {
hasAnyValues = true;
internalValueResult.membership = this._membership;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._membership = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._membership = value.membership;
}
}
get membership() {
return this.getStringAttribute('membership');
}
set membership(value) {
this._membership = value;
}
resetMembership() {
this._membership = undefined;
}
// Temporarily expose input value. Use with caution.
get membershipInput() {
return this._membership;
}
}
exports.ClouddeployTargetAnthosClusterOutputReference = ClouddeployTargetAnthosClusterOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ClouddeployTargetAnthosClusterOutputReference[_a] = { fqn: "@cdktf/provider-google.clouddeployTarget.ClouddeployTargetAnthosClusterOutputReference", version: "14.3.0" };
function clouddeployTargetCustomTargetToTerraform(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 {
custom_target_type: cdktf.stringToTerraform(struct.customTargetType),
};
}
exports.clouddeployTargetCustomTargetToTerraform = clouddeployTargetCustomTargetToTerraform;
function clouddeployTargetCustomTargetToHclTerraform(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 = {
custom_target_type: {
value: cdktf.stringToHclTerraform(struct.customTargetType),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.clouddeployTargetCustomTargetToHclTerraform = clouddeployTargetCustomTargetToHclTerraform;
class ClouddeployTargetCustomTargetOutputReference 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._customTargetType !== undefined) {
hasAnyValues = true;
internalValueResult.customTargetType = this._customTargetType;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._customTargetType = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._customTargetType = value.customTargetType;
}
}
get customTargetType() {
return this.getStringAttribute('custom_target_type');
}
set customTargetType(value) {
this._customTargetType = value;
}
// Temporarily expose input value. Use with caution.
get customTargetTypeInput() {
return this._customTargetType;
}
}
exports.ClouddeployTargetCustomTargetOutputReference = ClouddeployTargetCustomTargetOutputReference;
_b = JSII_RTTI_SYMBOL_1;
ClouddeployTargetCustomTargetOutputReference[_b] = { fqn: "@cdktf/provider-google.clouddeployTarget.ClouddeployTargetCustomTargetOutputReference", version: "14.3.0" };
function clouddeployTargetExecutionConfigsToTerraform(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 {
artifact_storage: cdktf.stringToTerraform(struct.artifactStorage),
execution_timeout: cdktf.stringToTerraform(struct.executionTimeout),
service_account: cdktf.stringToTerraform(struct.serviceAccount),
usages: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.usages),
verbose: cdktf.booleanToTerraform(struct.verbose),
worker_pool: cdktf.stringToTerraform(struct.workerPool),
};
}
exports.clouddeployTargetExecutionConfigsToTerraform = clouddeployTargetExecutionConfigsToTerraform;
function clouddeployTargetExecutionConfigsToHclTerraform(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 = {
artifact_storage: {
value: cdktf.stringToHclTerraform(struct.artifactStorage),
isBlock: false,
type: "simple",
storageClassType: "string",
},
execution_timeout: {
value: cdktf.stringToHclTerraform(struct.executionTimeout),
isBlock: false,
type: "simple",
storageClassType: "string",
},
service_account: {
value: cdktf.stringToHclTerraform(struct.serviceAccount),
isBlock: false,
type: "simple",
storageClassType: "string",
},
usages: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.usages),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
verbose: {
value: cdktf.booleanToHclTerraform(struct.verbose),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
worker_pool: {
value: cdktf.stringToHclTerraform(struct.workerPool),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.clouddeployTargetExecutionConfigsToHclTerraform = clouddeployTargetExecutionConfigsToHclTerraform;
class ClouddeployTargetExecutionConfigsOutputReference 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._artifactStorage !== undefined) {
hasAnyValues = true;
internalValueResult.artifactStorage = this._artifactStorage;
}
if (this._executionTimeout !== undefined) {
hasAnyValues = true;
internalValueResult.executionTimeout = this._executionTimeout;
}
if (this._serviceAccount !== undefined) {
hasAnyValues = true;
internalValueResult.serviceAccount = this._serviceAccount;
}
if (this._usages !== undefined) {
hasAnyValues = true;
internalValueResult.usages = this._usages;
}
if (this._verbose !== undefined) {
hasAnyValues = true;
internalValueResult.verbose = this._verbose;
}
if (this._workerPool !== undefined) {
hasAnyValues = true;
internalValueResult.workerPool = this._workerPool;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._artifactStorage = undefined;
this._executionTimeout = undefined;
this._serviceAccount = undefined;
this._usages = undefined;
this._verbose = undefined;
this._workerPool = 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._artifactStorage = value.artifactStorage;
this._executionTimeout = value.executionTimeout;
this._serviceAccount = value.serviceAccount;
this._usages = value.usages;
this._verbose = value.verbose;
this._workerPool = value.workerPool;
}
}
get artifactStorage() {
return this.getStringAttribute('artifact_storage');
}
set artifactStorage(value) {
this._artifactStorage = value;
}
resetArtifactStorage() {
this._artifactStorage = undefined;
}
// Temporarily expose input value. Use with caution.
get artifactStorageInput() {
return this._artifactStorage;
}
get executionTimeout() {
return this.getStringAttribute('execution_timeout');
}
set executionTimeout(value) {
this._executionTimeout = value;
}
resetExecutionTimeout() {
this._executionTimeout = undefined;
}
// Temporarily expose input value. Use with caution.
get executionTimeoutInput() {
return this._executionTimeout;
}
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 usages() {
return this.getListAttribute('usages');
}
set usages(value) {
this._usages = value;
}
// Temporarily expose input value. Use with caution.
get usagesInput() {
return this._usages;
}
get verbose() {
return this.getBooleanAttribute('verbose');
}
set verbose(value) {
this._verbose = value;
}
resetVerbose() {
this._verbose = undefined;
}
// Temporarily expose input value. Use with caution.
get verboseInput() {
return this._verbose;
}
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;
}
}
exports.ClouddeployTargetExecutionConfigsOutputReference = ClouddeployTargetExecutionConfigsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ClouddeployTargetExecutionConfigsOutputReference[_c] = { fqn: "@cdktf/provider-google.clouddeployTarget.ClouddeployTargetExecutionConfigsOutputReference", version: "14.3.0" };
class ClouddeployTargetExecutionConfigsList 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 ClouddeployTargetExecutionConfigsOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ClouddeployTargetExecutionConfigsList = ClouddeployTargetExecutionConfigsList;
_d = JSII_RTTI_SYMBOL_1;
ClouddeployTargetExecutionConfigsList[_d] = { fqn: "@cdktf/provider-google.clouddeployTarget.ClouddeployTargetExecutionConfigsList", version: "14.3.0" };
function clouddeployTargetGkeToTerraform(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 {
cluster: cdktf.stringToTerraform(struct.cluster),
internal_ip: cdktf.booleanToTerraform(struct.internalIp),
proxy_url: cdktf.stringToTerraform(struct.proxyUrl),
};
}
exports.clouddeployTargetGkeToTerraform = clouddeployTargetGkeToTerraform;
function clouddeployTargetGkeToHclTerraform(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 = {
cluster: {
value: cdktf.stringToHclTerraform(struct.cluster),
isBlock: false,
type: "simple",
storageClassType: "string",
},
internal_ip: {
value: cdktf.booleanToHclTerraform(struct.internalIp),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
proxy_url: {
value: cdktf.stringToHclTerraform(struct.proxyUrl),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.clouddeployTargetGkeToHclTerraform = clouddeployTargetGkeToHclTerraform;
class ClouddeployTargetGkeOutputReference 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._cluster !== undefined) {
hasAnyValues = true;
internalValueResult.cluster = this._cluster;
}
if (this._internalIp !== undefined) {
hasAnyValues = true;
internalValueResult.internalIp = this._internalIp;
}
if (this._proxyUrl !== undefined) {
hasAnyValues = true;
internalValueResult.proxyUrl = this._proxyUrl;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._cluster = undefined;
this._internalIp = undefined;
this._proxyUrl = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._cluster = value.cluster;
this._internalIp = value.internalIp;
this._proxyUrl = value.proxyUrl;
}
}
get cluster() {
return this.getStringAttribute('cluster');
}
set cluster(value) {
this._cluster = value;
}
resetCluster() {
this._cluster = undefined;
}
// Temporarily expose input value. Use with caution.
get clusterInput() {
return this._cluster;
}
get internalIp() {
return this.getBooleanAttribute('internal_ip');
}
set internalIp(value) {
this._internalIp = value;
}
resetInternalIp() {
this._internalIp = undefined;
}
// Temporarily expose input value. Use with caution.
get internalIpInput() {
return this._internalIp;
}
get proxyUrl() {
return this.getStringAttribute('proxy_url');
}
set proxyUrl(value) {
this._proxyUrl = value;
}
resetProxyUrl() {
this._proxyUrl = undefined;
}
// Temporarily expose input value. Use with caution.
get proxyUrlInput() {
return this._proxyUrl;
}
}
exports.ClouddeployTargetGkeOutputReference = ClouddeployTargetGkeOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ClouddeployTargetGkeOutputReference[_e] = { fqn: "@cdktf/provider-google.clouddeployTarget.ClouddeployTargetGkeOutputReference", version: "14.3.0" };
function clouddeployTargetMultiTargetToTerraform(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 {
target_ids: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.targetIds),
};
}
exports.clouddeployTargetMultiTargetToTerraform = clouddeployTargetMultiTargetToTerraform;
function clouddeployTargetMultiTargetToHclTerraform(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 = {
target_ids: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.targetIds),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.clouddeployTargetMultiTargetToHclTerraform = clouddeployTargetMultiTargetToHclTerraform;
class ClouddeployTargetMultiTargetOutputReference 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._targetIds !== undefined) {
hasAnyValues = true;
internalValueResult.targetIds = this._targetIds;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._targetIds = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._targetIds = value.targetIds;
}
}
get targetIds() {
return this.getListAttribute('target_ids');
}
set targetIds(value) {
this._targetIds = value;
}
// Temporarily expose input value. Use with caution.
get targetIdsInput() {
return this._targetIds;
}
}
exports.ClouddeployTargetMultiTargetOutputReference = ClouddeployTargetMultiTargetOutputReference;
_f = JSII_RTTI_SYMBOL_1;
ClouddeployTargetMultiTargetOutputReference[_f] = { fqn: "@cdktf/provider-google.clouddeployTarget.ClouddeployTargetMultiTargetOutputReference", version: "14.3.0" };
function clouddeployTargetRunToTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
return {
location: cdktf.stringToTerraform(struct.location),
};
}
exports.clouddeployTargetRunToTerraform = clouddeployTargetRunToTerraform;
function clouddeployTargetRunToHclTerraform(struct) {
if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) {
return struct;
}
if (cdktf.isComplexElement(struct)) {
throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration");
}
const attrs = {
location: {
value: cdktf.stringToHclTerraform(struct.location),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.clouddeployTargetRunToHclTerraform = clouddeployTargetRunToHclTerraform;
class ClouddeployTargetRunOutputReference 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._location !== undefined) {
hasAnyValues = true;
internalValueResult.location = this._location;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._location = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._location = value.location;
}
}
get location() {
return this.getStringAttribute('location');
}
set location(value) {
this._location = value;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;
}
}
exports.ClouddeployTargetRunOutputReference = ClouddeployTargetRunOutputReference;
_g = JSII_RTTI_SYMBOL_1;
ClouddeployTargetRunOutputReference[_g] = { fqn: "@cdktf/provider-google.clouddeployTarget.ClouddeployTargetRunOutputReference", version: "14.3.0" };
function clouddeployTargetTimeoutsToTerraform(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.clouddeployTargetTimeoutsToTerraform = clouddeployTargetTimeoutsToTerraform;
function clouddeployTargetTimeoutsToHclTerraform(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.clouddeployTargetTimeoutsToHclTerraform = clouddeployTargetTimeoutsToHclTerraform;
class ClouddeployTargetTimeoutsOutputReference 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.ClouddeployTargetTimeoutsOutputReference = ClouddeployTargetTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ClouddeployTargetTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.clouddeployTarget.ClouddeployTargetTimeoutsOutputReference", version: "14.3.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/clouddeploy_target google_clouddeploy_target}
*/
class ClouddeployTarget extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ClouddeployTarget 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 ClouddeployTarget to import
* @param importFromId The id of the existing ClouddeployTarget that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/clouddeploy_target#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ClouddeployTarget to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_clouddeploy_target", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/clouddeploy_target google_clouddeploy_target} 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 ClouddeployTargetConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_clouddeploy_target',
terraformGeneratorMetadata: {
providerName: 'google',
providerVersion: '6.4.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
});
// effective_annotations - computed: true, optional: false, required: false
this._effectiveAnnotations = new cdktf.StringMap(this, "effective_annotations");
// effective_labels - computed: true, optional: false, required: false
this._effectiveLabels = new cdktf.StringMap(this, "effective_labels");
// terraform_labels - computed: true, optional: false, required: false
this._terraformLabels = new cdktf.StringMap(this, "terraform_labels");
// anthos_cluster - computed: false, optional: true, required: false
this._anthosCluster = new ClouddeployTargetAnthosClusterOutputReference(this, "anthos_cluster");
// custom_target - computed: false, optional: true, required: false
this._customTarget = new ClouddeployTargetCustomTargetOutputReference(this, "custom_target");
// execution_configs - computed: false, optional: true, required: false
this._executionConfigs = new ClouddeployTargetExecutionConfigsList(this, "execution_configs", false);
// gke - computed: false, optional: true, required: false
this._gke = new ClouddeployTargetGkeOutputReference(this, "gke");
// multi_target - computed: false, optional: true, required: false
this._multiTarget = new ClouddeployTargetMultiTargetOutputReference(this, "multi_target");
// run - computed: false, optional: true, required: false
this._run = new ClouddeployTargetRunOutputReference(this, "run");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ClouddeployTargetTimeoutsOutputReference(this, "timeouts");
this._annotations = config.annotations;
this._deployParameters = config.deployParameters;
this._description = config.description;
this._id = config.id;
this._labels = config.labels;
this._location = config.location;
this._name = config.name;
this._project = config.project;
this._requireApproval = config.requireApproval;
this._anthosCluster.internalValue = config.anthosCluster;
this._customTarget.internalValue = config.customTarget;
this._executionConfigs.internalValue = config.executionConfigs;
this._gke.internalValue = config.gke;
this._multiTarget.internalValue = config.multiTarget;
this._run.internalValue = config.run;
this._timeouts.internalValue = config.timeouts;
}
get annotations() {
return this.getStringMapAttribute('annotations');
}
set annotations(value) {
this._annotations = value;
}
resetAnnotations() {
this._annotations = undefined;
}
// Temporarily expose input value. Use with caution.
get annotationsInput() {
return this._annotations;
}
// create_time - computed: true, optional: false, required: false
get createTime() {
return this.getStringAttribute('create_time');
}
get deployParameters() {
return this.getStringMapAttribute('deploy_parameters');
}
set deployParameters(value) {
this._deployParameters = value;
}
resetDeployParameters() {
this._deployParameters = undefined;
}
// Temporarily expose input value. Use with caution.
get deployParametersInput() {
return this._deployParameters;
}
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 effectiveAnnotations() {
return this._effectiveAnnotations;
}
get effectiveLabels() {
return this._effectiveLabels;
}
// etag - computed: true, optional: false, required: false
get etag() {
return this.getStringAttribute('etag');
}
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;
}
get labels() {
return this.getStringMapAttribute('labels');
}
set labels(value) {
this._labels = value;
}
resetLabels() {
this._labels = undefined;
}
// Temporarily expose input value. Use with caution.
get labelsInput() {
return this._labels;
}
get location() {
return this.getStringAttribute('location');
}
set location(value) {
this._location = value;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;
}
get name() {
return this.getStringAttribute('name');
}
set name(value) {
this._name = value;
}
// Temporarily expose input value. Use with caution.
get nameInput() {
return this._name;
}
get project() {
return this.getStringAttribute('project');
}
set project(value) {
this._project = value;
}
resetProject() {
this._project = undefined;
}
// Temporarily expose input value. Use with caution.
get projectInput() {
return this._project;
}
get requireApproval() {
return this.getBooleanAttribute('require_approval');
}
set requireApproval(value) {
this._requireApproval = value;
}
resetRequireApproval() {
this._requireApproval = undefined;
}
// Temporarily expose input value. Use with caution.
get requireApprovalInput() {
return this._requireApproval;
}
// target_id - computed: true, optional: false, required: false
get targetId() {
return this.getStringAttribute('target_id');
}
get terraformLabels() {
return this._terraformLabels;
}
// uid - computed: true, optional: false, required: false
get uid() {
return this.getStringAttribute('uid');
}
// update_time - computed: true, optional: false, required: false
get updateTime() {
return this.getStringAttribute('update_time');
}
get anthosCluster() {
return this._anthosCluster;
}
putAnthosCluster(value) {
this._anthosCluster.internalValue = value;
}
resetAnthosCluster() {
this._anthosCluster.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get anthosClusterInput() {
return this._anthosCluster.internalValue;
}
get customTarget() {
return this._customTarget;
}
putCustomTarget(value) {
this._customTarget.internalValue = value;
}
resetCustomTarget() {
this._customTarget.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get customTargetInput() {
return this._customTarget.internalValue;
}
get executionConfigs() {
return this._executionConfigs;
}
putExecutionConfigs(value) {
this._executionConfigs.internalValue = value;
}
resetExecutionConfigs() {
this._executionConfigs.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get executionConfigsInput() {
return this._executionConfigs.internalValue;
}
get gke() {
return this._gke;
}
putGke(value) {
this._gke.internalValue = value;
}
resetGke() {
this._gke.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get gkeInput() {
return this._gke.internalValue;
}
get multiTarget() {
return this._multiTarget;
}
putMultiTarget(value) {
this._multiTarget.internalValue = value;
}
resetMultiTarget() {
this._multiTarget.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get multiTargetInput() {
return this._multiTarget.internalValue;
}
get run() {
return this._run;
}
putRun(value) {
this._run.internalValue = value;
}
resetRun() {
this._run.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get runInput() {
return this._run.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 {
annotations: cdktf.hashMapper(cdktf.stringToTerraform)(this._annotations),
deploy_parameters: cdktf.hashMapper(cdktf.stringToTerraform)(this._deployParameters),
description: cdktf.stringToTerraform(this._description),
id: cdktf.stringToTerraform(this._id),
labels: cdktf.hashMapper(cdktf.stringToTerraform)(this._labels),
location: cdktf.stringToTerraform(this._location),
name: cdktf.stringToTerraform(this._name),
project: cdktf.stringToTerraform(this._project),
require_approval: cdktf.booleanToTerraform(this._requireApproval),
anthos_cluster: clouddeployTargetAnthosClusterToTerraform(this._anthosCluster.internalValue),
custom_target: clouddeployTargetCustomTargetToTerraform(this._customTarget.internalValue),
execution_configs: cdktf.listMapper(clouddeployTargetExecutionConfigsToTerraform, true)(this._executionConfigs.internalValue),
gke: clouddeployTargetGkeToTerraform(this._gke.internalValue),
multi_target: clouddeployTargetMultiTargetToTerraform(this._multiTarget.internalValue),
run: clouddeployTargetRunToTerraform(this._run.internalValue),
timeouts: clouddeployTargetTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
annotations: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._annotations),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
deploy_parameters: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._deployParameters),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
description: {
value: cdktf.stringToHclTerraform(this._description),
isBlock: false,
type: "simple",
storageClassType: "string",
},
id: {
value: cdktf.stringToHclTerraform(this._id),
isBlock: false,
type: "simple",
storageClassType: "string",
},
labels: {
value: cdktf.hashMapperHcl(cdktf.stringToHclTerraform)(this._labels),
isBlock: false,
type: "map",
storageClassType: "stringMap",
},
location: {
value: cdktf.stringToHclTerraform(this._location),
isBlock: false,
type: "simple",
storageClassType: "string",
},
name: {
value: cdktf.stringToHclTerraform(this._name),
isBlock: false,
type: "simple",
storageClassType: "string",
},
project: {
value: cdktf.stringToHclTerraform(this._project),
isBlock: false,
type: "simple",
storageClassType: "string",
},
require_approval: {
value: cdktf.booleanToHclTerraform(this._requireApproval),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
anthos_cluster: {
value: clouddeployTargetAnthosClusterToHclTerraform(this._anthosCluster.internalValue),
isBlock: true,
type: "list",
storageClassType: "ClouddeployTargetAnthosClusterList",
},
custom_target: {
value: clouddeployTargetCustomTargetToHclTerraform(this._customTarget.internalValue),
isBlock: true,
type: "list",
storageClassType: "ClouddeployTargetCustomTargetList",
},
execution_configs: {
value: cdktf.listMapperHcl(clouddeployTargetExecutionConfigsToHclTerraform, true)(this._executionConfigs.internalValue),
isBlock: true,
type: "list",
storageClassType: "ClouddeployTargetExecutionConfigsList",
},
gke: {
value: clouddeployTargetGkeToHclTerraform(this._gke.internalValue),
isBlock: true,
type: "list",
storageClassType: "ClouddeployTargetGkeList",
},
multi_target: {
value: clouddeployTargetMultiTargetToHclTerraform(this._multiTarget.internalValue),
isBlock: true,
type: "list",
storageClassType: "ClouddeployTargetMultiTargetList",
},
run: {
value: clouddeployTargetRunToHclTerraform(this._run.internalValue),
isBlock: true,
type: "list",
storageClassType: "ClouddeployTargetRunList",
},
timeouts: {
value: clouddeployTargetTimeoutsToHclTerraform(this._timeouts.internalValue),
isBlock: true,
type: "struct",
storageClassType: "ClouddeployTargetTimeouts",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
}
exports.ClouddeployTarget = ClouddeployTarget;
_j = JSII_RTTI_SYMBOL_1;
ClouddeployTarget[_j] = { fqn: "@cdktf/provider-google.clouddeployTarget.ClouddeployTarget", version: "14.3.0" };
// =================
// STATIC PROPERTIES
// =================
ClouddeployTarget.tfResourceType = "google_clouddeploy_target";
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY2xvdWRkZXBsb3ktdGFyZ2V0L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7O0FBU0EsK0JBQStCO0FBc0gvQixTQUFnQix5Q0FBeUMsQ0FBQyxNQUF1RjtJQUMvSSxJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQUMsT0FBTyxNQUFNLENBQUM7SUFBQyxDQUFDO0lBQzVGLElBQUksS0FBSyxDQUFDLGdCQUFnQixDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUM7UUFDbkMsTUFBTSxJQUFJLEtBQUssQ0FBQyxvSEFBb0gsQ0FBQyxDQUFDO0lBQ3hJLENBQUM7SUFDRCxPQUFPO1FBQ0wsVUFBVSxFQUFFLEtBQUssQ0FBQyxpQkFBaUIsQ0FBQyxNQUFPLENBQUMsVUFBVSxDQUFDO0tBQ3hELENBQUE7QUFDSCxDQUFDO0FBUkQsOEZBUUM7QUFHRCxTQUFnQiw0Q0FBNEMsQ0FBQyxNQUF1RjtJQUNsSixJQUFJLENBQUMsS0FBSyxDQUFDLFVBQVUsQ0FBQyxNQUFNLENBQUMsSUFBSSxLQUFLLENBQUMsWUFBWSxDQUFDLFlBQVksQ0FBQyxNQUFNLENBQUMsRUFBRSxDQUFDO1FBQUMsT0FBTyxNQUFNLENBQUM7SUFBQyxDQUFDO0lBQzVGLElBQUksS0FBSyx