
commonMain.aws.sdk.kotlin.services.xray.model.CreateSamplingRuleRequest.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.xray.model
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateSamplingRuleRequest private constructor(builder: Builder) {
/**
* The rule definition.
*/
public val samplingRule: aws.sdk.kotlin.services.xray.model.SamplingRule? = builder.samplingRule
/**
* A map that contains one or more tag keys and tag values to attach to an X-Ray sampling rule. For more information about ways to use tags, see [Tagging Amazon Web Services resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *Amazon Web Services General Reference*.
*
* The following restrictions apply to tags:
* + Maximum number of user-applied tags per resource: 50
* + Maximum tag key length: 128 Unicode characters
* + Maximum tag value length: 256 Unicode characters
* + Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @
* + Tag keys and values are case sensitive.
* + Don't use `aws:` as a prefix for keys; it's reserved for Amazon Web Services use.
*/
public val tags: List? = builder.tags
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.CreateSamplingRuleRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateSamplingRuleRequest(")
append("samplingRule=$samplingRule,")
append("tags=$tags")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = samplingRule?.hashCode() ?: 0
result = 31 * result + (tags?.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 CreateSamplingRuleRequest
if (samplingRule != other.samplingRule) return false
if (tags != other.tags) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.CreateSamplingRuleRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The rule definition.
*/
public var samplingRule: aws.sdk.kotlin.services.xray.model.SamplingRule? = null
/**
* A map that contains one or more tag keys and tag values to attach to an X-Ray sampling rule. For more information about ways to use tags, see [Tagging Amazon Web Services resources](https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) in the *Amazon Web Services General Reference*.
*
* The following restrictions apply to tags:
* + Maximum number of user-applied tags per resource: 50
* + Maximum tag key length: 128 Unicode characters
* + Maximum tag value length: 256 Unicode characters
* + Valid values for key and value: a-z, A-Z, 0-9, space, and the following characters: _ . : / = + - and @
* + Tag keys and values are case sensitive.
* + Don't use `aws:` as a prefix for keys; it's reserved for Amazon Web Services use.
*/
public var tags: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.xray.model.CreateSamplingRuleRequest) : this() {
this.samplingRule = x.samplingRule
this.tags = x.tags
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.xray.model.CreateSamplingRuleRequest = CreateSamplingRuleRequest(this)
/**
* construct an [aws.sdk.kotlin.services.xray.model.SamplingRule] inside the given [block]
*/
public fun samplingRule(block: aws.sdk.kotlin.services.xray.model.SamplingRule.Builder.() -> kotlin.Unit) {
this.samplingRule = aws.sdk.kotlin.services.xray.model.SamplingRule.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy