@@ -14,6 +14,8 @@ import kotlin.jvm.optionals.getOrNull
1414class BrandRetrieveNaicsParams
1515private constructor (
1616 private val input: String ,
17+ private val maxResults: Long? ,
18+ private val minResults: Long? ,
1719 private val timeoutMs: Long? ,
1820 private val additionalHeaders: Headers ,
1921 private val additionalQueryParams: QueryParams ,
@@ -26,6 +28,12 @@ private constructor(
2628 */
2729 fun input (): String = input
2830
31+ /* * Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults to 5. */
32+ fun maxResults (): Optional <Long > = Optional .ofNullable(maxResults)
33+
34+ /* * Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1. */
35+ fun minResults (): Optional <Long > = Optional .ofNullable(minResults)
36+
2937 /* *
3038 * Optional timeout in milliseconds for the request. If the request takes longer than this
3139 * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5
@@ -58,13 +66,17 @@ private constructor(
5866 class Builder internal constructor() {
5967
6068 private var input: String? = null
69+ private var maxResults: Long? = null
70+ private var minResults: Long? = null
6171 private var timeoutMs: Long? = null
6272 private var additionalHeaders: Headers .Builder = Headers .builder()
6373 private var additionalQueryParams: QueryParams .Builder = QueryParams .builder()
6474
6575 @JvmSynthetic
6676 internal fun from (brandRetrieveNaicsParams : BrandRetrieveNaicsParams ) = apply {
6777 input = brandRetrieveNaicsParams.input
78+ maxResults = brandRetrieveNaicsParams.maxResults
79+ minResults = brandRetrieveNaicsParams.minResults
6880 timeoutMs = brandRetrieveNaicsParams.timeoutMs
6981 additionalHeaders = brandRetrieveNaicsParams.additionalHeaders.toBuilder()
7082 additionalQueryParams = brandRetrieveNaicsParams.additionalQueryParams.toBuilder()
@@ -77,6 +89,32 @@ private constructor(
7789 */
7890 fun input (input : String ) = apply { this .input = input }
7991
92+ /* * Maximum number of NAICS codes to return. Must be between 1 and 10. Defaults to 5. */
93+ fun maxResults (maxResults : Long? ) = apply { this .maxResults = maxResults }
94+
95+ /* *
96+ * Alias for [Builder.maxResults].
97+ *
98+ * This unboxed primitive overload exists for backwards compatibility.
99+ */
100+ fun maxResults (maxResults : Long ) = maxResults(maxResults as Long? )
101+
102+ /* * Alias for calling [Builder.maxResults] with `maxResults.orElse(null)`. */
103+ fun maxResults (maxResults : Optional <Long >) = maxResults(maxResults.getOrNull())
104+
105+ /* * Minimum number of NAICS codes to return. Must be at least 1. Defaults to 1. */
106+ fun minResults (minResults : Long? ) = apply { this .minResults = minResults }
107+
108+ /* *
109+ * Alias for [Builder.minResults].
110+ *
111+ * This unboxed primitive overload exists for backwards compatibility.
112+ */
113+ fun minResults (minResults : Long ) = minResults(minResults as Long? )
114+
115+ /* * Alias for calling [Builder.minResults] with `minResults.orElse(null)`. */
116+ fun minResults (minResults : Optional <Long >) = minResults(minResults.getOrNull())
117+
80118 /* *
81119 * Optional timeout in milliseconds for the request. If the request takes longer than this
82120 * value, it will be aborted with a 408 status code. Maximum allowed value is 300000ms (5
@@ -207,6 +245,8 @@ private constructor(
207245 fun build (): BrandRetrieveNaicsParams =
208246 BrandRetrieveNaicsParams (
209247 checkRequired(" input" , input),
248+ maxResults,
249+ minResults,
210250 timeoutMs,
211251 additionalHeaders.build(),
212252 additionalQueryParams.build(),
@@ -219,6 +259,8 @@ private constructor(
219259 QueryParams .builder()
220260 .apply {
221261 put(" input" , input)
262+ maxResults?.let { put(" maxResults" , it.toString()) }
263+ minResults?.let { put(" minResults" , it.toString()) }
222264 timeoutMs?.let { put(" timeoutMS" , it.toString()) }
223265 putAll(additionalQueryParams)
224266 }
@@ -231,14 +273,23 @@ private constructor(
231273
232274 return other is BrandRetrieveNaicsParams &&
233275 input == other.input &&
276+ maxResults == other.maxResults &&
277+ minResults == other.minResults &&
234278 timeoutMs == other.timeoutMs &&
235279 additionalHeaders == other.additionalHeaders &&
236280 additionalQueryParams == other.additionalQueryParams
237281 }
238282
239283 override fun hashCode (): Int =
240- Objects .hash(input, timeoutMs, additionalHeaders, additionalQueryParams)
284+ Objects .hash(
285+ input,
286+ maxResults,
287+ minResults,
288+ timeoutMs,
289+ additionalHeaders,
290+ additionalQueryParams,
291+ )
241292
242293 override fun toString () =
243- " BrandRetrieveNaicsParams{input=$input , timeoutMs=$timeoutMs , additionalHeaders=$additionalHeaders , additionalQueryParams=$additionalQueryParams }"
294+ " BrandRetrieveNaicsParams{input=$input , maxResults= $maxResults , minResults= $minResults , timeoutMs=$timeoutMs , additionalHeaders=$additionalHeaders , additionalQueryParams=$additionalQueryParams }"
244295}
0 commit comments