@@ -162,9 +162,13 @@ constructor(
162162
163163 fun build (): AccountHolderResubmitBody =
164164 AccountHolderResubmitBody (
165- workflow!! ,
166- tosTimestamp!! ,
167- individual!! ,
165+ checkNotNull(workflow) { " Property `workflow` is required but was not set" },
166+ checkNotNull(tosTimestamp) {
167+ " Property `tosTimestamp` is required but was not set"
168+ },
169+ checkNotNull(individual) {
170+ " Property `individual` is required but was not set"
171+ },
168172 additionalProperties.toUnmodifiable(),
169173 )
170174 }
@@ -296,10 +300,14 @@ constructor(
296300
297301 fun build (): AccountHolderResubmitParams =
298302 AccountHolderResubmitParams (
299- accountHolderToken!! ,
300- workflow!! ,
301- tosTimestamp!! ,
302- individual!! ,
303+ checkNotNull(accountHolderToken) {
304+ " Property `accountHolderToken` is required but was not set"
305+ },
306+ checkNotNull(workflow) { " Property `workflow` is required but was not set" },
307+ checkNotNull(tosTimestamp) {
308+ " Property `tosTimestamp` is required but was not set"
309+ },
310+ checkNotNull(individual) { " Property `individual` is required but was not set" },
303311 additionalQueryParams.toUnmodifiable(),
304312 additionalHeaders.toUnmodifiable(),
305313 additionalBodyProperties.toUnmodifiable(),
@@ -531,185 +539,19 @@ constructor(
531539
532540 fun build (): Individual =
533541 Individual (
534- address!! ,
535- dob!! ,
536- email!! ,
537- firstName!! ,
538- governmentId!! ,
539- lastName!! ,
540- phoneNumber!! ,
542+ checkNotNull(address) { " Property `address` is required but was not set" },
543+ checkNotNull(dob) { " Property `dob` is required but was not set" },
544+ checkNotNull(email) { " Property `email` is required but was not set" },
545+ checkNotNull(firstName) { " Property `firstName` is required but was not set" },
546+ checkNotNull(governmentId) {
547+ " Property `governmentId` is required but was not set"
548+ },
549+ checkNotNull(lastName) { " Property `lastName` is required but was not set" },
550+ checkNotNull(phoneNumber) {
551+ " Property `phoneNumber` is required but was not set"
552+ },
541553 additionalProperties.toUnmodifiable(),
542554 )
543555 }
544-
545- /* *
546- * Individual's current address - PO boxes, UPS drops, and FedEx drops are not acceptable;
547- * APO/FPO are acceptable. Only USA addresses are currently supported.
548- */
549- @NoAutoDetect
550- class Address
551- private constructor (
552- private val address1: String? ,
553- private val address2: String? ,
554- private val city: String? ,
555- private val country: String? ,
556- private val postalCode: String? ,
557- private val state: String? ,
558- private val additionalProperties: Map <String , JsonValue >,
559- ) {
560-
561- private var hashCode: Int = 0
562-
563- /* * Valid deliverable address (no PO boxes). */
564- @JsonProperty(" address1" ) fun address1 (): String? = address1
565-
566- /* * Unit or apartment number (if applicable). */
567- @JsonProperty(" address2" ) fun address2 (): String? = address2
568-
569- /* * Name of city. */
570- @JsonProperty(" city" ) fun city (): String? = city
571-
572- /* *
573- * Valid country code. Only USA is currently supported, entered in uppercase ISO 3166-1
574- * alpha-3 three-character format.
575- */
576- @JsonProperty(" country" ) fun country (): String? = country
577-
578- /* *
579- * Valid postal code. Only USA ZIP codes are currently supported, entered as a
580- * five-digit ZIP or nine-digit ZIP+4.
581- */
582- @JsonProperty(" postal_code" ) fun postalCode (): String? = postalCode
583-
584- /* *
585- * Valid state code. Only USA state codes are currently supported, entered in uppercase
586- * ISO 3166-2 two-character format.
587- */
588- @JsonProperty(" state" ) fun state (): String? = state
589-
590- @JsonAnyGetter
591- @ExcludeMissing
592- fun _additionalProperties (): Map <String , JsonValue > = additionalProperties
593-
594- fun toBuilder () = Builder ().from(this )
595-
596- override fun equals (other : Any? ): Boolean {
597- if (this == = other) {
598- return true
599- }
600-
601- return other is Address &&
602- address1 == other.address1 &&
603- address2 == other.address2 &&
604- city == other.city &&
605- country == other.country &&
606- postalCode == other.postalCode &&
607- state == other.state &&
608- additionalProperties == other.additionalProperties
609- }
610-
611- override fun hashCode (): Int {
612- if (hashCode == 0 ) {
613- hashCode =
614- Objects .hash(
615- address1,
616- address2,
617- city,
618- country,
619- postalCode,
620- state,
621- additionalProperties,
622- )
623- }
624- return hashCode
625- }
626-
627- override fun toString () =
628- " Address{address1=$address1 , address2=$address2 , city=$city , country=$country , postalCode=$postalCode , state=$state , additionalProperties=$additionalProperties }"
629-
630- companion object {
631-
632- @JvmStatic fun builder () = Builder ()
633- }
634-
635- class Builder {
636-
637- private var address1: String? = null
638- private var address2: String? = null
639- private var city: String? = null
640- private var country: String? = null
641- private var postalCode: String? = null
642- private var state: String? = null
643- private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
644-
645- @JvmSynthetic
646- internal fun from (address : Address ) = apply {
647- this .address1 = address.address1
648- this .address2 = address.address2
649- this .city = address.city
650- this .country = address.country
651- this .postalCode = address.postalCode
652- this .state = address.state
653- additionalProperties(address.additionalProperties)
654- }
655-
656- /* * Valid deliverable address (no PO boxes). */
657- @JsonProperty(" address1" )
658- fun address1 (address1 : String ) = apply { this .address1 = address1 }
659-
660- /* * Unit or apartment number (if applicable). */
661- @JsonProperty(" address2" )
662- fun address2 (address2 : String ) = apply { this .address2 = address2 }
663-
664- /* * Name of city. */
665- @JsonProperty(" city" ) fun city (city : String ) = apply { this .city = city }
666-
667- /* *
668- * Valid country code. Only USA is currently supported, entered in uppercase ISO
669- * 3166-1 alpha-3 three-character format.
670- */
671- @JsonProperty(" country" )
672- fun country (country : String ) = apply { this .country = country }
673-
674- /* *
675- * Valid postal code. Only USA ZIP codes are currently supported, entered as a
676- * five-digit ZIP or nine-digit ZIP+4.
677- */
678- @JsonProperty(" postal_code" )
679- fun postalCode (postalCode : String ) = apply { this .postalCode = postalCode }
680-
681- /* *
682- * Valid state code. Only USA state codes are currently supported, entered in
683- * uppercase ISO 3166-2 two-character format.
684- */
685- @JsonProperty(" state" ) fun state (state : String ) = apply { this .state = state }
686-
687- fun additionalProperties (additionalProperties : Map <String , JsonValue >) = apply {
688- this .additionalProperties.clear()
689- this .additionalProperties.putAll(additionalProperties)
690- }
691-
692- @JsonAnySetter
693- fun putAdditionalProperty (key : String , value : JsonValue ) = apply {
694- this .additionalProperties.put(key, value)
695- }
696-
697- fun putAllAdditionalProperties (additionalProperties : Map <String , JsonValue >) =
698- apply {
699- this .additionalProperties.putAll(additionalProperties)
700- }
701-
702- fun build (): Address =
703- Address (
704- address1!! ,
705- address2,
706- city!! ,
707- country!! ,
708- postalCode!! ,
709- state!! ,
710- additionalProperties.toUnmodifiable(),
711- )
712- }
713- }
714556 }
715557}
0 commit comments