commonMain.aws.sdk.kotlin.services.waf.model.GetSampledRequestsResponse.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of waf-jvm Show documentation
Show all versions of waf-jvm Show documentation
The AWS SDK for Kotlin client for WAF
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.waf.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetSampledRequestsResponse private constructor(builder: Builder) {
/**
* The total number of requests from which `GetSampledRequests` got a sample of `MaxItems` requests. If `PopulationSize` is less than `MaxItems`, the sample includes every request that your AWS resource received during the specified time range.
*/
public val populationSize: kotlin.Long = builder.populationSize
/**
* A complex type that contains detailed information about each of the requests in the sample.
*/
public val sampledRequests: List? = builder.sampledRequests
/**
* Usually, `TimeWindow` is the time range that you specified in the `GetSampledRequests` request. However, if your AWS resource received more than 5,000 requests during the time range that you specified in the request, `GetSampledRequests` returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format.
*/
public val timeWindow: aws.sdk.kotlin.services.waf.model.TimeWindow? = builder.timeWindow
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.waf.model.GetSampledRequestsResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetSampledRequestsResponse(")
append("populationSize=$populationSize,")
append("sampledRequests=$sampledRequests,")
append("timeWindow=$timeWindow")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = populationSize.hashCode()
result = 31 * result + (sampledRequests?.hashCode() ?: 0)
result = 31 * result + (timeWindow?.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 GetSampledRequestsResponse
if (populationSize != other.populationSize) return false
if (sampledRequests != other.sampledRequests) return false
if (timeWindow != other.timeWindow) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.waf.model.GetSampledRequestsResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The total number of requests from which `GetSampledRequests` got a sample of `MaxItems` requests. If `PopulationSize` is less than `MaxItems`, the sample includes every request that your AWS resource received during the specified time range.
*/
public var populationSize: kotlin.Long = 0L
/**
* A complex type that contains detailed information about each of the requests in the sample.
*/
public var sampledRequests: List? = null
/**
* Usually, `TimeWindow` is the time range that you specified in the `GetSampledRequests` request. However, if your AWS resource received more than 5,000 requests during the time range that you specified in the request, `GetSampledRequests` returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format.
*/
public var timeWindow: aws.sdk.kotlin.services.waf.model.TimeWindow? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.waf.model.GetSampledRequestsResponse) : this() {
this.populationSize = x.populationSize
this.sampledRequests = x.sampledRequests
this.timeWindow = x.timeWindow
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.waf.model.GetSampledRequestsResponse = GetSampledRequestsResponse(this)
/**
* construct an [aws.sdk.kotlin.services.waf.model.TimeWindow] inside the given [block]
*/
public fun timeWindow(block: aws.sdk.kotlin.services.waf.model.TimeWindow.Builder.() -> kotlin.Unit) {
this.timeWindow = aws.sdk.kotlin.services.waf.model.TimeWindow.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}