commonMain.aws.sdk.kotlin.services.codeartifact.model.LicenseInfo.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of codeartifact-jvm Show documentation
Show all versions of codeartifact-jvm Show documentation
The AWS SDK for Kotlin client for codeartifact
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.codeartifact.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* Details of the license data.
*/
public class LicenseInfo private constructor(builder: Builder) {
/**
* Name of the license.
*/
public val name: kotlin.String? = builder.name
/**
* The URL for license data.
*/
public val url: kotlin.String? = builder.url
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.codeartifact.model.LicenseInfo = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("LicenseInfo(")
append("name=$name,")
append("url=$url")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = name?.hashCode() ?: 0
result = 31 * result + (url?.hashCode() ?: 0)
return result
}
override fun equals(other: kotlin.Any?): kotlin.Boolean {
if (this === other) return true
if (other == null || this::class != other::class) return false
other as LicenseInfo
if (name != other.name) return false
if (url != other.url) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.codeartifact.model.LicenseInfo = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Name of the license.
*/
public var name: kotlin.String? = null
/**
* The URL for license data.
*/
public var url: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.codeartifact.model.LicenseInfo) : this() {
this.name = x.name
this.url = x.url
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.codeartifact.model.LicenseInfo = LicenseInfo(this)
internal fun correctErrors(): Builder {
return this
}
}
}