commonMain.aws.sdk.kotlin.services.xray.model.SamplingRuleUpdate.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
/**
* A document specifying changes to a sampling rule's configuration.
*/
public class SamplingRuleUpdate private constructor(builder: Builder) {
/**
* Matches attributes derived from the request.
*/
public val attributes: Map? = builder.attributes
/**
* The percentage of matching requests to instrument, after the reservoir is exhausted.
*/
public val fixedRate: kotlin.Double? = builder.fixedRate
/**
* Matches the hostname from a request URL.
*/
public val host: kotlin.String? = builder.host
/**
* Matches the HTTP method of a request.
*/
public val httpMethod: kotlin.String? = builder.httpMethod
/**
* The priority of the sampling rule.
*/
public val priority: kotlin.Int? = builder.priority
/**
* A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.
*/
public val reservoirSize: kotlin.Int? = builder.reservoirSize
/**
* Matches the ARN of the Amazon Web Services resource on which the service runs.
*/
public val resourceArn: kotlin.String? = builder.resourceArn
/**
* The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
*/
public val ruleArn: kotlin.String? = builder.ruleArn
/**
* The name of the sampling rule. Specify a rule by either name or ARN, but not both.
*/
public val ruleName: kotlin.String? = builder.ruleName
/**
* Matches the `name` that the service uses to identify itself in segments.
*/
public val serviceName: kotlin.String? = builder.serviceName
/**
* Matches the `origin` that the service uses to identify its type in segments.
*/
public val serviceType: kotlin.String? = builder.serviceType
/**
* Matches the path from a request URL.
*/
public val urlPath: kotlin.String? = builder.urlPath
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.xray.model.SamplingRuleUpdate = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("SamplingRuleUpdate(")
append("attributes=$attributes,")
append("fixedRate=$fixedRate,")
append("host=$host,")
append("httpMethod=$httpMethod,")
append("priority=$priority,")
append("reservoirSize=$reservoirSize,")
append("resourceArn=$resourceArn,")
append("ruleArn=$ruleArn,")
append("ruleName=$ruleName,")
append("serviceName=$serviceName,")
append("serviceType=$serviceType,")
append("urlPath=$urlPath")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = attributes?.hashCode() ?: 0
result = 31 * result + (fixedRate?.hashCode() ?: 0)
result = 31 * result + (host?.hashCode() ?: 0)
result = 31 * result + (httpMethod?.hashCode() ?: 0)
result = 31 * result + (priority ?: 0)
result = 31 * result + (reservoirSize ?: 0)
result = 31 * result + (resourceArn?.hashCode() ?: 0)
result = 31 * result + (ruleArn?.hashCode() ?: 0)
result = 31 * result + (ruleName?.hashCode() ?: 0)
result = 31 * result + (serviceName?.hashCode() ?: 0)
result = 31 * result + (serviceType?.hashCode() ?: 0)
result = 31 * result + (urlPath?.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 SamplingRuleUpdate
if (attributes != other.attributes) return false
if (!(fixedRate?.equals(other.fixedRate) ?: (other.fixedRate == null))) return false
if (host != other.host) return false
if (httpMethod != other.httpMethod) return false
if (priority != other.priority) return false
if (reservoirSize != other.reservoirSize) return false
if (resourceArn != other.resourceArn) return false
if (ruleArn != other.ruleArn) return false
if (ruleName != other.ruleName) return false
if (serviceName != other.serviceName) return false
if (serviceType != other.serviceType) return false
if (urlPath != other.urlPath) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.xray.model.SamplingRuleUpdate = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* Matches attributes derived from the request.
*/
public var attributes: Map? = null
/**
* The percentage of matching requests to instrument, after the reservoir is exhausted.
*/
public var fixedRate: kotlin.Double? = null
/**
* Matches the hostname from a request URL.
*/
public var host: kotlin.String? = null
/**
* Matches the HTTP method of a request.
*/
public var httpMethod: kotlin.String? = null
/**
* The priority of the sampling rule.
*/
public var priority: kotlin.Int? = null
/**
* A fixed number of matching requests to instrument per second, prior to applying the fixed rate. The reservoir is not used directly by services, but applies to all services using the rule collectively.
*/
public var reservoirSize: kotlin.Int? = null
/**
* Matches the ARN of the Amazon Web Services resource on which the service runs.
*/
public var resourceArn: kotlin.String? = null
/**
* The ARN of the sampling rule. Specify a rule by either name or ARN, but not both.
*/
public var ruleArn: kotlin.String? = null
/**
* The name of the sampling rule. Specify a rule by either name or ARN, but not both.
*/
public var ruleName: kotlin.String? = null
/**
* Matches the `name` that the service uses to identify itself in segments.
*/
public var serviceName: kotlin.String? = null
/**
* Matches the `origin` that the service uses to identify its type in segments.
*/
public var serviceType: kotlin.String? = null
/**
* Matches the path from a request URL.
*/
public var urlPath: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.xray.model.SamplingRuleUpdate) : this() {
this.attributes = x.attributes
this.fixedRate = x.fixedRate
this.host = x.host
this.httpMethod = x.httpMethod
this.priority = x.priority
this.reservoirSize = x.reservoirSize
this.resourceArn = x.resourceArn
this.ruleArn = x.ruleArn
this.ruleName = x.ruleName
this.serviceName = x.serviceName
this.serviceType = x.serviceType
this.urlPath = x.urlPath
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.xray.model.SamplingRuleUpdate = SamplingRuleUpdate(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy