/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.pinpoint.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Specifies Amazon Pinpoint configuration settings for retrieving and processing recommendation data from a recommender * model. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateRecommenderConfiguration implements Serializable, Cloneable, StructuredPojo { /** *

* A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the * RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's * retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute * can be used as a message variable in a message template. *

*

* In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. * The display name appears in the Attribute finder of the template editor on the Amazon Pinpoint console. * The following restrictions apply to these names: *

* *

* This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to * process recommendation data. Otherwise, don't include this object in your request. *

*/ private java.util.Map attributes; /** *

* A custom description of the configuration for the recommender model. The description can contain up to 128 * characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐. *

*/ private String description; /** *

* A custom name of the configuration for the recommender model. The name must start with a letter or number and it * can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens * (-). *

*/ private String name; /** *

* The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the * model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint * application. Valid values are: *

* */ private String recommendationProviderIdType; /** *

* The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon * Pinpoint to retrieve recommendation data from the recommender model. *

*/ private String recommendationProviderRoleArn; /** *

* The Amazon Resource Name (ARN) of the recommender model to retrieve recommendation data from. This value must * match the ARN of an Amazon Personalize campaign. *

*/ private String recommendationProviderUri; /** *

* The name or Amazon Resource Name (ARN) of the AWS Lambda function to invoke for additional processing of * recommendation data that's retrieved from the recommender model. *

*/ private String recommendationTransformerUri; /** *

* A custom display name for the standard endpoint or user attribute (RecommendationItems) that temporarily stores * recommended items for each endpoint or user, depending on the value for the RecommendationProviderIdType * property. This value is required if the configuration doesn't invoke an AWS Lambda function * (RecommendationTransformerUri) to perform additional processing of recommendation data. *

*

* This name appears in the Attribute finder of the template editor on the Amazon Pinpoint console. The name * can contain up to 25 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens (-). * These restrictions don't apply to attribute values. *

*/ private String recommendationsDisplayName; /** *

* The number of recommended items to retrieve from the model for each endpoint or user, depending on the value for * the RecommendationProviderIdType property. This number determines how many recommended items are available for * use in message variables. The minimum value is 1. The maximum value is 5. The default value is 5. *

*

* To use multiple recommended items and custom attributes with message variables, you have to use an AWS Lambda * function (RecommendationTransformerUri) to perform additional processing of recommendation data. *

*/ private Integer recommendationsPerMessage; /** *

* A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the * RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's * retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute * can be used as a message variable in a message template. *

*

* In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. * The display name appears in the Attribute finder of the template editor on the Amazon Pinpoint console. * The following restrictions apply to these names: *

* *

* This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to * process recommendation data. Otherwise, don't include this object in your request. *

* * @return A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for * the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item * that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. * Each attribute can be used as a message variable in a message template.

*

* In the map, the key is the name of a custom attribute and the value is a custom display name for that * attribute. The display name appears in the Attribute finder of the template editor on the Amazon * Pinpoint console. The following restrictions apply to these names: *

* *

* This object is required if the configuration invokes an AWS Lambda function * (RecommendationTransformerUri) to process recommendation data. Otherwise, don't include this object in * your request. */ public java.util.Map getAttributes() { return attributes; } /** *

* A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the * RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's * retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute * can be used as a message variable in a message template. *

*

* In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. * The display name appears in the Attribute finder of the template editor on the Amazon Pinpoint console. * The following restrictions apply to these names: *

* *

* This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to * process recommendation data. Otherwise, don't include this object in your request. *

* * @param attributes * A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for * the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item * that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. * Each attribute can be used as a message variable in a message template.

*

* In the map, the key is the name of a custom attribute and the value is a custom display name for that * attribute. The display name appears in the Attribute finder of the template editor on the Amazon * Pinpoint console. The following restrictions apply to these names: *

* *

* This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) * to process recommendation data. Otherwise, don't include this object in your request. */ public void setAttributes(java.util.Map attributes) { this.attributes = attributes; } /** *

* A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for the * RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item that's * retrieved from the recommender model and sent to an AWS Lambda function for additional processing. Each attribute * can be used as a message variable in a message template. *

*

* In the map, the key is the name of a custom attribute and the value is a custom display name for that attribute. * The display name appears in the Attribute finder of the template editor on the Amazon Pinpoint console. * The following restrictions apply to these names: *

* *

* This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) to * process recommendation data. Otherwise, don't include this object in your request. *

* * @param attributes * A map of key-value pairs that defines 1-10 custom endpoint or user attributes, depending on the value for * the RecommendationProviderIdType property. Each of these attributes temporarily stores a recommended item * that's retrieved from the recommender model and sent to an AWS Lambda function for additional processing. * Each attribute can be used as a message variable in a message template.

*

* In the map, the key is the name of a custom attribute and the value is a custom display name for that * attribute. The display name appears in the Attribute finder of the template editor on the Amazon * Pinpoint console. The following restrictions apply to these names: *

* *

* This object is required if the configuration invokes an AWS Lambda function (RecommendationTransformerUri) * to process recommendation data. Otherwise, don't include this object in your request. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateRecommenderConfiguration withAttributes(java.util.Map attributes) { setAttributes(attributes); return this; } /** * Add a single Attributes entry * * @see UpdateRecommenderConfiguration#withAttributes * @returns a reference to this object so that method calls can be chained together. */ public UpdateRecommenderConfiguration addAttributesEntry(String key, String value) { if (null == this.attributes) { this.attributes = new java.util.HashMap(); } if (this.attributes.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.attributes.put(key, value); return this; } /** * Removes all the entries added into Attributes. * * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateRecommenderConfiguration clearAttributesEntries() { this.attributes = null; return this; } /** *

* A custom description of the configuration for the recommender model. The description can contain up to 128 * characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐. *

* * @param description * A custom description of the configuration for the recommender model. The description can contain up to 128 * characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐. */ public void setDescription(String description) { this.description = description; } /** *

* A custom description of the configuration for the recommender model. The description can contain up to 128 * characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐. *

* * @return A custom description of the configuration for the recommender model. The description can contain up to * 128 characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐. */ public String getDescription() { return this.description; } /** *

* A custom description of the configuration for the recommender model. The description can contain up to 128 * characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐. *

* * @param description * A custom description of the configuration for the recommender model. The description can contain up to 128 * characters. The characters can be letters, numbers, spaces, or the following symbols: _ ; () , ‐. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateRecommenderConfiguration withDescription(String description) { setDescription(description); return this; } /** *

* A custom name of the configuration for the recommender model. The name must start with a letter or number and it * can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens * (-). *

* * @param name * A custom name of the configuration for the recommender model. The name must start with a letter or number * and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), * or hyphens (-). */ public void setName(String name) { this.name = name; } /** *

* A custom name of the configuration for the recommender model. The name must start with a letter or number and it * can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens * (-). *

* * @return A custom name of the configuration for the recommender model. The name must start with a letter or number * and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), * or hyphens (-). */ public String getName() { return this.name; } /** *

* A custom name of the configuration for the recommender model. The name must start with a letter or number and it * can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), or hyphens * (-). *

* * @param name * A custom name of the configuration for the recommender model. The name must start with a letter or number * and it can contain up to 128 characters. The characters can be letters, numbers, spaces, underscores (_), * or hyphens (-). * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateRecommenderConfiguration withName(String name) { setName(name); return this; } /** *

* The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value enables the * model to use attribute and event data that’s specific to a particular endpoint or user in an Amazon Pinpoint * application. Valid values are: *

* * * @param recommendationProviderIdType * The type of Amazon Pinpoint ID to associate with unique user IDs in the recommender model. This value * enables the model to use attribute and event data that’s specific to a particular endpoint or user in an * Amazon Pinpoint application. Valid values are:

*