{-# 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.LookoutVision.UpdateDatasetEntries
-- 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)
--
-- Adds one or more JSON Line entries to a dataset. A JSON Line includes
-- information about an image used for training or testing an Amazon
-- Lookout for Vision model. The following is an example JSON Line.
--
-- Updating a dataset might take a while to complete. To check the current
-- status, call DescribeDataset and check the @Status@ field in the
-- response.
--
-- This operation requires permissions to perform the
-- @lookoutvision:UpdateDatasetEntries@ operation.
module Amazonka.LookoutVision.UpdateDatasetEntries
  ( -- * Creating a Request
    UpdateDatasetEntries (..),
    newUpdateDatasetEntries,

    -- * Request Lenses
    updateDatasetEntries_clientToken,
    updateDatasetEntries_projectName,
    updateDatasetEntries_datasetType,
    updateDatasetEntries_changes,

    -- * Destructuring the Response
    UpdateDatasetEntriesResponse (..),
    newUpdateDatasetEntriesResponse,

    -- * Response Lenses
    updateDatasetEntriesResponse_status,
    updateDatasetEntriesResponse_httpStatus,
  )
where

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

-- | /See:/ 'newUpdateDatasetEntries' smart constructor.
data UpdateDatasetEntries = UpdateDatasetEntries'
  { -- | ClientToken is an idempotency token that ensures a call to
    -- @UpdateDatasetEntries@ completes only once. You choose the value to
    -- pass. For example, An issue, such as an network outage, might prevent
    -- you from getting a response from @UpdateDatasetEntries@. In this case,
    -- safely retry your call to @UpdateDatasetEntries@ by using the same
    -- @ClientToken@ parameter value. An error occurs if the other input
    -- parameters are not the same as in the first request. Using a different
    -- value for @ClientToken@ is considered a new call to
    -- @UpdateDatasetEntries@. An idempotency token is active for 8 hours.
    UpdateDatasetEntries -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The name of the project that contains the dataset that you want to
    -- update.
    UpdateDatasetEntries -> Text
projectName :: Prelude.Text,
    -- | The type of the dataset that you want to update. Specify @train@ to
    -- update the training dataset. Specify @test@ to update the test dataset.
    -- If you have a single dataset project, specify @train@.
    UpdateDatasetEntries -> Text
datasetType :: Prelude.Text,
    -- | The entries to add to the dataset.
    UpdateDatasetEntries -> Base64
changes :: Core.Base64
  }
  deriving (UpdateDatasetEntries -> UpdateDatasetEntries -> Bool
(UpdateDatasetEntries -> UpdateDatasetEntries -> Bool)
-> (UpdateDatasetEntries -> UpdateDatasetEntries -> Bool)
-> Eq UpdateDatasetEntries
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDatasetEntries -> UpdateDatasetEntries -> Bool
$c/= :: UpdateDatasetEntries -> UpdateDatasetEntries -> Bool
== :: UpdateDatasetEntries -> UpdateDatasetEntries -> Bool
$c== :: UpdateDatasetEntries -> UpdateDatasetEntries -> Bool
Prelude.Eq, ReadPrec [UpdateDatasetEntries]
ReadPrec UpdateDatasetEntries
Int -> ReadS UpdateDatasetEntries
ReadS [UpdateDatasetEntries]
(Int -> ReadS UpdateDatasetEntries)
-> ReadS [UpdateDatasetEntries]
-> ReadPrec UpdateDatasetEntries
-> ReadPrec [UpdateDatasetEntries]
-> Read UpdateDatasetEntries
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDatasetEntries]
$creadListPrec :: ReadPrec [UpdateDatasetEntries]
readPrec :: ReadPrec UpdateDatasetEntries
$creadPrec :: ReadPrec UpdateDatasetEntries
readList :: ReadS [UpdateDatasetEntries]
$creadList :: ReadS [UpdateDatasetEntries]
readsPrec :: Int -> ReadS UpdateDatasetEntries
$creadsPrec :: Int -> ReadS UpdateDatasetEntries
Prelude.Read, Int -> UpdateDatasetEntries -> ShowS
[UpdateDatasetEntries] -> ShowS
UpdateDatasetEntries -> String
(Int -> UpdateDatasetEntries -> ShowS)
-> (UpdateDatasetEntries -> String)
-> ([UpdateDatasetEntries] -> ShowS)
-> Show UpdateDatasetEntries
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDatasetEntries] -> ShowS
$cshowList :: [UpdateDatasetEntries] -> ShowS
show :: UpdateDatasetEntries -> String
$cshow :: UpdateDatasetEntries -> String
showsPrec :: Int -> UpdateDatasetEntries -> ShowS
$cshowsPrec :: Int -> UpdateDatasetEntries -> ShowS
Prelude.Show, (forall x. UpdateDatasetEntries -> Rep UpdateDatasetEntries x)
-> (forall x. Rep UpdateDatasetEntries x -> UpdateDatasetEntries)
-> Generic UpdateDatasetEntries
forall x. Rep UpdateDatasetEntries x -> UpdateDatasetEntries
forall x. UpdateDatasetEntries -> Rep UpdateDatasetEntries x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateDatasetEntries x -> UpdateDatasetEntries
$cfrom :: forall x. UpdateDatasetEntries -> Rep UpdateDatasetEntries x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDatasetEntries' 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:
--
-- 'clientToken', 'updateDatasetEntries_clientToken' - ClientToken is an idempotency token that ensures a call to
-- @UpdateDatasetEntries@ completes only once. You choose the value to
-- pass. For example, An issue, such as an network outage, might prevent
-- you from getting a response from @UpdateDatasetEntries@. In this case,
-- safely retry your call to @UpdateDatasetEntries@ by using the same
-- @ClientToken@ parameter value. An error occurs if the other input
-- parameters are not the same as in the first request. Using a different
-- value for @ClientToken@ is considered a new call to
-- @UpdateDatasetEntries@. An idempotency token is active for 8 hours.
--
-- 'projectName', 'updateDatasetEntries_projectName' - The name of the project that contains the dataset that you want to
-- update.
--
-- 'datasetType', 'updateDatasetEntries_datasetType' - The type of the dataset that you want to update. Specify @train@ to
-- update the training dataset. Specify @test@ to update the test dataset.
-- If you have a single dataset project, specify @train@.
--
-- 'changes', 'updateDatasetEntries_changes' - The entries to add to the dataset.--
-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.
-- -- The underlying isomorphism will encode to Base64 representation during
-- -- serialisation, and decode from Base64 representation during deserialisation.
-- -- This 'Lens' accepts and returns only raw unencoded data.
newUpdateDatasetEntries ::
  -- | 'projectName'
  Prelude.Text ->
  -- | 'datasetType'
  Prelude.Text ->
  -- | 'changes'
  Prelude.ByteString ->
  UpdateDatasetEntries
newUpdateDatasetEntries :: Text -> Text -> ByteString -> UpdateDatasetEntries
newUpdateDatasetEntries
  Text
pProjectName_
  Text
pDatasetType_
  ByteString
pChanges_ =
    UpdateDatasetEntries' :: Maybe Text -> Text -> Text -> Base64 -> UpdateDatasetEntries
UpdateDatasetEntries'
      { $sel:clientToken:UpdateDatasetEntries' :: Maybe Text
clientToken =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:projectName:UpdateDatasetEntries' :: Text
projectName = Text
pProjectName_,
        $sel:datasetType:UpdateDatasetEntries' :: Text
datasetType = Text
pDatasetType_,
        $sel:changes:UpdateDatasetEntries' :: Base64
changes = Tagged ByteString (Identity ByteString)
-> Tagged Base64 (Identity Base64)
Iso' Base64 ByteString
Core._Base64 (Tagged ByteString (Identity ByteString)
 -> Tagged Base64 (Identity Base64))
-> ByteString -> Base64
forall t b. AReview t b -> b -> t
Lens.# ByteString
pChanges_
      }

-- | ClientToken is an idempotency token that ensures a call to
-- @UpdateDatasetEntries@ completes only once. You choose the value to
-- pass. For example, An issue, such as an network outage, might prevent
-- you from getting a response from @UpdateDatasetEntries@. In this case,
-- safely retry your call to @UpdateDatasetEntries@ by using the same
-- @ClientToken@ parameter value. An error occurs if the other input
-- parameters are not the same as in the first request. Using a different
-- value for @ClientToken@ is considered a new call to
-- @UpdateDatasetEntries@. An idempotency token is active for 8 hours.
updateDatasetEntries_clientToken :: Lens.Lens' UpdateDatasetEntries (Prelude.Maybe Prelude.Text)
updateDatasetEntries_clientToken :: (Maybe Text -> f (Maybe Text))
-> UpdateDatasetEntries -> f UpdateDatasetEntries
updateDatasetEntries_clientToken = (UpdateDatasetEntries -> Maybe Text)
-> (UpdateDatasetEntries -> Maybe Text -> UpdateDatasetEntries)
-> Lens
     UpdateDatasetEntries UpdateDatasetEntries (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDatasetEntries' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:UpdateDatasetEntries' :: UpdateDatasetEntries -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: UpdateDatasetEntries
s@UpdateDatasetEntries' {} Maybe Text
a -> UpdateDatasetEntries
s {$sel:clientToken:UpdateDatasetEntries' :: Maybe Text
clientToken = Maybe Text
a} :: UpdateDatasetEntries)

-- | The name of the project that contains the dataset that you want to
-- update.
updateDatasetEntries_projectName :: Lens.Lens' UpdateDatasetEntries Prelude.Text
updateDatasetEntries_projectName :: (Text -> f Text) -> UpdateDatasetEntries -> f UpdateDatasetEntries
updateDatasetEntries_projectName = (UpdateDatasetEntries -> Text)
-> (UpdateDatasetEntries -> Text -> UpdateDatasetEntries)
-> Lens UpdateDatasetEntries UpdateDatasetEntries Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDatasetEntries' {Text
projectName :: Text
$sel:projectName:UpdateDatasetEntries' :: UpdateDatasetEntries -> Text
projectName} -> Text
projectName) (\s :: UpdateDatasetEntries
s@UpdateDatasetEntries' {} Text
a -> UpdateDatasetEntries
s {$sel:projectName:UpdateDatasetEntries' :: Text
projectName = Text
a} :: UpdateDatasetEntries)

-- | The type of the dataset that you want to update. Specify @train@ to
-- update the training dataset. Specify @test@ to update the test dataset.
-- If you have a single dataset project, specify @train@.
updateDatasetEntries_datasetType :: Lens.Lens' UpdateDatasetEntries Prelude.Text
updateDatasetEntries_datasetType :: (Text -> f Text) -> UpdateDatasetEntries -> f UpdateDatasetEntries
updateDatasetEntries_datasetType = (UpdateDatasetEntries -> Text)
-> (UpdateDatasetEntries -> Text -> UpdateDatasetEntries)
-> Lens UpdateDatasetEntries UpdateDatasetEntries Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDatasetEntries' {Text
datasetType :: Text
$sel:datasetType:UpdateDatasetEntries' :: UpdateDatasetEntries -> Text
datasetType} -> Text
datasetType) (\s :: UpdateDatasetEntries
s@UpdateDatasetEntries' {} Text
a -> UpdateDatasetEntries
s {$sel:datasetType:UpdateDatasetEntries' :: Text
datasetType = Text
a} :: UpdateDatasetEntries)

-- | The entries to add to the dataset.--
-- -- /Note:/ This 'Lens' automatically encodes and decodes Base64 data.
-- -- The underlying isomorphism will encode to Base64 representation during
-- -- serialisation, and decode from Base64 representation during deserialisation.
-- -- This 'Lens' accepts and returns only raw unencoded data.
updateDatasetEntries_changes :: Lens.Lens' UpdateDatasetEntries Prelude.ByteString
updateDatasetEntries_changes :: (ByteString -> f ByteString)
-> UpdateDatasetEntries -> f UpdateDatasetEntries
updateDatasetEntries_changes = (UpdateDatasetEntries -> Base64)
-> (UpdateDatasetEntries -> Base64 -> UpdateDatasetEntries)
-> Lens UpdateDatasetEntries UpdateDatasetEntries Base64 Base64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDatasetEntries' {Base64
changes :: Base64
$sel:changes:UpdateDatasetEntries' :: UpdateDatasetEntries -> Base64
changes} -> Base64
changes) (\s :: UpdateDatasetEntries
s@UpdateDatasetEntries' {} Base64
a -> UpdateDatasetEntries
s {$sel:changes:UpdateDatasetEntries' :: Base64
changes = Base64
a} :: UpdateDatasetEntries) ((Base64 -> f Base64)
 -> UpdateDatasetEntries -> f UpdateDatasetEntries)
-> ((ByteString -> f ByteString) -> Base64 -> f Base64)
-> (ByteString -> f ByteString)
-> UpdateDatasetEntries
-> f UpdateDatasetEntries
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (ByteString -> f ByteString) -> Base64 -> f Base64
Iso' Base64 ByteString
Core._Base64

instance Core.AWSRequest UpdateDatasetEntries where
  type
    AWSResponse UpdateDatasetEntries =
      UpdateDatasetEntriesResponse
  request :: UpdateDatasetEntries -> Request UpdateDatasetEntries
request = Service -> UpdateDatasetEntries -> Request UpdateDatasetEntries
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.patchJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy UpdateDatasetEntries
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDatasetEntries)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse UpdateDatasetEntries))
-> Logger
-> Service
-> Proxy UpdateDatasetEntries
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse UpdateDatasetEntries)))
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 DatasetStatus -> Int -> UpdateDatasetEntriesResponse
UpdateDatasetEntriesResponse'
            (Maybe DatasetStatus -> Int -> UpdateDatasetEntriesResponse)
