
commonMain.aws.sdk.kotlin.services.iottwinmaker.model.PropertySummary.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iottwinmaker.model
/**
* This is an object that contains the information of a property.
*/
public class PropertySummary private constructor(builder: Builder) {
/**
* This flag notes whether all values of a list or map type property are returned in the API response. The maximum number of values per property returned is 50.
*/
public val areAllPropertyValuesReturned: kotlin.Boolean? = builder.areAllPropertyValuesReturned
/**
* This is the schema for the property.
*/
public val definition: aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse? = builder.definition
/**
* This is the name of the property.
*/
public val propertyName: kotlin.String = requireNotNull(builder.propertyName) { "A non-null value must be provided for propertyName" }
/**
* This is the value for the property.
*/
public val value: aws.sdk.kotlin.services.iottwinmaker.model.DataValue? = builder.value
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iottwinmaker.model.PropertySummary = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("PropertySummary(")
append("areAllPropertyValuesReturned=$areAllPropertyValuesReturned,")
append("definition=$definition,")
append("propertyName=$propertyName,")
append("value=$value")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = areAllPropertyValuesReturned?.hashCode() ?: 0
result = 31 * result + (definition?.hashCode() ?: 0)
result = 31 * result + (propertyName.hashCode())
result = 31 * result + (value?.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 PropertySummary
if (areAllPropertyValuesReturned != other.areAllPropertyValuesReturned) return false
if (definition != other.definition) return false
if (propertyName != other.propertyName) return false
if (value != other.value) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iottwinmaker.model.PropertySummary = Builder(this).apply(block).build()
public class Builder {
/**
* This flag notes whether all values of a list or map type property are returned in the API response. The maximum number of values per property returned is 50.
*/
public var areAllPropertyValuesReturned: kotlin.Boolean? = null
/**
* This is the schema for the property.
*/
public var definition: aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse? = null
/**
* This is the name of the property.
*/
public var propertyName: kotlin.String? = null
/**
* This is the value for the property.
*/
public var value: aws.sdk.kotlin.services.iottwinmaker.model.DataValue? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iottwinmaker.model.PropertySummary) : this() {
this.areAllPropertyValuesReturned = x.areAllPropertyValuesReturned
this.definition = x.definition
this.propertyName = x.propertyName
this.value = x.value
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iottwinmaker.model.PropertySummary = PropertySummary(this)
/**
* construct an [aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse] inside the given [block]
*/
public fun definition(block: aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse.Builder.() -> kotlin.Unit) {
this.definition = aws.sdk.kotlin.services.iottwinmaker.model.PropertyDefinitionResponse.invoke(block)
}
/**
* construct an [aws.sdk.kotlin.services.iottwinmaker.model.DataValue] inside the given [block]
*/
public fun value(block: aws.sdk.kotlin.services.iottwinmaker.model.DataValue.Builder.() -> kotlin.Unit) {
this.value = aws.sdk.kotlin.services.iottwinmaker.model.DataValue.invoke(block)
}
internal fun correctErrors(): Builder {
if (propertyName == null) propertyName = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy