All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.aws.sdk.kotlin.services.appflow.model.SalesforceMetadata.kt Maven / Gradle / Ivy

There is a newer version: 1.3.79
Show newest version
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!

package aws.sdk.kotlin.services.appflow.model

import aws.smithy.kotlin.runtime.SdkDsl

/**
 * The connector metadata specific to Salesforce.
 */
public class SalesforceMetadata private constructor(builder: Builder) {
    /**
     * The Salesforce APIs that you can have Amazon AppFlow use when your flows transfers data to or from Salesforce.
     */
    public val dataTransferApis: List? = builder.dataTransferApis
    /**
     * The desired authorization scope for the Salesforce account.
     */
    public val oAuthScopes: List? = builder.oAuthScopes
    /**
     * The OAuth 2.0 grant types that Amazon AppFlow can use when it requests an access token from Salesforce. Amazon AppFlow requires an access token each time it attempts to access your Salesforce records.
     *
     * ## AUTHORIZATION_CODE
     * Amazon AppFlow passes an authorization code when it requests the access token from Salesforce. Amazon AppFlow receives the authorization code from Salesforce after you log in to your Salesforce account and authorize Amazon AppFlow to access your records.
     *
     * ## JWT_BEARER
     * Amazon AppFlow passes a JSON web token (JWT) when it requests the access token from Salesforce. You provide the JWT to Amazon AppFlow when you define the connection to your Salesforce account. When you use this grant type, you don't need to log in to your Salesforce account to authorize Amazon AppFlow to access your records.
     *
     * The CLIENT_CREDENTIALS value is not supported for Salesforce.
     */
    public val oauth2GrantTypesSupported: List? = builder.oauth2GrantTypesSupported

    public companion object {
        public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.appflow.model.SalesforceMetadata = Builder().apply(block).build()
    }

    override fun toString(): kotlin.String = buildString {
        append("SalesforceMetadata(")
        append("dataTransferApis=$dataTransferApis,")
        append("oAuthScopes=$oAuthScopes,")
        append("oauth2GrantTypesSupported=$oauth2GrantTypesSupported")
        append(")")
    }

    override fun hashCode(): kotlin.Int {
        var result = dataTransferApis?.hashCode() ?: 0
        result = 31 * result + (oAuthScopes?.hashCode() ?: 0)
        result = 31 * result + (oauth2GrantTypesSupported?.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 SalesforceMetadata

        if (dataTransferApis != other.dataTransferApis) return false
        if (oAuthScopes != other.oAuthScopes) return false
        if (oauth2GrantTypesSupported != other.oauth2GrantTypesSupported) return false

        return true
    }

    public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.appflow.model.SalesforceMetadata = Builder(this).apply(block).build()

    @SdkDsl
    public class Builder {
        /**
         * The Salesforce APIs that you can have Amazon AppFlow use when your flows transfers data to or from Salesforce.
         */
        public var dataTransferApis: List? = null
        /**
         * The desired authorization scope for the Salesforce account.
         */
        public var oAuthScopes: List? = null
        /**
         * The OAuth 2.0 grant types that Amazon AppFlow can use when it requests an access token from Salesforce. Amazon AppFlow requires an access token each time it attempts to access your Salesforce records.
         *
         * ## AUTHORIZATION_CODE
         * Amazon AppFlow passes an authorization code when it requests the access token from Salesforce. Amazon AppFlow receives the authorization code from Salesforce after you log in to your Salesforce account and authorize Amazon AppFlow to access your records.
         *
         * ## JWT_BEARER
         * Amazon AppFlow passes a JSON web token (JWT) when it requests the access token from Salesforce. You provide the JWT to Amazon AppFlow when you define the connection to your Salesforce account. When you use this grant type, you don't need to log in to your Salesforce account to authorize Amazon AppFlow to access your records.
         *
         * The CLIENT_CREDENTIALS value is not supported for Salesforce.
         */
        public var oauth2GrantTypesSupported: List? = null

        @PublishedApi
        internal constructor()
        @PublishedApi
        internal constructor(x: aws.sdk.kotlin.services.appflow.model.SalesforceMetadata) : this() {
            this.dataTransferApis = x.dataTransferApis
            this.oAuthScopes = x.oAuthScopes
            this.oauth2GrantTypesSupported = x.oauth2GrantTypesSupported
        }

        @PublishedApi
        internal fun build(): aws.sdk.kotlin.services.appflow.model.SalesforceMetadata = SalesforceMetadata(this)

        internal fun correctErrors(): Builder {
            return this
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy