commonMain.aws.sdk.kotlin.services.applicationsignals.model.ServiceOperation.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.applicationsignals.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* This structure contains information about an operation discovered by Application Signals. An operation is a specific function performed by a service that was discovered by Application Signals, and is often an API that is called by an upstream dependent.
*/
public class ServiceOperation private constructor(builder: Builder) {
/**
* An array of structures that each contain information about one metric associated with this service operation that was discovered by Application Signals.
*/
public val metricReferences: List = requireNotNull(builder.metricReferences) { "A non-null value must be provided for metricReferences" }
/**
* The name of the operation, discovered by Application Signals.
*/
public val name: kotlin.String = requireNotNull(builder.name) { "A non-null value must be provided for name" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.applicationsignals.model.ServiceOperation = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ServiceOperation(")
append("metricReferences=$metricReferences,")
append("name=$name")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = metricReferences.hashCode()
result = 31 * result + (name.hashCode())
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 ServiceOperation
if (metricReferences != other.metricReferences) return false
if (name != other.name) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.applicationsignals.model.ServiceOperation = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* An array of structures that each contain information about one metric associated with this service operation that was discovered by Application Signals.
*/
public var metricReferences: List? = null
/**
* The name of the operation, discovered by Application Signals.
*/
public var name: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.applicationsignals.model.ServiceOperation) : this() {
this.metricReferences = x.metricReferences
this.name = x.name
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.applicationsignals.model.ServiceOperation = ServiceOperation(this)
internal fun correctErrors(): Builder {
if (metricReferences == null) metricReferences = emptyList()
if (name == null) name = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy