export function toJson_CfnUserProps()

in packages/@cdk-cloudformation/tf-azuread-user/src/index.ts [182:211]


export function toJson_CfnUserProps(obj: CfnUserProps | undefined): Record<string, any> | undefined {
  if (obj === undefined) { return undefined; }
  const result = {
    'AccountEnabled': obj.accountEnabled,
    'City': obj.city,
    'CompanyName': obj.companyName,
    'Country': obj.country,
    'Department': obj.department,
    'DisplayName': obj.displayName,
    'ForcePasswordChange': obj.forcePasswordChange,
    'GivenName': obj.givenName,
    'ImmutableId': obj.immutableId,
    'JobTitle': obj.jobTitle,
    'MailNickname': obj.mailNickname,
    'Mobile': obj.mobile,
    'MobilePhone': obj.mobilePhone,
    'OfficeLocation': obj.officeLocation,
    'OnpremisesImmutableId': obj.onpremisesImmutableId,
    'Password': obj.password,
    'PhysicalDeliveryOfficeName': obj.physicalDeliveryOfficeName,
    'PostalCode': obj.postalCode,
    'State': obj.state,
    'StreetAddress': obj.streetAddress,
    'Surname': obj.surname,
    'UsageLocation': obj.usageLocation,
    'UserPrincipalName': obj.userPrincipalName,
  };
  // filter undefined values
  return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}