commonMain.aws.sdk.kotlin.services.vpclattice.model.CreateRuleResponse.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
import aws.smithy.kotlin.runtime.SdkDsl
public class CreateRuleResponse private constructor(builder: Builder) {
/**
* The rule action.
*/
public val action: aws.sdk.kotlin.services.vpclattice.model.RuleAction? = builder.action
/**
* The Amazon Resource Name (ARN) of the rule.
*/
public val arn: kotlin.String? = builder.arn
/**
* The ID of the rule.
*/
public val id: kotlin.String? = builder.id
/**
* The rule match. The `RuleMatch` must be an `HttpMatch`. This means that the rule should be an exact match on HTTP constraints which are made up of the HTTP method, path, and header.
*/
public val match: aws.sdk.kotlin.services.vpclattice.model.RuleMatch? = builder.match
/**
* The name of the rule.
*/
public val name: kotlin.String? = builder.name
/**
* The priority assigned to the rule. The lower the priority number the higher the priority.
*/
public val priority: kotlin.Int? = builder.priority
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.vpclattice.model.CreateRuleResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("CreateRuleResponse(")
append("action=$action,")
append("arn=$arn,")
append("id=$id,")
append("match=$match,")
append("name=$name,")
append("priority=$priority")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = action?.hashCode() ?: 0
result = 31 * result + (arn?.hashCode() ?: 0)
result = 31 * result + (id?.hashCode() ?: 0)
result = 31 * result + (match?.hashCode() ?: 0)
result = 31 * result + (name?.hashCode() ?: 0)
result = 31 * result + (priority ?: 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 CreateRuleResponse
if (action != other.action) return false
if (arn != other.arn) return false
if (id != other.id) return false
if (match != other.match) return false
if (name != other.name) return false
if (priority != other.priority) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.vpclattice.model.CreateRuleResponse = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The rule action.
*/
public var action: aws.sdk.kotlin.services.vpclattice.model.RuleAction? = null
/**
* The Amazon Resource Name (ARN) of the rule.
*/
public var arn: kotlin.String? = null
/**
* The ID of the rule.
*/
public var id: kotlin.String? = null
/**
* The rule match. The `RuleMatch` must be an `HttpMatch`. This means that the rule should be an exact match on HTTP constraints which are made up of the HTTP method, path, and header.
*/
public var match: aws.sdk.kotlin.services.vpclattice.model.RuleMatch? = null
/**
* The name of the rule.
*/
public var name: kotlin.String? = null
/**
* The priority assigned to the rule. The lower the priority number the higher the priority.
*/
public var priority: kotlin.Int? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.vpclattice.model.CreateRuleResponse) : this() {
this.action = x.action
this.arn = x.arn
this.id = x.id
this.match = x.match
this.name = x.name
this.priority = x.priority
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.vpclattice.model.CreateRuleResponse = CreateRuleResponse(this)
internal fun correctErrors(): Builder {
return this
}
}
}