commonMain.aws.sdk.kotlin.services.ssmincidents.model.GetResourcePoliciesRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ssmincidents-jvm Show documentation
Show all versions of ssmincidents-jvm Show documentation
The AWS SDK for Kotlin client for SSM Incidents
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.ssmincidents.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetResourcePoliciesRequest private constructor(builder: Builder) {
/**
* The maximum number of resource policies to display for each page of results.
*/
public val maxResults: kotlin.Int? = builder.maxResults
/**
* The pagination token for the next set of items to return. (You received this token from a previous call.)
*/
public val nextToken: kotlin.String? = builder.nextToken
/**
* The Amazon Resource Name (ARN) of the response plan with the attached resource policy.
*/
public val resourceArn: kotlin.String = requireNotNull(builder.resourceArn) { "A non-null value must be provided for resourceArn" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.ssmincidents.model.GetResourcePoliciesRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetResourcePoliciesRequest(")
append("maxResults=$maxResults,")
append("nextToken=$nextToken,")
append("resourceArn=$resourceArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = maxResults ?: 0
result = 31 * result + (nextToken?.hashCode() ?: 0)
result = 31 * result + (resourceArn.hashCode())
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 GetResourcePoliciesRequest
if (maxResults != other.maxResults) return false
if (nextToken != other.nextToken) return false
if (resourceArn != other.resourceArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.ssmincidents.model.GetResourcePoliciesRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The maximum number of resource policies to display for each page of results.
*/
public var maxResults: kotlin.Int? = null
/**
* The pagination token for the next set of items to return. (You received this token from a previous call.)
*/
public var nextToken: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the response plan with the attached resource policy.
*/
public var resourceArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.ssmincidents.model.GetResourcePoliciesRequest) : this() {
this.maxResults = x.maxResults
this.nextToken = x.nextToken
this.resourceArn = x.resourceArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.ssmincidents.model.GetResourcePoliciesRequest = GetResourcePoliciesRequest(this)
internal fun correctErrors(): Builder {
if (resourceArn == null) resourceArn = ""
return this
}
}
}