commonMain.aws.sdk.kotlin.services.appflow.model.ZendeskConnectorProfileCredentials.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of appflow-jvm Show documentation
Show all versions of appflow-jvm Show documentation
The AWS SDK for Kotlin client for Appflow
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.appflow.model
import aws.smithy.kotlin.runtime.SdkDsl
/**
* The connector-specific profile credentials required when using Zendesk.
*/
public class ZendeskConnectorProfileCredentials private constructor(builder: Builder) {
/**
* The credentials used to access protected Zendesk resources.
*/
public val accessToken: kotlin.String? = builder.accessToken
/**
* The identifier for the desired client.
*/
public val clientId: kotlin.String = requireNotNull(builder.clientId) { "A non-null value must be provided for clientId" }
/**
* The client secret used by the OAuth client to authenticate to the authorization server.
*/
public val clientSecret: kotlin.String = requireNotNull(builder.clientSecret) { "A non-null value must be provided for clientSecret" }
/**
* The OAuth requirement needed to request security tokens from the connector endpoint.
*/
public val oAuthRequest: aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest? = builder.oAuthRequest
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appflow.model.ZendeskConnectorProfileCredentials = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ZendeskConnectorProfileCredentials(")
append("accessToken=*** Sensitive Data Redacted ***,")
append("clientId=$clientId,")
append("clientSecret=*** Sensitive Data Redacted ***,")
append("oAuthRequest=$oAuthRequest")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = accessToken?.hashCode() ?: 0
result = 31 * result + (clientId.hashCode())
result = 31 * result + (clientSecret.hashCode())
result = 31 * result + (oAuthRequest?.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 ZendeskConnectorProfileCredentials
if (accessToken != other.accessToken) return false
if (clientId != other.clientId) return false
if (clientSecret != other.clientSecret) return false
if (oAuthRequest != other.oAuthRequest) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appflow.model.ZendeskConnectorProfileCredentials = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The credentials used to access protected Zendesk resources.
*/
public var accessToken: kotlin.String? = null
/**
* The identifier for the desired client.
*/
public var clientId: kotlin.String? = null
/**
* The client secret used by the OAuth client to authenticate to the authorization server.
*/
public var clientSecret: kotlin.String? = null
/**
* The OAuth requirement needed to request security tokens from the connector endpoint.
*/
public var oAuthRequest: aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appflow.model.ZendeskConnectorProfileCredentials) : this() {
this.accessToken = x.accessToken
this.clientId = x.clientId
this.clientSecret = x.clientSecret
this.oAuthRequest = x.oAuthRequest
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appflow.model.ZendeskConnectorProfileCredentials = ZendeskConnectorProfileCredentials(this)
/**
* construct an [aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest] inside the given [block]
*/
public fun oAuthRequest(block: aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest.Builder.() -> kotlin.Unit) {
this.oAuthRequest = aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest.invoke(block)
}
internal fun correctErrors(): Builder {
if (clientId == null) clientId = ""
if (clientSecret == null) clientSecret = ""
return this
}
}
}