{-# 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.Glue.UpdateColumnStatisticsForTable
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates or updates table statistics of columns.
--
-- The Identity and Access Management (IAM) permission required for this
-- operation is @UpdateTable@.
module Amazonka.Glue.UpdateColumnStatisticsForTable
  ( -- * Creating a Request
    UpdateColumnStatisticsForTable (..),
    newUpdateColumnStatisticsForTable,

    -- * Request Lenses
    updateColumnStatisticsForTable_catalogId,
    updateColumnStatisticsForTable_databaseName,
    updateColumnStatisticsForTable_tableName,
    updateColumnStatisticsForTable_columnStatisticsList,

    -- * Destructuring the Response
    UpdateColumnStatisticsForTableResponse (..),
    newUpdateColumnStatisticsForTableResponse,

    -- * Response Lenses
    updateColumnStatisticsForTableResponse_errors,
    updateColumnStatisticsForTableResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Glue.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newUpdateColumnStatisticsForTable' smart constructor.
data UpdateColumnStatisticsForTable = UpdateColumnStatisticsForTable'
  { -- | The ID of the Data Catalog where the partitions in question reside. If
    -- none is supplied, the Amazon Web Services account ID is used by default.
    UpdateColumnStatisticsForTable -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
    -- | The name of the catalog database where the partitions reside.
    UpdateColumnStatisticsForTable -> Text
databaseName :: Prelude.Text,
    -- | The name of the partitions\' table.
    UpdateColumnStatisticsForTable -> Text
tableName :: Prelude.Text,
    -- | A list of the column statistics.
    UpdateColumnStatisticsForTable -> [ColumnStatistics]
columnStatisticsList :: [ColumnStatistics]
  }
  deriving (UpdateColumnStatisticsForTable
-> UpdateColumnStatisticsForTable -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateColumnStatisticsForTable
-> UpdateColumnStatisticsForTable -> Bool
$c/= :: UpdateColumnStatisticsForTable
-> UpdateColumnStatisticsForTable -> Bool
== :: UpdateColumnStatisticsForTable
-> UpdateColumnStatisticsForTable -> Bool
$c== :: UpdateColumnStatisticsForTable
-> UpdateColumnStatisticsForTable -> Bool
Prelude.Eq, ReadPrec [UpdateColumnStatisticsForTable]
ReadPrec UpdateColumnStatisticsForTable
Int -> ReadS UpdateColumnStatisticsForTable
ReadS [UpdateColumnStatisticsForTable]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateColumnStatisticsForTable]
$creadListPrec :: ReadPrec [UpdateColumnStatisticsForTable]
readPrec :: ReadPrec UpdateColumnStatisticsForTable
$creadPrec :: ReadPrec UpdateColumnStatisticsForTable
readList :: ReadS [UpdateColumnStatisticsForTable]
$creadList :: ReadS [UpdateColumnStatisticsForTable]
readsPrec :: Int -> ReadS UpdateColumnStatisticsForTable
$creadsPrec :: Int -> ReadS UpdateColumnStatisticsForTable
Prelude.Read, Int -> UpdateColumnStatisticsForTable -> ShowS
[UpdateColumnStatisticsForTable] -> ShowS
UpdateColumnStatisticsForTable -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateColumnStatisticsForTable] -> ShowS
$cshowList :: [UpdateColumnStatisticsForTable] -> ShowS
show :: UpdateColumnStatisticsForTable -> String
$cshow :: UpdateColumnStatisticsForTable -> String
showsPrec :: Int -> UpdateColumnStatisticsForTable -> ShowS
$cshowsPrec :: Int -> UpdateColumnStatisticsForTable -> ShowS
Prelude.Show, forall x.
Rep UpdateColumnStatisticsForTable x
-> UpdateColumnStatisticsForTable
forall x.
UpdateColumnStatisticsForTable
-> Rep UpdateColumnStatisticsForTable x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateColumnStatisticsForTable x
-> UpdateColumnStatisticsForTable
$cfrom :: forall x.
UpdateColumnStatisticsForTable
-> Rep UpdateColumnStatisticsForTable x
Prelude.Generic)

-- |
-- Create a value of 'UpdateColumnStatisticsForTable' 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:
--
-- 'catalogId', 'updateColumnStatisticsForTable_catalogId' - The ID of the Data Catalog where the partitions in question reside. If
-- none is supplied, the Amazon Web Services account ID is used by default.
--
-- 'databaseName', 'updateColumnStatisticsForTable_databaseName' - The name of the catalog database where the partitions reside.
--
-- 'tableName', 'updateColumnStatisticsForTable_tableName' - The name of the partitions\' table.
--
-- 'columnStatisticsList', 'updateColumnStatisticsForTable_columnStatisticsList' - A list of the column statistics.
newUpdateColumnStatisticsForTable ::
  -- | 'databaseName'
  Prelude.Text ->
  -- | 'tableName'
  Prelude.Text ->
  UpdateColumnStatisticsForTable
