Skip to content

Commit 828e6d9

Browse files
authored
chore: generate new sdk (#128)
PR: #128
1 parent 08d1a89 commit 828e6d9

File tree

260 files changed

+4716
-16422
lines changed

Some content is hidden

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

260 files changed

+4716
-16422
lines changed

xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIGatewayError.kt

Lines changed: 9 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,80 +13,43 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
/**
17-
*
18-
* Please note:
19-
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20-
* Do not edit this file manually.
21-
*
22-
*/
23-
24-
@file:Suppress(
25-
"ArrayInDataClass",
26-
"EnumEntryName",
27-
"RemoveRedundantQualifierName",
28-
"UnusedImport"
29-
)
30-
3116
package com.expediagroup.sdk.xap.models
3217

33-
import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException
3418
import com.fasterxml.jackson.annotation.JsonProperty
35-
import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator
36-
import javax.validation.Valid
37-
import javax.validation.Validation
3819

3920
/**
40-
*
21+
*
4122
* @param message
42-
*/
23+
*/
4324
data class APIGatewayError(
4425
@JsonProperty("message")
45-
@field:Valid
46-
val message: kotlin.String? = null
26+
val message: kotlin.String? = null,
4727
) {
28+
init {
29+
}
30+
4831
companion object {
4932
@JvmStatic
5033
fun builder() = Builder()
5134
}
5235

5336
class Builder(
54-
private var message: kotlin.String? = null
37+
private var message: kotlin.String? = null,
5538
) {
5639
fun message(message: kotlin.String?) = apply { this.message = message }
5740

5841
fun build(): APIGatewayError {
5942
val instance =
6043
APIGatewayError(
61-
message = message
44+
message = message,
6245
)
6346

64-
validate(instance)
65-
6647
return instance
6748
}
68-
69-
private fun validate(instance: APIGatewayError) {
70-
val validator =
71-
Validation
72-
.byDefaultProvider()
73-
.configure()
74-
.messageInterpolator(ParameterMessageInterpolator())
75-
.buildValidatorFactory()
76-
.validator
77-
78-
val violations = validator.validate(instance)
79-
80-
if (violations.isNotEmpty()) {
81-
throw PropertyConstraintViolationException(
82-
constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" }
83-
)
84-
}
85-
}
8649
}
8750

8851
fun toBuilder() =
8952
Builder(
90-
message = message
53+
message = message,
9154
)
9255
}

xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/APIMError.kt

Lines changed: 9 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -13,80 +13,43 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
/**
17-
*
18-
* Please note:
19-
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20-
* Do not edit this file manually.
21-
*
22-
*/
23-
24-
@file:Suppress(
25-
"ArrayInDataClass",
26-
"EnumEntryName",
27-
"RemoveRedundantQualifierName",
28-
"UnusedImport"
29-
)
30-
3116
package com.expediagroup.sdk.xap.models
3217

33-
import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException
3418
import com.fasterxml.jackson.annotation.JsonProperty
35-
import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator
36-
import javax.validation.Valid
37-
import javax.validation.Validation
3819

3920
/**
40-
*
21+
*
4122
* @param message
42-
*/
23+
*/
4324
data class APIMError(
4425
@JsonProperty("message")
45-
@field:Valid
46-
val message: kotlin.String? = null
26+
val message: kotlin.String? = null,
4727
) {
28+
init {
29+
}
30+
4831
companion object {
4932
@JvmStatic
5033
fun builder() = Builder()
5134
}
5235

5336
class Builder(
54-
private var message: kotlin.String? = null
37+
private var message: kotlin.String? = null,
5538
) {
5639
fun message(message: kotlin.String?) = apply { this.message = message }
5740

5841
fun build(): APIMError {
5942
val instance =
6043
APIMError(
61-
message = message
44+
message = message,
6245
)
6346

64-
validate(instance)
65-
6647
return instance
6748
}
68-
69-
private fun validate(instance: APIMError) {
70-
val validator =
71-
Validation
72-
.byDefaultProvider()
73-
.configure()
74-
.messageInterpolator(ParameterMessageInterpolator())
75-
.buildValidatorFactory()
76-
.validator
77-
78-
val violations = validator.validate(instance)
79-
80-
if (violations.isNotEmpty()) {
81-
throw PropertyConstraintViolationException(
82-
constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" }
83-
)
84-
}
85-
}
8649
}
8750

8851
fun toBuilder() =
8952
Builder(
90-
message = message
53+
message = message,
9154
)
9255
}

xap-sdk/src/main/kotlin/com/expediagroup/sdk/xap/models/ActivitiesAddress.kt

Lines changed: 9 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -13,69 +13,46 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
/**
17-
*
18-
* Please note:
19-
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20-
* Do not edit this file manually.
21-
*
22-
*/
23-
24-
@file:Suppress(
25-
"ArrayInDataClass",
26-
"EnumEntryName",
27-
"RemoveRedundantQualifierName",
28-
"UnusedImport"
29-
)
30-
3116
package com.expediagroup.sdk.xap.models
3217

33-
import com.expediagroup.sdk.core.model.exception.client.PropertyConstraintViolationException
3418
import com.fasterxml.jackson.annotation.JsonProperty
35-
import org.hibernate.validator.messageinterpolation.ParameterMessageInterpolator
36-
import javax.validation.Valid
37-
import javax.validation.Validation
3819

3920
/**
40-
* Address information
21+
* Address information
4122
* @param address1 Street Number, Street Name, or PO Box.
4223
* @param address2 Apartment, Floor, Suite, Bldg
4324
* @param suite Suite/apartment number
4425
* @param city The city
4526
* @param province The state or province.
4627
* @param country 3-letter code for the country.
4728
* @param postalCode Zip/postal code.
48-
*/
29+
*/
4930
data class ActivitiesAddress(
5031
// Street Number, Street Name, or PO Box.
5132
@JsonProperty("Address1")
52-
@field:Valid
5333
val address1: kotlin.String? = null,
5434
// Apartment, Floor, Suite, Bldg
5535
@JsonProperty("Address2")
56-
@field:Valid
5736
val address2: kotlin.String? = null,
5837
// Suite/apartment number
5938
@JsonProperty("Suite")
60-
@field:Valid
6139
val suite: kotlin.String? = null,
6240
// The city
6341
@JsonProperty("City")
64-
@field:Valid
6542
val city: kotlin.String? = null,
6643
// The state or province.
6744
@JsonProperty("Province")
68-
@field:Valid
6945
val province: kotlin.String? = null,
7046
// 3-letter code for the country.
7147
@JsonProperty("Country")
72-
@field:Valid
7348
val country: kotlin.String? = null,
7449
// Zip/postal code.
7550
@JsonProperty("PostalCode")
76-
@field:Valid
77-
val postalCode: kotlin.String? = null
51+
val postalCode: kotlin.String? = null,
7852
) {
53+
init {
54+
}
55+
7956
companion object {
8057
@JvmStatic
8158
fun builder() = Builder()
@@ -88,7 +65,7 @@ data class ActivitiesAddress(
8865
private var city: kotlin.String? = null,
8966
private var province: kotlin.String? = null,
9067
private var country: kotlin.String? = null,
91-
private var postalCode: kotlin.String? = null
68+
private var postalCode: kotlin.String? = null,
9269
) {
9370
fun address1(address1: kotlin.String?) = apply { this.address1 = address1 }
9471

@@ -113,31 +90,11 @@ data class ActivitiesAddress(
11390
city = city,
11491
province = province,
11592
country = country,
116-
postalCode = postalCode
93+
postalCode = postalCode,
11794
)
11895

119-
validate(instance)
120-
12196
return instance
12297
}
123-
124-
private fun validate(instance: ActivitiesAddress) {
125-
val validator =
126-
Validation
127-
.byDefaultProvider()
128-
.configure()
129-
.messageInterpolator(ParameterMessageInterpolator())
130-
.buildValidatorFactory()
131-
.validator
132-
133-
val violations = validator.validate(instance)
134-
135-
if (violations.isNotEmpty()) {
136-
throw PropertyConstraintViolationException(
137-
constraintViolations = violations.map { "${it.propertyPath}: ${it.message}" }
138-
)
139-
}
140-
}
14198
}
14299

143100
fun toBuilder() =
@@ -148,6 +105,6 @@ data class ActivitiesAddress(
148105
city = city,
149106
province = province,
150107
country = country,
151-
postalCode = postalCode
108+
postalCode = postalCode,
152109
)
153110
}

0 commit comments

Comments
 (0)