commonMain.aws.sdk.kotlin.services.vpclattice.model.RuleAction.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of vpclattice-jvm Show documentation
Show all versions of vpclattice-jvm Show documentation
The AWS SDK for Kotlin client for VPC Lattice
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.vpclattice.model
/**
* Describes the action for a rule.
*/
public sealed class RuleAction {
/**
* The fixed response action. The rule returns a custom HTTP response.
*/
public data class FixedResponse(val value: aws.sdk.kotlin.services.vpclattice.model.FixedResponseAction) : aws.sdk.kotlin.services.vpclattice.model.RuleAction() {
}
/**
* The forward action. Traffic that matches the rule is forwarded to the specified target groups.
*/
public data class Forward(val value: aws.sdk.kotlin.services.vpclattice.model.ForwardAction) : aws.sdk.kotlin.services.vpclattice.model.RuleAction() {
}
public object SdkUnknown : aws.sdk.kotlin.services.vpclattice.model.RuleAction() {
}
/**
* Casts this [RuleAction] as a [FixedResponse] and retrieves its [aws.sdk.kotlin.services.vpclattice.model.FixedResponseAction] value. Throws an exception if the [RuleAction] is not a
* [FixedResponse].
*/
public fun asFixedResponse(): aws.sdk.kotlin.services.vpclattice.model.FixedResponseAction = (this as RuleAction.FixedResponse).value
/**
* Casts this [RuleAction] as a [FixedResponse] and retrieves its [aws.sdk.kotlin.services.vpclattice.model.FixedResponseAction] value. Returns null if the [RuleAction] is not a [FixedResponse].
*/
public fun asFixedResponseOrNull(): aws.sdk.kotlin.services.vpclattice.model.FixedResponseAction? = (this as? RuleAction.FixedResponse)?.value
/**
* Casts this [RuleAction] as a [Forward] and retrieves its [aws.sdk.kotlin.services.vpclattice.model.ForwardAction] value. Throws an exception if the [RuleAction] is not a
* [Forward].
*/
public fun asForward(): aws.sdk.kotlin.services.vpclattice.model.ForwardAction = (this as RuleAction.Forward).value
/**
* Casts this [RuleAction] as a [Forward] and retrieves its [aws.sdk.kotlin.services.vpclattice.model.ForwardAction] value. Returns null if the [RuleAction] is not a [Forward].
*/
public fun asForwardOrNull(): aws.sdk.kotlin.services.vpclattice.model.ForwardAction? = (this as? RuleAction.Forward)?.value
}