
commonMain.aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItem.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.verifiedpermissions.model
import aws.smithy.kotlin.runtime.time.Instant
/**
* A structure that defines an identity source.
*
* This data type is a response parameter to the [ListIdentitySources](https://docs.aws.amazon.com/verifiedpermissions/latest/apireference/API_ListIdentitySources.html) operation.
*/
public class IdentitySourceItem private constructor(builder: Builder) {
/**
* Contains configuration information about an identity source.
*/
public val configuration: aws.sdk.kotlin.services.verifiedpermissions.model.ConfigurationItem? = builder.configuration
/**
* The date and time the identity source was originally created.
*/
public val createdDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.createdDate) { "A non-null value must be provided for createdDate" }
/**
* A structure that contains the details of the associated identity provider (IdP).
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public val details: aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItemDetails? = builder.details
/**
* The unique identifier of the identity source.
*/
public val identitySourceId: kotlin.String = requireNotNull(builder.identitySourceId) { "A non-null value must be provided for identitySourceId" }
/**
* The date and time the identity source was most recently updated.
*/
public val lastUpdatedDate: aws.smithy.kotlin.runtime.time.Instant = requireNotNull(builder.lastUpdatedDate) { "A non-null value must be provided for lastUpdatedDate" }
/**
* The identifier of the policy store that contains the identity source.
*/
public val policyStoreId: kotlin.String = requireNotNull(builder.policyStoreId) { "A non-null value must be provided for policyStoreId" }
/**
* The Cedar entity type of the principals returned from the IdP associated with this identity source.
*/
public val principalEntityType: kotlin.String = requireNotNull(builder.principalEntityType) { "A non-null value must be provided for principalEntityType" }
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItem = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("IdentitySourceItem(")
append("configuration=$configuration,")
append("createdDate=$createdDate,")
append("details=$details,")
append("identitySourceId=$identitySourceId,")
append("lastUpdatedDate=$lastUpdatedDate,")
append("policyStoreId=$policyStoreId,")
append("principalEntityType=*** Sensitive Data Redacted ***")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = configuration?.hashCode() ?: 0
result = 31 * result + (createdDate.hashCode())
result = 31 * result + (details?.hashCode() ?: 0)
result = 31 * result + (identitySourceId.hashCode())
result = 31 * result + (lastUpdatedDate.hashCode())
result = 31 * result + (policyStoreId.hashCode())
result = 31 * result + (principalEntityType.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 IdentitySourceItem
if (configuration != other.configuration) return false
if (createdDate != other.createdDate) return false
if (details != other.details) return false
if (identitySourceId != other.identitySourceId) return false
if (lastUpdatedDate != other.lastUpdatedDate) return false
if (policyStoreId != other.policyStoreId) return false
if (principalEntityType != other.principalEntityType) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItem = Builder(this).apply(block).build()
public class Builder {
/**
* Contains configuration information about an identity source.
*/
public var configuration: aws.sdk.kotlin.services.verifiedpermissions.model.ConfigurationItem? = null
/**
* The date and time the identity source was originally created.
*/
public var createdDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* A structure that contains the details of the associated identity provider (IdP).
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public var details: aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItemDetails? = null
/**
* The unique identifier of the identity source.
*/
public var identitySourceId: kotlin.String? = null
/**
* The date and time the identity source was most recently updated.
*/
public var lastUpdatedDate: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The identifier of the policy store that contains the identity source.
*/
public var policyStoreId: kotlin.String? = null
/**
* The Cedar entity type of the principals returned from the IdP associated with this identity source.
*/
public var principalEntityType: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItem) : this() {
this.configuration = x.configuration
this.createdDate = x.createdDate
this.details = x.details
this.identitySourceId = x.identitySourceId
this.lastUpdatedDate = x.lastUpdatedDate
this.policyStoreId = x.policyStoreId
this.principalEntityType = x.principalEntityType
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItem = IdentitySourceItem(this)
/**
* construct an [aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItemDetails] inside the given [block]
*/
@Deprecated("No longer recommended for use. See AWS API documentation for more details.")
public fun details(block: aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItemDetails.Builder.() -> kotlin.Unit) {
this.details = aws.sdk.kotlin.services.verifiedpermissions.model.IdentitySourceItemDetails.invoke(block)
}
internal fun correctErrors(): Builder {
if (createdDate == null) createdDate = Instant.fromEpochSeconds(0)
if (identitySourceId == null) identitySourceId = ""
if (lastUpdatedDate == null) lastUpdatedDate = Instant.fromEpochSeconds(0)
if (policyStoreId == null) policyStoreId = ""
if (principalEntityType == null) principalEntityType = ""
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy