
commonMain.aws.sdk.kotlin.services.iam.model.GetServiceLastAccessedDetailsWithEntitiesResponse.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.iam.model
import aws.smithy.kotlin.runtime.time.Instant
public class GetServiceLastAccessedDetailsWithEntitiesResponse private constructor(builder: Builder) {
/**
* An `EntityDetailsList` object that contains details about when an IAM entity (user or role) used group or policy permissions in an attempt to access the specified Amazon Web Services service.
*/
public val entityDetailsList: List = requireNotNull(builder.entityDetailsList) { "A non-null value must be provided for entityDetailsList" }
/**
* An object that contains details about the reason the operation failed.
*/
public val error: aws.sdk.kotlin.services.iam.model.ErrorDetails? = builder.error
/**
* 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
/**
* The date and time, in [ISO 8601 date-time format](http://www.iso.org/iso/iso8601), when the generated report job was completed or failed.
*
* This field is null if the job is still in progress, as indicated by a job status value of `IN_PROGRESS`.
*/
public val jobCompletionDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.jobCompletionDate) { "A non-null value must be provided for jobCompletionDate" }
/**
* The date and time, in [ISO 8601 date-time format](http://www.iso.org/iso/iso8601), when the report job was created.
*/
public val jobCreationDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.jobCreationDate) { "A non-null value must be provided for jobCreationDate" }
/**
* The status of the job.
*/
public val jobStatus: aws.sdk.kotlin.services.iam.model.JobStatusType = requireNotNull(builder.jobStatus) { "A non-null value must be provided for jobStatus" }
/**
* 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
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.iam.model.GetServiceLastAccessedDetailsWithEntitiesResponse = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetServiceLastAccessedDetailsWithEntitiesResponse(")
append("entityDetailsList=$entityDetailsList,")
append("error=$error,")
append("isTruncated=$isTruncated,")
append("jobCompletionDate=$jobCompletionDate,")
append("jobCreationDate=$jobCreationDate,")
append("jobStatus=$jobStatus,")
append("marker=$marker")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = entityDetailsList.hashCode()
result = 31 * result + (error?.hashCode() ?: 0)
result = 31 * result + (isTruncated.hashCode())
result = 31 * result + (jobCompletionDate.hashCode())
result = 31 * result + (jobCreationDate.hashCode())
result = 31 * result + (jobStatus.hashCode())
result = 31 * result + (marker?.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 GetServiceLastAccessedDetailsWithEntitiesResponse
if (entityDetailsList != other.entityDetailsList) return false
if (error != other.error) return false
if (isTruncated != other.isTruncated) return false
if (jobCompletionDate != other.jobCompletionDate) return false
if (jobCreationDate != other.jobCreationDate) return false
if (jobStatus != other.jobStatus) return false
if (marker != other.marker) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.iam.model.GetServiceLastAccessedDetailsWithEntitiesResponse = Builder(this).apply(block).build()
public class Builder {
/**
* An `EntityDetailsList` object that contains details about when an IAM entity (user or role) used group or policy permissions in an attempt to access the specified Amazon Web Services service.
*/
public var entityDetailsList: List? = null
/**
* An object that contains details about the reason the operation failed.
*/
public var error: aws.sdk.kotlin.services.iam.model.ErrorDetails? = 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
/**
* The date and time, in [ISO 8601 date-time format](http://www.iso.org/iso/iso8601), when the generated report job was completed or failed.
*
* This field is null if the job is still in progress, as indicated by a job status value of `IN_PROGRESS`.
*/
public var jobCompletionDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The date and time, in [ISO 8601 date-time format](http://www.iso.org/iso/iso8601), when the report job was created.
*/
public var jobCreationDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The status of the job.
*/
public var jobStatus: aws.sdk.kotlin.services.iam.model.JobStatusType? = null
/**
* 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
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.iam.model.GetServiceLastAccessedDetailsWithEntitiesResponse) : this() {
this.entityDetailsList = x.entityDetailsList
this.error = x.error
this.isTruncated = x.isTruncated
this.jobCompletionDate = x.jobCompletionDate
this.jobCreationDate = x.jobCreationDate
this.jobStatus = x.jobStatus
this.marker = x.marker
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.iam.model.GetServiceLastAccessedDetailsWithEntitiesResponse = GetServiceLastAccessedDetailsWithEntitiesResponse(this)
/**
* construct an [aws.sdk.kotlin.services.iam.model.ErrorDetails] inside the given [block]
*/
public fun error(block: aws.sdk.kotlin.services.iam.model.ErrorDetails.Builder.() -> kotlin.Unit) {
this.error = aws.sdk.kotlin.services.iam.model.ErrorDetails.invoke(block)
}
internal fun correctErrors(): Builder {
if (entityDetailsList == null) entityDetailsList = emptyList()
if (jobCompletionDate == null) jobCompletionDate = Instant.fromEpochSeconds(0)
if (jobCreationDate == null) jobCreationDate = Instant.fromEpochSeconds(0)
if (jobStatus == null) jobStatus = JobStatusType.SdkUnknown("no value provided")
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy