commonMain.aws.sdk.kotlin.services.personalizeruntime.model.GetPersonalizedRankingRequest.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 GetPersonalizedRankingRequest private constructor(builder: Builder) {
/**
* The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking.
*/
public val campaignArn: kotlin.String? = builder.campaignArn
/**
* The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user's recommendations, such as the user's current location or device type.
*/
public val context: Map? = builder.context
/**
* The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for a given user. For more information, see [Filtering Recommendations](https://docs.aws.amazon.com/personalize/latest/dg/filter.html).
*/
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 items, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an `EXCLUDE` element to exclude items, 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](https://docs.aws.amazon.com/personalize/latest/dg/filter.html).
*/
public val filterValues: Map? = builder.filterValues
/**
* A list of items (by `itemId`) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list. If you are including metadata in recommendations, the maximum is 50. Otherwise, the maximum is 500.
*/
public val inputList: List? = builder.inputList
/**
* If you enabled metadata in recommendations when you created or updated the campaign, specify metadata columns from your Items dataset to include in the personalized ranking. The map key is `ITEMS` and the value is a list of column names from your Items dataset. The maximum number of columns you can provide is 10.
*
* For information about enabling metadata for a campaign, see [Enabling metadata in recommendations for a campaign](https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-return-metadata).
*/
public val metadataColumns: Map>? = builder.metadataColumns
/**
* The user for which you want the campaign to provide a personalized ranking.
*/
public val userId: kotlin.String? = builder.userId
public companion object {
public operator fun invoke(block: Builder.() -> kotlin.Unit): aws.sdk.kotlin.services.personalizeruntime.model.GetPersonalizedRankingRequest = Builder().apply(block).build()
}
override fun toString(): kotlin.String = buildString {
append("GetPersonalizedRankingRequest(")
append("campaignArn=$campaignArn,")
append("context=*** Sensitive Data Redacted ***,")
append("filterArn=$filterArn,")
append("filterValues=*** Sensitive Data Redacted ***,")
append("inputList=$inputList,")
append("metadataColumns=$metadataColumns,")
append("userId=$userId")
append(")")
}
override fun hashCode(): kotlin.Int {
var result = campaignArn?.hashCode() ?: 0
result = 31 * result + (context?.hashCode() ?: 0)
result = 31 * result + (filterArn?.hashCode() ?: 0)
result = 31 * result + (filterValues?.hashCode() ?: 0)
result = 31 * result + (inputList?.hashCode() ?: 0)
result = 31 * result + (metadataColumns?.hashCode() ?: 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 GetPersonalizedRankingRequest
if (campaignArn != other.campaignArn) return false
if (context != other.context) return false
if (filterArn != other.filterArn) return false
if (filterValues != other.filterValues) return false
if (inputList != other.inputList) return false
if (metadataColumns != other.metadataColumns) return false
if (userId != other.userId) return false
return true
}
public inline fun copy(block: Builder.() -> kotlin.Unit = {}): aws.sdk.kotlin.services.personalizeruntime.model.GetPersonalizedRankingRequest = Builder(this).apply(block).build()
@SdkDsl
public class Builder {
/**
* The Amazon Resource Name (ARN) of the campaign to use for generating the personalized ranking.
*/
public var campaignArn: kotlin.String? = null
/**
* The contextual metadata to use when getting recommendations. Contextual metadata includes any interaction information that might be relevant when getting a user's recommendations, such as the user's current location or device type.
*/
public var context: Map? = null
/**
* The Amazon Resource Name (ARN) of a filter you created to include items or exclude items from recommendations for a given user. For more information, see [Filtering Recommendations](https://docs.aws.amazon.com/personalize/latest/dg/filter.html).
*/
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 items, you must provide values for all parameters that are defined in the expression. For filters with expressions that use an `EXCLUDE` element to exclude items, 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](https://docs.aws.amazon.com/personalize/latest/dg/filter.html).
*/
public var filterValues: Map? = null
/**
* A list of items (by `itemId`) to rank. If an item was not included in the training dataset, the item is appended to the end of the reranked list. If you are including metadata in recommendations, the maximum is 50. Otherwise, the maximum is 500.
*/
public var inputList: List? = null
/**
* If you enabled metadata in recommendations when you created or updated the campaign, specify metadata columns from your Items dataset to include in the personalized ranking. The map key is `ITEMS` and the value is a list of column names from your Items dataset. The maximum number of columns you can provide is 10.
*
* For information about enabling metadata for a campaign, see [Enabling metadata in recommendations for a campaign](https://docs.aws.amazon.com/personalize/latest/dg/campaigns.html#create-campaign-return-metadata).
*/
public var metadataColumns: Map>? = null
/**
* The user for which you want the campaign to provide a personalized ranking.
*/
public var userId: kotlin.String? = null
@PublishedApi
internal constructor()
@PublishedApi
internal constructor(x: aws.sdk.kotlin.services.personalizeruntime.model.GetPersonalizedRankingRequest) : this() {
this.campaignArn = x.campaignArn
this.context = x.context
this.filterArn = x.filterArn
this.filterValues = x.filterValues
this.inputList = x.inputList
this.metadataColumns = x.metadataColumns
this.userId = x.userId
}
@PublishedApi
internal fun build(): aws.sdk.kotlin.services.personalizeruntime.model.GetPersonalizedRankingRequest = GetPersonalizedRankingRequest(this)
internal fun correctErrors(): Builder {
return this
}
}
}