{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.Pinpoint.Types.UpdateRecommenderConfiguration
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.Pinpoint.Types.UpdateRecommenderConfiguration where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude

-- | Specifies Amazon Pinpoint configuration settings for retrieving and
-- processing recommendation data from a recommender model.
--
-- /See:/ 'newUpdateRecommenderConfiguration' smart constructor.
data UpdateRecommenderConfiguration = UpdateRecommenderConfiguration'
  { -- | 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.
    UpdateRecommenderConfiguration -> Maybe Text
recommendationTransformerUri :: Prelude.Maybe Prelude.Text,
    -- | 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.
    UpdateRecommenderConfiguration -> Maybe Text
recommendationsDisplayName :: Prelude.Maybe Prelude.Text,
    -- | 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:
    --
    -- -   PINPOINT_ENDPOINT_ID - Associate each user in the model with a
    --     particular endpoint in Amazon Pinpoint. The data is correlated based
    --     on endpoint IDs in Amazon Pinpoint. This is the default value.
    --
    -- -   PINPOINT_USER_ID - Associate each user in the model with a
    --     particular user and endpoint in Amazon Pinpoint. The data is
    --     correlated based on user IDs in Amazon Pinpoint. If you specify this
    --     value, an endpoint definition in Amazon Pinpoint has to specify both
    --     a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be
    --     sent to the user\'s endpoint.
    UpdateRecommenderConfiguration -> Maybe Text
recommendationProviderIdType :: Prelude.Maybe Prelude.Text,
    -- | 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:
    --
    -- -   An attribute name must start with a letter or number and it can
    --     contain up to 50 characters. The characters can be letters, numbers,
    --     underscores (_), or hyphens (-). Attribute names are case sensitive
    --     and must be unique.
    --
    -- -   An attribute display name must start with a letter or number and it
    --     can contain up to 25 characters. The characters can be letters,
    --     numbers, spaces, underscores (_), or hyphens (-).
    --
    -- 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.
    UpdateRecommenderConfiguration -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | 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 (-).
    UpdateRecommenderConfiguration -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | 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: _ ; () , ‐.
    UpdateRecommenderConfiguration -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | 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.
    UpdateRecommenderConfiguration -> Maybe Int
recommendationsPerMessage :: Prelude.Maybe Prelude.Int,
    -- | 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.
    UpdateRecommenderConfiguration -> Text
recommendationProviderUri :: Prelude.Text,
    -- | 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.
    UpdateRecommenderConfiguration -> Text
recommendationProviderRoleArn :: Prelude.Text
  }
  deriving (UpdateRecommenderConfiguration
-> UpdateRecommenderConfiguration -> Bool
(UpdateRecommenderConfiguration
 -> UpdateRecommenderConfiguration -> Bool)
-> (UpdateRecommenderConfiguration
    -> UpdateRecommenderConfiguration -> Bool)
-> Eq UpdateRecommenderConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateRecommenderConfiguration
-> UpdateRecommenderConfiguration -> Bool
$c/= :: UpdateRecommenderConfiguration
-> UpdateRecommenderConfiguration -> Bool
== :: UpdateRecommenderConfiguration
-> UpdateRecommenderConfiguration -> Bool
$c== :: UpdateRecommenderConfiguration
-> UpdateRecommenderConfiguration -> Bool
Prelude.Eq, ReadPrec [UpdateRecommenderConfiguration]
ReadPrec UpdateRecommenderConfiguration
Int -> ReadS UpdateRecommenderConfiguration
ReadS [UpdateRecommenderConfiguration]
(Int -> ReadS UpdateRecommenderConfiguration)
-> ReadS [UpdateRecommenderConfiguration]
-> ReadPrec UpdateRecommenderConfiguration
-> ReadPrec [UpdateRecommenderConfiguration]
-> Read UpdateRecommenderConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateRecommenderConfiguration]
$creadListPrec :: ReadPrec [UpdateRecommenderConfiguration]
readPrec :: ReadPrec UpdateRecommenderConfiguration
$creadPrec :: ReadPrec UpdateRecommenderConfiguration
readList :: ReadS [UpdateRecommenderConfiguration]
$creadList :: ReadS [UpdateRecommenderConfiguration]
readsPrec :: Int -> ReadS UpdateRecommenderConfiguration
$creadsPrec :: Int -> ReadS UpdateRecommenderConfiguration
Prelude.Read, Int -> UpdateRecommenderConfiguration -> ShowS
[UpdateRecommenderConfiguration] -> ShowS
UpdateRecommenderConfiguration -> String
(Int -> UpdateRecommenderConfiguration -> ShowS)
-> (UpdateRecommenderConfiguration -> String)
-> ([UpdateRecommenderConfiguration] -> ShowS)
-> Show UpdateRecommenderConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateRecommenderConfiguration] -> ShowS
$cshowList :: [UpdateRecommenderConfiguration] -> ShowS
show :: UpdateRecommenderConfiguration -> String
$cshow :: UpdateRecommenderConfiguration -> String
showsPrec :: Int -> UpdateRecommenderConfiguration -> ShowS
$cshowsPrec :: Int -> UpdateRecommenderConfiguration -> ShowS
Prelude.Show, (forall x.
 UpdateRecommenderConfiguration
 -> Rep UpdateRecommenderConfiguration x)
