export function toJson_LabelsDefinition()

in packages/@cdk-cloudformation/tf-google-storagebucket/src/index.ts [177:185]


export function toJson_LabelsDefinition(obj: LabelsDefinition | undefined): Record<string, any> | undefined {
  if (obj === undefined) { return undefined; }
  const result = {
    'MapKey': obj.mapKey,
    'MapValue': obj.mapValue,
  };
  // filter undefined values
  return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}