Skip to content

Commit

Permalink
chore: reformat typed link template file (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
anssari1 authored Feb 19, 2025
1 parent db43fd2 commit 48c87ef
Showing 1 changed file with 41 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
{{#operations}}{{#operation}}{{#isLinkable}}
package com.expediagroup.sdk.{{namespace}}.operations
{{#operations}}
{{#operation}}
{{#isLinkable}}
package com.expediagroup.sdk.{{namespace}}.operations

import com.expediagroup.sdk.{{namespace}}.models.Link
import com.fasterxml.jackson.annotation.JsonProperty
import javax.validation.Valid
import com.expediagroup.sdk.{{namespace}}.models.Link
import com.fasterxml.jackson.annotation.JsonProperty
import javax.validation.Valid

data class {{classname}}Link(
// The request method used to access the link.
@JsonProperty("method")
@field:Valid
override val method: kotlin.String? = null,
// The URL for the link. This can be absolute or relative.
@JsonProperty("href")
@field:Valid
override val href: kotlin.String? = null,
// If the link expires, this will be the UTC date the link will expire, in ISO 8601 format.
@JsonProperty("expires")
@field:Valid
override val expires: kotlin.String? = null
) : Link(method, href, expires) {
companion object {
@JvmStatic
fun builder() = Builder()
}
data class {{classname}}Link(
// The request method used to access the link.
@JsonProperty("method")
@field:Valid
override val method: kotlin.String? = null,
// The URL for the link. This can be absolute or relative.
@JsonProperty("href")
@field:Valid
override val href: kotlin.String? = null,
// If the link expires, this will be the UTC date the link will expire, in ISO 8601 format.
@JsonProperty("expires")
@field:Valid
override val expires: kotlin.String? = null
) : Link(method, href, expires) {
companion object {
@JvmStatic
fun builder() = Builder()
}

class Builder(
private var method: kotlin.String? = null,
private var href: kotlin.String? = null,
private var expires: kotlin.String? = null
) {
fun build(): {{classname}}Link {
return {{classname}}Link(
method = method,
href = href,
expires = expires
)
class Builder(
private var method: kotlin.String? = null,
private var href: kotlin.String? = null,
private var expires: kotlin.String? = null
) {
fun build(): {{classname}}Link {
return {{classname}}Link(
method = method,
href = href,
expires = expires
)
}
}
}
}
}

{{/isLinkable}}{{/operation}}{{/operations}}
{{/isLinkable}}
{{/operation}}
{{/operations}}

0 comments on commit 48c87ef

Please sign in to comment.