{-# 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.RecommenderConfigurationResponse
-- 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.RecommenderConfigurationResponse where

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

-- | Provides information about Amazon Pinpoint configuration settings for
-- retrieving and processing data from a recommender model.
--
-- /See:/ 'newRecommenderConfigurationResponse' smart constructor.
data RecommenderConfigurationResponse = RecommenderConfigurationResponse'
  { -- | The name or Amazon Resource Name (ARN) of the AWS Lambda function that
    -- Amazon Pinpoint invokes to perform additional processing of
    -- recommendation data that it retrieves from the recommender model.
    RecommenderConfigurationResponse -> Maybe Text
recommendationTransformerUri :: Prelude.Maybe Prelude.Text,
    -- | The 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 name appears in the
    -- __Attribute finder__ of the template editor on the Amazon Pinpoint
    -- console.
    --
    -- This value is null if the configuration doesn\'t invoke an AWS Lambda
    -- function (RecommendationTransformerUri) to perform additional processing
    -- of recommendation data.
    RecommenderConfigurationResponse -> Maybe Text
recommendationsDisplayName :: Prelude.Maybe Prelude.Text,
    -- | The type of Amazon Pinpoint ID that\'s associated 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. Possible values are:
    --
    -- -   PINPOINT_ENDPOINT_ID - Each user in the model is associated 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 - Each user in the model is associated with a
    --     particular user and endpoint in Amazon Pinpoint. The data is
    --     correlated based on user IDs in Amazon Pinpoint. If this value is
    --     specified, 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.
    RecommenderConfigurationResponse -> Maybe Text
recommendationProviderIdType :: Prelude.Maybe Prelude.Text,
    -- | A map 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.
    --
    -- This value is null if the configuration doesn\'t invoke an AWS Lambda
    -- function (RecommendationTransformerUri) to perform additional processing
    -- of recommendation data.
    RecommenderConfigurationResponse -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | The custom name of the configuration for the recommender model.
    RecommenderConfigurationResponse -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The custom description of the configuration for the recommender model.
    RecommenderConfigurationResponse -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
    -- | The number of recommended items that are retrieved 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.
    RecommenderConfigurationResponse -> Maybe Int
recommendationsPerMessage :: Prelude.Maybe Prelude.Int,
    -- | The Amazon Resource Name (ARN) of the recommender model that Amazon
    -- Pinpoint retrieves the recommendation data from. This value is the ARN
    -- of an Amazon Personalize campaign.
    RecommenderConfigurationResponse -> Text
recommendationProviderUri :: Prelude.Text,
    -- | The date, in extended ISO 8601 format, when the configuration for the
    -- recommender model was last modified.
    RecommenderConfigurationResponse -> Text
lastModifiedDate :: Prelude.Text,
    -- | The date, in extended ISO 8601 format, when the configuration was
    -- created for the recommender model.
    RecommenderConfigurationResponse -> Text
creationDate :: 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.
    RecommenderConfigurationResponse -> Text
recommendationProviderRoleArn :: Prelude.Text,
    -- | The unique identifier for the recommender model configuration.
    RecommenderConfigurationResponse -> Text
id :: Prelude.Text
  }
  deriving (RecommenderConfigurationResponse
-> RecommenderConfigurationResponse -> Bool
(RecommenderConfigurationResponse
 -> RecommenderConfigurationResponse -> Bool)
-> (RecommenderConfigurationResponse
    -> RecommenderConfigurationResponse -> Bool)
-> Eq RecommenderConfigurationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RecommenderConfigurationResponse
-> RecommenderConfigurationResponse -> Bool
$c/= :: RecommenderConfigurationResponse
-> RecommenderConfigurationResponse -> Bool
== :: RecommenderConfigurationResponse
-> RecommenderConfigurationResponse -> Bool
$c== :: RecommenderConfigurationResponse
-> RecommenderConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [RecommenderConfigurationResponse]
ReadPrec RecommenderConfigurationResponse
Int -> ReadS RecommenderConfigurationResponse
ReadS [RecommenderConfigurationResponse]
(Int -> ReadS RecommenderConfigurationResponse)
-> ReadS [RecommenderConfigurationResponse]
-> ReadPrec RecommenderConfigurationResponse
-> ReadPrec [RecommenderConfigurationResponse]
-> Read RecommenderConfigurationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RecommenderConfigurationResponse]
$creadListPrec :: ReadPrec [RecommenderConfigurationResponse]
readPrec :: ReadPrec RecommenderConfigurationResponse
$creadPrec :: ReadPrec RecommenderConfigurationResponse
readList :: ReadS [RecommenderConfigurationResponse]
$creadList :: ReadS [RecommenderConfigurationResponse]
readsPrec :: Int -> ReadS RecommenderConfigurationResponse
$creadsPrec :: Int -> ReadS RecommenderConfigurationResponse
Prelude.Read, Int -> RecommenderConfigurationResponse -> ShowS
[RecommenderConfigurationResponse] -> ShowS
RecommenderConfigurationResponse -> String
(Int -> RecommenderConfigurationResponse -> ShowS)
-> (RecommenderConfigurationResponse -> String)
-> ([RecommenderConfigurationResponse] -> ShowS)
-> Show RecommenderConfigurationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RecommenderConfigurationResponse] -> ShowS
$cshowList :: [RecommenderConfigurationResponse] -> ShowS
show :: RecommenderConfigurationResponse -> String
$cshow :: RecommenderConfigurationResponse -> String
showsPrec :: Int -> RecommenderConfigurationResponse -> ShowS
$cshowsPrec :: Int -> RecommenderConfigurationResponse -> ShowS
Prelude.Show, (forall x.
 RecommenderConfigurationResponse
 -> Rep RecommenderConfigurationResponse x)
