commonMain.aws.sdk.kotlin.services.personalizeruntime.model.GetActionRecommendationsRequest.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of personalizeruntime-jvm Show documentation
Show all versions of personalizeruntime-jvm Show documentation
The AWS SDK for Kotlin client for Personalize Runtime
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.personalizeruntime.model
import aws.smithy.kotlin.runtime.SdkDsl
public class GetActionRecommendationsRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the campaign to use for getting action recommendations. This campaign must deploy a solution version trained with a PERSONALIZED_ACTIONS recipe.
*/
public val campaignArn: kotlin.String? = builder.campaignArn
/**
* The ARN of the filter to apply to the returned recommendations. For more information, see [Filtering Recommendations](https://docs.aws.amazon.com/personalize/latest/dg/filter.html).
*
* When using this parameter, be sure the filter resource is `ACTIVE`.
*/
public val filterArn: kotlin.String? = builder.filterArn
/**
* The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.
*
* For filter expressions that use an `INCLUDE` element to include actions, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an `EXCLUDE` element to exclude actions, you can omit the `filter-values`. In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations.
*
* For more information, see [Filtering recommendations and user segments](https://docs.aws.amazon.com/personalize/latest/dg/filter.html).
*/
public val filterValues: Map? = builder.filterValues
/**
* The number of results to return. The default is 5. The maximum is 100.
*/
public val numResults: kotlin.Int? = builder.numResults
/**
* The user ID of the user to provide action recommendations for.
*/
public val userId: kotlin.String? = builder.userId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalizeruntime.model.GetActionRecommendationsRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetActionRecommendationsRequest(")
append("campaignArn=$campaignArn,")
append("filterArn=$filterArn,")
append("filterValues=*** Sensitive Data Redacted ***,")
append("numResults=$numResults,")
append("userId=$userId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = campaignArn?.hashCode() ?: 0
result = 31 * result + (filterArn?.hashCode() ?: 0)
result = 31 * result + (filterValues?.hashCode() ?: 0)
result = 31 * result + (numResults ?: 0)
result = 31 * result + (userId?.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 GetActionRecommendationsRequest
if (campaignArn != other.campaignArn) return false
if (filterArn != other.filterArn) return false
if (filterValues != other.filterValues) return false
if (numResults != other.numResults) return false
if (userId != other.userId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalizeruntime.model.GetActionRecommendationsRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the campaign to use for getting action recommendations. This campaign must deploy a solution version trained with a PERSONALIZED_ACTIONS recipe.
*/
public var campaignArn: kotlin.String? = null
/**
* The ARN of the filter to apply to the returned recommendations. For more information, see [Filtering Recommendations](https://docs.aws.amazon.com/personalize/latest/dg/filter.html).
*
* When using this parameter, be sure the filter resource is `ACTIVE`.
*/
public var filterArn: kotlin.String? = null
/**
* The values to use when filtering recommendations. For each placeholder parameter in your filter expression, provide the parameter name (in matching case) as a key and the filter value(s) as the corresponding value. Separate multiple values for one parameter with a comma.
*
* For filter expressions that use an `INCLUDE` element to include actions, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an `EXCLUDE` element to exclude actions, you can omit the `filter-values`. In this case, Amazon Personalize doesn't use that portion of the expression to filter recommendations.
*
* For more information, see [Filtering recommendations and user segments](https://docs.aws.amazon.com/personalize/latest/dg/filter.html).
*/
public var filterValues: Map? = null
/**
* The number of results to return. The default is 5. The maximum is 100.
*/
public var numResults: kotlin.Int? = null
/**
* The user ID of the user to provide action recommendations for.
*/
public var userId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.personalizeruntime.model.GetActionRecommendationsRequest) : this() {
this.campaignArn = x.campaignArn
this.filterArn = x.filterArn
this.filterValues = x.filterValues
this.numResults = x.numResults
this.userId = x.userId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.personalizeruntime.model.GetActionRecommendationsRequest = GetActionRecommendationsRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}