|
| 1 | +package com.mindee.product.us.driverlicense; |
| 2 | + |
| 3 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
| 4 | +import com.fasterxml.jackson.annotation.JsonProperty; |
| 5 | +import com.mindee.parsing.SummaryHelper; |
| 6 | +import com.mindee.parsing.standard.DateField; |
| 7 | +import com.mindee.parsing.standard.StringField; |
| 8 | +import lombok.EqualsAndHashCode; |
| 9 | +import lombok.Getter; |
| 10 | + |
| 11 | +/** |
| 12 | + * Document data for Driver License, API version 1. |
| 13 | + */ |
| 14 | +@Getter |
| 15 | +@EqualsAndHashCode |
| 16 | +@JsonIgnoreProperties(ignoreUnknown = true) |
| 17 | +public class DriverLicenseV1Document { |
| 18 | + |
| 19 | + /** |
| 20 | + * US driver license holders address |
| 21 | + */ |
| 22 | + @JsonProperty("address") |
| 23 | + private StringField address; |
| 24 | + /** |
| 25 | + * US driver license holders date of birth |
| 26 | + */ |
| 27 | + @JsonProperty("date_of_birth") |
| 28 | + private DateField dateOfBirth; |
| 29 | + /** |
| 30 | + * Document Discriminator Number of the US Driver License |
| 31 | + */ |
| 32 | + @JsonProperty("dd_number") |
| 33 | + private StringField ddNumber; |
| 34 | + /** |
| 35 | + * US driver license holders class |
| 36 | + */ |
| 37 | + @JsonProperty("dl_class") |
| 38 | + private StringField dlClass; |
| 39 | + /** |
| 40 | + * ID number of the US Driver License. |
| 41 | + */ |
| 42 | + @JsonProperty("driver_license_id") |
| 43 | + private StringField driverLicenseId; |
| 44 | + /** |
| 45 | + * US driver license holders endorsements |
| 46 | + */ |
| 47 | + @JsonProperty("endorsements") |
| 48 | + private StringField endorsements; |
| 49 | + /** |
| 50 | + * Date on which the documents expires. |
| 51 | + */ |
| 52 | + @JsonProperty("expiry_date") |
| 53 | + private DateField expiryDate; |
| 54 | + /** |
| 55 | + * US driver license holders eye colour |
| 56 | + */ |
| 57 | + @JsonProperty("eye_color") |
| 58 | + private StringField eyeColor; |
| 59 | + /** |
| 60 | + * US driver license holders first name(s) |
| 61 | + */ |
| 62 | + @JsonProperty("first_name") |
| 63 | + private StringField firstName; |
| 64 | + /** |
| 65 | + * US driver license holders hair colour |
| 66 | + */ |
| 67 | + @JsonProperty("hair_color") |
| 68 | + private StringField hairColor; |
| 69 | + /** |
| 70 | + * US driver license holders hight |
| 71 | + */ |
| 72 | + @JsonProperty("height") |
| 73 | + private StringField height; |
| 74 | + /** |
| 75 | + * Date on which the documents was issued. |
| 76 | + */ |
| 77 | + @JsonProperty("issued_date") |
| 78 | + private DateField issuedDate; |
| 79 | + /** |
| 80 | + * US driver license holders last name |
| 81 | + */ |
| 82 | + @JsonProperty("last_name") |
| 83 | + private StringField lastName; |
| 84 | + /** |
| 85 | + * US driver license holders restrictions |
| 86 | + */ |
| 87 | + @JsonProperty("restrictions") |
| 88 | + private StringField restrictions; |
| 89 | + /** |
| 90 | + * US driver license holders gender |
| 91 | + */ |
| 92 | + @JsonProperty("sex") |
| 93 | + private StringField sex; |
| 94 | + /** |
| 95 | + * US State |
| 96 | + */ |
| 97 | + @JsonProperty("state") |
| 98 | + private StringField state; |
| 99 | + /** |
| 100 | + * US driver license holders weight |
| 101 | + */ |
| 102 | + @JsonProperty("weight") |
| 103 | + private StringField weight; |
| 104 | + |
| 105 | + @Override |
| 106 | + public String toString() { |
| 107 | + StringBuilder outStr = new StringBuilder(); |
| 108 | + outStr.append( |
| 109 | + String.format(":State: %s%n", this.getState()) |
| 110 | + ); |
| 111 | + outStr.append( |
| 112 | + String.format(":Driver License ID: %s%n", this.getDriverLicenseId()) |
| 113 | + ); |
| 114 | + outStr.append( |
| 115 | + String.format(":Expiry Date: %s%n", this.getExpiryDate()) |
| 116 | + ); |
| 117 | + outStr.append( |
| 118 | + String.format(":Date Of Issue: %s%n", this.getIssuedDate()) |
| 119 | + ); |
| 120 | + outStr.append( |
| 121 | + String.format(":Last Name: %s%n", this.getLastName()) |
| 122 | + ); |
| 123 | + outStr.append( |
| 124 | + String.format(":First Name: %s%n", this.getFirstName()) |
| 125 | + ); |
| 126 | + outStr.append( |
| 127 | + String.format(":Address: %s%n", this.getAddress()) |
| 128 | + ); |
| 129 | + outStr.append( |
| 130 | + String.format(":Date Of Birth: %s%n", this.getDateOfBirth()) |
| 131 | + ); |
| 132 | + outStr.append( |
| 133 | + String.format(":Restrictions: %s%n", this.getRestrictions()) |
| 134 | + ); |
| 135 | + outStr.append( |
| 136 | + String.format(":Endorsements: %s%n", this.getEndorsements()) |
| 137 | + ); |
| 138 | + outStr.append( |
| 139 | + String.format(":Driver License Class: %s%n", this.getDlClass()) |
| 140 | + ); |
| 141 | + outStr.append( |
| 142 | + String.format(":Sex: %s%n", this.getSex()) |
| 143 | + ); |
| 144 | + outStr.append( |
| 145 | + String.format(":Height: %s%n", this.getHeight()) |
| 146 | + ); |
| 147 | + outStr.append( |
| 148 | + String.format(":Weight: %s%n", this.getWeight()) |
| 149 | + ); |
| 150 | + outStr.append( |
| 151 | + String.format(":Hair Color: %s%n", this.getHairColor()) |
| 152 | + ); |
| 153 | + outStr.append( |
| 154 | + String.format(":Eye Color: %s%n", this.getEyeColor()) |
| 155 | + ); |
| 156 | + outStr.append( |
| 157 | + String.format(":Document Discriminator: %s%n", this.getDdNumber()) |
| 158 | + ); |
| 159 | + return SummaryHelper.cleanSummary(outStr.toString()); |
| 160 | + } |
| 161 | +} |
0 commit comments