-> (forall x.
    Rep RecommenderConfigurationResponse x
    -> RecommenderConfigurationResponse)
-> Generic RecommenderConfigurationResponse
forall x.
Rep RecommenderConfigurationResponse x
-> RecommenderConfigurationResponse
forall x.
RecommenderConfigurationResponse
-> Rep RecommenderConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RecommenderConfigurationResponse x
-> RecommenderConfigurationResponse
$cfrom :: forall x.
RecommenderConfigurationResponse
-> Rep RecommenderConfigurationResponse x
Prelude.Generic)

-- |
-- Create a value of 'RecommenderConfigurationResponse' 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', 'recommenderConfigurationResponse_recommendationTransformerUri' - The name or Amazon Resource Name (ARN) of the AWS Lambda function that
-- Amazon Pinpoint invokes to perform additional processing of
-- recommendation data that it retrieves from the recommender model.
--
-- 'recommendationsDisplayName', 'recommenderConfigurationResponse_recommendationsDisplayName' - The 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 name appears in the
-- __Attribute finder__ of the template editor on the Amazon Pinpoint
-- console.
--
-- This value is null if the configuration doesn\'t invoke an AWS Lambda
-- function (RecommendationTransformerUri) to perform additional processing
-- of recommendation data.
--
-- 'recommendationProviderIdType', 'recommenderConfigurationResponse_recommendationProviderIdType' - The type of Amazon Pinpoint ID that\'s associated 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. Possible values are:
--
-- -   PINPOINT_ENDPOINT_ID - Each user in the model is associated 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 - Each user in the model is associated with a
--     particular user and endpoint in Amazon Pinpoint. The data is
--     correlated based on user IDs in Amazon Pinpoint. If this value is
--     specified, 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', 'recommenderConfigurationResponse_attributes' - A map 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.
--
-- This value is null if the configuration doesn\'t invoke an AWS Lambda
-- function (RecommendationTransformerUri) to perform additional processing
-- of recommendation data.
--
-- 'name', 'recommenderConfigurationResponse_name' - The custom name of the configuration for the recommender model.
--
-- 'description', 'recommenderConfigurationResponse_description' - The custom description of the configuration for the recommender model.
--
-- 'recommendationsPerMessage', 'recommenderConfigurationResponse_recommendationsPerMessage' - The number of recommended items that are retrieved 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.
--
-- 'recommendationProviderUri', 'recommenderConfigurationResponse_recommendationProviderUri' - The Amazon Resource Name (ARN) of the recommender model that Amazon
-- Pinpoint retrieves the recommendation data from. This value is the ARN
-- of an Amazon Personalize campaign.
--
-- 'lastModifiedDate', 'recommenderConfigurationResponse_lastModifiedDate' - The date, in extended ISO 8601 format, when the configuration for the
-- recommender model was last modified.
--
-- 'creationDate', 'recommenderConfigurationResponse_creationDate' - The date, in extended ISO 8601 format, when the configuration was
-- created for the recommender model.
--
-- 'recommendationProviderRoleArn', 'recommenderConfigurationResponse_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.
--
-- 'id', 'recommenderConfigurationResponse_id' - The unique identifier for the recommender model configuration.
newRecommenderConfigurationResponse ::
  -- | 'recommendationProviderUri'
  Prelude.Text ->
  -- | 'lastModifiedDate'
  Prelude.Text ->
  -- | 'creationDate'
  Prelude.Text ->
  -- | 'recommendationProviderRoleArn'
  Prelude.Text ->
  -- | 'id'
  Prelude.Text ->
  RecommenderConfigurationResponse