newUpdateColumnStatisticsForTable :: Text -> Text -> UpdateColumnStatisticsForTable
newUpdateColumnStatisticsForTable
  Text
pDatabaseName_
  Text
pTableName_ =
    UpdateColumnStatisticsForTable'
      { $sel:catalogId:UpdateColumnStatisticsForTable' :: Maybe Text
catalogId =
          forall a. Maybe a
Prelude.Nothing,
        $sel:databaseName:UpdateColumnStatisticsForTable' :: Text
databaseName = Text
pDatabaseName_,
        $sel:tableName:UpdateColumnStatisticsForTable' :: Text
tableName = Text
pTableName_,
        $sel:columnStatisticsList:UpdateColumnStatisticsForTable' :: [ColumnStatistics]
columnStatisticsList = forall a. Monoid a => a
Prelude.mempty
      }

-- | The ID of the Data Catalog where the partitions in question reside. If
-- none is supplied, the Amazon Web Services account ID is used by default.
updateColumnStatisticsForTable_catalogId :: Lens.Lens' UpdateColumnStatisticsForTable (Prelude.Maybe Prelude.Text)
updateColumnStatisticsForTable_catalogId :: Lens' UpdateColumnStatisticsForTable (Maybe Text)
updateColumnStatisticsForTable_catalogId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateColumnStatisticsForTable' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: UpdateColumnStatisticsForTable
s@UpdateColumnStatisticsForTable' {} Maybe Text
a -> UpdateColumnStatisticsForTable
s {$sel:catalogId:UpdateColumnStatisticsForTable' :: Maybe Text
catalogId = Maybe Text
a} :: UpdateColumnStatisticsForTable)

-- | The name of the catalog database where the partitions reside.
updateColumnStatisticsForTable_databaseName :: Lens.Lens' UpdateColumnStatisticsForTable Prelude.Text
updateColumnStatisticsForTable_databaseName :: Lens' UpdateColumnStatisticsForTable Text
updateColumnStatisticsForTable_databaseName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateColumnStatisticsForTable' {Text
databaseName :: Text
$sel:databaseName:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Text
databaseName} -> Text
databaseName) (\s :: UpdateColumnStatisticsForTable
s@UpdateColumnStatisticsForTable' {} Text
a -> UpdateColumnStatisticsForTable
s {$sel:databaseName:UpdateColumnStatisticsForTable' :: Text
databaseName = Text
a} :: UpdateColumnStatisticsForTable)

-- | The name of the partitions\' table.
updateColumnStatisticsForTable_tableName :: Lens.Lens' UpdateColumnStatisticsForTable Prelude.Text
updateColumnStatisticsForTable_tableName :: Lens' UpdateColumnStatisticsForTable Text
updateColumnStatisticsForTable_tableName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateColumnStatisticsForTable' {Text
tableName :: Text
$sel:tableName:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Text
tableName} -> Text
tableName) (\s :: UpdateColumnStatisticsForTable
s@UpdateColumnStatisticsForTable' {} Text
a -> UpdateColumnStatisticsForTable
s {$sel:tableName:UpdateColumnStatisticsForTable' :: Text
tableName = Text
a} :: UpdateColumnStatisticsForTable)

-- | A list of the column statistics.
updateColumnStatisticsForTable_columnStatisticsList :: Lens.Lens' UpdateColumnStatisticsForTable [ColumnStatistics]
updateColumnStatisticsForTable_columnStatisticsList :: Lens' UpdateColumnStatisticsForTable [ColumnStatistics]
updateColumnStatisticsForTable_columnStatisticsList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateColumnStatisticsForTable' {[ColumnStatistics]
columnStatisticsList :: [ColumnStatistics]
$sel:columnStatisticsList:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> [ColumnStatistics]
columnStatisticsList} -> [ColumnStatistics]
columnStatisticsList) (\s :: UpdateColumnStatisticsForTable
s@UpdateColumnStatisticsForTable' {} [ColumnStatistics]
a -> UpdateColumnStatisticsForTable
s {$sel:columnStatisticsList:UpdateColumnStatisticsForTable' :: [ColumnStatistics]
columnStatisticsList = [ColumnStatistics]
a} :: UpdateColumnStatisticsForTable) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance
  Core.AWSRequest
    UpdateColumnStatisticsForTable
  where
  type
    AWSResponse UpdateColumnStatisticsForTable =
      UpdateColumnStatisticsForTableResponse
  request :: (Service -> Service)
-> UpdateColumnStatisticsForTable
-> Request UpdateColumnStatisticsForTable
request Service -> Service
overrides =
    forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateColumnStatisticsForTable
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse UpdateColumnStatisticsForTable)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
      ( \Int
s ResponseHeaders
h Object
x ->
          Maybe [ColumnStatisticsError]
-> Int -> UpdateColumnStatisticsForTableResponse
UpdateColumnStatisticsForTableResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Errors" forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance
  Prelude.Hashable
    UpdateColumnStatisticsForTable
  where
  hashWithSalt :: Int -> UpdateColumnStatisticsForTable -> Int
hashWithSalt
    Int
_salt
    UpdateColumnStatisticsForTable' {[ColumnStatistics]
Maybe Text
Text
columnStatisticsList :: [ColumnStatistics]
tableName :: Text
databaseName :: Text
catalogId :: Maybe Text
$sel:columnStatisticsList:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> [ColumnStatistics]
$sel:tableName:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Text
$sel:databaseName:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Text
$sel:catalogId:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Maybe Text
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
catalogId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
databaseName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
tableName
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [ColumnStatistics]
columnStatisticsList

instance
  Prelude.NFData
    UpdateColumnStatisticsForTable
  where
  rnf :: UpdateColumnStatisticsForTable -> ()
rnf UpdateColumnStatisticsForTable' {[ColumnStatistics]
Maybe Text
Text
columnStatisticsList :: [ColumnStatistics]
tableName :: Text
databaseName :: Text
catalogId :: Maybe Text
$sel:columnStatisticsList:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> [ColumnStatistics]
$sel:tableName:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Text
$sel:databaseName:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Text
$sel:catalogId:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
catalogId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
databaseName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
tableName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [ColumnStatistics]
columnStatisticsList

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

instance Data.ToJSON UpdateColumnStatisticsForTable where
  toJSON :: UpdateColumnStatisticsForTable -> Value
toJSON UpdateColumnStatisticsForTable' {[ColumnStatistics]
Maybe Text
Text
columnStatisticsList :: [ColumnStatistics]
tableName :: Text
databaseName :: Text
catalogId :: Maybe Text
$sel:columnStatisticsList:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> [ColumnStatistics]
$sel:tableName:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Text
$sel:databaseName:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Text
$sel:catalogId:UpdateColumnStatisticsForTable' :: UpdateColumnStatisticsForTable -> Maybe Text
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"CatalogId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
catalogId,
            forall a. a -> Maybe a
Prelude.Just (Key
"DatabaseName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
databaseName),
            forall a. a -> Maybe a
Prelude.Just (Key
"TableName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
tableName),
            forall a. a -> Maybe a
Prelude.Just
              ( Key
"ColumnStatisticsList"
                  forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [ColumnStatistics]
columnStatisticsList
              )
          ]
      )

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

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

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

-- |
-- Create a value of 'UpdateColumnStatisticsForTableResponse' 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:
--
-- 'errors', 'updateColumnStatisticsForTableResponse_errors' - List of ColumnStatisticsErrors.
--
-- 'httpStatus', 'updateColumnStatisticsForTableResponse_httpStatus' - The response's http status code.
newUpdateColumnStatisticsForTableResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  UpdateColumnStatisticsForTableResponse
newUpdateColumnStatisticsForTableResponse :: Int -> UpdateColumnStatisticsForTableResponse
newUpdateColumnStatisticsForTableResponse
  Int
pHttpStatus_ =
    UpdateColumnStatisticsForTableResponse'
      { $sel:errors:UpdateColumnStatisticsForTableResponse' :: Maybe [ColumnStatisticsError]
errors =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:UpdateColumnStatisticsForTableResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | List of ColumnStatisticsErrors.
updateColumnStatisticsForTableResponse_errors :: Lens.Lens' UpdateColumnStatisticsForTableResponse (Prelude.Maybe [ColumnStatisticsError])
updateColumnStatisticsForTableResponse_errors :: Lens'
  UpdateColumnStatisticsForTableResponse
  (Maybe [ColumnStatisticsError])
updateColumnStatisticsForTableResponse_errors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateColumnStatisticsForTableResponse' {Maybe [ColumnStatisticsError]
errors :: Maybe [ColumnStatisticsError]
$sel:errors:UpdateColumnStatisticsForTableResponse' :: UpdateColumnStatisticsForTableResponse
-> Maybe [ColumnStatisticsError]
errors} -> Maybe [ColumnStatisticsError]
errors) (\s :: UpdateColumnStatisticsForTableResponse
s@UpdateColumnStatisticsForTableResponse' {} Maybe [ColumnStatisticsError]
a -> UpdateColumnStatisticsForTableResponse
s {$sel:errors:UpdateColumnStatisticsForTableResponse' :: Maybe [ColumnStatisticsError]
errors = Maybe [ColumnStatisticsError]
a} :: UpdateColumnStatisticsForTableResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    UpdateColumnStatisticsForTableResponse
  where
  rnf :: UpdateColumnStatisticsForTableResponse -> ()
rnf UpdateColumnStatisticsForTableResponse' {Int
Maybe [ColumnStatisticsError]
httpStatus :: Int
errors :: Maybe [ColumnStatisticsError]
$sel:httpStatus:UpdateColumnStatisticsForTableResponse' :: UpdateColumnStatisticsForTableResponse -> Int
$sel:errors:UpdateColumnStatisticsForTableResponse' :: UpdateColumnStatisticsForTableResponse
-> Maybe [ColumnStatisticsError]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [ColumnStatisticsError]
errors
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus