Skip to content

Commit c08609a

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): codegen related update (#123)
1 parent 3163e60 commit c08609a

File tree

97 files changed

+2593
-2533
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+2593
-2533
lines changed

orb-java-core/src/main/kotlin/com/withorb/api/models/AlertCreateForCustomerParams.kt

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ constructor(
3939

4040
fun thresholds(): Optional<List<Threshold>> = Optional.ofNullable(thresholds)
4141

42+
fun _additionalHeaders(): Headers = additionalHeaders
43+
44+
fun _additionalQueryParams(): QueryParams = additionalQueryParams
45+
46+
fun _additionalBodyProperties(): Map<String, JsonValue> = additionalBodyProperties
47+
4248
@JvmSynthetic
4349
internal fun getBody(): AlertCreateForCustomerBody {
4450
return AlertCreateForCustomerBody(
@@ -157,25 +163,6 @@ constructor(
157163
"AlertCreateForCustomerBody{currency=$currency, type=$type, thresholds=$thresholds, additionalProperties=$additionalProperties}"
158164
}
159165

160-
fun _additionalHeaders(): Headers = additionalHeaders
161-
162-
fun _additionalQueryParams(): QueryParams = additionalQueryParams
163-
164-
fun _additionalBodyProperties(): Map<String, JsonValue> = additionalBodyProperties
165-
166-
override fun equals(other: Any?): Boolean {
167-
if (this === other) {
168-
return true
169-
}
170-
171-
return /* spotless:off */ other is AlertCreateForCustomerParams && customerId == other.customerId && currency == other.currency && type == other.type && thresholds == other.thresholds && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
172-
}
173-
174-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(customerId, currency, type, thresholds, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
175-
176-
override fun toString() =
177-
"AlertCreateForCustomerParams{customerId=$customerId, currency=$currency, type=$type, thresholds=$thresholds, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
178-
179166
fun toBuilder() = Builder().from(this)
180167

181168
companion object {
@@ -196,13 +183,14 @@ constructor(
196183

197184
@JvmSynthetic
198185
internal fun from(alertCreateForCustomerParams: AlertCreateForCustomerParams) = apply {
199-
this.customerId = alertCreateForCustomerParams.customerId
200-
this.currency = alertCreateForCustomerParams.currency
201-
this.type = alertCreateForCustomerParams.type
202-
this.thresholds(alertCreateForCustomerParams.thresholds ?: listOf())
203-
additionalHeaders(alertCreateForCustomerParams.additionalHeaders)
204-
additionalQueryParams(alertCreateForCustomerParams.additionalQueryParams)
205-
additionalBodyProperties(alertCreateForCustomerParams.additionalBodyProperties)
186+
customerId = alertCreateForCustomerParams.customerId
187+
currency = alertCreateForCustomerParams.currency
188+
type = alertCreateForCustomerParams.type
189+
thresholds = alertCreateForCustomerParams.thresholds?.toMutableList() ?: mutableListOf()
190+
additionalHeaders = alertCreateForCustomerParams.additionalHeaders.toBuilder()
191+
additionalQueryParams = alertCreateForCustomerParams.additionalQueryParams.toBuilder()
192+
additionalBodyProperties =
193+
alertCreateForCustomerParams.additionalBodyProperties.toMutableMap()
206194
}
207195

208196
fun customerId(customerId: String) = apply { this.customerId = customerId }
@@ -347,7 +335,7 @@ constructor(
347335
checkNotNull(customerId) { "`customerId` is required but was not set" },
348336
checkNotNull(currency) { "`currency` is required but was not set" },
349337
checkNotNull(type) { "`type` is required but was not set" },
350-
if (thresholds.size == 0) null else thresholds.toImmutable(),
338+
thresholds.toImmutable().ifEmpty { null },
351339
additionalHeaders.build(),
352340
additionalQueryParams.build(),
353341
additionalBodyProperties.toImmutable(),
@@ -512,4 +500,17 @@ constructor(
512500
override fun toString() =
513501
"Threshold{value=$value, additionalProperties=$additionalProperties}"
514502
}
503+
504+
override fun equals(other: Any?): Boolean {
505+
if (this === other) {
506+
return true
507+
}
508+
509+
return /* spotless:off */ other is AlertCreateForCustomerParams && customerId == other.customerId && currency == other.currency && type == other.type && thresholds == other.thresholds && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
510+
}
511+
512+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(customerId, currency, type, thresholds, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
513+
514+
override fun toString() =
515+
"AlertCreateForCustomerParams{customerId=$customerId, currency=$currency, type=$type, thresholds=$thresholds, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
515516
}

orb-java-core/src/main/kotlin/com/withorb/api/models/AlertCreateForExternalCustomerParams.kt

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ constructor(
3939

4040
fun thresholds(): Optional<List<Threshold>> = Optional.ofNullable(thresholds)
4141

42+
fun _additionalHeaders(): Headers = additionalHeaders
43+
44+
fun _additionalQueryParams(): QueryParams = additionalQueryParams
45+
46+
fun _additionalBodyProperties(): Map<String, JsonValue> = additionalBodyProperties
47+
4248
@JvmSynthetic
4349
internal fun getBody(): AlertCreateForExternalCustomerBody {
4450
return AlertCreateForExternalCustomerBody(
@@ -159,25 +165,6 @@ constructor(
159165
"AlertCreateForExternalCustomerBody{currency=$currency, type=$type, thresholds=$thresholds, additionalProperties=$additionalProperties}"
160166
}
161167

162-
fun _additionalHeaders(): Headers = additionalHeaders
163-
164-
fun _additionalQueryParams(): QueryParams = additionalQueryParams
165-
166-
fun _additionalBodyProperties(): Map<String, JsonValue> = additionalBodyProperties
167-
168-
override fun equals(other: Any?): Boolean {
169-
if (this === other) {
170-
return true
171-
}
172-
173-
return /* spotless:off */ other is AlertCreateForExternalCustomerParams && externalCustomerId == other.externalCustomerId && currency == other.currency && type == other.type && thresholds == other.thresholds && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
174-
}
175-
176-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(externalCustomerId, currency, type, thresholds, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
177-
178-
override fun toString() =
179-
"AlertCreateForExternalCustomerParams{externalCustomerId=$externalCustomerId, currency=$currency, type=$type, thresholds=$thresholds, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
180-
181168
fun toBuilder() = Builder().from(this)
182169

183170
companion object {
@@ -200,13 +187,16 @@ constructor(
200187
internal fun from(
201188
alertCreateForExternalCustomerParams: AlertCreateForExternalCustomerParams
202189
) = apply {
203-
this.externalCustomerId = alertCreateForExternalCustomerParams.externalCustomerId
204-
this.currency = alertCreateForExternalCustomerParams.currency
205-
this.type = alertCreateForExternalCustomerParams.type
206-
this.thresholds(alertCreateForExternalCustomerParams.thresholds ?: listOf())
207-
additionalHeaders(alertCreateForExternalCustomerParams.additionalHeaders)
208-
additionalQueryParams(alertCreateForExternalCustomerParams.additionalQueryParams)
209-
additionalBodyProperties(alertCreateForExternalCustomerParams.additionalBodyProperties)
190+
externalCustomerId = alertCreateForExternalCustomerParams.externalCustomerId
191+
currency = alertCreateForExternalCustomerParams.currency
192+
type = alertCreateForExternalCustomerParams.type
193+
thresholds =
194+
alertCreateForExternalCustomerParams.thresholds?.toMutableList() ?: mutableListOf()
195+
additionalHeaders = alertCreateForExternalCustomerParams.additionalHeaders.toBuilder()
196+
additionalQueryParams =
197+
alertCreateForExternalCustomerParams.additionalQueryParams.toBuilder()
198+
additionalBodyProperties =
199+
alertCreateForExternalCustomerParams.additionalBodyProperties.toMutableMap()
210200
}
211201

212202
fun externalCustomerId(externalCustomerId: String) = apply {
@@ -355,7 +345,7 @@ constructor(
355345
},
356346
checkNotNull(currency) { "`currency` is required but was not set" },
357347
checkNotNull(type) { "`type` is required but was not set" },
358-
if (thresholds.size == 0) null else thresholds.toImmutable(),
348+
thresholds.toImmutable().ifEmpty { null },
359349
additionalHeaders.build(),
360350
additionalQueryParams.build(),
361351
additionalBodyProperties.toImmutable(),
@@ -520,4 +510,17 @@ constructor(
520510
override fun toString() =
521511
"Threshold{value=$value, additionalProperties=$additionalProperties}"
522512
}
513+
514+
override fun equals(other: Any?): Boolean {
515+
if (this === other) {
516+
return true
517+
}
518+
519+
return /* spotless:off */ other is AlertCreateForExternalCustomerParams && externalCustomerId == other.externalCustomerId && currency == other.currency && type == other.type && thresholds == other.thresholds && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
520+
}
521+
522+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(externalCustomerId, currency, type, thresholds, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
523+
524+
override fun toString() =
525+
"AlertCreateForExternalCustomerParams{externalCustomerId=$externalCustomerId, currency=$currency, type=$type, thresholds=$thresholds, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
523526
}

orb-java-core/src/main/kotlin/com/withorb/api/models/AlertCreateForSubscriptionParams.kt

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ constructor(
3939

4040
fun metricId(): Optional<String> = Optional.ofNullable(metricId)
4141

42+
fun _additionalHeaders(): Headers = additionalHeaders
43+
44+
fun _additionalQueryParams(): QueryParams = additionalQueryParams
45+
46+
fun _additionalBodyProperties(): Map<String, JsonValue> = additionalBodyProperties
47+
4248
@JvmSynthetic
4349
internal fun getBody(): AlertCreateForSubscriptionBody {
4450
return AlertCreateForSubscriptionBody(
@@ -159,25 +165,6 @@ constructor(
159165
"AlertCreateForSubscriptionBody{thresholds=$thresholds, type=$type, metricId=$metricId, additionalProperties=$additionalProperties}"
160166
}
161167

162-
fun _additionalHeaders(): Headers = additionalHeaders
163-
164-
fun _additionalQueryParams(): QueryParams = additionalQueryParams
165-
166-
fun _additionalBodyProperties(): Map<String, JsonValue> = additionalBodyProperties
167-
168-
override fun equals(other: Any?): Boolean {
169-
if (this === other) {
170-
return true
171-
}
172-
173-
return /* spotless:off */ other is AlertCreateForSubscriptionParams && subscriptionId == other.subscriptionId && thresholds == other.thresholds && type == other.type && metricId == other.metricId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
174-
}
175-
176-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(subscriptionId, thresholds, type, metricId, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
177-
178-
override fun toString() =
179-
"AlertCreateForSubscriptionParams{subscriptionId=$subscriptionId, thresholds=$thresholds, type=$type, metricId=$metricId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
180-
181168
fun toBuilder() = Builder().from(this)
182169

183170
companion object {
@@ -199,13 +186,15 @@ constructor(
199186
@JvmSynthetic
200187
internal fun from(alertCreateForSubscriptionParams: AlertCreateForSubscriptionParams) =
201188
apply {
202-
this.subscriptionId = alertCreateForSubscriptionParams.subscriptionId
203-
this.thresholds(alertCreateForSubscriptionParams.thresholds)
204-
this.type = alertCreateForSubscriptionParams.type
205-
this.metricId = alertCreateForSubscriptionParams.metricId
206-
additionalHeaders(alertCreateForSubscriptionParams.additionalHeaders)
207-
additionalQueryParams(alertCreateForSubscriptionParams.additionalQueryParams)
208-
additionalBodyProperties(alertCreateForSubscriptionParams.additionalBodyProperties)
189+
subscriptionId = alertCreateForSubscriptionParams.subscriptionId
190+
thresholds = alertCreateForSubscriptionParams.thresholds.toMutableList()
191+
type = alertCreateForSubscriptionParams.type
192+
metricId = alertCreateForSubscriptionParams.metricId
193+
additionalHeaders = alertCreateForSubscriptionParams.additionalHeaders.toBuilder()
194+
additionalQueryParams =
195+
alertCreateForSubscriptionParams.additionalQueryParams.toBuilder()
196+
additionalBodyProperties =
197+
alertCreateForSubscriptionParams.additionalBodyProperties.toMutableMap()
209198
}
210199

211200
fun subscriptionId(subscriptionId: String) = apply { this.subscriptionId = subscriptionId }
@@ -348,8 +337,7 @@ constructor(
348337
fun build(): AlertCreateForSubscriptionParams =
349338
AlertCreateForSubscriptionParams(
350339
checkNotNull(subscriptionId) { "`subscriptionId` is required but was not set" },
351-
checkNotNull(thresholds) { "`thresholds` is required but was not set" }
352-
.toImmutable(),
340+
thresholds.toImmutable(),
353341
checkNotNull(type) { "`type` is required but was not set" },
354342
metricId,
355343
additionalHeaders.build(),
@@ -516,4 +504,17 @@ constructor(
516504

517505
fun asString(): String = _value().asStringOrThrow()
518506
}
507+
508+
override fun equals(other: Any?): Boolean {
509+
if (this === other) {
510+
return true
511+
}
512+
513+
return /* spotless:off */ other is AlertCreateForSubscriptionParams && subscriptionId == other.subscriptionId && thresholds == other.thresholds && type == other.type && metricId == other.metricId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
514+
}
515+
516+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(subscriptionId, thresholds, type, metricId, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
517+
518+
override fun toString() =
519+
"AlertCreateForSubscriptionParams{subscriptionId=$subscriptionId, thresholds=$thresholds, type=$type, metricId=$metricId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
519520
}

orb-java-core/src/main/kotlin/com/withorb/api/models/AlertDisableParams.kt

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ constructor(
2121

2222
fun alertConfigurationId(): String = alertConfigurationId
2323

24+
fun _additionalHeaders(): Headers = additionalHeaders
25+
26+
fun _additionalQueryParams(): QueryParams = additionalQueryParams
27+
28+
fun _additionalBodyProperties(): Map<String, JsonValue> = additionalBodyProperties
29+
2430
@JvmSynthetic
2531
internal fun getBody(): Optional<Map<String, JsonValue>> {
2632
return Optional.ofNullable(additionalBodyProperties.ifEmpty { null })
@@ -37,25 +43,6 @@ constructor(
3743
}
3844
}
3945

40-
fun _additionalHeaders(): Headers = additionalHeaders
41-
42-
fun _additionalQueryParams(): QueryParams = additionalQueryParams
43-
44-
fun _additionalBodyProperties(): Map<String, JsonValue> = additionalBodyProperties
45-
46-
override fun equals(other: Any?): Boolean {
47-
if (this === other) {
48-
return true
49-
}
50-
51-
return /* spotless:off */ other is AlertDisableParams && alertConfigurationId == other.alertConfigurationId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
52-
}
53-
54-
override fun hashCode(): Int = /* spotless:off */ Objects.hash(alertConfigurationId, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
55-
56-
override fun toString() =
57-
"AlertDisableParams{alertConfigurationId=$alertConfigurationId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
58-
5946
fun toBuilder() = Builder().from(this)
6047

6148
companion object {
@@ -73,10 +60,10 @@ constructor(
7360

7461
@JvmSynthetic
7562
internal fun from(alertDisableParams: AlertDisableParams) = apply {
76-
this.alertConfigurationId = alertDisableParams.alertConfigurationId
77-
additionalHeaders(alertDisableParams.additionalHeaders)
78-
additionalQueryParams(alertDisableParams.additionalQueryParams)
79-
additionalBodyProperties(alertDisableParams.additionalBodyProperties)
63+
alertConfigurationId = alertDisableParams.alertConfigurationId
64+
additionalHeaders = alertDisableParams.additionalHeaders.toBuilder()
65+
additionalQueryParams = alertDisableParams.additionalQueryParams.toBuilder()
66+
additionalBodyProperties = alertDisableParams.additionalBodyProperties.toMutableMap()
8067
}
8168

8269
fun alertConfigurationId(alertConfigurationId: String) = apply {
@@ -213,4 +200,17 @@ constructor(
213200
additionalBodyProperties.toImmutable(),
214201
)
215202
}
203+
204+
override fun equals(other: Any?): Boolean {
205+
if (this === other) {
206+
return true
207+
}
208+
209+
return /* spotless:off */ other is AlertDisableParams && alertConfigurationId == other.alertConfigurationId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams && additionalBodyProperties == other.additionalBodyProperties /* spotless:on */
210+
}
211+
212+
override fun hashCode(): Int = /* spotless:off */ Objects.hash(alertConfigurationId, additionalHeaders, additionalQueryParams, additionalBodyProperties) /* spotless:on */
213+
214+
override fun toString() =
215+
"AlertDisableParams{alertConfigurationId=$alertConfigurationId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams, additionalBodyProperties=$additionalBodyProperties}"
216216
}

0 commit comments

Comments
 (0)