newRecommenderConfigurationResponse :: Text
-> Text -> Text -> Text -> Text -> RecommenderConfigurationResponse
newRecommenderConfigurationResponse
  Text
pRecommendationProviderUri_
  Text
pLastModifiedDate_
  Text
pCreationDate_
  Text
pRecommendationProviderRoleArn_
  Text
pId_ =
    RecommenderConfigurationResponse' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Text
-> Text
-> Text
-> Text
-> Text
-> RecommenderConfigurationResponse
RecommenderConfigurationResponse'
      { $sel:recommendationTransformerUri:RecommenderConfigurationResponse' :: Maybe Text
recommendationTransformerUri =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendationsDisplayName:RecommenderConfigurationResponse' :: Maybe Text
recommendationsDisplayName =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendationProviderIdType:RecommenderConfigurationResponse' :: Maybe Text
recommendationProviderIdType =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:attributes:RecommenderConfigurationResponse' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
        $sel:name:RecommenderConfigurationResponse' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:description:RecommenderConfigurationResponse' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendationsPerMessage:RecommenderConfigurationResponse' :: Maybe Int
recommendationsPerMessage =
          Maybe Int
forall a. Maybe a
Prelude.Nothing,
        $sel:recommendationProviderUri:RecommenderConfigurationResponse' :: Text
recommendationProviderUri =
          Text
pRecommendationProviderUri_,
        $sel:lastModifiedDate:RecommenderConfigurationResponse' :: Text
lastModifiedDate = Text
pLastModifiedDate_,
        $sel:creationDate:RecommenderConfigurationResponse' :: Text
creationDate = Text
pCreationDate_,
        $sel:recommendationProviderRoleArn:RecommenderConfigurationResponse' :: Text
recommendationProviderRoleArn =
          Text
pRecommendationProviderRoleArn_,
        $sel:id:RecommenderConfigurationResponse' :: Text
id = Text
pId_
      }

-- | The name or Amazon Resource Name (ARN) of the AWS Lambda function that
-- Amazon Pinpoint invokes to perform additional processing of
-- recommendation data that it retrieves from the recommender model.
recommenderConfigurationResponse_recommendationTransformerUri :: Lens.Lens' RecommenderConfigurationResponse (Prelude.Maybe Prelude.Text)
recommenderConfigurationResponse_recommendationTransformerUri :: (Maybe Text -> f (Maybe Text))
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_recommendationTransformerUri = (RecommenderConfigurationResponse -> Maybe Text)
-> (RecommenderConfigurationResponse
    -> Maybe Text -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Maybe Text
recommendationTransformerUri :: Maybe Text
$sel:recommendationTransformerUri:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Maybe Text
recommendationTransformerUri} -> Maybe Text
recommendationTransformerUri) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Maybe Text
a -> RecommenderConfigurationResponse
s {$sel:recommendationTransformerUri:RecommenderConfigurationResponse' :: Maybe Text
recommendationTransformerUri = Maybe Text
a} :: RecommenderConfigurationResponse)

-- | The 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 name appears in the
-- __Attribute finder__ of the template editor on the Amazon Pinpoint
-- console.
--
-- This value is null if the configuration doesn\'t invoke an AWS Lambda
-- function (RecommendationTransformerUri) to perform additional processing
-- of recommendation data.
recommenderConfigurationResponse_recommendationsDisplayName :: Lens.Lens' RecommenderConfigurationResponse (Prelude.Maybe Prelude.Text)
recommenderConfigurationResponse_recommendationsDisplayName :: (Maybe Text -> f (Maybe Text))
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_recommendationsDisplayName = (RecommenderConfigurationResponse -> Maybe Text)
-> (RecommenderConfigurationResponse
    -> Maybe Text -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Maybe Text
recommendationsDisplayName :: Maybe Text
$sel:recommendationsDisplayName:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Maybe Text
recommendationsDisplayName} -> Maybe Text
recommendationsDisplayName) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Maybe Text
a -> RecommenderConfigurationResponse
s {$sel:recommendationsDisplayName:RecommenderConfigurationResponse' :: Maybe Text
recommendationsDisplayName = Maybe Text
a} :: RecommenderConfigurationResponse)

-- | The type of Amazon Pinpoint ID that\'s associated 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. Possible values are:
--
-- -   PINPOINT_ENDPOINT_ID - Each user in the model is associated 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 - Each user in the model is associated with a
--     particular user and endpoint in Amazon Pinpoint. The data is
--     correlated based on user IDs in Amazon Pinpoint. If this value is
--     specified, 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.
recommenderConfigurationResponse_recommendationProviderIdType :: Lens.Lens' RecommenderConfigurationResponse (Prelude.Maybe Prelude.Text)
recommenderConfigurationResponse_recommendationProviderIdType :: (Maybe Text -> f (Maybe Text))
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_recommendationProviderIdType = (RecommenderConfigurationResponse -> Maybe Text)
-> (RecommenderConfigurationResponse
    -> Maybe Text -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Maybe Text
recommendationProviderIdType :: Maybe Text
$sel:recommendationProviderIdType:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Maybe Text
recommendationProviderIdType} -> Maybe Text
recommendationProviderIdType) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Maybe Text
a -> RecommenderConfigurationResponse
s {$sel:recommendationProviderIdType:RecommenderConfigurationResponse' :: Maybe Text
recommendationProviderIdType = Maybe Text
a} :: RecommenderConfigurationResponse)

-- | A map 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.
--
-- This value is null if the configuration doesn\'t invoke an AWS Lambda
-- function (RecommendationTransformerUri) to perform additional processing
-- of recommendation data.
recommenderConfigurationResponse_attributes :: Lens.Lens' RecommenderConfigurationResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
recommenderConfigurationResponse_attributes :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_attributes = (RecommenderConfigurationResponse -> Maybe (HashMap Text Text))
-> (RecommenderConfigurationResponse
    -> Maybe (HashMap Text Text) -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     (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 (\RecommenderConfigurationResponse' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Maybe (HashMap Text Text)
a -> RecommenderConfigurationResponse
s {$sel:attributes:RecommenderConfigurationResponse' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: RecommenderConfigurationResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
 -> RecommenderConfigurationResponse
 -> f RecommenderConfigurationResponse)
-> ((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)))
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
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

-- | The custom name of the configuration for the recommender model.
recommenderConfigurationResponse_name :: Lens.Lens' RecommenderConfigurationResponse (Prelude.Maybe Prelude.Text)
recommenderConfigurationResponse_name :: (Maybe Text -> f (Maybe Text))
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_name = (RecommenderConfigurationResponse -> Maybe Text)
-> (RecommenderConfigurationResponse
    -> Maybe Text -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Maybe Text
name :: Maybe Text
$sel:name:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Maybe Text
name} -> Maybe Text
name) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Maybe Text
a -> RecommenderConfigurationResponse
s {$sel:name:RecommenderConfigurationResponse' :: Maybe Text
name = Maybe Text
a} :: RecommenderConfigurationResponse)