-> Either String (Maybe DatasetStatus)
-> Either String (Int -> UpdateDatasetEntriesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe DatasetStatus)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Status")
            Either String (Int -> UpdateDatasetEntriesResponse)
-> Either String Int -> Either String UpdateDatasetEntriesResponse
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 UpdateDatasetEntries

instance Prelude.NFData UpdateDatasetEntries

instance Core.ToHeaders UpdateDatasetEntries where
  toHeaders :: UpdateDatasetEntries -> ResponseHeaders
toHeaders UpdateDatasetEntries' {Maybe Text
Text
Base64
changes :: Base64
datasetType :: Text
projectName :: Text
clientToken :: Maybe Text
$sel:changes:UpdateDatasetEntries' :: UpdateDatasetEntries -> Base64
$sel:datasetType:UpdateDatasetEntries' :: UpdateDatasetEntries -> Text
$sel:projectName:UpdateDatasetEntries' :: UpdateDatasetEntries -> Text
$sel:clientToken:UpdateDatasetEntries' :: UpdateDatasetEntries -> Maybe Text
..} =
    [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ HeaderName
"X-Amzn-Client-Token" HeaderName -> Maybe Text -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# Maybe Text
clientToken,
        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 UpdateDatasetEntries where
  toJSON :: UpdateDatasetEntries -> Value
toJSON UpdateDatasetEntries' {Maybe Text
Text
Base64
changes :: Base64
datasetType :: Text
projectName :: Text
clientToken :: Maybe Text
$sel:changes:UpdateDatasetEntries' :: UpdateDatasetEntries -> Base64
$sel:datasetType:UpdateDatasetEntries' :: UpdateDatasetEntries -> Text
$sel:projectName:UpdateDatasetEntries' :: UpdateDatasetEntries -> Text
$sel:clientToken:UpdateDatasetEntries' :: UpdateDatasetEntries -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Changes" Text -> Base64 -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Base64
changes)]
      )

instance Core.ToPath UpdateDatasetEntries where
  toPath :: UpdateDatasetEntries -> ByteString
toPath UpdateDatasetEntries' {Maybe Text
Text
Base64
changes :: Base64
datasetType :: Text
projectName :: Text
clientToken :: Maybe Text
$sel:changes:UpdateDatasetEntries' :: UpdateDatasetEntries -> Base64
$sel:datasetType:UpdateDatasetEntries' :: UpdateDatasetEntries -> Text
$sel:projectName:UpdateDatasetEntries' :: UpdateDatasetEntries -> Text
$sel:clientToken:UpdateDatasetEntries' :: UpdateDatasetEntries -> Maybe Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2020-11-20/projects/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
projectName,
        ByteString
"/datasets/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
datasetType,
        ByteString
"/entries"
      ]

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

-- | /See:/ 'newUpdateDatasetEntriesResponse' smart constructor.
data UpdateDatasetEntriesResponse = UpdateDatasetEntriesResponse'
  { -- | The status of the dataset update.
    UpdateDatasetEntriesResponse -> Maybe DatasetStatus
status :: Prelude.Maybe DatasetStatus,
    -- | The response's http status code.
    UpdateDatasetEntriesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (UpdateDatasetEntriesResponse
-> UpdateDatasetEntriesResponse -> Bool
(UpdateDatasetEntriesResponse
 -> UpdateDatasetEntriesResponse -> Bool)
-> (UpdateDatasetEntriesResponse
    -> UpdateDatasetEntriesResponse -> Bool)
-> Eq UpdateDatasetEntriesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateDatasetEntriesResponse
-> UpdateDatasetEntriesResponse -> Bool
$c/= :: UpdateDatasetEntriesResponse
-> UpdateDatasetEntriesResponse -> Bool
== :: UpdateDatasetEntriesResponse
-> UpdateDatasetEntriesResponse -> Bool
$c== :: UpdateDatasetEntriesResponse
-> UpdateDatasetEntriesResponse -> Bool
Prelude.Eq, ReadPrec [UpdateDatasetEntriesResponse]
ReadPrec UpdateDatasetEntriesResponse
Int -> ReadS UpdateDatasetEntriesResponse
ReadS [UpdateDatasetEntriesResponse]
(Int -> ReadS UpdateDatasetEntriesResponse)
-> ReadS [UpdateDatasetEntriesResponse]
-> ReadPrec UpdateDatasetEntriesResponse
-> ReadPrec [UpdateDatasetEntriesResponse]
-> Read UpdateDatasetEntriesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateDatasetEntriesResponse]
$creadListPrec :: ReadPrec [UpdateDatasetEntriesResponse]
readPrec :: ReadPrec UpdateDatasetEntriesResponse
$creadPrec :: ReadPrec UpdateDatasetEntriesResponse
readList :: ReadS [UpdateDatasetEntriesResponse]
$creadList :: ReadS [UpdateDatasetEntriesResponse]
readsPrec :: Int -> ReadS UpdateDatasetEntriesResponse
$creadsPrec :: Int -> ReadS UpdateDatasetEntriesResponse
Prelude.Read, Int -> UpdateDatasetEntriesResponse -> ShowS
[UpdateDatasetEntriesResponse] -> ShowS
UpdateDatasetEntriesResponse -> String
(Int -> UpdateDatasetEntriesResponse -> ShowS)
-> (UpdateDatasetEntriesResponse -> String)
-> ([UpdateDatasetEntriesResponse] -> ShowS)
-> Show UpdateDatasetEntriesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateDatasetEntriesResponse] -> ShowS
$cshowList :: [UpdateDatasetEntriesResponse] -> ShowS
show :: UpdateDatasetEntriesResponse -> String
$cshow :: UpdateDatasetEntriesResponse -> String
showsPrec :: Int -> UpdateDatasetEntriesResponse -> ShowS
$cshowsPrec :: Int -> UpdateDatasetEntriesResponse -> ShowS
Prelude.Show, (forall x.
 UpdateDatasetEntriesResponse -> Rep UpdateDatasetEntriesResponse x)
-> (forall x.
    Rep UpdateDatasetEntriesResponse x -> UpdateDatasetEntriesResponse)
-> Generic UpdateDatasetEntriesResponse
forall x.
Rep UpdateDatasetEntriesResponse x -> UpdateDatasetEntriesResponse
forall x.
UpdateDatasetEntriesResponse -> Rep UpdateDatasetEntriesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateDatasetEntriesResponse x -> UpdateDatasetEntriesResponse
$cfrom :: forall x.
UpdateDatasetEntriesResponse -> Rep UpdateDatasetEntriesResponse x
Prelude.Generic)

-- |
-- Create a value of 'UpdateDatasetEntriesResponse' 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:
--
-- 'status', 'updateDatasetEntriesResponse_status' - The status of the dataset update.
--
-- 'httpStatus', 'updateDatasetEntriesResponse_httpStatus' - The response's http status code.
newUpdateDatasetEntriesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateDatasetEntriesResponse
newUpdateDatasetEntriesResponse :: Int -> UpdateDatasetEntriesResponse
newUpdateDatasetEntriesResponse Int
pHttpStatus_ =
  UpdateDatasetEntriesResponse' :: Maybe DatasetStatus -> Int -> UpdateDatasetEntriesResponse
UpdateDatasetEntriesResponse'
    { $sel:status:UpdateDatasetEntriesResponse' :: Maybe DatasetStatus
status =
        Maybe DatasetStatus
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:UpdateDatasetEntriesResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The status of the dataset update.
updateDatasetEntriesResponse_status :: Lens.Lens' UpdateDatasetEntriesResponse (Prelude.Maybe DatasetStatus)
updateDatasetEntriesResponse_status :: (Maybe DatasetStatus -> f (Maybe DatasetStatus))
-> UpdateDatasetEntriesResponse -> f UpdateDatasetEntriesResponse
updateDatasetEntriesResponse_status = (UpdateDatasetEntriesResponse -> Maybe DatasetStatus)
-> (UpdateDatasetEntriesResponse
    -> Maybe DatasetStatus -> UpdateDatasetEntriesResponse)
-> Lens
     UpdateDatasetEntriesResponse
     UpdateDatasetEntriesResponse
     (Maybe DatasetStatus)
     (Maybe DatasetStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateDatasetEntriesResponse' {Maybe DatasetStatus
status :: Maybe DatasetStatus
$sel:status:UpdateDatasetEntriesResponse' :: UpdateDatasetEntriesResponse -> Maybe DatasetStatus
status} -> Maybe DatasetStatus
status) (\s :: UpdateDatasetEntriesResponse
s@UpdateDatasetEntriesResponse' {} Maybe DatasetStatus
a -> UpdateDatasetEntriesResponse
s {$sel:status:UpdateDatasetEntriesResponse' :: Maybe DatasetStatus
status = Maybe DatasetStatus
a} :: UpdateDatasetEntriesResponse)

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

instance Prelude.NFData UpdateDatasetEntriesResponse