toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final commonName = this.commonName;
  final country = this.country;
  final distinguishedNameQualifier = this.distinguishedNameQualifier;
  final generationQualifier = this.generationQualifier;
  final givenName = this.givenName;
  final initials = this.initials;
  final locality = this.locality;
  final organization = this.organization;
  final organizationalUnit = this.organizationalUnit;
  final pseudonym = this.pseudonym;
  final serialNumber = this.serialNumber;
  final state = this.state;
  final surname = this.surname;
  final title = this.title;
  return {
    if (commonName != null) 'CommonName': commonName,
    if (country != null) 'Country': country,
    if (distinguishedNameQualifier != null)
      'DistinguishedNameQualifier': distinguishedNameQualifier,
    if (generationQualifier != null)
      'GenerationQualifier': generationQualifier,
    if (givenName != null) 'GivenName': givenName,
    if (initials != null) 'Initials': initials,
    if (locality != null) 'Locality': locality,
    if (organization != null) 'Organization': organization,
    if (organizationalUnit != null) 'OrganizationalUnit': organizationalUnit,
    if (pseudonym != null) 'Pseudonym': pseudonym,
    if (serialNumber != null) 'SerialNumber': serialNumber,
    if (state != null) 'State': state,
    if (surname != null) 'Surname': surname,
    if (title != null) 'Title': title,
  };
}