/**
 *
 * Please note:
 * This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * Do not edit this file manually.
 *
 */
package com.gravatar.restapi.models

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass
import java.util.Objects

/**
 * An interest the user has added to their profile.
 *
 * @param id The unique identifier for the interest.
 * @param name The name of the interest.
 */
@JsonClass(generateAdapter = true)
public class Interest internal constructor(
    // The unique identifier for the interest.
    @Json(name = "id")
    public val id: kotlin.Int,
    // The name of the interest.
    @Json(name = "name")
    public val name: kotlin.String,
) {
    override fun toString(): String = "Interest(id=$id, name=$name)"

    override fun equals(other: Any?): Boolean = other is Interest &&
        id == other.id &&
        name == other.name

    override fun hashCode(): Int = Objects.hash(id, name)

    public class Builder {
        // The unique identifier for the interest.
        @set:JvmSynthetic // Hide 'void' setter from Java
        public var id: kotlin.Int? = null

        // The name of the interest.
        @set:JvmSynthetic // Hide 'void' setter from Java
        public var name: kotlin.String? = null

        public fun setId(id: kotlin.Int?): Builder = apply { this.id = id }

        public fun setName(name: kotlin.String?): Builder = apply { this.name = name }

        public fun build(): Interest = Interest(id!!, name!!)
    }
}

@JvmSynthetic // Hide from Java callers who should use Builder.
public fun Interest(initializer: Interest.Builder.() -> Unit): Interest {
    return Interest.Builder().apply(initializer).build()
}
