5353 */
5454@ javax .annotation .Generated (value = "org.openapitools.codegen.languages.JavaClientCodegen" , comments = "Generator version: 7.11.0" )
5555public class SigningDocumentsList {
56- public static final String SERIALIZED_NAME_DOCUMENTS = "documents " ;
57- @ SerializedName (SERIALIZED_NAME_DOCUMENTS )
58- @ javax .annotation .Nullable
59- private List <SigningDocument > documents = new ArrayList <>();
56+ public static final String SERIALIZED_NAME_SIGNING_DOCUMENTS = "signing_documents " ;
57+ @ SerializedName (SERIALIZED_NAME_SIGNING_DOCUMENTS )
58+ @ javax .annotation .Nonnull
59+ private List <SigningDocument > signingDocuments = new ArrayList <>();
6060
6161 public SigningDocumentsList () {
6262 }
6363
64- public SigningDocumentsList documents (@ javax .annotation .Nullable List <SigningDocument > documents ) {
65- this .documents = documents ;
64+ public SigningDocumentsList signingDocuments (@ javax .annotation .Nonnull List <SigningDocument > signingDocuments ) {
65+ this .signingDocuments = signingDocuments ;
6666 return this ;
6767 }
6868
69- public SigningDocumentsList addDocumentsItem (SigningDocument documentsItem ) {
70- if (this .documents == null ) {
71- this .documents = new ArrayList <>();
69+ public SigningDocumentsList addSigningDocumentsItem (SigningDocument signingDocumentsItem ) {
70+ if (this .signingDocuments == null ) {
71+ this .signingDocuments = new ArrayList <>();
7272 }
73- this .documents .add (documentsItem );
73+ this .signingDocuments .add (signingDocumentsItem );
7474 return this ;
7575 }
7676
7777 /**
78- * Get documents
79- * @return documents
78+ * Get signingDocuments
79+ * @return signingDocuments
8080 */
81- @ javax .annotation .Nullable
82- public List <SigningDocument > getDocuments () {
83- return documents ;
81+ @ javax .annotation .Nonnull
82+ public List <SigningDocument > getSigningDocuments () {
83+ return signingDocuments ;
8484 }
8585
86- public void setDocuments (@ javax .annotation .Nullable List <SigningDocument > documents ) {
87- this .documents = documents ;
86+ public void setSigningDocuments (@ javax .annotation .Nonnull List <SigningDocument > signingDocuments ) {
87+ this .signingDocuments = signingDocuments ;
8888 }
8989
9090 /**
@@ -142,20 +142,20 @@ public boolean equals(Object o) {
142142 return false ;
143143 }
144144 SigningDocumentsList signingDocumentsList = (SigningDocumentsList ) o ;
145- return Objects .equals (this .documents , signingDocumentsList .documents )&&
145+ return Objects .equals (this .signingDocuments , signingDocumentsList .signingDocuments )&&
146146 Objects .equals (this .additionalProperties , signingDocumentsList .additionalProperties );
147147 }
148148
149149 @ Override
150150 public int hashCode () {
151- return Objects .hash (documents , additionalProperties );
151+ return Objects .hash (signingDocuments , additionalProperties );
152152 }
153153
154154 @ Override
155155 public String toString () {
156156 StringBuilder sb = new StringBuilder ();
157157 sb .append ("class SigningDocumentsList {\n " );
158- sb .append (" documents : " ).append (toIndentedString (documents )).append ("\n " );
158+ sb .append (" signingDocuments : " ).append (toIndentedString (signingDocuments )).append ("\n " );
159159 sb .append (" additionalProperties: " ).append (toIndentedString (additionalProperties )).append ("\n " );
160160 sb .append ("}" );
161161 return sb .toString ();
@@ -179,10 +179,11 @@ private String toIndentedString(Object o) {
179179 static {
180180 // a set of all properties/fields (JSON key names)
181181 openapiFields = new HashSet <String >();
182- openapiFields .add ("documents " );
182+ openapiFields .add ("signing_documents " );
183183
184184 // a set of required properties/fields (JSON key names)
185185 openapiRequiredFields = new HashSet <String >();
186+ openapiRequiredFields .add ("signing_documents" );
186187 }
187188
188189 /**
@@ -197,21 +198,24 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
197198 throw new IllegalArgumentException (String .format ("The required field(s) %s in SigningDocumentsList is not found in the empty JSON string" , SigningDocumentsList .openapiRequiredFields .toString ()));
198199 }
199200 }
200- JsonObject jsonObj = jsonElement .getAsJsonObject ();
201- if (jsonObj .get ("documents" ) != null && !jsonObj .get ("documents" ).isJsonNull ()) {
202- JsonArray jsonArraydocuments = jsonObj .getAsJsonArray ("documents" );
203- if (jsonArraydocuments != null ) {
204- // ensure the json data is an array
205- if (!jsonObj .get ("documents" ).isJsonArray ()) {
206- throw new IllegalArgumentException (String .format ("Expected the field `documents` to be an array in the JSON string but got `%s`" , jsonObj .get ("documents" ).toString ()));
207- }
208-
209- // validate the optional field `documents` (array)
210- for (int i = 0 ; i < jsonArraydocuments .size (); i ++) {
211- SigningDocument .validateJsonElement (jsonArraydocuments .get (i ));
212- };
201+
202+ // check to make sure all required properties/fields are present in the JSON string
203+ for (String requiredField : SigningDocumentsList .openapiRequiredFields ) {
204+ if (jsonElement .getAsJsonObject ().get (requiredField ) == null ) {
205+ throw new IllegalArgumentException (String .format ("The required field `%s` is not found in the JSON string: %s" , requiredField , jsonElement .toString ()));
213206 }
214207 }
208+ JsonObject jsonObj = jsonElement .getAsJsonObject ();
209+ // ensure the json data is an array
210+ if (!jsonObj .get ("signing_documents" ).isJsonArray ()) {
211+ throw new IllegalArgumentException (String .format ("Expected the field `signing_documents` to be an array in the JSON string but got `%s`" , jsonObj .get ("signing_documents" ).toString ()));
212+ }
213+
214+ JsonArray jsonArraysigningDocuments = jsonObj .getAsJsonArray ("signing_documents" );
215+ // validate the required field `signing_documents` (array)
216+ for (int i = 0 ; i < jsonArraysigningDocuments .size (); i ++) {
217+ SigningDocument .validateJsonElement (jsonArraysigningDocuments .get (i ));
218+ };
215219 }
216220
217221 public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
0 commit comments