
commonMain.aws.sdk.kotlin.services.rekognition.model.ProjectPolicy.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.rekognition.model
import aws.smithy.kotlin.runtime.SdkDsl
import aws.smithy.kotlin.runtime.time.Instant
/**
* Describes a project policy in the response from ListProjectPolicies.
*/
public class ProjectPolicy private constructor(builder: Builder) {
/**
* The Unix datetime for the creation of the project policy.
*/
public val creationTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.creationTimestamp
/**
* The Unix datetime for when the project policy was last updated.
*/
public val lastUpdatedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = builder.lastUpdatedTimestamp
/**
* The JSON document for the project policy.
*/
public val policyDocument: kotlin.String? = builder.policyDocument
/**
* The name of the project policy.
*/
public val policyName: kotlin.String? = builder.policyName
/**
* The revision ID of the project policy.
*/
public val policyRevisionId: kotlin.String? = builder.policyRevisionId
/**
* The Amazon Resource Name (ARN) of the project to which the project policy is attached.
*/
public val projectArn: kotlin.String? = builder.projectArn
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.rekognition.model.ProjectPolicy = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ProjectPolicy(")
append("creationTimestamp=$creationTimestamp,")
append("lastUpdatedTimestamp=$lastUpdatedTimestamp,")
append("policyDocument=$policyDocument,")
append("policyName=$policyName,")
append("policyRevisionId=$policyRevisionId,")
append("projectArn=$projectArn")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = creationTimestamp?.hashCode() ?: 0
result = 31 * result + (lastUpdatedTimestamp?.hashCode() ?: 0)
result = 31 * result + (policyDocument?.hashCode() ?: 0)
result = 31 * result + (policyName?.hashCode() ?: 0)
result = 31 * result + (policyRevisionId?.hashCode() ?: 0)
result = 31 * result + (projectArn?.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 ProjectPolicy
if (creationTimestamp != other.creationTimestamp) return false
if (lastUpdatedTimestamp != other.lastUpdatedTimestamp) return false
if (policyDocument != other.policyDocument) return false
if (policyName != other.policyName) return false
if (policyRevisionId != other.policyRevisionId) return false
if (projectArn != other.projectArn) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.rekognition.model.ProjectPolicy = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Unix datetime for the creation of the project policy.
*/
public var creationTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The Unix datetime for when the project policy was last updated.
*/
public var lastUpdatedTimestamp: aws.smithy.kotlin.runtime.time.Instant? = null
/**
* The JSON document for the project policy.
*/
public var policyDocument: kotlin.String? = null
/**
* The name of the project policy.
*/
public var policyName: kotlin.String? = null
/**
* The revision ID of the project policy.
*/
public var policyRevisionId: kotlin.String? = null
/**
* The Amazon Resource Name (ARN) of the project to which the project policy is attached.
*/
public var projectArn: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.rekognition.model.ProjectPolicy) : this() {
this.creationTimestamp = x.creationTimestamp
this.lastUpdatedTimestamp = x.lastUpdatedTimestamp
this.policyDocument = x.policyDocument
this.policyName = x.policyName
this.policyRevisionId = x.policyRevisionId
this.projectArn = x.projectArn
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.rekognition.model.ProjectPolicy = ProjectPolicy(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy