@cdktf/provider-google
Version:
Prebuilt google Provider for Terraform CDK (cdktf)
1,185 lines (1,184 loc) • 189 kB
JavaScript
"use strict";
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
Object.defineProperty(exports, "__esModule", { value: true });
exports.DialogflowCxAgent = exports.DialogflowCxAgentTimeoutsOutputReference = exports.dialogflowCxAgentTimeoutsToHclTerraform = exports.dialogflowCxAgentTimeoutsToTerraform = exports.DialogflowCxAgentTextToSpeechSettingsOutputReference = exports.dialogflowCxAgentTextToSpeechSettingsToHclTerraform = exports.dialogflowCxAgentTextToSpeechSettingsToTerraform = exports.DialogflowCxAgentSpeechToTextSettingsOutputReference = exports.dialogflowCxAgentSpeechToTextSettingsToHclTerraform = exports.dialogflowCxAgentSpeechToTextSettingsToTerraform = exports.DialogflowCxAgentGitIntegrationSettingsOutputReference = exports.dialogflowCxAgentGitIntegrationSettingsToHclTerraform = exports.dialogflowCxAgentGitIntegrationSettingsToTerraform = exports.DialogflowCxAgentGitIntegrationSettingsGithubSettingsOutputReference = exports.dialogflowCxAgentGitIntegrationSettingsGithubSettingsToHclTerraform = exports.dialogflowCxAgentGitIntegrationSettingsGithubSettingsToTerraform = exports.DialogflowCxAgentAdvancedSettingsOutputReference = exports.dialogflowCxAgentAdvancedSettingsToHclTerraform = exports.dialogflowCxAgentAdvancedSettingsToTerraform = exports.DialogflowCxAgentAdvancedSettingsDtmfSettingsOutputReference = exports.dialogflowCxAgentAdvancedSettingsDtmfSettingsToHclTerraform = exports.dialogflowCxAgentAdvancedSettingsDtmfSettingsToTerraform = exports.DialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationOutputReference = exports.dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToHclTerraform = exports.dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToTerraform = void 0;
const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti");
const cdktf = require("cdktf");
function dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToTerraform(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 {
uri: cdktf.stringToTerraform(struct.uri),
};
}
exports.dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToTerraform = dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToTerraform;
function dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToHclTerraform(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 = {
uri: {
value: cdktf.stringToHclTerraform(struct.uri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToHclTerraform = dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToHclTerraform;
class DialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationOutputReference 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._uri !== undefined) {
hasAnyValues = true;
internalValueResult.uri = this._uri;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._uri = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._uri = value.uri;
}
}
get uri() {
return this.getStringAttribute('uri');
}
set uri(value) {
this._uri = value;
}
resetUri() {
this._uri = undefined;
}
// Temporarily expose input value. Use with caution.
get uriInput() {
return this._uri;
}
}
exports.DialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationOutputReference = DialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationOutputReference;
_a = JSII_RTTI_SYMBOL_1;
DialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationOutputReference[_a] = { fqn: "@cdktf/provider-google.dialogflowCxAgent.DialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationOutputReference", version: "14.3.0" };
function dialogflowCxAgentAdvancedSettingsDtmfSettingsToTerraform(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 {
enabled: cdktf.booleanToTerraform(struct.enabled),
finish_digit: cdktf.stringToTerraform(struct.finishDigit),
max_digits: cdktf.numberToTerraform(struct.maxDigits),
};
}
exports.dialogflowCxAgentAdvancedSettingsDtmfSettingsToTerraform = dialogflowCxAgentAdvancedSettingsDtmfSettingsToTerraform;
function dialogflowCxAgentAdvancedSettingsDtmfSettingsToHclTerraform(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 = {
enabled: {
value: cdktf.booleanToHclTerraform(struct.enabled),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
finish_digit: {
value: cdktf.stringToHclTerraform(struct.finishDigit),
isBlock: false,
type: "simple",
storageClassType: "string",
},
max_digits: {
value: cdktf.numberToHclTerraform(struct.maxDigits),
isBlock: false,
type: "simple",
storageClassType: "number",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dialogflowCxAgentAdvancedSettingsDtmfSettingsToHclTerraform = dialogflowCxAgentAdvancedSettingsDtmfSettingsToHclTerraform;
class DialogflowCxAgentAdvancedSettingsDtmfSettingsOutputReference 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._enabled !== undefined) {
hasAnyValues = true;
internalValueResult.enabled = this._enabled;
}
if (this._finishDigit !== undefined) {
hasAnyValues = true;
internalValueResult.finishDigit = this._finishDigit;
}
if (this._maxDigits !== undefined) {
hasAnyValues = true;
internalValueResult.maxDigits = this._maxDigits;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enabled = undefined;
this._finishDigit = undefined;
this._maxDigits = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enabled = value.enabled;
this._finishDigit = value.finishDigit;
this._maxDigits = value.maxDigits;
}
}
get enabled() {
return this.getBooleanAttribute('enabled');
}
set enabled(value) {
this._enabled = value;
}
resetEnabled() {
this._enabled = undefined;
}
// Temporarily expose input value. Use with caution.
get enabledInput() {
return this._enabled;
}
get finishDigit() {
return this.getStringAttribute('finish_digit');
}
set finishDigit(value) {
this._finishDigit = value;
}
resetFinishDigit() {
this._finishDigit = undefined;
}
// Temporarily expose input value. Use with caution.
get finishDigitInput() {
return this._finishDigit;
}
get maxDigits() {
return this.getNumberAttribute('max_digits');
}
set maxDigits(value) {
this._maxDigits = value;
}
resetMaxDigits() {
this._maxDigits = undefined;
}
// Temporarily expose input value. Use with caution.
get maxDigitsInput() {
return this._maxDigits;
}
}
exports.DialogflowCxAgentAdvancedSettingsDtmfSettingsOutputReference = DialogflowCxAgentAdvancedSettingsDtmfSettingsOutputReference;
_b = JSII_RTTI_SYMBOL_1;
DialogflowCxAgentAdvancedSettingsDtmfSettingsOutputReference[_b] = { fqn: "@cdktf/provider-google.dialogflowCxAgent.DialogflowCxAgentAdvancedSettingsDtmfSettingsOutputReference", version: "14.3.0" };
function dialogflowCxAgentAdvancedSettingsToTerraform(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 {
audio_export_gcs_destination: dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToTerraform(struct.audioExportGcsDestination),
dtmf_settings: dialogflowCxAgentAdvancedSettingsDtmfSettingsToTerraform(struct.dtmfSettings),
};
}
exports.dialogflowCxAgentAdvancedSettingsToTerraform = dialogflowCxAgentAdvancedSettingsToTerraform;
function dialogflowCxAgentAdvancedSettingsToHclTerraform(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 = {
audio_export_gcs_destination: {
value: dialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationToHclTerraform(struct.audioExportGcsDestination),
isBlock: true,
type: "list",
storageClassType: "DialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationList",
},
dtmf_settings: {
value: dialogflowCxAgentAdvancedSettingsDtmfSettingsToHclTerraform(struct.dtmfSettings),
isBlock: true,
type: "list",
storageClassType: "DialogflowCxAgentAdvancedSettingsDtmfSettingsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dialogflowCxAgentAdvancedSettingsToHclTerraform = dialogflowCxAgentAdvancedSettingsToHclTerraform;
class DialogflowCxAgentAdvancedSettingsOutputReference 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;
// audio_export_gcs_destination - computed: false, optional: true, required: false
this._audioExportGcsDestination = new DialogflowCxAgentAdvancedSettingsAudioExportGcsDestinationOutputReference(this, "audio_export_gcs_destination");
// dtmf_settings - computed: false, optional: true, required: false
this._dtmfSettings = new DialogflowCxAgentAdvancedSettingsDtmfSettingsOutputReference(this, "dtmf_settings");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._audioExportGcsDestination?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.audioExportGcsDestination = this._audioExportGcsDestination?.internalValue;
}
if (this._dtmfSettings?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.dtmfSettings = this._dtmfSettings?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._audioExportGcsDestination.internalValue = undefined;
this._dtmfSettings.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._audioExportGcsDestination.internalValue = value.audioExportGcsDestination;
this._dtmfSettings.internalValue = value.dtmfSettings;
}
}
get audioExportGcsDestination() {
return this._audioExportGcsDestination;
}
putAudioExportGcsDestination(value) {
this._audioExportGcsDestination.internalValue = value;
}
resetAudioExportGcsDestination() {
this._audioExportGcsDestination.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get audioExportGcsDestinationInput() {
return this._audioExportGcsDestination.internalValue;
}
get dtmfSettings() {
return this._dtmfSettings;
}
putDtmfSettings(value) {
this._dtmfSettings.internalValue = value;
}
resetDtmfSettings() {
this._dtmfSettings.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get dtmfSettingsInput() {
return this._dtmfSettings.internalValue;
}
}
exports.DialogflowCxAgentAdvancedSettingsOutputReference = DialogflowCxAgentAdvancedSettingsOutputReference;
_c = JSII_RTTI_SYMBOL_1;
DialogflowCxAgentAdvancedSettingsOutputReference[_c] = { fqn: "@cdktf/provider-google.dialogflowCxAgent.DialogflowCxAgentAdvancedSettingsOutputReference", version: "14.3.0" };
function dialogflowCxAgentGitIntegrationSettingsGithubSettingsToTerraform(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 {
access_token: cdktf.stringToTerraform(struct.accessToken),
branches: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.branches),
display_name: cdktf.stringToTerraform(struct.displayName),
repository_uri: cdktf.stringToTerraform(struct.repositoryUri),
tracking_branch: cdktf.stringToTerraform(struct.trackingBranch),
};
}
exports.dialogflowCxAgentGitIntegrationSettingsGithubSettingsToTerraform = dialogflowCxAgentGitIntegrationSettingsGithubSettingsToTerraform;
function dialogflowCxAgentGitIntegrationSettingsGithubSettingsToHclTerraform(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 = {
access_token: {
value: cdktf.stringToHclTerraform(struct.accessToken),
isBlock: false,
type: "simple",
storageClassType: "string",
},
branches: {
value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.branches),
isBlock: false,
type: "list",
storageClassType: "stringList",
},
display_name: {
value: cdktf.stringToHclTerraform(struct.displayName),
isBlock: false,
type: "simple",
storageClassType: "string",
},
repository_uri: {
value: cdktf.stringToHclTerraform(struct.repositoryUri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
tracking_branch: {
value: cdktf.stringToHclTerraform(struct.trackingBranch),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dialogflowCxAgentGitIntegrationSettingsGithubSettingsToHclTerraform = dialogflowCxAgentGitIntegrationSettingsGithubSettingsToHclTerraform;
class DialogflowCxAgentGitIntegrationSettingsGithubSettingsOutputReference 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._accessToken !== undefined) {
hasAnyValues = true;
internalValueResult.accessToken = this._accessToken;
}
if (this._branches !== undefined) {
hasAnyValues = true;
internalValueResult.branches = this._branches;
}
if (this._displayName !== undefined) {
hasAnyValues = true;
internalValueResult.displayName = this._displayName;
}
if (this._repositoryUri !== undefined) {
hasAnyValues = true;
internalValueResult.repositoryUri = this._repositoryUri;
}
if (this._trackingBranch !== undefined) {
hasAnyValues = true;
internalValueResult.trackingBranch = this._trackingBranch;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._accessToken = undefined;
this._branches = undefined;
this._displayName = undefined;
this._repositoryUri = undefined;
this._trackingBranch = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._accessToken = value.accessToken;
this._branches = value.branches;
this._displayName = value.displayName;
this._repositoryUri = value.repositoryUri;
this._trackingBranch = value.trackingBranch;
}
}
get accessToken() {
return this.getStringAttribute('access_token');
}
set accessToken(value) {
this._accessToken = value;
}
resetAccessToken() {
this._accessToken = undefined;
}
// Temporarily expose input value. Use with caution.
get accessTokenInput() {
return this._accessToken;
}
get branches() {
return this.getListAttribute('branches');
}
set branches(value) {
this._branches = value;
}
resetBranches() {
this._branches = undefined;
}
// Temporarily expose input value. Use with caution.
get branchesInput() {
return this._branches;
}
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 repositoryUri() {
return this.getStringAttribute('repository_uri');
}
set repositoryUri(value) {
this._repositoryUri = value;
}
resetRepositoryUri() {
this._repositoryUri = undefined;
}
// Temporarily expose input value. Use with caution.
get repositoryUriInput() {
return this._repositoryUri;
}
get trackingBranch() {
return this.getStringAttribute('tracking_branch');
}
set trackingBranch(value) {
this._trackingBranch = value;
}
resetTrackingBranch() {
this._trackingBranch = undefined;
}
// Temporarily expose input value. Use with caution.
get trackingBranchInput() {
return this._trackingBranch;
}
}
exports.DialogflowCxAgentGitIntegrationSettingsGithubSettingsOutputReference = DialogflowCxAgentGitIntegrationSettingsGithubSettingsOutputReference;
_d = JSII_RTTI_SYMBOL_1;
DialogflowCxAgentGitIntegrationSettingsGithubSettingsOutputReference[_d] = { fqn: "@cdktf/provider-google.dialogflowCxAgent.DialogflowCxAgentGitIntegrationSettingsGithubSettingsOutputReference", version: "14.3.0" };
function dialogflowCxAgentGitIntegrationSettingsToTerraform(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 {
github_settings: dialogflowCxAgentGitIntegrationSettingsGithubSettingsToTerraform(struct.githubSettings),
};
}
exports.dialogflowCxAgentGitIntegrationSettingsToTerraform = dialogflowCxAgentGitIntegrationSettingsToTerraform;
function dialogflowCxAgentGitIntegrationSettingsToHclTerraform(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 = {
github_settings: {
value: dialogflowCxAgentGitIntegrationSettingsGithubSettingsToHclTerraform(struct.githubSettings),
isBlock: true,
type: "list",
storageClassType: "DialogflowCxAgentGitIntegrationSettingsGithubSettingsList",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dialogflowCxAgentGitIntegrationSettingsToHclTerraform = dialogflowCxAgentGitIntegrationSettingsToHclTerraform;
class DialogflowCxAgentGitIntegrationSettingsOutputReference 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;
// github_settings - computed: false, optional: true, required: false
this._githubSettings = new DialogflowCxAgentGitIntegrationSettingsGithubSettingsOutputReference(this, "github_settings");
}
get internalValue() {
let hasAnyValues = this.isEmptyObject;
const internalValueResult = {};
if (this._githubSettings?.internalValue !== undefined) {
hasAnyValues = true;
internalValueResult.githubSettings = this._githubSettings?.internalValue;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._githubSettings.internalValue = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._githubSettings.internalValue = value.githubSettings;
}
}
get githubSettings() {
return this._githubSettings;
}
putGithubSettings(value) {
this._githubSettings.internalValue = value;
}
resetGithubSettings() {
this._githubSettings.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get githubSettingsInput() {
return this._githubSettings.internalValue;
}
}
exports.DialogflowCxAgentGitIntegrationSettingsOutputReference = DialogflowCxAgentGitIntegrationSettingsOutputReference;
_e = JSII_RTTI_SYMBOL_1;
DialogflowCxAgentGitIntegrationSettingsOutputReference[_e] = { fqn: "@cdktf/provider-google.dialogflowCxAgent.DialogflowCxAgentGitIntegrationSettingsOutputReference", version: "14.3.0" };
function dialogflowCxAgentSpeechToTextSettingsToTerraform(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 {
enable_speech_adaptation: cdktf.booleanToTerraform(struct.enableSpeechAdaptation),
};
}
exports.dialogflowCxAgentSpeechToTextSettingsToTerraform = dialogflowCxAgentSpeechToTextSettingsToTerraform;
function dialogflowCxAgentSpeechToTextSettingsToHclTerraform(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 = {
enable_speech_adaptation: {
value: cdktf.booleanToHclTerraform(struct.enableSpeechAdaptation),
isBlock: false,
type: "simple",
storageClassType: "boolean",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dialogflowCxAgentSpeechToTextSettingsToHclTerraform = dialogflowCxAgentSpeechToTextSettingsToHclTerraform;
class DialogflowCxAgentSpeechToTextSettingsOutputReference 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._enableSpeechAdaptation !== undefined) {
hasAnyValues = true;
internalValueResult.enableSpeechAdaptation = this._enableSpeechAdaptation;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._enableSpeechAdaptation = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._enableSpeechAdaptation = value.enableSpeechAdaptation;
}
}
get enableSpeechAdaptation() {
return this.getBooleanAttribute('enable_speech_adaptation');
}
set enableSpeechAdaptation(value) {
this._enableSpeechAdaptation = value;
}
resetEnableSpeechAdaptation() {
this._enableSpeechAdaptation = undefined;
}
// Temporarily expose input value. Use with caution.
get enableSpeechAdaptationInput() {
return this._enableSpeechAdaptation;
}
}
exports.DialogflowCxAgentSpeechToTextSettingsOutputReference = DialogflowCxAgentSpeechToTextSettingsOutputReference;
_f = JSII_RTTI_SYMBOL_1;
DialogflowCxAgentSpeechToTextSettingsOutputReference[_f] = { fqn: "@cdktf/provider-google.dialogflowCxAgent.DialogflowCxAgentSpeechToTextSettingsOutputReference", version: "14.3.0" };
function dialogflowCxAgentTextToSpeechSettingsToTerraform(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 {
synthesize_speech_configs: cdktf.stringToTerraform(struct.synthesizeSpeechConfigs),
};
}
exports.dialogflowCxAgentTextToSpeechSettingsToTerraform = dialogflowCxAgentTextToSpeechSettingsToTerraform;
function dialogflowCxAgentTextToSpeechSettingsToHclTerraform(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 = {
synthesize_speech_configs: {
value: cdktf.stringToHclTerraform(struct.synthesizeSpeechConfigs),
isBlock: false,
type: "simple",
storageClassType: "string",
},
};
// remove undefined attributes
return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined));
}
exports.dialogflowCxAgentTextToSpeechSettingsToHclTerraform = dialogflowCxAgentTextToSpeechSettingsToHclTerraform;
class DialogflowCxAgentTextToSpeechSettingsOutputReference 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._synthesizeSpeechConfigs !== undefined) {
hasAnyValues = true;
internalValueResult.synthesizeSpeechConfigs = this._synthesizeSpeechConfigs;
}
return hasAnyValues ? internalValueResult : undefined;
}
set internalValue(value) {
if (value === undefined) {
this.isEmptyObject = false;
this._synthesizeSpeechConfigs = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._synthesizeSpeechConfigs = value.synthesizeSpeechConfigs;
}
}
get synthesizeSpeechConfigs() {
return this.getStringAttribute('synthesize_speech_configs');
}
set synthesizeSpeechConfigs(value) {
this._synthesizeSpeechConfigs = value;
}
resetSynthesizeSpeechConfigs() {
this._synthesizeSpeechConfigs = undefined;
}
// Temporarily expose input value. Use with caution.
get synthesizeSpeechConfigsInput() {
return this._synthesizeSpeechConfigs;
}
}
exports.DialogflowCxAgentTextToSpeechSettingsOutputReference = DialogflowCxAgentTextToSpeechSettingsOutputReference;
_g = JSII_RTTI_SYMBOL_1;
DialogflowCxAgentTextToSpeechSettingsOutputReference[_g] = { fqn: "@cdktf/provider-google.dialogflowCxAgent.DialogflowCxAgentTextToSpeechSettingsOutputReference", version: "14.3.0" };
function dialogflowCxAgentTimeoutsToTerraform(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.dialogflowCxAgentTimeoutsToTerraform = dialogflowCxAgentTimeoutsToTerraform;
function dialogflowCxAgentTimeoutsToHclTerraform(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.dialogflowCxAgentTimeoutsToHclTerraform = dialogflowCxAgentTimeoutsToHclTerraform;
class DialogflowCxAgentTimeoutsOutputReference 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.DialogflowCxAgentTimeoutsOutputReference = DialogflowCxAgentTimeoutsOutputReference;
_h = JSII_RTTI_SYMBOL_1;
DialogflowCxAgentTimeoutsOutputReference[_h] = { fqn: "@cdktf/provider-google.dialogflowCxAgent.DialogflowCxAgentTimeoutsOutputReference", version: "14.3.0" };
/**
* Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/dialogflow_cx_agent google_dialogflow_cx_agent}
*/
class DialogflowCxAgent extends cdktf.TerraformResource {
// ==============
// STATIC Methods
// ==============
/**
* Generates CDKTF code for importing a DialogflowCxAgent 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 DialogflowCxAgent to import
* @param importFromId The id of the existing DialogflowCxAgent that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/dialogflow_cx_agent#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the DialogflowCxAgent to import is found
*/
static generateConfigForImport(scope, importToId, importFromId, provider) {
return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_dialogflow_cx_agent", importId: importFromId, provider });
}
// ===========
// INITIALIZER
// ===========
/**
* Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.4.0/docs/resources/dialogflow_cx_agent google_dialogflow_cx_agent} 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 DialogflowCxAgentConfig
*/
constructor(scope, id, config) {
super(scope, id, {
terraformResourceType: 'google_dialogflow_cx_agent',
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
});
// advanced_settings - computed: false, optional: true, required: false
this._advancedSettings = new DialogflowCxAgentAdvancedSettingsOutputReference(this, "advanced_settings");
// git_integration_settings - computed: false, optional: true, required: false
this._gitIntegrationSettings = new DialogflowCxAgentGitIntegrationSettingsOutputReference(this, "git_integration_settings");
// speech_to_text_settings - computed: false, optional: true, required: false
this._speechToTextSettings = new DialogflowCxAgentSpeechToTextSettingsOutputReference(this, "speech_to_text_settings");
// text_to_speech_settings - computed: false, optional: true, required: false
this._textToSpeechSettings = new DialogflowCxAgentTextToSpeechSettingsOutputReference(this, "text_to_speech_settings");
// timeouts - computed: false, optional: true, required: false
this._timeouts = new DialogflowCxAgentTimeoutsOutputReference(this, "timeouts");
this._avatarUri = config.avatarUri;
this._defaultLanguageCode = config.defaultLanguageCode;
this._description = config.description;
this._displayName = config.displayName;
this._enableSpellCorrection = config.enableSpellCorrection;
this._enableStackdriverLogging = config.enableStackdriverLogging;
this._id = config.id;
this._location = config.location;
this._project = config.project;
this._securitySettings = config.securitySettings;
this._supportedLanguageCodes = config.supportedLanguageCodes;
this._timeZone = config.timeZone;
this._advancedSettings.internalValue = config.advancedSettings;
this._gitIntegrationSettings.internalValue = config.gitIntegrationSettings;
this._speechToTextSettings.internalValue = config.speechToTextSettings;
this._textToSpeechSettings.internalValue = config.textToSpeechSettings;
this._timeouts.internalValue = config.timeouts;
}
get avatarUri() {
return this.getStringAttribute('avatar_uri');
}
set avatarUri(value) {
this._avatarUri = value;
}
resetAvatarUri() {
this._avatarUri = undefined;
}
// Temporarily expose input value. Use with caution.
get avatarUriInput() {
return this._avatarUri;
}
get defaultLanguageCode() {
return this.getStringAttribute('default_language_code');
}
set defaultLanguageCode(value) {
this._defaultLanguageCode = value;
}
// Temporarily expose input value. Use with caution.
get defaultLanguageCodeInput() {
return this._defaultLanguageCode;
}
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 displayName() {
return this.getStringAttribute('display_name');
}
set displayName(value) {
this._displayName = value;
}
// Temporarily expose input value. Use with caution.
get displayNameInput() {
return this._displayName;
}
get enableSpellCorrection() {
return this.getBooleanAttribute('enable_spell_correction');
}
set enableSpellCorrection(value) {
this._enableSpellCorrection = value;
}
resetEnableSpellCorrection() {
this._enableSpellCorrection = undefined;
}
// Temporarily expose input value. Use with caution.
get enableSpellCorrectionInput() {
return this._enableSpellCorrection;
}
get enableStackdriverLogging() {
return this.getBooleanAttribute('enable_stackdriver_logging');
}
set enableStackdriverLogging(value) {
this._enableStackdriverLogging = value;
}
resetEnableStackdriverLogging() {
this._enableStackdriverLogging = undefined;
}
// Temporarily expose input value. Use with caution.
get enableStackdriverLoggingInput() {
return this._enableStackdriverLogging;
}
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 location() {
return this.getStringAttribute('location');
}
set location(value) {
this._location = value;
}
// Temporarily expose input value. Use with caution.
get locationInput() {
return this._location;
}
// name - computed: true, optional: false, required: false
get name() {
return this.getStringAttribute('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 securitySettings() {
return this.getStringAttribute('security_settings');
}
set securitySettings(value) {
this._securitySettings = value;
}
resetSecuritySettings() {
this._securitySettings = undefined;
}
// Temporarily expose input value. Use with caution.
get securitySettingsInput() {
return this._securitySettings;
}
// start_flow - computed: true, optional: false, required: false
get startFlow() {
return this.getStringAttribute('start_flow');
}
get supportedLanguageCodes() {
return this.getListAttribute('supported_language_codes');
}
set supportedLanguageCodes(value) {
this._supportedLanguageCodes = value;
}
resetSupportedLanguageCodes() {
this._supportedLanguageCodes = undefined;
}
// Temporarily expose input value. Use with caution.
get supportedLanguageCodesInput() {
return this._supportedLanguageCodes;
}
get timeZone() {
return this.getStringAttribute('time_zone');
}
set timeZone(value) {
this._timeZone = value;
}
// Temporarily expose input value. Use with caution.
get timeZoneInput() {
return this._timeZone;
}
get advancedSettings() {
return this._advancedSettings;
}
putAdvancedSettings(value) {
this._advancedSettings.internalValue = value;
}
resetAdvancedSettings() {
this._advancedSettings.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get advancedSettingsInput() {
return this._advancedSettings.internalValue;
}
get gitIntegrationSettings() {
return this._gitIntegrationSettings;
}
putGitIntegrationSettings(value) {
this._gitIntegrationSettings.internalValue = value;
}
resetGitIntegrationSettings() {
this._gitIntegrationSettings.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get gitIntegrationSettingsInput() {
return this._gitIntegrationSettings.internalValue;
}
get speechToTextSettings() {
return this._speechToTextSettings;
}
putSpeechToTextSettings(value) {
this._speechToTextSettings.internalValue = value;
}
resetSpeechToTextSettings() {
this._speechToTextSettings.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get speechToTextSettingsInput() {
return this._speechToTextSettings.internalValue;
}
get textToSpeechSettings() {
return this._textToSpeechSettings;
}
putTextToSpeechSettings(value) {
this._textToSpeechSettings.internalValue = value;
}
resetTextToSpeechSettings() {
this._textToSpeechSettings.internalValue = undefined;
}
// Temporarily expose input value. Use with caution.
get textToSpeechSettingsInput() {
return this._textToSpeechSettings.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 {
avatar_uri: cdktf.stringToTerraform(this._avatarUri),
default_language_code: cdktf.stringToTerraform(this._defaultLanguageCode),
description: cdktf.stringToTerraform(this._description),
display_name: cdktf.stringToTerraform(this._displayName),
enable_spell_correction: cdktf.booleanToTerraform(this._enableSpellCorrection),
enable_stackdriver_logging: cdktf.booleanToTerraform(this._enableStackdriverLogging),
id: cdktf.stringToTerraform(this._id),
location: cdktf.stringToTerraform(this._location),
project: cdktf.stringToTerraform(this._project),
security_settings: cdktf.stringToTerraform(this._securitySettings),
supported_language_codes: cdktf.listMapper(cdktf.stringToTerraform, false)(this._supportedLanguageCodes),
time_zone: cdktf.stringToTerraform(this._timeZone),
advanced_settings: dialogflowCxAgentAdvancedSettingsToTerraform(this._advancedSettings.internalValue),
git_integration_settings: dialogflowCxAgentGitIntegrationSettingsToTerraform(this._gitIntegrationSettings.internalValue),
speech_to_text_settings: dialogflowCxAgentSpeechToTextSettingsToTerraform(this._speechToTextSettings.internalValue),
text_to_speech_settings: dialogflowCxAgentTextToSpeechSettingsToTerraform(this._textToSpeechSettings.internalValue),
timeouts: dialogflowCxAgentTimeoutsToTerraform(this._timeouts.internalValue),
};
}
synthesizeHclAttributes() {
const attrs = {
avatar_uri: {
value: cdktf.stringToHclTerraform(this._avatarUri),
isBlock: false,
type: "simple",
storageClassType: "string",
},
default_language_code: {