UNPKG

@cdktf/provider-google

Version:

Prebuilt google Provider for Terraform CDK (cdktf)

1,175 lines 181 kB
"use strict"; var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k; Object.defineProperty(exports, "__esModule", { value: true }); exports.StorageInsightsReportConfig = exports.StorageInsightsReportConfigTimeoutsOutputReference = exports.StorageInsightsReportConfigParquetOptionsOutputReference = exports.StorageInsightsReportConfigObjectMetadataReportOptionsOutputReference = exports.StorageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersOutputReference = exports.StorageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsOutputReference = exports.StorageInsightsReportConfigFrequencyOptionsOutputReference = exports.StorageInsightsReportConfigFrequencyOptionsStartDateOutputReference = exports.StorageInsightsReportConfigFrequencyOptionsEndDateOutputReference = exports.StorageInsightsReportConfigCsvOptionsOutputReference = void 0; exports.storageInsightsReportConfigCsvOptionsToTerraform = storageInsightsReportConfigCsvOptionsToTerraform; exports.storageInsightsReportConfigCsvOptionsToHclTerraform = storageInsightsReportConfigCsvOptionsToHclTerraform; exports.storageInsightsReportConfigFrequencyOptionsEndDateToTerraform = storageInsightsReportConfigFrequencyOptionsEndDateToTerraform; exports.storageInsightsReportConfigFrequencyOptionsEndDateToHclTerraform = storageInsightsReportConfigFrequencyOptionsEndDateToHclTerraform; exports.storageInsightsReportConfigFrequencyOptionsStartDateToTerraform = storageInsightsReportConfigFrequencyOptionsStartDateToTerraform; exports.storageInsightsReportConfigFrequencyOptionsStartDateToHclTerraform = storageInsightsReportConfigFrequencyOptionsStartDateToHclTerraform; exports.storageInsightsReportConfigFrequencyOptionsToTerraform = storageInsightsReportConfigFrequencyOptionsToTerraform; exports.storageInsightsReportConfigFrequencyOptionsToHclTerraform = storageInsightsReportConfigFrequencyOptionsToHclTerraform; exports.storageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsToTerraform = storageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsToTerraform; exports.storageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsToHclTerraform = storageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsToHclTerraform; exports.storageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersToTerraform = storageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersToTerraform; exports.storageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersToHclTerraform = storageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersToHclTerraform; exports.storageInsightsReportConfigObjectMetadataReportOptionsToTerraform = storageInsightsReportConfigObjectMetadataReportOptionsToTerraform; exports.storageInsightsReportConfigObjectMetadataReportOptionsToHclTerraform = storageInsightsReportConfigObjectMetadataReportOptionsToHclTerraform; exports.storageInsightsReportConfigParquetOptionsToTerraform = storageInsightsReportConfigParquetOptionsToTerraform; exports.storageInsightsReportConfigParquetOptionsToHclTerraform = storageInsightsReportConfigParquetOptionsToHclTerraform; exports.storageInsightsReportConfigTimeoutsToTerraform = storageInsightsReportConfigTimeoutsToTerraform; exports.storageInsightsReportConfigTimeoutsToHclTerraform = storageInsightsReportConfigTimeoutsToHclTerraform; const JSII_RTTI_SYMBOL_1 = Symbol.for("jsii.rtti"); const cdktf = require("cdktf"); function storageInsightsReportConfigCsvOptionsToTerraform(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 { delimiter: cdktf.stringToTerraform(struct.delimiter), header_required: cdktf.booleanToTerraform(struct.headerRequired), record_separator: cdktf.stringToTerraform(struct.recordSeparator), }; } function storageInsightsReportConfigCsvOptionsToHclTerraform(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 = { delimiter: { value: cdktf.stringToHclTerraform(struct.delimiter), isBlock: false, type: "simple", storageClassType: "string", }, header_required: { value: cdktf.booleanToHclTerraform(struct.headerRequired), isBlock: false, type: "simple", storageClassType: "boolean", }, record_separator: { value: cdktf.stringToHclTerraform(struct.recordSeparator), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class StorageInsightsReportConfigCsvOptionsOutputReference 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._delimiter !== undefined) { hasAnyValues = true; internalValueResult.delimiter = this._delimiter; } if (this._headerRequired !== undefined) { hasAnyValues = true; internalValueResult.headerRequired = this._headerRequired; } if (this._recordSeparator !== undefined) { hasAnyValues = true; internalValueResult.recordSeparator = this._recordSeparator; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._delimiter = undefined; this._headerRequired = undefined; this._recordSeparator = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._delimiter = value.delimiter; this._headerRequired = value.headerRequired; this._recordSeparator = value.recordSeparator; } } get delimiter() { return this.getStringAttribute('delimiter'); } set delimiter(value) { this._delimiter = value; } resetDelimiter() { this._delimiter = undefined; } // Temporarily expose input value. Use with caution. get delimiterInput() { return this._delimiter; } get headerRequired() { return this.getBooleanAttribute('header_required'); } set headerRequired(value) { this._headerRequired = value; } resetHeaderRequired() { this._headerRequired = undefined; } // Temporarily expose input value. Use with caution. get headerRequiredInput() { return this._headerRequired; } get recordSeparator() { return this.getStringAttribute('record_separator'); } set recordSeparator(value) { this._recordSeparator = value; } resetRecordSeparator() { this._recordSeparator = undefined; } // Temporarily expose input value. Use with caution. get recordSeparatorInput() { return this._recordSeparator; } } exports.StorageInsightsReportConfigCsvOptionsOutputReference = StorageInsightsReportConfigCsvOptionsOutputReference; _a = JSII_RTTI_SYMBOL_1; StorageInsightsReportConfigCsvOptionsOutputReference[_a] = { fqn: "@cdktf/provider-google.storageInsightsReportConfig.StorageInsightsReportConfigCsvOptionsOutputReference", version: "14.35.1" }; function storageInsightsReportConfigFrequencyOptionsEndDateToTerraform(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 { day: cdktf.numberToTerraform(struct.day), month: cdktf.numberToTerraform(struct.month), year: cdktf.numberToTerraform(struct.year), }; } function storageInsightsReportConfigFrequencyOptionsEndDateToHclTerraform(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 = { day: { value: cdktf.numberToHclTerraform(struct.day), isBlock: false, type: "simple", storageClassType: "number", }, month: { value: cdktf.numberToHclTerraform(struct.month), isBlock: false, type: "simple", storageClassType: "number", }, year: { value: cdktf.numberToHclTerraform(struct.year), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class StorageInsightsReportConfigFrequencyOptionsEndDateOutputReference 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._day !== undefined) { hasAnyValues = true; internalValueResult.day = this._day; } if (this._month !== undefined) { hasAnyValues = true; internalValueResult.month = this._month; } if (this._year !== undefined) { hasAnyValues = true; internalValueResult.year = this._year; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._day = undefined; this._month = undefined; this._year = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._day = value.day; this._month = value.month; this._year = value.year; } } get day() { return this.getNumberAttribute('day'); } set day(value) { this._day = value; } // Temporarily expose input value. Use with caution. get dayInput() { return this._day; } get month() { return this.getNumberAttribute('month'); } set month(value) { this._month = value; } // Temporarily expose input value. Use with caution. get monthInput() { return this._month; } get year() { return this.getNumberAttribute('year'); } set year(value) { this._year = value; } // Temporarily expose input value. Use with caution. get yearInput() { return this._year; } } exports.StorageInsightsReportConfigFrequencyOptionsEndDateOutputReference = StorageInsightsReportConfigFrequencyOptionsEndDateOutputReference; _b = JSII_RTTI_SYMBOL_1; StorageInsightsReportConfigFrequencyOptionsEndDateOutputReference[_b] = { fqn: "@cdktf/provider-google.storageInsightsReportConfig.StorageInsightsReportConfigFrequencyOptionsEndDateOutputReference", version: "14.35.1" }; function storageInsightsReportConfigFrequencyOptionsStartDateToTerraform(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 { day: cdktf.numberToTerraform(struct.day), month: cdktf.numberToTerraform(struct.month), year: cdktf.numberToTerraform(struct.year), }; } function storageInsightsReportConfigFrequencyOptionsStartDateToHclTerraform(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 = { day: { value: cdktf.numberToHclTerraform(struct.day), isBlock: false, type: "simple", storageClassType: "number", }, month: { value: cdktf.numberToHclTerraform(struct.month), isBlock: false, type: "simple", storageClassType: "number", }, year: { value: cdktf.numberToHclTerraform(struct.year), isBlock: false, type: "simple", storageClassType: "number", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class StorageInsightsReportConfigFrequencyOptionsStartDateOutputReference 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._day !== undefined) { hasAnyValues = true; internalValueResult.day = this._day; } if (this._month !== undefined) { hasAnyValues = true; internalValueResult.month = this._month; } if (this._year !== undefined) { hasAnyValues = true; internalValueResult.year = this._year; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._day = undefined; this._month = undefined; this._year = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._day = value.day; this._month = value.month; this._year = value.year; } } get day() { return this.getNumberAttribute('day'); } set day(value) { this._day = value; } // Temporarily expose input value. Use with caution. get dayInput() { return this._day; } get month() { return this.getNumberAttribute('month'); } set month(value) { this._month = value; } // Temporarily expose input value. Use with caution. get monthInput() { return this._month; } get year() { return this.getNumberAttribute('year'); } set year(value) { this._year = value; } // Temporarily expose input value. Use with caution. get yearInput() { return this._year; } } exports.StorageInsightsReportConfigFrequencyOptionsStartDateOutputReference = StorageInsightsReportConfigFrequencyOptionsStartDateOutputReference; _c = JSII_RTTI_SYMBOL_1; StorageInsightsReportConfigFrequencyOptionsStartDateOutputReference[_c] = { fqn: "@cdktf/provider-google.storageInsightsReportConfig.StorageInsightsReportConfigFrequencyOptionsStartDateOutputReference", version: "14.35.1" }; function storageInsightsReportConfigFrequencyOptionsToTerraform(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 { frequency: cdktf.stringToTerraform(struct.frequency), end_date: storageInsightsReportConfigFrequencyOptionsEndDateToTerraform(struct.endDate), start_date: storageInsightsReportConfigFrequencyOptionsStartDateToTerraform(struct.startDate), }; } function storageInsightsReportConfigFrequencyOptionsToHclTerraform(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 = { frequency: { value: cdktf.stringToHclTerraform(struct.frequency), isBlock: false, type: "simple", storageClassType: "string", }, end_date: { value: storageInsightsReportConfigFrequencyOptionsEndDateToHclTerraform(struct.endDate), isBlock: true, type: "list", storageClassType: "StorageInsightsReportConfigFrequencyOptionsEndDateList", }, start_date: { value: storageInsightsReportConfigFrequencyOptionsStartDateToHclTerraform(struct.startDate), isBlock: true, type: "list", storageClassType: "StorageInsightsReportConfigFrequencyOptionsStartDateList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class StorageInsightsReportConfigFrequencyOptionsOutputReference 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; // end_date - computed: false, optional: false, required: true this._endDate = new StorageInsightsReportConfigFrequencyOptionsEndDateOutputReference(this, "end_date"); // start_date - computed: false, optional: false, required: true this._startDate = new StorageInsightsReportConfigFrequencyOptionsStartDateOutputReference(this, "start_date"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._frequency !== undefined) { hasAnyValues = true; internalValueResult.frequency = this._frequency; } if (this._endDate?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.endDate = this._endDate?.internalValue; } if (this._startDate?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.startDate = this._startDate?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._frequency = undefined; this._endDate.internalValue = undefined; this._startDate.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._frequency = value.frequency; this._endDate.internalValue = value.endDate; this._startDate.internalValue = value.startDate; } } get frequency() { return this.getStringAttribute('frequency'); } set frequency(value) { this._frequency = value; } // Temporarily expose input value. Use with caution. get frequencyInput() { return this._frequency; } get endDate() { return this._endDate; } putEndDate(value) { this._endDate.internalValue = value; } // Temporarily expose input value. Use with caution. get endDateInput() { return this._endDate.internalValue; } get startDate() { return this._startDate; } putStartDate(value) { this._startDate.internalValue = value; } // Temporarily expose input value. Use with caution. get startDateInput() { return this._startDate.internalValue; } } exports.StorageInsightsReportConfigFrequencyOptionsOutputReference = StorageInsightsReportConfigFrequencyOptionsOutputReference; _d = JSII_RTTI_SYMBOL_1; StorageInsightsReportConfigFrequencyOptionsOutputReference[_d] = { fqn: "@cdktf/provider-google.storageInsightsReportConfig.StorageInsightsReportConfigFrequencyOptionsOutputReference", version: "14.35.1" }; function storageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { bucket: cdktf.stringToTerraform(struct.bucket), destination_path: cdktf.stringToTerraform(struct.destinationPath), }; } function storageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { bucket: { value: cdktf.stringToHclTerraform(struct.bucket), isBlock: false, type: "simple", storageClassType: "string", }, destination_path: { value: cdktf.stringToHclTerraform(struct.destinationPath), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class StorageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._bucket !== undefined) { hasAnyValues = true; internalValueResult.bucket = this._bucket; } if (this._destinationPath !== undefined) { hasAnyValues = true; internalValueResult.destinationPath = this._destinationPath; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._bucket = undefined; this._destinationPath = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._bucket = value.bucket; this._destinationPath = value.destinationPath; } } get bucket() { return this.getStringAttribute('bucket'); } set bucket(value) { this._bucket = value; } // Temporarily expose input value. Use with caution. get bucketInput() { return this._bucket; } get destinationPath() { return this.getStringAttribute('destination_path'); } set destinationPath(value) { this._destinationPath = value; } resetDestinationPath() { this._destinationPath = undefined; } // Temporarily expose input value. Use with caution. get destinationPathInput() { return this._destinationPath; } } exports.StorageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsOutputReference = StorageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsOutputReference; _e = JSII_RTTI_SYMBOL_1; StorageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsOutputReference[_e] = { fqn: "@cdktf/provider-google.storageInsightsReportConfig.StorageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsOutputReference", version: "14.35.1" }; function storageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersToTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } return { bucket: cdktf.stringToTerraform(struct.bucket), }; } function storageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersToHclTerraform(struct) { if (!cdktf.canInspect(struct) || cdktf.Tokenization.isResolvable(struct)) { return struct; } if (cdktf.isComplexElement(struct)) { throw new Error("A complex element was used as configuration, this is not supported: https://cdk.tf/complex-object-as-configuration"); } const attrs = { bucket: { value: cdktf.stringToHclTerraform(struct.bucket), isBlock: false, type: "simple", storageClassType: "string", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class StorageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._bucket !== undefined) { hasAnyValues = true; internalValueResult.bucket = this._bucket; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._bucket = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._bucket = value.bucket; } } get bucket() { return this.getStringAttribute('bucket'); } set bucket(value) { this._bucket = value; } resetBucket() { this._bucket = undefined; } // Temporarily expose input value. Use with caution. get bucketInput() { return this._bucket; } } exports.StorageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersOutputReference = StorageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersOutputReference; _f = JSII_RTTI_SYMBOL_1; StorageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersOutputReference[_f] = { fqn: "@cdktf/provider-google.storageInsightsReportConfig.StorageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersOutputReference", version: "14.35.1" }; function storageInsightsReportConfigObjectMetadataReportOptionsToTerraform(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 { metadata_fields: cdktf.listMapper(cdktf.stringToTerraform, false)(struct.metadataFields), storage_destination_options: storageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsToTerraform(struct.storageDestinationOptions), storage_filters: storageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersToTerraform(struct.storageFilters), }; } function storageInsightsReportConfigObjectMetadataReportOptionsToHclTerraform(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 = { metadata_fields: { value: cdktf.listMapperHcl(cdktf.stringToHclTerraform, false)(struct.metadataFields), isBlock: false, type: "list", storageClassType: "stringList", }, storage_destination_options: { value: storageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsToHclTerraform(struct.storageDestinationOptions), isBlock: true, type: "list", storageClassType: "StorageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsList", }, storage_filters: { value: storageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersToHclTerraform(struct.storageFilters), isBlock: true, type: "list", storageClassType: "StorageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersList", }, }; // remove undefined attributes return Object.fromEntries(Object.entries(attrs).filter(([_, value]) => value !== undefined && value.value !== undefined)); } class StorageInsightsReportConfigObjectMetadataReportOptionsOutputReference 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; // storage_destination_options - computed: false, optional: false, required: true this._storageDestinationOptions = new StorageInsightsReportConfigObjectMetadataReportOptionsStorageDestinationOptionsOutputReference(this, "storage_destination_options"); // storage_filters - computed: false, optional: true, required: false this._storageFilters = new StorageInsightsReportConfigObjectMetadataReportOptionsStorageFiltersOutputReference(this, "storage_filters"); } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; if (this._metadataFields !== undefined) { hasAnyValues = true; internalValueResult.metadataFields = this._metadataFields; } if (this._storageDestinationOptions?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.storageDestinationOptions = this._storageDestinationOptions?.internalValue; } if (this._storageFilters?.internalValue !== undefined) { hasAnyValues = true; internalValueResult.storageFilters = this._storageFilters?.internalValue; } return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; this._metadataFields = undefined; this._storageDestinationOptions.internalValue = undefined; this._storageFilters.internalValue = undefined; } else { this.isEmptyObject = Object.keys(value).length === 0; this._metadataFields = value.metadataFields; this._storageDestinationOptions.internalValue = value.storageDestinationOptions; this._storageFilters.internalValue = value.storageFilters; } } get metadataFields() { return this.getListAttribute('metadata_fields'); } set metadataFields(value) { this._metadataFields = value; } // Temporarily expose input value. Use with caution. get metadataFieldsInput() { return this._metadataFields; } get storageDestinationOptions() { return this._storageDestinationOptions; } putStorageDestinationOptions(value) { this._storageDestinationOptions.internalValue = value; } // Temporarily expose input value. Use with caution. get storageDestinationOptionsInput() { return this._storageDestinationOptions.internalValue; } get storageFilters() { return this._storageFilters; } putStorageFilters(value) { this._storageFilters.internalValue = value; } resetStorageFilters() { this._storageFilters.internalValue = undefined; } // Temporarily expose input value. Use with caution. get storageFiltersInput() { return this._storageFilters.internalValue; } } exports.StorageInsightsReportConfigObjectMetadataReportOptionsOutputReference = StorageInsightsReportConfigObjectMetadataReportOptionsOutputReference; _g = JSII_RTTI_SYMBOL_1; StorageInsightsReportConfigObjectMetadataReportOptionsOutputReference[_g] = { fqn: "@cdktf/provider-google.storageInsightsReportConfig.StorageInsightsReportConfigObjectMetadataReportOptionsOutputReference", version: "14.35.1" }; function storageInsightsReportConfigParquetOptionsToTerraform(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 {}; } function storageInsightsReportConfigParquetOptionsToHclTerraform(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; } class StorageInsightsReportConfigParquetOptionsOutputReference extends cdktf.ComplexObject { /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing */ constructor(terraformResource, terraformAttribute) { super(terraformResource, terraformAttribute, false, 0); this.isEmptyObject = false; } get internalValue() { let hasAnyValues = this.isEmptyObject; const internalValueResult = {}; return hasAnyValues ? internalValueResult : undefined; } set internalValue(value) { if (value === undefined) { this.isEmptyObject = false; } else { this.isEmptyObject = Object.keys(value).length === 0; } } } exports.StorageInsightsReportConfigParquetOptionsOutputReference = StorageInsightsReportConfigParquetOptionsOutputReference; _h = JSII_RTTI_SYMBOL_1; StorageInsightsReportConfigParquetOptionsOutputReference[_h] = { fqn: "@cdktf/provider-google.storageInsightsReportConfig.StorageInsightsReportConfigParquetOptionsOutputReference", version: "14.35.1" }; function storageInsightsReportConfigTimeoutsToTerraform(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), }; } function storageInsightsReportConfigTimeoutsToHclTerraform(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)); } class StorageInsightsReportConfigTimeoutsOutputReference 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.StorageInsightsReportConfigTimeoutsOutputReference = StorageInsightsReportConfigTimeoutsOutputReference; _j = JSII_RTTI_SYMBOL_1; StorageInsightsReportConfigTimeoutsOutputReference[_j] = { fqn: "@cdktf/provider-google.storageInsightsReportConfig.StorageInsightsReportConfigTimeoutsOutputReference", version: "14.35.1" }; /** * Represents a {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/storage_insights_report_config google_storage_insights_report_config} */ class StorageInsightsReportConfig extends cdktf.TerraformResource { // ============== // STATIC Methods // ============== /** * Generates CDKTF code for importing a StorageInsightsReportConfig 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 StorageInsightsReportConfig to import * @param importFromId The id of the existing StorageInsightsReportConfig that should be imported. Refer to the {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/storage_insights_report_config#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the StorageInsightsReportConfig to import is found */ static generateConfigForImport(scope, importToId, importFromId, provider) { return new cdktf.ImportableResource(scope, importToId, { terraformResourceType: "google_storage_insights_report_config", importId: importFromId, provider }); } // =========== // INITIALIZER // =========== /** * Create a new {@link https://registry.terraform.io/providers/hashicorp/google/6.36.1/docs/resources/storage_insights_report_config google_storage_insights_report_config} 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 StorageInsightsReportConfigConfig */ constructor(scope, id, config) { super(scope, id, { terraformResourceType: 'google_storage_insights_report_config', terraformGeneratorMetadata: { providerName: 'google', providerVersion: '6.36.1', providerVersionConstraint: '~> 6.0' }, provider: config.provider, dependsOn: config.dependsOn, count: config.count, lifecycle: config.lifecycle, provisioners: config.provisioners, connection: config.connection, forEach: config.forEach }); // csv_options - computed: false, optional: true, required: false this._csvOptions = new StorageInsightsReportConfigCsvOptionsOutputReference(this, "csv_options"); // frequency_options - computed: false, optional: true, required: false this._frequencyOptions = new StorageInsightsReportConfigFrequencyOptionsOutputReference(this, "frequency_options"); // object_metadata_report_options - computed: false, optional: true, required: false this._objectMetadataReportOptions = new StorageInsightsReportConfigObjectMetadataReportOptionsOutputReference(this, "object_metadata_report_options"); // parquet_options - computed: false, optional: true, required: false this._parquetOptions = new StorageInsightsReportConfigParquetOptionsOutputReference(this, "parquet_options"); // timeouts - computed: false, optional: true, required: false this._timeouts = new StorageInsightsReportConfigTimeoutsOutputReference(this, "timeouts"); this._displayName = config.displayName; this._id = config.id; this._location = config.location; this._project = config.project; this._csvOptions.internalValue = config.csvOptions; this._frequencyOptions.internalValue = config.frequencyOptions; this._objectMetadataReportOptions.internalValue = config.objectMetadataReportOptions; this._parquetOptions.internalValue = config.parquetOptions; this._timeouts.internalValue = config.timeouts; } 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 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 csvOptions() { return this._csvOptions; } putCsvOptions(value) { this._csvOptions.internalValue = value; } resetCsvOptions() { this._csvOptions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get csvOptionsInput() { return this._csvOptions.internalValue; } get frequencyOptions() { return this._frequencyOptions; } putFrequencyOptions(value) { this._frequencyOptions.internalValue = value; } resetFrequencyOptions() { this._frequencyOptions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get frequencyOptionsInput() { return this._frequencyOptions.internalValue; } get objectMetadataReportOptions() { return this._objectMetadataReportOptions; } putObjectMetadataReportOptions(value) { this._objectMetadataReportOptions.internalValue = value; } resetObjectMetadataReportOptions() { this._objectMetadataReportOptions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get objectMetadataReportOptionsInput() { return this._objectMetadataReportOptions.internalValue; } get parquetOptions() { return this._parquetOptions; } putParquetOptions(value) { this._parquetOptions.internalValue = value; } resetParquetOptions() { this._parquetOptions.internalValue = undefined; } // Temporarily expose input value. Use with caution. get parquetOptionsInput() { return this._parquetOptions.internalValue; } get timeouts() { return this._timeouts; } putTimeouts(value) { this._timeouts.internalValue = value; } resetTimeouts() { this._timeouts.internalValue = undefined; } // Temporarily expose input value. Use with caution. get timeoutsInput() { return this._timeouts.internalValue; } // ========= // SYNTHESIS // ========= synthesizeAttributes() { return { display_name: cdktf.stringToTerraform(this._displayName), id: cdktf.stringToTerraform(this._id), location: cdktf.stringToTerraform(this._location), project: cdktf.stringToTerraform(this._project), csv_options: storageInsightsReportConfigCsvOptionsToTerraform(this._csvOptions.internalValue), frequency_options: storageInsightsReportConfigFrequencyOptionsToTerraform(this._frequencyOptions.internalValue), object_metadata_report_options: storageInsightsReportConfigObjectMetadataReportOptionsToTerraform(this._objectMetadataReportOptions.internalValue), parquet_options: storageInsightsReportConfigParquetOptionsToTerraform(this._parquetOptions.internalValue), timeouts: storageInsightsReportConfigTimeoutsToTerraform(this._timeou