
commonMain.aws.sdk.kotlin.services.acmpca.model.AccessMethod.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.acmpca.model
/**
* Describes the type and format of extension access. Only one of `CustomObjectIdentifier` or `AccessMethodType` may be provided. Providing both results in `InvalidArgsException`.
*/
public class AccessMethod private constructor(builder: Builder) {
/**
* Specifies the `AccessMethod`.
*/
public val accessMethodType: aws.sdk.kotlin.services.acmpca.model.AccessMethodType? = builder.accessMethodType
/**
* An object identifier (OID) specifying the `AccessMethod`. The OID must satisfy the regular expression shown below. For more information, see NIST's definition of [Object Identifier (OID)](https://csrc.nist.gov/glossary/term/Object_Identifier).
*/
public val customObjectIdentifier: kotlin.String? = builder.customObjectIdentifier
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.acmpca.model.AccessMethod = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("AccessMethod(")
append("accessMethodType=$accessMethodType,")
append("customObjectIdentifier=$customObjectIdentifier")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accessMethodType?.hashCode() ?: 0
result = 31 * result + (customObjectIdentifier?.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 AccessMethod
if (accessMethodType != other.accessMethodType) return false
if (customObjectIdentifier != other.customObjectIdentifier) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.acmpca.model.AccessMethod = Builder(this).apply(block).build()
public class Builder {
/**
* Specifies the `AccessMethod`.
*/
public var accessMethodType: aws.sdk.kotlin.services.acmpca.model.AccessMethodType? = null
/**
* An object identifier (OID) specifying the `AccessMethod`. The OID must satisfy the regular expression shown below. For more information, see NIST's definition of [Object Identifier (OID)](https://csrc.nist.gov/glossary/term/Object_Identifier).
*/
public var customObjectIdentifier: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.acmpca.model.AccessMethod) : this() {
this.accessMethodType = x.accessMethodType
this.customObjectIdentifier = x.customObjectIdentifier
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.acmpca.model.AccessMethod = AccessMethod(this)
internal fun correctErrors(): Builder {
return this
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy