All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceMethod.kt Maven / Gradle / Ivy

There is a newer version: 1.3.107
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.iot1clickdevicesservice.model

import aws.smithy.kotlin.runtime.SdkDsl

public class DeviceMethod private constructor(builder: Builder) {
    /**
     * The type of the device, such as "button".
     */
    public val deviceType: kotlin.String? = builder.deviceType
    /**
     * The name of the method applicable to the deviceType.
     */
    public val methodName: kotlin.String? = builder.methodName

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceMethod = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("DeviceMethod(")
        append("deviceType=$deviceType,")
        append("methodName=$methodName")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = deviceType?.hashCode() ?: 0
        result = 31 * result + (methodName?.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 DeviceMethod

        if (deviceType != other.deviceType) return false
        if (methodName != other.methodName) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceMethod = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The type of the device, such as "button".
         */
        public var deviceType: kotlin.String? = null
        /**
         * The name of the method applicable to the deviceType.
         */
        public var methodName: kotlin.String? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceMethod) : this() {
            this.deviceType = x.deviceType
            this.methodName = x.methodName
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.iot1clickdevicesservice.model.DeviceMethod = DeviceMethod(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy