export function toJson_CfnUserProps()

in packages/@cdk-cloudformation/tf-ad-user/src/index.ts [206:250]


export function toJson_CfnUserProps(obj: CfnUserProps | undefined): Record<string, any> | undefined {
  if (obj === undefined) { return undefined; }
  const result = {
    'CannotChangePassword': obj.cannotChangePassword,
    'City': obj.city,
    'Company': obj.company,
    'Container': obj.container,
    'Country': obj.country,
    'CustomAttributes': obj.customAttributes,
    'Department': obj.department,
    'Description': obj.description,
    'DisplayName': obj.displayName,
    'Division': obj.division,
    'EmailAddress': obj.emailAddress,
    'EmployeeId': obj.employeeId,
    'EmployeeNumber': obj.employeeNumber,
    'Enabled': obj.enabled,
    'Fax': obj.fax,
    'GivenName': obj.givenName,
    'HomeDirectory': obj.homeDirectory,
    'HomeDrive': obj.homeDrive,
    'HomePage': obj.homePage,
    'HomePhone': obj.homePhone,
    'InitialPassword': obj.initialPassword,
    'Initials': obj.initials,
    'MobilePhone': obj.mobilePhone,
    'Office': obj.office,
    'OfficePhone': obj.officePhone,
    'Organization': obj.organization,
    'OtherName': obj.otherName,
    'PasswordNeverExpires': obj.passwordNeverExpires,
    'PoBox': obj.poBox,
    'PostalCode': obj.postalCode,
    'PrincipalName': obj.principalName,
    'SamAccountName': obj.samAccountName,
    'SmartCardLogonRequired': obj.smartCardLogonRequired,
    'State': obj.state,
    'StreetAddress': obj.streetAddress,
    'Surname': obj.surname,
    'Title': obj.title,
    'TrustedForDelegation': obj.trustedForDelegation,
  };
  // filter undefined values
  return Object.entries(result).reduce((r, i) => (i[1] === undefined) ? r : ({ ...r, [i[0]]: i[1] }), {});
}