-> (forall x.
    Rep UpdateRecommenderConfiguration x
    -> UpdateRecommenderConfiguration)
-> Generic UpdateRecommenderConfiguration
forall x.
Rep UpdateRecommenderConfiguration x
-> UpdateRecommenderConfiguration
forall x.
UpdateRecommenderConfiguration
-> Rep UpdateRecommenderConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateRecommenderConfiguration x
-> UpdateRecommenderConfiguration
$cfrom :: forall x.
UpdateRecommenderConfiguration
-> Rep UpdateRecommenderConfiguration x
Prelude.Generic)

-- |
-- Create a value of 'UpdateRecommenderConfiguration' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'recommendationTransformerUri', 'updateRecommenderConfiguration_recommendationTransformerUri' - 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.
--
-- 'recommendationsDisplayName', 'updateRecommenderConfiguration_recommendationsDisplayName' - 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.
--
-- 'recommendationProviderIdType', 'updateRecommenderConfiguration_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:
--
-- -   PINPOINT_ENDPOINT_ID - Associate each user in the model with a
--     particular endpoint in Amazon Pinpoint. The data is correlated based
--     on endpoint IDs in Amazon Pinpoint. This is the default value.
--
-- -   PINPOINT_USER_ID - Associate each user in the model with a
--     particular user and endpoint in Amazon Pinpoint. The data is
--     correlated based on user IDs in Amazon Pinpoint. If you specify this
--     value, an endpoint definition in Amazon Pinpoint has to specify both
--     a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be
--     sent to the user\'s endpoint.
--
-- 'attributes', 'updateRecommenderConfiguration_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:
--
-- -   An attribute name must start with a letter or number and it can
--     contain up to 50 characters. The characters can be letters, numbers,
--     underscores (_), or hyphens (-). Attribute names are case sensitive
--     and must be unique.
--
-- -   An attribute display name must start with a letter or number and it
--     can contain up to 25 characters. The characters can be letters,
--     numbers, spaces, underscores (_), or hyphens (-).
--
-- 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.
--
-- 'name', 'updateRecommenderConfiguration_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 (-).
--
-- 'description', 'updateRecommenderConfiguration_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: _ ; () , ‐.
--
-- 'recommendationsPerMessage', 'updateRecommenderConfiguration_recommendationsPerMessage' - 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.
--
-- 'recommendationProviderUri', 'updateRecommenderConfiguration_recommendationProviderUri' - 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.
--
-- 'recommendationProviderRoleArn', 'updateRecommenderConfiguration_recommendationProviderRoleArn' - 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.
newUpdateRecommenderConfiguration ::
  -- | 'recommendationProviderUri'
  Prelude.Text ->
  -- | 'recommendationProviderRoleArn'
  Prelude.Text ->
  UpdateRecommenderConfiguration
newUpdateRecommenderConfiguration :: Text -> Text -> UpdateRecommenderConfiguration
newUpdateRecommenderConfiguration
  Text
pRecommendationProviderUri_
  Text
pRecommendationProviderRoleArn_ =
    UpdateRecommenderConfiguration' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Text
-> Text
-> UpdateRecommenderConfiguration
UpdateRecommenderConfiguration'
      { $sel:recommendationTransformerUri:UpdateRecommenderConfiguration' :: Maybe Text
recommendationTransformerUri =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendationsDisplayName:UpdateRecommenderConfiguration' :: Maybe Text
recommendationsDisplayName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendationProviderIdType:UpdateRecommenderConfiguration' :: Maybe Text
recommendationProviderIdType =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:attributes:UpdateRecommenderConfiguration' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:name:UpdateRecommenderConfiguration' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:UpdateRecommenderConfiguration' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendationsPerMessage:UpdateRecommenderConfiguration' :: Maybe Int
recommendationsPerMessage = Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendationProviderUri:UpdateRecommenderConfiguration' :: Text
recommendationProviderUri =
          Text
pRecommendationProviderUri_,
        $sel:recommendationProviderRoleArn:UpdateRecommenderConfiguration' :: Text
recommendationProviderRoleArn =
          Text
pRecommendationProviderRoleArn_
      }

-- | 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.
updateRecommenderConfiguration_recommendationTransformerUri :: Lens.Lens' UpdateRecommenderConfiguration (Prelude.Maybe Prelude.Text)
updateRecommenderConfiguration_recommendationTransformerUri :: (Maybe Text -> f (Maybe Text))
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
updateRecommenderConfiguration_recommendationTransformerUri = (UpdateRecommenderConfiguration -> Maybe Text)
-> (UpdateRecommenderConfiguration
    -> Maybe Text -> UpdateRecommenderConfiguration)
-> Lens
     UpdateRecommenderConfiguration
     UpdateRecommenderConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecommenderConfiguration' {Maybe Text
recommendationTransformerUri :: Maybe Text
$sel:recommendationTransformerUri:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
recommendationTransformerUri} -> Maybe Text
recommendationTransformerUri) (\s :: UpdateRecommenderConfiguration
s@UpdateRecommenderConfiguration' {} Maybe Text
a -> UpdateRecommenderConfiguration
s {$sel:recommendationTransformerUri:UpdateRecommenderConfiguration' :: Maybe Text
recommendationTransformerUri = Maybe Text
a} :: UpdateRecommenderConfiguration)

-- | 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.
updateRecommenderConfiguration_recommendationsDisplayName :: Lens.Lens' UpdateRecommenderConfiguration (Prelude.Maybe Prelude.Text)
updateRecommenderConfiguration_recommendationsDisplayName :: (Maybe Text -> f (Maybe Text))
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
updateRecommenderConfiguration_recommendationsDisplayName = (UpdateRecommenderConfiguration -> Maybe Text)
-> (UpdateRecommenderConfiguration
    -> Maybe Text -> UpdateRecommenderConfiguration)
-> Lens
     UpdateRecommenderConfiguration
     UpdateRecommenderConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecommenderConfiguration' {Maybe Text
recommendationsDisplayName :: Maybe Text
$sel:recommendationsDisplayName:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
recommendationsDisplayName} -> Maybe Text
recommendationsDisplayName) (\s :: UpdateRecommenderConfiguration
s@UpdateRecommenderConfiguration' {} Maybe Text
a -> UpdateRecommenderConfiguration
s {$sel:recommendationsDisplayName:UpdateRecommenderConfiguration' :: Maybe Text
recommendationsDisplayName = Maybe Text
a} :: UpdateRecommenderConfiguration)

-- | 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:
--
-- -   PINPOINT_ENDPOINT_ID - Associate each user in the model with a
--     particular endpoint in Amazon Pinpoint. The data is correlated based
--     on endpoint IDs in Amazon Pinpoint. This is the default value.
--
-- -   PINPOINT_USER_ID - Associate each user in the model with a
--     particular user and endpoint in Amazon Pinpoint. The data is
--     correlated based on user IDs in Amazon Pinpoint. If you specify this
--     value, an endpoint definition in Amazon Pinpoint has to specify both
--     a user ID (UserId) and an endpoint ID. Otherwise, messages won’t be
--     sent to the user\'s endpoint.
updateRecommenderConfiguration_recommendationProviderIdType :: Lens.Lens' UpdateRecommenderConfiguration (Prelude.Maybe Prelude.Text)
updateRecommenderConfiguration_recommendationProviderIdType :: (Maybe Text -> f (Maybe Text))
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
updateRecommenderConfiguration_recommendationProviderIdType = (UpdateRecommenderConfiguration -> Maybe Text)
-> (UpdateRecommenderConfiguration
    -> Maybe Text -> UpdateRecommenderConfiguration)
-> Lens
     UpdateRecommenderConfiguration
     UpdateRecommenderConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecommenderConfiguration' {Maybe Text
