
commonMain.aws.sdk.kotlin.services.iam.model.GetGroupResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iam.model
/**
* Contains the response to a successful GetGroup request.
*/
public class GetGroupResponse private constructor(builder: Builder) {
/**
* A structure that contains details about the group.
*/
public val group: aws.sdk.kotlin.services.iam.model.Group? = builder.group
/**
* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the `Marker` request parameter to retrieve more items. Note that IAM might return fewer than the `MaxItems` number of results even when there are more results available. We recommend that you check `IsTruncated` after every call to ensure that you receive all your results.
*/
public val isTruncated: kotlin.Boolean = builder.isTruncated
/**
* When `IsTruncated` is `true`, this element is present and contains the value to use for the `Marker` parameter in a subsequent pagination request.
*/
public val marker: kotlin.String? = builder.marker
/**
* A list of users in the group.
*/
public val users: List = requireNotNull(builder.users) { "A non-null value must be provided for users" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iam.model.GetGroupResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetGroupResponse(")
append("group=$group,")
append("isTruncated=$isTruncated,")
append("marker=$marker,")
append("users=$users")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = group?.hashCode() ?: 0
result = 31 * result + (isTruncated.hashCode())
result = 31 * result + (marker?.hashCode() ?: 0)
result = 31 * result + (users.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 GetGroupResponse
if (group != other.group) return false
if (isTruncated != other.isTruncated) return false
if (marker != other.marker) return false
if (users != other.users) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.GetGroupResponse = Builder(this).apply(block).build()
public class Builder {
/**
* A structure that contains details about the group.
*/
public var group: aws.sdk.kotlin.services.iam.model.Group? = null
/**
* A flag that indicates whether there are more items to return. If your results were truncated, you can make a subsequent pagination request using the `Marker` request parameter to retrieve more items. Note that IAM might return fewer than the `MaxItems` number of results even when there are more results available. We recommend that you check `IsTruncated` after every call to ensure that you receive all your results.
*/
public var isTruncated: kotlin.Boolean = false
/**
* When `IsTruncated` is `true`, this element is present and contains the value to use for the `Marker` parameter in a subsequent pagination request.
*/
public var marker: kotlin.String? = null
/**
* A list of users in the group.
*/
public var users: List? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iam.model.GetGroupResponse) : this() {
this.group = x.group
this.isTruncated = x.isTruncated
this.marker = x.marker
this.users = x.users
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iam.model.GetGroupResponse = GetGroupResponse(this)
/**
* construct an [aws.sdk.kotlin.services.iam.model.Group] inside the given [block]
*/
public fun group(block: aws.sdk.kotlin.services.iam.model.Group.Builder.() -> kotlin.Unit) {
this.group = aws.sdk.kotlin.services.iam.model.Group.invoke(block)
}
internal fun correctErrors(): Builder {
if (users == null) users = emptyList()
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy