@@ -31,15 +31,15 @@ import java.util.Optional
3131class AuthRuleV2DraftParams
3232constructor (
3333 private val authRuleToken: String ,
34- private val parameters: AuthRuleParameters ? ,
34+ private val parameters: Parameters ? ,
3535 private val additionalQueryParams: Map <String , List <String >>,
3636 private val additionalHeaders: Map <String , List <String >>,
3737 private val additionalBodyProperties: Map <String , JsonValue >,
3838) {
3939
4040 fun authRuleToken (): String = authRuleToken
4141
42- fun parameters (): Optional <AuthRuleParameters > = Optional .ofNullable(parameters)
42+ fun parameters (): Optional <Parameters > = Optional .ofNullable(parameters)
4343
4444 @JvmSynthetic
4545 internal fun getBody (): AuthRuleV2DraftBody {
@@ -61,12 +61,12 @@ constructor(
6161 @NoAutoDetect
6262 class AuthRuleV2DraftBody
6363 internal constructor (
64- private val parameters: AuthRuleParameters ? ,
64+ private val parameters: Parameters ? ,
6565 private val additionalProperties: Map <String , JsonValue >,
6666 ) {
6767
6868 /* * Parameters for the current version of the Auth Rule */
69- @JsonProperty(" parameters" ) fun parameters (): AuthRuleParameters ? = parameters
69+ @JsonProperty(" parameters" ) fun parameters (): Parameters ? = parameters
7070
7171 @JsonAnyGetter
7272 @ExcludeMissing
@@ -81,7 +81,7 @@ constructor(
8181
8282 class Builder {
8383
84- private var parameters: AuthRuleParameters ? = null
84+ private var parameters: Parameters ? = null
8585 private var additionalProperties: MutableMap <String , JsonValue > = mutableMapOf ()
8686
8787 @JvmSynthetic
@@ -92,7 +92,7 @@ constructor(
9292
9393 /* * Parameters for the current version of the Auth Rule */
9494 @JsonProperty(" parameters" )
95- fun parameters (parameters : AuthRuleParameters ) = apply { this .parameters = parameters }
95+ fun parameters (parameters : Parameters ) = apply { this .parameters = parameters }
9696
9797 fun additionalProperties (additionalProperties : Map <String , JsonValue >) = apply {
9898 this .additionalProperties.clear()
@@ -165,7 +165,7 @@ constructor(
165165 class Builder {
166166
167167 private var authRuleToken: String? = null
168- private var parameters: AuthRuleParameters ? = null
168+ private var parameters: Parameters ? = null
169169 private var additionalQueryParams: MutableMap <String , MutableList <String >> = mutableMapOf ()
170170 private var additionalHeaders: MutableMap <String , MutableList <String >> = mutableMapOf ()
171171 private var additionalBodyProperties: MutableMap <String , JsonValue > = mutableMapOf ()
@@ -182,18 +182,16 @@ constructor(
182182 fun authRuleToken (authRuleToken : String ) = apply { this .authRuleToken = authRuleToken }
183183
184184 /* * Parameters for the current version of the Auth Rule */
185- fun parameters (parameters : AuthRuleParameters ) = apply { this .parameters = parameters }
185+ fun parameters (parameters : Parameters ) = apply { this .parameters = parameters }
186186
187187 /* * Parameters for the current version of the Auth Rule */
188- fun parameters (conditionalBlockParameters : AuthRuleParameters .ConditionalBlockParameters ) =
189- apply {
190- this .parameters =
191- AuthRuleParameters .ofConditionalBlockParameters(conditionalBlockParameters)
192- }
188+ fun parameters (conditionalBlockParameters : Parameters .ConditionalBlockParameters ) = apply {
189+ this .parameters = Parameters .ofConditionalBlockParameters(conditionalBlockParameters)
190+ }
193191
194192 /* * Parameters for the current version of the Auth Rule */
195193 fun parameters (velocityLimitParams : VelocityLimitParams ) = apply {
196- this .parameters = AuthRuleParameters .ofVelocityLimitParams(velocityLimitParams)
194+ this .parameters = Parameters .ofVelocityLimitParams(velocityLimitParams)
197195 }
198196
199197 fun additionalQueryParams (additionalQueryParams : Map <String , List <String >>) = apply {
@@ -260,9 +258,9 @@ constructor(
260258 )
261259 }
262260
263- @JsonDeserialize(using = AuthRuleParameters .Deserializer ::class )
264- @JsonSerialize(using = AuthRuleParameters .Serializer ::class )
265- class AuthRuleParameters
261+ @JsonDeserialize(using = Parameters .Deserializer ::class )
262+ @JsonSerialize(using = Parameters .Serializer ::class )
263+ class Parameters
266264 private constructor (
267265 private val conditionalBlockParameters: ConditionalBlockParameters ? = null ,
268266 private val velocityLimitParams: VelocityLimitParams ? = null ,
@@ -298,10 +296,10 @@ constructor(
298296 }
299297 }
300298
301- fun validate (): AuthRuleParameters = apply {
299+ fun validate (): Parameters = apply {
302300 if (! validated) {
303301 if (conditionalBlockParameters == null && velocityLimitParams == null ) {
304- throw LithicInvalidDataException (" Unknown AuthRuleParameters : $_json " )
302+ throw LithicInvalidDataException (" Unknown Parameters : $_json " )
305303 }
306304 conditionalBlockParameters?.validate()
307305 velocityLimitParams?.validate()
@@ -314,7 +312,7 @@ constructor(
314312 return true
315313 }
316314
317- return /* spotless:off */ other is AuthRuleParameters && this .conditionalBlockParameters == other.conditionalBlockParameters && this .velocityLimitParams == other.velocityLimitParams /* spotless:on */
315+ return /* spotless:off */ other is Parameters && this .conditionalBlockParameters == other.conditionalBlockParameters && this .velocityLimitParams == other.velocityLimitParams /* spotless:on */
318316 }
319317
320318 override fun hashCode (): Int {
@@ -324,11 +322,11 @@ constructor(
324322 override fun toString (): String {
325323 return when {
326324 conditionalBlockParameters != null ->
327- " AuthRuleParameters {conditionalBlockParameters=$conditionalBlockParameters }"
325+ " Parameters {conditionalBlockParameters=$conditionalBlockParameters }"
328326 velocityLimitParams != null ->
329- " AuthRuleParameters {velocityLimitParams=$velocityLimitParams }"
330- _json != null -> " AuthRuleParameters {_unknown=$_json }"
331- else -> throw IllegalStateException (" Invalid AuthRuleParameters " )
327+ " Parameters {velocityLimitParams=$velocityLimitParams }"
328+ _json != null -> " Parameters {_unknown=$_json }"
329+ else -> throw IllegalStateException (" Invalid Parameters " )
332330 }
333331 }
334332
@@ -337,11 +335,11 @@ constructor(
337335 @JvmStatic
338336 fun ofConditionalBlockParameters (
339337 conditionalBlockParameters : ConditionalBlockParameters
340- ) = AuthRuleParameters (conditionalBlockParameters = conditionalBlockParameters)
338+ ) = Parameters (conditionalBlockParameters = conditionalBlockParameters)
341339
342340 @JvmStatic
343341 fun ofVelocityLimitParams (velocityLimitParams : VelocityLimitParams ) =
344- AuthRuleParameters (velocityLimitParams = velocityLimitParams)
342+ Parameters (velocityLimitParams = velocityLimitParams)
345343 }
346344
347345 interface Visitor <out T > {
@@ -353,32 +351,32 @@ constructor(
353351 fun visitVelocityLimitParams (velocityLimitParams : VelocityLimitParams ): T
354352
355353 fun unknown (json : JsonValue ? ): T {
356- throw LithicInvalidDataException (" Unknown AuthRuleParameters : $json " )
354+ throw LithicInvalidDataException (" Unknown Parameters : $json " )
357355 }
358356 }
359357
360- class Deserializer : BaseDeserializer <AuthRuleParameters >( AuthRuleParameters : :class) {
358+ class Deserializer : BaseDeserializer <Parameters >( Parameters : :class) {
361359
362- override fun ObjectCodec.deserialize (node : JsonNode ): AuthRuleParameters {
360+ override fun ObjectCodec.deserialize (node : JsonNode ): Parameters {
363361 val json = JsonValue .fromJsonNode(node)
364362
365363 tryDeserialize(node, jacksonTypeRef<ConditionalBlockParameters >()) { it.validate() }
366364 ?.let {
367- return AuthRuleParameters (conditionalBlockParameters = it, _json = json)
365+ return Parameters (conditionalBlockParameters = it, _json = json)
368366 }
369367 tryDeserialize(node, jacksonTypeRef<VelocityLimitParams >()) { it.validate() }
370368 ?.let {
371- return AuthRuleParameters (velocityLimitParams = it, _json = json)
369+ return Parameters (velocityLimitParams = it, _json = json)
372370 }
373371
374- return AuthRuleParameters (_json = json)
372+ return Parameters (_json = json)
375373 }
376374 }
377375
378- class Serializer : BaseSerializer <AuthRuleParameters >( AuthRuleParameters : :class) {
376+ class Serializer : BaseSerializer <Parameters >( Parameters : :class) {
379377
380378 override fun serialize (
381- value : AuthRuleParameters ,
379+ value : Parameters ,
382380 generator : JsonGenerator ,
383381 provider : SerializerProvider
384382 ) {
@@ -388,7 +386,7 @@ constructor(
388386 value.velocityLimitParams != null ->
389387 generator.writeObject(value.velocityLimitParams)
390388 value._json != null -> generator.writeObject(value._json )
391- else -> throw IllegalStateException (" Invalid AuthRuleParameters " )
389+ else -> throw IllegalStateException (" Invalid Parameters " )
392390 }
393391 }
394392 }
0 commit comments