11package com .blockscore .models ;
22
3+ import com .fasterxml .jackson .annotation .JsonProperty ;
4+
35import org .jetbrains .annotations .NotNull ;
4- import org .jetbrains .annotations .Nullable ;
56
67/**
78 * The address model.
89 */
910public class Address {
10- @ NotNull
11+ @ JsonProperty ( "address_street1" )
1112 private String street1 ;
12-
13- @ Nullable
13+
14+ @ JsonProperty ( "address_street2" )
1415 private String street2 ;
15-
16- @ NotNull
16+
17+ @ JsonProperty ( "address_city" )
1718 private String city ;
1819
19- @ NotNull
20+ @ JsonProperty ( "address_subdivision" )
2021 private String subdivision ;
2122
22- @ NotNull
23+ @ JsonProperty ( "address_postal_code" )
2324 private String postalCode ;
24-
25- @ NotNull
25+
26+ @ JsonProperty ( "address_country_code" )
2627 private String countryCode ;
2728
2829
@@ -40,9 +41,9 @@ public Address() {
4041 * @param postalCode the postal (ZIP) code
4142 * @param countryCode the country code
4243 */
43- public Address (@ NotNull final String street1 , @ Nullable final String street2 ,
44- @ NotNull final String city , @ NotNull final String subdivision ,
45- @ NotNull final String postalCode , @ NotNull final String countryCode ) {
44+ public Address (final String street1 , final String street2 ,
45+ final String city , final String subdivision ,
46+ final String postalCode , final String countryCode ) {
4647 this .street1 = street1 ;
4748 this .street2 = street2 ;
4849 this .city = city ;
@@ -58,7 +59,7 @@ public Address(@NotNull final String street1, @Nullable final String street2,
5859 * @return this
5960 */
6061 @ NotNull
61- public Address setStreet1 (@ NotNull final String street1 ) {
62+ public Address setStreet1 (final String street1 ) {
6263 this .street1 = street1 ;
6364 return this ;
6465 }
@@ -69,8 +70,8 @@ public Address setStreet1(@NotNull final String street1) {
6970 * @param street2 Street (Line 2)
7071 * @return this
7172 */
72- @ Nullable
73- public Address setStreet2 (@ NotNull final String street2 ) {
73+ @ NotNull
74+ public Address setStreet2 (final String street2 ) {
7475 this .street2 = street2 ;
7576 return this ;
7677 }
@@ -82,7 +83,7 @@ public Address setStreet2(@NotNull final String street2) {
8283 * @return this
8384 */
8485 @ NotNull
85- public Address setCity (@ NotNull final String city ) {
86+ public Address setCity (final String city ) {
8687 this .city = city ;
8788 return this ;
8889 }
@@ -95,7 +96,7 @@ public Address setCity(@NotNull final String city) {
9596 * @return this
9697 */
9798 @ NotNull
98- public Address setSubdivision (@ NotNull final String subdivision ) {
99+ public Address setSubdivision (final String subdivision ) {
99100 this .subdivision = subdivision ;
100101 return this ;
101102 }
@@ -107,7 +108,7 @@ public Address setSubdivision(@NotNull final String subdivision) {
107108 * @return this
108109 */
109110 @ NotNull
110- public Address setPostalCode (@ NotNull final String postalCode ) {
111+ public Address setPostalCode (final String postalCode ) {
111112 this .postalCode = postalCode ;
112113 return this ;
113114 }
@@ -119,7 +120,7 @@ public Address setPostalCode(@NotNull final String postalCode) {
119120 * @return this
120121 */
121122 @ NotNull
122- public Address setCountryCode (@ NotNull final String countryCode ) {
123+ public Address setCountryCode (final String countryCode ) {
123124 this .countryCode = countryCode ;
124125 return this ;
125126 }
@@ -129,7 +130,6 @@ public Address setCountryCode(@NotNull final String countryCode) {
129130 *
130131 * @return Line 1 of the address
131132 */
132- @ NotNull
133133 public String getStreet1 () {
134134 return street1 ;
135135 }
@@ -139,7 +139,6 @@ public String getStreet1() {
139139 *
140140 * @return Line 2 of the address
141141 */
142- @ Nullable
143142 public String getStreet2 () {
144143 return street2 ;
145144 }
@@ -149,7 +148,6 @@ public String getStreet2() {
149148 *
150149 * @return the address city
151150 */
152- @ NotNull
153151 public String getCity () {
154152 return city ;
155153 }
@@ -159,7 +157,6 @@ public String getCity() {
159157 *
160158 * @return the address subdivision
161159 */
162- @ NotNull
163160 public String getSubdivision () {
164161 return subdivision ;
165162 }
@@ -169,7 +166,6 @@ public String getSubdivision() {
169166 *
170167 * @return the postal code
171168 */
172- @ NotNull
173169 public String getPostalCode () {
174170 return postalCode ;
175171 }
@@ -179,7 +175,6 @@ public String getPostalCode() {
179175 *
180176 * @return the country code
181177 */
182- @ NotNull
183178 public String getCountryCode () {
184179 return countryCode ;
185180 }
0 commit comments