@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,121 lines (1,120 loc) • 185 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ApphubWorkload = exports.ApphubWorkloadTimeoutsOutputReference = exports.apphubWorkloadTimeoutsToHclTerraform = exports.apphubWorkloadTimeoutsToTerraform = exports.ApphubWorkloadAttributesOutputReference = exports.apphubWorkloadAttributesToHclTerraform = exports.apphubWorkloadAttributesToTerraform = exports.ApphubWorkloadAttributesOperatorOwnersList = exports.ApphubWorkloadAttributesOperatorOwnersOutputReference = exports.apphubWorkloadAttributesOperatorOwnersToHclTerraform = exports.apphubWorkloadAttributesOperatorOwnersToTerraform = exports.ApphubWorkloadAttributesEnvironmentOutputReference = exports.apphubWorkloadAttributesEnvironmentToHclTerraform = exports.apphubWorkloadAttributesEnvironmentToTerraform = exports.ApphubWorkloadAttributesDeveloperOwnersList = exports.ApphubWorkloadAttributesDeveloperOwnersOutputReference = exports.apphubWorkloadAttributesDeveloperOwnersToHclTerraform = exports.apphubWorkloadAttributesDeveloperOwnersToTerraform = exports.ApphubWorkloadAttributesCriticalityOutputReference = exports.apphubWorkloadAttributesCriticalityToHclTerraform = exports.apphubWorkloadAttributesCriticalityToTerraform = exports.ApphubWorkloadAttributesBusinessOwnersList = exports.ApphubWorkloadAttributesBusinessOwnersOutputReference = exports.apphubWorkloadAttributesBusinessOwnersToHclTerraform = exports.apphubWorkloadAttributesBusinessOwnersToTerraform = exports.ApphubWorkloadWorkloadReferenceList = exports.ApphubWorkloadWorkloadReferenceOutputReference = exports.apphubWorkloadWorkloadReferenceToHclTerraform = exports.apphubWorkloadWorkloadReferenceToTerraform = exports.ApphubWorkloadWorkloadPropertiesList = exports.ApphubWorkloadWorkloadPropertiesOutputReference = exports.apphubWorkloadWorkloadPropertiesToHclTerraform = exports.apphubWorkloadWorkloadPropertiesToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function apphubWorkloadWorkloadPropertiesToTerraform(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.apphubWorkloadWorkloadPropertiesToTerraform = apphubWorkloadWorkloadPropertiesToTerraform;
function apphubWorkloadWorkloadPropertiesToHclTerraform(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.apphubWorkloadWorkloadPropertiesToHclTerraform = apphubWorkloadWorkloadPropertiesToHclTerraform;
class ApphubWorkloadWorkloadPropertiesOutputReference 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() {
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;
}
}
// gcp_project - computed: true, optional: false, required: false
get gcpProject() {
return this.getStringAttribute('gcp_project');
}
// location - computed: true, optional: false, required: false
get location() {
return this.getStringAttribute('location');
}
// zone - computed: true, optional: false, required: false
get zone() {
return this.getStringAttribute('zone');
}
}
exports.ApphubWorkloadWorkloadPropertiesOutputReference = ApphubWorkloadWorkloadPropertiesOutputReference;
_a = JSII_RTTI_SYMBOL_1;
ApphubWorkloadWorkloadPropertiesOutputReference[_a] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadWorkloadPropertiesOutputReference", version: "14.12.0" };
class ApphubWorkloadWorkloadPropertiesList 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 ApphubWorkloadWorkloadPropertiesOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ApphubWorkloadWorkloadPropertiesList = ApphubWorkloadWorkloadPropertiesList;
_b = JSII_RTTI_SYMBOL_1;
ApphubWorkloadWorkloadPropertiesList[_b] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadWorkloadPropertiesList", version: "14.12.0" };
function apphubWorkloadWorkloadReferenceToTerraform(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.apphubWorkloadWorkloadReferenceToTerraform = apphubWorkloadWorkloadReferenceToTerraform;
function apphubWorkloadWorkloadReferenceToHclTerraform(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.apphubWorkloadWorkloadReferenceToHclTerraform = apphubWorkloadWorkloadReferenceToHclTerraform;
class ApphubWorkloadWorkloadReferenceOutputReference 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() {
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;
}
}
// uri - computed: true, optional: false, required: false
get uri() {
return this.getStringAttribute('uri');
}
}
exports.ApphubWorkloadWorkloadReferenceOutputReference = ApphubWorkloadWorkloadReferenceOutputReference;
_c = JSII_RTTI_SYMBOL_1;
ApphubWorkloadWorkloadReferenceOutputReference[_c] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadWorkloadReferenceOutputReference", version: "14.12.0" };
class ApphubWorkloadWorkloadReferenceList 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 ApphubWorkloadWorkloadReferenceOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ApphubWorkloadWorkloadReferenceList = ApphubWorkloadWorkloadReferenceList;
_d = JSII_RTTI_SYMBOL_1;
ApphubWorkloadWorkloadReferenceList[_d] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadWorkloadReferenceList", version: "14.12.0" };
function apphubWorkloadAttributesBusinessOwnersToTerraform(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 {
display_name: cdktf.stringToTerraform(struct.displayName),
email: cdktf.stringToTerraform(struct.email),
};
}
exports.apphubWorkloadAttributesBusinessOwnersToTerraform = apphubWorkloadAttributesBusinessOwnersToTerraform;
function apphubWorkloadAttributesBusinessOwnersToHclTerraform(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 = {
display_name: {
value: cdktf.stringToHclTerraform(struct.displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
email: {
value: cdktf.stringToHclTerraform(struct.email),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apphubWorkloadAttributesBusinessOwnersToHclTerraform = apphubWorkloadAttributesBusinessOwnersToHclTerraform;
class ApphubWorkloadAttributesBusinessOwnersOutputReference 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._displayName !== undefined) {
hasAnyValues = true;
internalValueResult.displayName = this._displayName;
}
if (this._email !== undefined) {
hasAnyValues = true;
internalValueResult.email = this._email;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._displayName = undefined;
this._email = 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._displayName = value.displayName;
this._email = value.email;
}
}
get displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
resetDisplayName() {
this._displayName = undefined;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
get email() {
return this.getStringAttribute('email');
}
set email(value) {
this._email = value;
}
// Temporarily expose input value. Use with caution.
get emailInput() {
return this._email;
}
}
exports.ApphubWorkloadAttributesBusinessOwnersOutputReference = ApphubWorkloadAttributesBusinessOwnersOutputReference;
_e = JSII_RTTI_SYMBOL_1;
ApphubWorkloadAttributesBusinessOwnersOutputReference[_e] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadAttributesBusinessOwnersOutputReference", version: "14.12.0" };
class ApphubWorkloadAttributesBusinessOwnersList 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 ApphubWorkloadAttributesBusinessOwnersOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ApphubWorkloadAttributesBusinessOwnersList = ApphubWorkloadAttributesBusinessOwnersList;
_f = JSII_RTTI_SYMBOL_1;
ApphubWorkloadAttributesBusinessOwnersList[_f] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadAttributesBusinessOwnersList", version: "14.12.0" };
function apphubWorkloadAttributesCriticalityToTerraform(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 {
type: cdktf.stringToTerraform(struct.type),
};
}
exports.apphubWorkloadAttributesCriticalityToTerraform = apphubWorkloadAttributesCriticalityToTerraform;
function apphubWorkloadAttributesCriticalityToHclTerraform(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 = {
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apphubWorkloadAttributesCriticalityToHclTerraform = apphubWorkloadAttributesCriticalityToHclTerraform;
class ApphubWorkloadAttributesCriticalityOutputReference 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._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._type = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._type = value.type;
}
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.ApphubWorkloadAttributesCriticalityOutputReference = ApphubWorkloadAttributesCriticalityOutputReference;
_g = JSII_RTTI_SYMBOL_1;
ApphubWorkloadAttributesCriticalityOutputReference[_g] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadAttributesCriticalityOutputReference", version: "14.12.0" };
function apphubWorkloadAttributesDeveloperOwnersToTerraform(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 {
display_name: cdktf.stringToTerraform(struct.displayName),
email: cdktf.stringToTerraform(struct.email),
};
}
exports.apphubWorkloadAttributesDeveloperOwnersToTerraform = apphubWorkloadAttributesDeveloperOwnersToTerraform;
function apphubWorkloadAttributesDeveloperOwnersToHclTerraform(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 = {
display_name: {
value: cdktf.stringToHclTerraform(struct.displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
email: {
value: cdktf.stringToHclTerraform(struct.email),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apphubWorkloadAttributesDeveloperOwnersToHclTerraform = apphubWorkloadAttributesDeveloperOwnersToHclTerraform;
class ApphubWorkloadAttributesDeveloperOwnersOutputReference 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._displayName !== undefined) {
hasAnyValues = true;
internalValueResult.displayName = this._displayName;
}
if (this._email !== undefined) {
hasAnyValues = true;
internalValueResult.email = this._email;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._displayName = undefined;
this._email = 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._displayName = value.displayName;
this._email = value.email;
}
}
get displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
resetDisplayName() {
this._displayName = undefined;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
get email() {
return this.getStringAttribute('email');
}
set email(value) {
this._email = value;
}
// Temporarily expose input value. Use with caution.
get emailInput() {
return this._email;
}
}
exports.ApphubWorkloadAttributesDeveloperOwnersOutputReference = ApphubWorkloadAttributesDeveloperOwnersOutputReference;
_h = JSII_RTTI_SYMBOL_1;
ApphubWorkloadAttributesDeveloperOwnersOutputReference[_h] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadAttributesDeveloperOwnersOutputReference", version: "14.12.0" };
class ApphubWorkloadAttributesDeveloperOwnersList 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 ApphubWorkloadAttributesDeveloperOwnersOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ApphubWorkloadAttributesDeveloperOwnersList = ApphubWorkloadAttributesDeveloperOwnersList;
_j = JSII_RTTI_SYMBOL_1;
ApphubWorkloadAttributesDeveloperOwnersList[_j] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadAttributesDeveloperOwnersList", version: "14.12.0" };
function apphubWorkloadAttributesEnvironmentToTerraform(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 {
type: cdktf.stringToTerraform(struct.type),
};
}
exports.apphubWorkloadAttributesEnvironmentToTerraform = apphubWorkloadAttributesEnvironmentToTerraform;
function apphubWorkloadAttributesEnvironmentToHclTerraform(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 = {
type: {
value: cdktf.stringToHclTerraform(struct.type),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apphubWorkloadAttributesEnvironmentToHclTerraform = apphubWorkloadAttributesEnvironmentToHclTerraform;
class ApphubWorkloadAttributesEnvironmentOutputReference 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._type !== undefined) {
hasAnyValues = true;
internalValueResult.type = this._type;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._type = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._type = value.type;
}
}
get type() {
return this.getStringAttribute('type');
}
set type(value) {
this._type = value;
}
// Temporarily expose input value. Use with caution.
get typeInput() {
return this._type;
}
}
exports.ApphubWorkloadAttributesEnvironmentOutputReference = ApphubWorkloadAttributesEnvironmentOutputReference;
_k = JSII_RTTI_SYMBOL_1;
ApphubWorkloadAttributesEnvironmentOutputReference[_k] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadAttributesEnvironmentOutputReference", version: "14.12.0" };
function apphubWorkloadAttributesOperatorOwnersToTerraform(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 {
display_name: cdktf.stringToTerraform(struct.displayName),
email: cdktf.stringToTerraform(struct.email),
};
}
exports.apphubWorkloadAttributesOperatorOwnersToTerraform = apphubWorkloadAttributesOperatorOwnersToTerraform;
function apphubWorkloadAttributesOperatorOwnersToHclTerraform(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 = {
display_name: {
value: cdktf.stringToHclTerraform(struct.displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
email: {
value: cdktf.stringToHclTerraform(struct.email),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apphubWorkloadAttributesOperatorOwnersToHclTerraform = apphubWorkloadAttributesOperatorOwnersToHclTerraform;
class ApphubWorkloadAttributesOperatorOwnersOutputReference 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._displayName !== undefined) {
hasAnyValues = true;
internalValueResult.displayName = this._displayName;
}
if (this._email !== undefined) {
hasAnyValues = true;
internalValueResult.email = this._email;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this.resolvableValue = undefined;
this._displayName = undefined;
this._email = 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._displayName = value.displayName;
this._email = value.email;
}
}
get displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
resetDisplayName() {
this._displayName = undefined;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
get email() {
return this.getStringAttribute('email');
}
set email(value) {
this._email = value;
}
// Temporarily expose input value. Use with caution.
get emailInput() {
return this._email;
}
}
exports.ApphubWorkloadAttributesOperatorOwnersOutputReference = ApphubWorkloadAttributesOperatorOwnersOutputReference;
_l = JSII_RTTI_SYMBOL_1;
ApphubWorkloadAttributesOperatorOwnersOutputReference[_l] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadAttributesOperatorOwnersOutputReference", version: "14.12.0" };
class ApphubWorkloadAttributesOperatorOwnersList 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 ApphubWorkloadAttributesOperatorOwnersOutputReference(this.terraformResource, this.terraformAttribute, index, this.wrapsSet);
}
}
exports.ApphubWorkloadAttributesOperatorOwnersList = ApphubWorkloadAttributesOperatorOwnersList;
_m = JSII_RTTI_SYMBOL_1;
ApphubWorkloadAttributesOperatorOwnersList[_m] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadAttributesOperatorOwnersList", version: "14.12.0" };
function apphubWorkloadAttributesToTerraform(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 {
business_owners: cdktf.listMapper(apphubWorkloadAttributesBusinessOwnersToTerraform, true)(struct.businessOwners),
criticality: apphubWorkloadAttributesCriticalityToTerraform(struct.criticality),
developer_owners: cdktf.listMapper(apphubWorkloadAttributesDeveloperOwnersToTerraform, true)(struct.developerOwners),
environment: apphubWorkloadAttributesEnvironmentToTerraform(struct.environment),
operator_owners: cdktf.listMapper(apphubWorkloadAttributesOperatorOwnersToTerraform, true)(struct.operatorOwners),
};
}
exports.apphubWorkloadAttributesToTerraform = apphubWorkloadAttributesToTerraform;
function apphubWorkloadAttributesToHclTerraform(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 = {
business_owners: {
value: cdktf.listMapperHcl(apphubWorkloadAttributesBusinessOwnersToHclTerraform, true)(struct.businessOwners),
isBlock: true,
type: "list",
storageClassType: "ApphubWorkloadAttributesBusinessOwnersList",
},
criticality: {
value: apphubWorkloadAttributesCriticalityToHclTerraform(struct.criticality),
isBlock: true,
type: "list",
storageClassType: "ApphubWorkloadAttributesCriticalityList",
},
developer_owners: {
value: cdktf.listMapperHcl(apphubWorkloadAttributesDeveloperOwnersToHclTerraform, true)(struct.developerOwners),
isBlock: true,
type: "list",
storageClassType: "ApphubWorkloadAttributesDeveloperOwnersList",
},
environment: {
value: apphubWorkloadAttributesEnvironmentToHclTerraform(struct.environment),
isBlock: true,
type: "list",
storageClassType: "ApphubWorkloadAttributesEnvironmentList",
},
operator_owners: {
value: cdktf.listMapperHcl(apphubWorkloadAttributesOperatorOwnersToHclTerraform, true)(struct.operatorOwners),
isBlock: true,
type: "list",
storageClassType: "ApphubWorkloadAttributesOperatorOwnersList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.apphubWorkloadAttributesToHclTerraform = apphubWorkloadAttributesToHclTerraform;
class ApphubWorkloadAttributesOutputReference 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;
// business_owners - computed: false, optional: true, required: false
this._businessOwners = new ApphubWorkloadAttributesBusinessOwnersList(this, "business_owners", false);
// criticality - computed: false, optional: true, required: false
this._criticality = new ApphubWorkloadAttributesCriticalityOutputReference(this, "criticality");
// developer_owners - computed: false, optional: true, required: false
this._developerOwners = new ApphubWorkloadAttributesDeveloperOwnersList(this, "developer_owners", false);
// environment - computed: false, optional: true, required: false
this._environment = new ApphubWorkloadAttributesEnvironmentOutputReference(this, "environment");
// operator_owners - computed: false, optional: true, required: false
this._operatorOwners = new ApphubWorkloadAttributesOperatorOwnersList(this, "operator_owners", false);
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._businessOwners?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.businessOwners = this._businessOwners?.internalValue;
}
if (this._criticality?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.criticality = this._criticality?.internalValue;
}
if (this._developerOwners?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.developerOwners = this._developerOwners?.internalValue;
}
if (this._environment?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.environment = this._environment?.internalValue;
}
if (this._operatorOwners?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.operatorOwners = this._operatorOwners?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._businessOwners.internalValue = undefined;
this._criticality.internalValue = undefined;
this._developerOwners.internalValue = undefined;
this._environment.internalValue = undefined;
this._operatorOwners.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._businessOwners.internalValue = value.businessOwners;
this._criticality.internalValue = value.criticality;
this._developerOwners.internalValue = value.developerOwners;
this._environment.internalValue = value.environment;
this._operatorOwners.internalValue = value.operatorOwners;
}
}
get businessOwners() {
return this._businessOwners;
}
putBusinessOwners(value) {
this._businessOwners.internalValue = value;
}
resetBusinessOwners() {
this._businessOwners.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get businessOwnersInput() {
return this._businessOwners.internalValue;
}
get criticality() {
return this._criticality;
}
putCriticality(value) {
this._criticality.internalValue = value;
}
resetCriticality() {
this._criticality.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get criticalityInput() {
return this._criticality.internalValue;
}
get developerOwners() {
return this._developerOwners;
}
putDeveloperOwners(value) {
this._developerOwners.internalValue = value;
}
resetDeveloperOwners() {
this._developerOwners.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get developerOwnersInput() {
return this._developerOwners.internalValue;
}
get environment() {
return this._environment;
}
putEnvironment(value) {
this._environment.internalValue = value;
}
resetEnvironment() {
this._environment.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get environmentInput() {
return this._environment.internalValue;
}
get operatorOwners() {
return this._operatorOwners;
}
putOperatorOwners(value) {
this._operatorOwners.internalValue = value;
}
resetOperatorOwners() {
this._operatorOwners.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get operatorOwnersInput() {
return this._operatorOwners.internalValue;
}
}
exports.ApphubWorkloadAttributesOutputReference = ApphubWorkloadAttributesOutputReference;
_o = JSII_RTTI_SYMBOL_1;
ApphubWorkloadAttributesOutputReference[_o] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadAttributesOutputReference", version: "14.12.0" };
function apphubWorkloadTimeoutsToTerraform(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.apphubWorkloadTimeoutsToTerraform = apphubWorkloadTimeoutsToTerraform;
function apphubWorkloadTimeoutsToHclTerraform(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.apphubWorkloadTimeoutsToHclTerraform = apphubWorkloadTimeoutsToHclTerraform;
class ApphubWorkloadTimeoutsOutputReference 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.ApphubWorkloadTimeoutsOutputReference = ApphubWorkloadTimeoutsOutputReference;
_p = JSII_RTTI_SYMBOL_1;
ApphubWorkloadTimeoutsOutputReference[_p] = { fqn: "@cdktf/provider-google.apphubWorkload.ApphubWorkloadTimeoutsOutputReference", version: "14.12.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/apphub_workload google_apphub_workload}
*/
class ApphubWorkload extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a ApphubWorkload 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 ApphubWorkload to import
* @param importFromId The id of the existing ApphubWorkload that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/apphub_workload#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the ApphubWorkload to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_apphub_workload", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.13.0/docs/resources/apphub_workload google_apphub_workload} 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 ApphubWorkloadConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_apphub_workload',
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
});
// workload_properties - computed: true, optional: false, required: false
this._workloadProperties = new ApphubWorkloadWorkloadPropertiesList(this, "workload_properties", false);
// workload_reference - computed: true, optional: false, required: false
this._workloadReference = new ApphubWorkloadWorkloadReferenceList(this, "workload_reference", false);
// attributes - computed: false, optional: true, required: false
this._attributes = new ApphubWorkloadAttributesOutputReference(this, "attributes");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new ApphubWorkloadTimeoutsOutputReference(this, "timeouts");
this._applicationId = config.applicationId;
this._description = config.description;
this._discoveredWorkload = config.discoveredWorkload;
this._displayName = config.displayName;
this._id = config.id;
this._location = config.location;
this._project = config.project;
this._workloadId = config.workloadId;
this._attributes.internalValue = config.attributes;
this._timeouts.internalValue = config.timeouts;
}
get applicationId() {
return this.getStringAttribute('application_id');
}
set applicationId(value) {
this._applicationId = value;
}
// Temporarily expose input value. Use with caution.
get applicationIdInput() {
return this._applicationId;
}
// create_time - computed: true, optional: false, required: false
get createTime() {
return this.getStringAttribute('create_time');
}
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() {