/**
 *
 * 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

/**
 * The avatar data to update. Partial updates are supported, so only the provided fields will be updated.
 *
 * @param rating Rating associated with the image.
 * @param altText Alternative text description of the image.
 */
@JsonClass(generateAdapter = true)
public class UpdateAvatarRequest internal constructor(
    // Rating associated with the image.
    @Json(name = "rating")
    public val rating: Rating? = null,
    // Alternative text description of the image.
    @Json(name = "alt_text")
    public val altText: kotlin.String? = null,
) {
    override fun toString(): String = "UpdateAvatarRequest(rating=$rating, altText=$altText)"

    override fun equals(other: Any?): Boolean = other is UpdateAvatarRequest &&
        rating == other.rating &&
        altText == other.altText

    override fun hashCode(): Int = Objects.hash(rating, altText)

    public class Builder {
        // Rating associated with the image.
        @set:JvmSynthetic // Hide 'void' setter from Java
        public var rating: Rating? = null

        // Alternative text description of the image.
        @set:JvmSynthetic // Hide 'void' setter from Java
        public var altText: kotlin.String? = null

        public fun setRating(rating: Rating?): Builder = apply { this.rating = rating }

        public fun setAltText(altText: kotlin.String?): Builder = apply { this.altText = altText }

        public fun build(): UpdateAvatarRequest = UpdateAvatarRequest(rating, altText)
    }
}

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