Skip to content

Commit

Permalink
Merge pull request #1329 from jsteinich/keep_specified_empty_objects
Browse files Browse the repository at this point in the history
fix(lib): Keep specified empty objects
  • Loading branch information
DanielMSchmidt authored Dec 2, 2021
2 parents 7353ed5 + a44a451 commit 28d9fc3
Show file tree
Hide file tree
Showing 10 changed files with 50,109 additions and 36,595 deletions.
60,798 changes: 30,399 additions & 30,399 deletions packages/@cdktf/provider-generator/lib/get/__tests__/__snapshots__/provider.test.ts.snap

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ export function acmCertificateOptionsToTerraform(struct?: AcmCertificateOptionsO
}
export class AcmCertificateOptionsOutputReference extends cdktf.ComplexObject {
private isEmptyObject = false;
/**
* @param terraformResource The parent resource
* @param terraformAttribute The attribute on the parent resource this class is referencing
Expand All @@ -99,7 +101,7 @@ export class AcmCertificateOptionsOutputReference extends cdktf.ComplexObject {
}
public get internalValue(): AcmCertificateOptions | undefined {
let hasAnyValues = false;
let hasAnyValues = this.isEmptyObject;
const internalValueResult: any = {};
if (this._certificateTransparencyLoggingPreference) {
hasAnyValues = true;
Expand All @@ -110,9 +112,11 @@ export class AcmCertificateOptionsOutputReference extends cdktf.ComplexObject {
public set internalValue(value: AcmCertificateOptions | undefined) {
if (value === undefined) {
this.isEmptyObject = false;
this._certificateTransparencyLoggingPreference = undefined;
}
else {
this.isEmptyObject = Object.keys(value).length === 0;
this._certificateTransparencyLoggingPreference = value.certificateTransparencyLoggingPreference;
}
}
Expand Down
Loading

0 comments on commit 28d9fc3

Please sign in to comment.