commonMain.aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest.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
/**
* Used by select connectors for which the OAuth workflow is supported, such as Salesforce, Google Analytics, Marketo, Zendesk, and Slack.
*/
public class ConnectorOAuthRequest private constructor(builder: Builder) {
/**
* The code provided by the connector when it has been authenticated via the connected app.
*/
public val authCode: kotlin.String? = builder.authCode
/**
* The URL to which the authentication server redirects the browser after authorization has been granted.
*/
public val redirectUri: kotlin.String? = builder.redirectUri
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("ConnectorOAuthRequest(")
append("authCode=$authCode,")
append("redirectUri=$redirectUri")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = authCode?.hashCode() ?: 0
result = 31 * result + (redirectUri?.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 ConnectorOAuthRequest
if (authCode != other.authCode) return false
if (redirectUri != other.redirectUri) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The code provided by the connector when it has been authenticated via the connected app.
*/
public var authCode: kotlin.String? = null
/**
* The URL to which the authentication server redirects the browser after authorization has been granted.
*/
public var redirectUri: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest) : this() {
this.authCode = x.authCode
this.redirectUri = x.redirectUri
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.appflow.model.ConnectorOAuthRequest = ConnectorOAuthRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}