recommendationProviderIdType :: Maybe Text
$sel:recommendationProviderIdType:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
recommendationProviderIdType} -> Maybe Text
recommendationProviderIdType) (\s :: UpdateRecommenderConfiguration
s@UpdateRecommenderConfiguration' {} Maybe Text
a -> UpdateRecommenderConfiguration
s {$sel:recommendationProviderIdType:UpdateRecommenderConfiguration' :: Maybe Text
recommendationProviderIdType = Maybe Text
a} :: UpdateRecommenderConfiguration)

-- | 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:
--
-- -   An attribute name must start with a letter or number and it can
--     contain up to 50 characters. The characters can be letters, numbers,
--     underscores (_), or hyphens (-). Attribute names are case sensitive
--     and must be unique.
--
-- -   An attribute display name must start with a letter or number and it
--     can contain up to 25 characters. The characters can be letters,
--     numbers, spaces, underscores (_), or hyphens (-).
--
-- 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.
updateRecommenderConfiguration_attributes :: Lens.Lens' UpdateRecommenderConfiguration (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
updateRecommenderConfiguration_attributes :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
updateRecommenderConfiguration_attributes = (UpdateRecommenderConfiguration -> Maybe (HashMap Text Text))
-> (UpdateRecommenderConfiguration
    -> Maybe (HashMap Text Text) -> UpdateRecommenderConfiguration)
-> Lens
     UpdateRecommenderConfiguration
     UpdateRecommenderConfiguration
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecommenderConfiguration' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: UpdateRecommenderConfiguration
s@UpdateRecommenderConfiguration' {} Maybe (HashMap Text Text)
a -> UpdateRecommenderConfiguration
s {$sel:attributes:UpdateRecommenderConfiguration' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: UpdateRecommenderConfiguration) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> UpdateRecommenderConfiguration
 -> f UpdateRecommenderConfiguration)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
    -> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
-> Iso
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
     (Maybe (HashMap Text Text))
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
  (HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 (-).
updateRecommenderConfiguration_name :: Lens.Lens' UpdateRecommenderConfiguration (Prelude.Maybe Prelude.Text)
updateRecommenderConfiguration_name :: (Maybe Text -> f (Maybe Text))
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
updateRecommenderConfiguration_name = (UpdateRecommenderConfiguration -> Maybe Text)
-> (UpdateRecommenderConfiguration
    -> Maybe Text -> UpdateRecommenderConfiguration)
-> Lens
     UpdateRecommenderConfiguration
     UpdateRecommenderConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecommenderConfiguration' {Maybe Text
name :: Maybe Text
$sel:name:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateRecommenderConfiguration
s@UpdateRecommenderConfiguration' {} Maybe Text
a -> UpdateRecommenderConfiguration
s {$sel:name:UpdateRecommenderConfiguration' :: Maybe Text
name = Maybe Text
a} :: UpdateRecommenderConfiguration)

-- | 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: _ ; () , ‐.
updateRecommenderConfiguration_description :: Lens.Lens' UpdateRecommenderConfiguration (Prelude.Maybe Prelude.Text)
updateRecommenderConfiguration_description :: (Maybe Text -> f (Maybe Text))
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
updateRecommenderConfiguration_description = (UpdateRecommenderConfiguration -> Maybe Text)
-> (UpdateRecommenderConfiguration
    -> Maybe Text -> UpdateRecommenderConfiguration)
-> Lens
     UpdateRecommenderConfiguration
     UpdateRecommenderConfiguration
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecommenderConfiguration' {Maybe Text
description :: Maybe Text
$sel:description:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateRecommenderConfiguration
s@UpdateRecommenderConfiguration' {} Maybe Text
a -> UpdateRecommenderConfiguration
s {$sel:description:UpdateRecommenderConfiguration' :: Maybe Text
description = Maybe Text
a} :: UpdateRecommenderConfiguration)

-- | 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.
updateRecommenderConfiguration_recommendationsPerMessage :: Lens.Lens' UpdateRecommenderConfiguration (Prelude.Maybe Prelude.Int)
updateRecommenderConfiguration_recommendationsPerMessage :: (Maybe Int -> f (Maybe Int))
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
updateRecommenderConfiguration_recommendationsPerMessage = (UpdateRecommenderConfiguration -> Maybe Int)
-> (UpdateRecommenderConfiguration
    -> Maybe Int -> UpdateRecommenderConfiguration)
-> Lens
     UpdateRecommenderConfiguration
     UpdateRecommenderConfiguration
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecommenderConfiguration' {Maybe Int
recommendationsPerMessage :: Maybe Int
$sel:recommendationsPerMessage:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Int
recommendationsPerMessage} -> Maybe Int
recommendationsPerMessage) (\s :: UpdateRecommenderConfiguration
s@UpdateRecommenderConfiguration' {} Maybe Int
a -> UpdateRecommenderConfiguration
s {$sel:recommendationsPerMessage:UpdateRecommenderConfiguration' :: Maybe Int
recommendationsPerMessage = Maybe Int
a} :: UpdateRecommenderConfiguration)

-- | 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.
updateRecommenderConfiguration_recommendationProviderUri :: Lens.Lens' UpdateRecommenderConfiguration Prelude.Text
updateRecommenderConfiguration_recommendationProviderUri :: (Text -> f Text)
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
updateRecommenderConfiguration_recommendationProviderUri = (UpdateRecommenderConfiguration -> Text)
-> (UpdateRecommenderConfiguration
    -> Text -> UpdateRecommenderConfiguration)
-> Lens
     UpdateRecommenderConfiguration
     UpdateRecommenderConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecommenderConfiguration' {Text
recommendationProviderUri :: Text
$sel:recommendationProviderUri:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Text
recommendationProviderUri} -> Text
recommendationProviderUri) (\s :: UpdateRecommenderConfiguration
s@UpdateRecommenderConfiguration' {} Text
a -> UpdateRecommenderConfiguration
s {$sel:recommendationProviderUri:UpdateRecommenderConfiguration' :: Text
recommendationProviderUri = Text
a} :: UpdateRecommenderConfiguration)

-- | 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.
updateRecommenderConfiguration_recommendationProviderRoleArn :: Lens.Lens' UpdateRecommenderConfiguration Prelude.Text
updateRecommenderConfiguration_recommendationProviderRoleArn :: (Text -> f Text)
-> UpdateRecommenderConfiguration
-> f UpdateRecommenderConfiguration
updateRecommenderConfiguration_recommendationProviderRoleArn = (UpdateRecommenderConfiguration -> Text)
-> (UpdateRecommenderConfiguration
    -> Text -> UpdateRecommenderConfiguration)
-> Lens
     UpdateRecommenderConfiguration
     UpdateRecommenderConfiguration
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateRecommenderConfiguration' {Text
recommendationProviderRoleArn :: Text
$sel:recommendationProviderRoleArn:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Text
recommendationProviderRoleArn} -> Text
recommendationProviderRoleArn) (\s :: UpdateRecommenderConfiguration
s@UpdateRecommenderConfiguration' {} Text
a -> UpdateRecommenderConfiguration
s {$sel:recommendationProviderRoleArn:UpdateRecommenderConfiguration' :: Text
recommendationProviderRoleArn = Text
a} :: UpdateRecommenderConfiguration)

instance
  Prelude.Hashable
    UpdateRecommenderConfiguration

instance
  Prelude.NFData
    UpdateRecommenderConfiguration

instance Core.ToJSON UpdateRecommenderConfiguration where
  toJSON :: UpdateRecommenderConfiguration -> Value
toJSON UpdateRecommenderConfiguration' {Maybe Int
Maybe Text
Maybe (HashMap Text Text)
Text
recommendationProviderRoleArn :: Text
recommendationProviderUri :: Text
recommendationsPerMessage :: Maybe Int
description :: Maybe Text
name :: Maybe Text
attributes :: Maybe (HashMap Text Text)
recommendationProviderIdType :: Maybe Text
recommendationsDisplayName :: Maybe Text
recommendationTransformerUri :: Maybe Text
$sel:recommendationProviderRoleArn:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Text
$sel:recommendationProviderUri:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Text
$sel:recommendationsPerMessage:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Int
$sel:description:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
$sel:name:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
$sel:attributes:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe (HashMap Text Text)
$sel:recommendationProviderIdType:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
$sel:recommendationsDisplayName:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
$sel:recommendationTransformerUri:UpdateRecommenderConfiguration' :: UpdateRecommenderConfiguration -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"RecommendationTransformerUri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
recommendationTransformerUri,
            (Text
"RecommendationsDisplayName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
recommendationsDisplayName,
            (Text
"RecommendationProviderIdType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
recommendationProviderIdType,
            (Text
"Attributes" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
attributes,
            (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
            (Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description,
            (Text
"RecommendationsPerMessage" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
recommendationsPerMessage,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"RecommendationProviderUri"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
recommendationProviderUri
              ),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"RecommendationProviderRoleArn"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
recommendationProviderRoleArn
              )
          ]
      )