-- | The custom description of the configuration for the recommender model.
recommenderConfigurationResponse_description :: Lens.Lens' RecommenderConfigurationResponse (Prelude.Maybe Prelude.Text)
recommenderConfigurationResponse_description :: (Maybe Text -> f (Maybe Text))
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_description = (RecommenderConfigurationResponse -> Maybe Text)
-> (RecommenderConfigurationResponse
    -> Maybe Text -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Maybe Text
description :: Maybe Text
$sel:description:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Maybe Text
description} -> Maybe Text
description) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Maybe Text
a -> RecommenderConfigurationResponse
s {$sel:description:RecommenderConfigurationResponse' :: Maybe Text
description = Maybe Text
a} :: RecommenderConfigurationResponse)

-- | The number of recommended items that are retrieved 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.
recommenderConfigurationResponse_recommendationsPerMessage :: Lens.Lens' RecommenderConfigurationResponse (Prelude.Maybe Prelude.Int)
recommenderConfigurationResponse_recommendationsPerMessage :: (Maybe Int -> f (Maybe Int))
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_recommendationsPerMessage = (RecommenderConfigurationResponse -> Maybe Int)
-> (RecommenderConfigurationResponse
    -> Maybe Int -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     (Maybe Int)
     (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Maybe Int
recommendationsPerMessage :: Maybe Int
$sel:recommendationsPerMessage:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Maybe Int
recommendationsPerMessage} -> Maybe Int
recommendationsPerMessage) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Maybe Int
a -> RecommenderConfigurationResponse
s {$sel:recommendationsPerMessage:RecommenderConfigurationResponse' :: Maybe Int
recommendationsPerMessage = Maybe Int
a} :: RecommenderConfigurationResponse)

-- | The Amazon Resource Name (ARN) of the recommender model that Amazon
-- Pinpoint retrieves the recommendation data from. This value is the ARN
-- of an Amazon Personalize campaign.
recommenderConfigurationResponse_recommendationProviderUri :: Lens.Lens' RecommenderConfigurationResponse Prelude.Text
recommenderConfigurationResponse_recommendationProviderUri :: (Text -> f Text)
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_recommendationProviderUri = (RecommenderConfigurationResponse -> Text)
-> (RecommenderConfigurationResponse
    -> Text -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Text
recommendationProviderUri :: Text
$sel:recommendationProviderUri:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Text
recommendationProviderUri} -> Text
recommendationProviderUri) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Text
a -> RecommenderConfigurationResponse
s {$sel:recommendationProviderUri:RecommenderConfigurationResponse' :: Text
recommendationProviderUri = Text
a} :: RecommenderConfigurationResponse)

-- | The date, in extended ISO 8601 format, when the configuration for the
-- recommender model was last modified.
recommenderConfigurationResponse_lastModifiedDate :: Lens.Lens' RecommenderConfigurationResponse Prelude.Text
recommenderConfigurationResponse_lastModifiedDate :: (Text -> f Text)
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_lastModifiedDate = (RecommenderConfigurationResponse -> Text)
-> (RecommenderConfigurationResponse
    -> Text -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Text
lastModifiedDate :: Text
$sel:lastModifiedDate:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Text
lastModifiedDate} -> Text
lastModifiedDate) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Text
a -> RecommenderConfigurationResponse
s {$sel:lastModifiedDate:RecommenderConfigurationResponse' :: Text
lastModifiedDate = Text
a} :: RecommenderConfigurationResponse)

-- | The date, in extended ISO 8601 format, when the configuration was
-- created for the recommender model.
recommenderConfigurationResponse_creationDate :: Lens.Lens' RecommenderConfigurationResponse Prelude.Text
recommenderConfigurationResponse_creationDate :: (Text -> f Text)
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_creationDate = (RecommenderConfigurationResponse -> Text)
-> (RecommenderConfigurationResponse
    -> Text -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Text
creationDate :: Text
$sel:creationDate:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Text
creationDate} -> Text
creationDate) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Text
a -> RecommenderConfigurationResponse
s {$sel:creationDate:RecommenderConfigurationResponse' :: Text
creationDate = Text
a} :: RecommenderConfigurationResponse)

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

-- | The unique identifier for the recommender model configuration.
recommenderConfigurationResponse_id :: Lens.Lens' RecommenderConfigurationResponse Prelude.Text
recommenderConfigurationResponse_id :: (Text -> f Text)
-> RecommenderConfigurationResponse
-> f RecommenderConfigurationResponse
recommenderConfigurationResponse_id = (RecommenderConfigurationResponse -> Text)
-> (RecommenderConfigurationResponse
    -> Text -> RecommenderConfigurationResponse)
-> Lens
     RecommenderConfigurationResponse
     RecommenderConfigurationResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RecommenderConfigurationResponse' {Text
id :: Text
$sel:id:RecommenderConfigurationResponse' :: RecommenderConfigurationResponse -> Text
id} -> Text
id) (\s :: RecommenderConfigurationResponse
s@RecommenderConfigurationResponse' {} Text
a -> RecommenderConfigurationResponse
s {$sel:id:RecommenderConfigurationResponse' :: Text
id = Text
a} :: RecommenderConfigurationResponse)

instance
  Core.FromJSON
    RecommenderConfigurationResponse
  where
  parseJSON :: Value -> Parser RecommenderConfigurationResponse
parseJSON =
    String
-> (Object -> Parser RecommenderConfigurationResponse)
-> Value
-> Parser RecommenderConfigurationResponse
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"RecommenderConfigurationResponse"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Int
-> Text
-> Text
-> Text
-> Text
-> Text
-> RecommenderConfigurationResponse
RecommenderConfigurationResponse'
            (Maybe Text
 -> Maybe Text
 -> Maybe Text
 -> Maybe (HashMap Text Text)
 -> Maybe Text
 -> Maybe Text
 -> Maybe Int
 -> Text
 -> Text
 -> Text
 -> Text
 -> Text
 -> RecommenderConfigurationResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecommendationTransformerUri")
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> RecommenderConfigurationResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecommendationsDisplayName")
            Parser
  (Maybe Text
   -> Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> RecommenderConfigurationResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe (HashMap Text Text)
      -> Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecommendationProviderIdType")
            Parser
  (Maybe (HashMap Text Text)
   -> Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> RecommenderConfigurationResponse)
-> Parser (Maybe (HashMap Text Text))
-> Parser
     (Maybe Text
      -> Maybe Text
      -> Maybe Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Attributes" Parser (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> Parser (Maybe (HashMap Text Text))
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
            Parser
  (Maybe Text
   -> Maybe Text
   -> Maybe Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> RecommenderConfigurationResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Name")
            Parser
  (Maybe Text
   -> Maybe Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> RecommenderConfigurationResponse)
-> Parser (Maybe Text)
-> Parser
     (Maybe Int
      -> Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"Description")
            Parser
  (Maybe Int
   -> Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> RecommenderConfigurationResponse)
-> Parser (Maybe Int)
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> Text
      -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Int)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"RecommendationsPerMessage")
            Parser
  (Text
   -> Text
   -> Text
   -> Text
   -> Text
   -> RecommenderConfigurationResponse)
-> Parser Text
-> Parser
     (Text -> Text -> Text -> Text -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RecommendationProviderUri")
            Parser
  (Text -> Text -> Text -> Text -> RecommenderConfigurationResponse)
-> Parser Text
-> Parser
     (Text -> Text -> Text -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"LastModifiedDate")
            Parser (Text -> Text -> Text -> RecommenderConfigurationResponse)
-> Parser Text
-> Parser (Text -> Text -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"CreationDate")
            Parser (Text -> Text -> RecommenderConfigurationResponse)
-> Parser Text -> Parser (Text -> RecommenderConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"RecommendationProviderRoleArn")
            Parser (Text -> RecommenderConfigurationResponse)
-> Parser Text -> Parser RecommenderConfigurationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Id")
      )

instance
  Prelude.Hashable
    RecommenderConfigurationResponse

instance
  Prelude.NFData
    RecommenderConfigurationResponse