commonMain.aws.sdk.kotlin.services.wafv2.model.GetSampledRequestsRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wafv2-jvm Show documentation
Show all versions of wafv2-jvm Show documentation
The AWS Kotlin client for WAFV2
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.wafv2.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetSampledRequestsRequest private constructor(builder: Builder) {
/**
* The number of requests that you want WAF to return from among the first 5,000 requests that your Amazon Web Services resource received during the time range. If your resource received fewer requests than the value of `MaxItems`, `GetSampledRequests` returns information about all of them.
*/
public val maxItems: kotlin.Long? = builder.maxItems
/**
* The metric name assigned to the `Rule` or `RuleGroup` dimension for which you want a sample of requests.
*/
public val ruleMetricName: kotlin.String? = builder.ruleMetricName
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.
*
* To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
* + CLI - Specify the Region when you use the CloudFront scope: `--scope=CLOUDFRONT --region=us-east-1`.
* + API and SDKs - For all calls, use the Region endpoint us-east-1.
*/
public val scope: aws.sdk.kotlin.services.wafv2.model.Scope? = builder.scope
/**
* The start date and time and the end date and time of the range for which you want `GetSampledRequests` to return a sample of requests. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, `Z`. For example, `"2016-09-27T14:50Z"`. You can specify any time range in the previous three hours. If you specify a start time that's earlier than three hours ago, WAF sets it to three hours ago.
*/
public val timeWindow: aws.sdk.kotlin.services.wafv2.model.TimeWindow? = builder.timeWindow
/**
* The Amazon resource name (ARN) of the `WebACL` for which you want a sample of requests.
*/
public val webAclArn: kotlin.String? = builder.webAclArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.wafv2.model.GetSampledRequestsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetSampledRequestsRequest(")
append("maxItems=$maxItems,")
append("ruleMetricName=$ruleMetricName,")
append("scope=$scope,")
append("timeWindow=$timeWindow,")
append("webAclArn=$webAclArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = maxItems?.hashCode() ?: 0
result = 31 * result + (ruleMetricName?.hashCode() ?: 0)
result = 31 * result + (scope?.hashCode() ?: 0)
result = 31 * result + (timeWindow?.hashCode() ?: 0)
result = 31 * result + (webAclArn?.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 GetSampledRequestsRequest
if (maxItems != other.maxItems) return false
if (ruleMetricName != other.ruleMetricName) return false
if (scope != other.scope) return false
if (timeWindow != other.timeWindow) return false
if (webAclArn != other.webAclArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.wafv2.model.GetSampledRequestsRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The number of requests that you want WAF to return from among the first 5,000 requests that your Amazon Web Services resource received during the time range. If your resource received fewer requests than the value of `MaxItems`, `GetSampledRequests` returns information about all of them.
*/
public var maxItems: kotlin.Long? = null
/**
* The metric name assigned to the `Rule` or `RuleGroup` dimension for which you want a sample of requests.
*/
public var ruleMetricName: kotlin.String? = null
/**
* Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.
*
* To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
* + CLI - Specify the Region when you use the CloudFront scope: `--scope=CLOUDFRONT --region=us-east-1`.
* + API and SDKs - For all calls, use the Region endpoint us-east-1.
*/
public var scope: aws.sdk.kotlin.services.wafv2.model.Scope? = null
/**
* The start date and time and the end date and time of the range for which you want `GetSampledRequests` to return a sample of requests. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, `Z`. For example, `"2016-09-27T14:50Z"`. You can specify any time range in the previous three hours. If you specify a start time that's earlier than three hours ago, WAF sets it to three hours ago.
*/
public var timeWindow: aws.sdk.kotlin.services.wafv2.model.TimeWindow? = null
/**
* The Amazon resource name (ARN) of the `WebACL` for which you want a sample of requests.
*/
public var webAclArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.wafv2.model.GetSampledRequestsRequest) : this() {
this.maxItems = x.maxItems
this.ruleMetricName = x.ruleMetricName
this.scope = x.scope
this.timeWindow = x.timeWindow
this.webAclArn = x.webAclArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.wafv2.model.GetSampledRequestsRequest = GetSampledRequestsRequest(this)
/**
* construct an [aws.sdk.kotlin.services.wafv2.model.TimeWindow] inside the given [block]
*/
public fun timeWindow(block: aws.sdk.kotlin.services.wafv2.model.TimeWindow.Builder.() -> kotlin.Unit) {
this.timeWindow = aws.sdk.kotlin.services.wafv2.model.TimeWindow.invoke(block)
}
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy