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

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

-- |
-- Module      : Amazonka.MachineLearning.CreateEvaluation
-- 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)
--
-- Creates a new @Evaluation@ of an @MLModel@. An @MLModel@ is evaluated on
-- a set of observations associated to a @DataSource@. Like a @DataSource@
-- for an @MLModel@, the @DataSource@ for an @Evaluation@ contains values
-- for the @Target Variable@. The @Evaluation@ compares the predicted
-- result for each observation to the actual outcome and provides a summary
-- so that you know how effective the @MLModel@ functions on the test data.
-- Evaluation generates a relevant performance metric, such as BinaryAUC,
-- RegressionRMSE or MulticlassAvgFScore based on the corresponding
-- @MLModelType@: @BINARY@, @REGRESSION@ or @MULTICLASS@.
--
-- @CreateEvaluation@ is an asynchronous operation. In response to
-- @CreateEvaluation@, Amazon Machine Learning (Amazon ML) immediately
-- returns and sets the evaluation status to @PENDING@. After the
-- @Evaluation@ is created and ready for use, Amazon ML sets the status to
-- @COMPLETED@.
--
-- You can use the @GetEvaluation@ operation to check progress of the
-- evaluation during the creation operation.
module Amazonka.MachineLearning.CreateEvaluation
  ( -- * Creating a Request
    CreateEvaluation (..),
    newCreateEvaluation,

    -- * Request Lenses
    createEvaluation_evaluationName,
    createEvaluation_evaluationId,
    createEvaluation_mLModelId,
    createEvaluation_evaluationDataSourceId,

    -- * Destructuring the Response
    CreateEvaluationResponse (..),
    newCreateEvaluationResponse,

    -- * Response Lenses
    createEvaluationResponse_evaluationId,
    createEvaluationResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.MachineLearning.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateEvaluation' smart constructor.
data CreateEvaluation = CreateEvaluation'
  { -- | A user-supplied name or description of the @Evaluation@.
    CreateEvaluation -> Maybe Text
evaluationName :: Prelude.Maybe Prelude.Text,
    -- | A user-supplied ID that uniquely identifies the @Evaluation@.
    CreateEvaluation -> Text
evaluationId :: Prelude.Text,
    -- | The ID of the @MLModel@ to evaluate.
    --
    -- The schema used in creating the @MLModel@ must match the schema of the
    -- @DataSource@ used in the @Evaluation@.
    CreateEvaluation -> Text
mLModelId :: Prelude.Text,
    -- | The ID of the @DataSource@ for the evaluation. The schema of the
    -- @DataSource@ must match the schema used to create the @MLModel@.
    CreateEvaluation -> Text
evaluationDataSourceId :: Prelude.Text
  }
  deriving (CreateEvaluation -> CreateEvaluation -> Bool
(CreateEvaluation -> CreateEvaluation -> Bool)
-> (CreateEvaluation -> CreateEvaluation -> Bool)
-> Eq CreateEvaluation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEvaluation -> CreateEvaluation -> Bool
$c/= :: CreateEvaluation -> CreateEvaluation -> Bool
== :: CreateEvaluation -> CreateEvaluation -> Bool
$c== :: CreateEvaluation -> CreateEvaluation -> Bool
Prelude.Eq, ReadPrec [CreateEvaluation]
ReadPrec CreateEvaluation
Int -> ReadS CreateEvaluation
ReadS [CreateEvaluation]
(Int -> ReadS CreateEvaluation)
-> ReadS [CreateEvaluation]
-> ReadPrec CreateEvaluation
-> ReadPrec [CreateEvaluation]
-> Read CreateEvaluation
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEvaluation]
$creadListPrec :: ReadPrec [CreateEvaluation]
readPrec :: ReadPrec CreateEvaluation
$creadPrec :: ReadPrec CreateEvaluation
readList :: ReadS [CreateEvaluation]
$creadList :: ReadS [CreateEvaluation]
readsPrec :: Int -> ReadS CreateEvaluation
$creadsPrec :: Int -> ReadS CreateEvaluation
Prelude.Read, Int -> CreateEvaluation -> ShowS
[CreateEvaluation] -> ShowS
CreateEvaluation -> String
(Int -> CreateEvaluation -> ShowS)
-> (CreateEvaluation -> String)
-> ([CreateEvaluation] -> ShowS)
-> Show CreateEvaluation
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEvaluation] -> ShowS
$cshowList :: [CreateEvaluation] -> ShowS
show :: CreateEvaluation -> String
$cshow :: CreateEvaluation -> String
showsPrec :: Int -> CreateEvaluation -> ShowS
$cshowsPrec :: Int -> CreateEvaluation -> ShowS
Prelude.Show, (forall x. CreateEvaluation -> Rep CreateEvaluation x)
-> (forall x. Rep CreateEvaluation x -> CreateEvaluation)
-> Generic CreateEvaluation
forall x. Rep CreateEvaluation x -> CreateEvaluation
forall x. CreateEvaluation -> Rep CreateEvaluation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateEvaluation x -> CreateEvaluation
$cfrom :: forall x. CreateEvaluation -> Rep CreateEvaluation x
Prelude.Generic)

-- |
-- Create a value of 'CreateEvaluation' 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:
--
-- 'evaluationName', 'createEvaluation_evaluationName' - A user-supplied name or description of the @Evaluation@.
--
-- 'evaluationId', 'createEvaluation_evaluationId' - A user-supplied ID that uniquely identifies the @Evaluation@.
--
-- 'mLModelId', 'createEvaluation_mLModelId' - The ID of the @MLModel@ to evaluate.
--
-- The schema used in creating the @MLModel@ must match the schema of the
-- @DataSource@ used in the @Evaluation@.
--
-- 'evaluationDataSourceId', 'createEvaluation_evaluationDataSourceId' - The ID of the @DataSource@ for the evaluation. The schema of the
-- @DataSource@ must match the schema used to create the @MLModel@.
newCreateEvaluation ::
  -- | 'evaluationId'
  Prelude.Text ->
  -- | 'mLModelId'
  Prelude.Text ->
  -- | 'evaluationDataSourceId'
  Prelude.Text ->
  CreateEvaluation
newCreateEvaluation :: Text -> Text -> Text -> CreateEvaluation
newCreateEvaluation
  Text
pEvaluationId_
  Text
pMLModelId_
  Text
pEvaluationDataSourceId_ =
    CreateEvaluation' :: Maybe Text -> Text -> Text -> Text -> CreateEvaluation
CreateEvaluation'
      { $sel:evaluationName:CreateEvaluation' :: Maybe Text
evaluationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:evaluationId:CreateEvaluation' :: Text
evaluationId = Text
pEvaluationId_,
        $sel:mLModelId:CreateEvaluation' :: Text
mLModelId = Text
pMLModelId_,
        $sel:evaluationDataSourceId:CreateEvaluation' :: Text
evaluationDataSourceId = Text
pEvaluationDataSourceId_
      }

-- | A user-supplied name or description of the @Evaluation@.
createEvaluation_evaluationName :: Lens.Lens' CreateEvaluation (Prelude.Maybe Prelude.Text)
createEvaluation_evaluationName :: (Maybe Text -> f (Maybe Text))
-> CreateEvaluation -> f CreateEvaluation
createEvaluation_evaluationName = (CreateEvaluation -> Maybe Text)
-> (CreateEvaluation -> Maybe Text -> CreateEvaluation)
-> Lens CreateEvaluation CreateEvaluation (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEvaluation' {Maybe Text
evaluationName :: Maybe Text
$sel:evaluationName:CreateEvaluation' :: CreateEvaluation -> Maybe Text
evaluationName} -> Maybe Text
evaluationName) (\s :: CreateEvaluation
s@CreateEvaluation' {} Maybe Text
a -> CreateEvaluation
s {$sel:evaluationName:CreateEvaluation' :: Maybe Text
evaluationName = Maybe Text
a} :: CreateEvaluation)

-- | A user-supplied ID that uniquely identifies the @Evaluation@.
createEvaluation_evaluationId :: Lens.Lens' CreateEvaluation Prelude.Text
createEvaluation_evaluationId :: (Text -> f Text) -> CreateEvaluation -> f CreateEvaluation
createEvaluation_evaluationId = (CreateEvaluation -> Text)
-> (CreateEvaluation -> Text -> CreateEvaluation)
-> Lens CreateEvaluation CreateEvaluation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEvaluation' {Text
evaluationId :: Text
$sel:evaluationId:CreateEvaluation' :: CreateEvaluation -> Text
evaluationId} -> Text
evaluationId) (\s :: CreateEvaluation
s@CreateEvaluation' {} Text
a -> CreateEvaluation
s {$sel:evaluationId:CreateEvaluation' :: Text
evaluationId = Text
a} :: CreateEvaluation)

-- | The ID of the @MLModel@ to evaluate.
--
-- The schema used in creating the @MLModel@ must match the schema of the
-- @DataSource@ used in the @Evaluation@.
createEvaluation_mLModelId :: Lens.Lens' CreateEvaluation Prelude.Text
createEvaluation_mLModelId :: (Text -> f Text) -> CreateEvaluation -> f CreateEvaluation
createEvaluation_mLModelId = (CreateEvaluation -> Text)
-> (CreateEvaluation -> Text -> CreateEvaluation)
-> Lens CreateEvaluation CreateEvaluation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEvaluation' {Text
mLModelId :: Text
$sel:mLModelId:CreateEvaluation' :: CreateEvaluation -> Text
mLModelId} -> Text
mLModelId) (\s :: CreateEvaluation
s@CreateEvaluation' {} Text
a -> CreateEvaluation
s {$sel:mLModelId:CreateEvaluation' :: Text
mLModelId = Text
a} :: CreateEvaluation)

-- | The ID of the @DataSource@ for the evaluation. The schema of the
-- @DataSource@ must match the schema used to create the @MLModel@.
createEvaluation_evaluationDataSourceId :: Lens.Lens' CreateEvaluation Prelude.Text
createEvaluation_evaluationDataSourceId :: (Text -> f Text) -> CreateEvaluation -> f CreateEvaluation
createEvaluation_evaluationDataSourceId = (CreateEvaluation -> Text)
-> (CreateEvaluation -> Text -> CreateEvaluation)
-> Lens CreateEvaluation CreateEvaluation Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEvaluation' {Text
evaluationDataSourceId :: Text
$sel:evaluationDataSourceId:CreateEvaluation' :: CreateEvaluation -> Text
evaluationDataSourceId} -> Text
evaluationDataSourceId) (\s :: CreateEvaluation
s@CreateEvaluation' {} Text
a -> CreateEvaluation
s {$sel:evaluationDataSourceId:CreateEvaluation' :: Text
evaluationDataSourceId = Text
a} :: CreateEvaluation)

instance Core.AWSRequest CreateEvaluation where
  type
    AWSResponse CreateEvaluation =
      CreateEvaluationResponse
  request :: CreateEvaluation -> Request CreateEvaluation
request = Service -> CreateEvaluation -> Request CreateEvaluation
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateEvaluation
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateEvaluation)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreateEvaluation))
-> Logger
-> Service
-> Proxy CreateEvaluation
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateEvaluation)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe Text -> Int -> CreateEvaluationResponse
CreateEvaluationResponse'
            (Maybe Text -> Int -> CreateEvaluationResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateEvaluationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"EvaluationId")
            Either String (Int -> CreateEvaluationResponse)
-> Either String Int -> Either String CreateEvaluationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable CreateEvaluation

instance Prelude.NFData CreateEvaluation

instance Core.ToHeaders CreateEvaluation where
  toHeaders :: CreateEvaluation -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateEvaluation -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"X-Amz-Target"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonML_20141212.CreateEvaluation" ::
                          Prelude.ByteString
                      ),
            HeaderName
"Content-Type"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Core.ToJSON CreateEvaluation where
  toJSON :: CreateEvaluation -> Value
toJSON CreateEvaluation' {Maybe Text
Text
evaluationDataSourceId :: Text
mLModelId :: Text
evaluationId :: Text
evaluationName :: Maybe Text
$sel:evaluationDataSourceId:CreateEvaluation' :: CreateEvaluation -> Text
$sel:mLModelId:CreateEvaluation' :: CreateEvaluation -> Text
$sel:evaluationId:CreateEvaluation' :: CreateEvaluation -> Text
$sel:evaluationName:CreateEvaluation' :: CreateEvaluation -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"EvaluationName" 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
evaluationName,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"EvaluationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
evaluationId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"MLModelId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
mLModelId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              ( Text
"EvaluationDataSourceId"
                  Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
evaluationDataSourceId
              )
          ]
      )

instance Core.ToPath CreateEvaluation where
  toPath :: CreateEvaluation -> ByteString
toPath = ByteString -> CreateEvaluation -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

instance Core.ToQuery CreateEvaluation where
  toQuery :: CreateEvaluation -> QueryString
toQuery = QueryString -> CreateEvaluation -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

-- | Represents the output of a @CreateEvaluation@ operation, and is an
-- acknowledgement that Amazon ML received the request.
--
-- @CreateEvaluation@ operation is asynchronous. You can poll for status
-- updates by using the @GetEvcaluation@ operation and checking the
-- @Status@ parameter.
--
-- /See:/ 'newCreateEvaluationResponse' smart constructor.
data CreateEvaluationResponse = CreateEvaluationResponse'
  { -- | The user-supplied ID that uniquely identifies the @Evaluation@. This
    -- value should be identical to the value of the @EvaluationId@ in the
    -- request.
    CreateEvaluationResponse -> Maybe Text
evaluationId :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreateEvaluationResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreateEvaluationResponse -> CreateEvaluationResponse -> Bool
(CreateEvaluationResponse -> CreateEvaluationResponse -> Bool)
-> (CreateEvaluationResponse -> CreateEvaluationResponse -> Bool)
-> Eq CreateEvaluationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateEvaluationResponse -> CreateEvaluationResponse -> Bool
$c/= :: CreateEvaluationResponse -> CreateEvaluationResponse -> Bool
== :: CreateEvaluationResponse -> CreateEvaluationResponse -> Bool
$c== :: CreateEvaluationResponse -> CreateEvaluationResponse -> Bool
Prelude.Eq, ReadPrec [CreateEvaluationResponse]
ReadPrec CreateEvaluationResponse
Int -> ReadS CreateEvaluationResponse
ReadS [CreateEvaluationResponse]
(Int -> ReadS CreateEvaluationResponse)
-> ReadS [CreateEvaluationResponse]
-> ReadPrec CreateEvaluationResponse
-> ReadPrec [CreateEvaluationResponse]
-> Read CreateEvaluationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateEvaluationResponse]
$creadListPrec :: ReadPrec [CreateEvaluationResponse]
readPrec :: ReadPrec CreateEvaluationResponse
$creadPrec :: ReadPrec CreateEvaluationResponse
readList :: ReadS [CreateEvaluationResponse]
$creadList :: ReadS [CreateEvaluationResponse]
readsPrec :: Int -> ReadS CreateEvaluationResponse
$creadsPrec :: Int -> ReadS CreateEvaluationResponse
Prelude.Read, Int -> CreateEvaluationResponse -> ShowS
[CreateEvaluationResponse] -> ShowS
CreateEvaluationResponse -> String
(Int -> CreateEvaluationResponse -> ShowS)
-> (CreateEvaluationResponse -> String)
-> ([CreateEvaluationResponse] -> ShowS)
-> Show CreateEvaluationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateEvaluationResponse] -> ShowS
$cshowList :: [CreateEvaluationResponse] -> ShowS
show :: CreateEvaluationResponse -> String
$cshow :: CreateEvaluationResponse -> String
showsPrec :: Int -> CreateEvaluationResponse -> ShowS
$cshowsPrec :: Int -> CreateEvaluationResponse -> ShowS
Prelude.Show, (forall x.
 CreateEvaluationResponse -> Rep CreateEvaluationResponse x)
-> (forall x.
    Rep CreateEvaluationResponse x -> CreateEvaluationResponse)
-> Generic CreateEvaluationResponse
forall x.
Rep CreateEvaluationResponse x -> CreateEvaluationResponse
forall x.
CreateEvaluationResponse -> Rep CreateEvaluationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateEvaluationResponse x -> CreateEvaluationResponse
$cfrom :: forall x.
CreateEvaluationResponse -> Rep CreateEvaluationResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateEvaluationResponse' 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:
--
-- 'evaluationId', 'createEvaluationResponse_evaluationId' - The user-supplied ID that uniquely identifies the @Evaluation@. This
-- value should be identical to the value of the @EvaluationId@ in the
-- request.
--
-- 'httpStatus', 'createEvaluationResponse_httpStatus' - The response's http status code.
newCreateEvaluationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateEvaluationResponse
newCreateEvaluationResponse :: Int -> CreateEvaluationResponse
newCreateEvaluationResponse Int
pHttpStatus_ =
  CreateEvaluationResponse' :: Maybe Text -> Int -> CreateEvaluationResponse
CreateEvaluationResponse'
    { $sel:evaluationId:CreateEvaluationResponse' :: Maybe Text
evaluationId =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateEvaluationResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The user-supplied ID that uniquely identifies the @Evaluation@. This
-- value should be identical to the value of the @EvaluationId@ in the
-- request.
createEvaluationResponse_evaluationId :: Lens.Lens' CreateEvaluationResponse (Prelude.Maybe Prelude.Text)
createEvaluationResponse_evaluationId :: (Maybe Text -> f (Maybe Text))
-> CreateEvaluationResponse -> f CreateEvaluationResponse
createEvaluationResponse_evaluationId = (CreateEvaluationResponse -> Maybe Text)
-> (CreateEvaluationResponse
    -> Maybe Text -> CreateEvaluationResponse)
-> Lens
     CreateEvaluationResponse
     CreateEvaluationResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEvaluationResponse' {Maybe Text
evaluationId :: Maybe Text
$sel:evaluationId:CreateEvaluationResponse' :: CreateEvaluationResponse -> Maybe Text
evaluationId} -> Maybe Text
evaluationId) (\s :: CreateEvaluationResponse
s@CreateEvaluationResponse' {} Maybe Text
a -> CreateEvaluationResponse
s {$sel:evaluationId:CreateEvaluationResponse' :: Maybe Text
evaluationId = Maybe Text
a} :: CreateEvaluationResponse)

-- | The response's http status code.
createEvaluationResponse_httpStatus :: Lens.Lens' CreateEvaluationResponse Prelude.Int
createEvaluationResponse_httpStatus :: (Int -> f Int)
-> CreateEvaluationResponse -> f CreateEvaluationResponse
createEvaluationResponse_httpStatus = (CreateEvaluationResponse -> Int)
-> (CreateEvaluationResponse -> Int -> CreateEvaluationResponse)
-> Lens CreateEvaluationResponse CreateEvaluationResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateEvaluationResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateEvaluationResponse' :: CreateEvaluationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateEvaluationResponse
s@CreateEvaluationResponse' {} Int
a -> CreateEvaluationResponse
s {$sel:httpStatus:CreateEvaluationResponse' :: Int
httpStatus = Int
a} :: CreateEvaluationResponse)

instance Prelude.NFData CreateEvaluationResponse