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

    -- * Request Lenses
    getColumnStatisticsForPartition_catalogId,
    getColumnStatisticsForPartition_databaseName,
    getColumnStatisticsForPartition_tableName,
    getColumnStatisticsForPartition_partitionValues,
    getColumnStatisticsForPartition_columnNames,

    -- * Destructuring the Response
    GetColumnStatisticsForPartitionResponse (..),
    newGetColumnStatisticsForPartitionResponse,

    -- * Response Lenses
    getColumnStatisticsForPartitionResponse_columnStatisticsList,
    getColumnStatisticsForPartitionResponse_errors,
    getColumnStatisticsForPartitionResponse_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:/ 'newGetColumnStatisticsForPartition' smart constructor.
data GetColumnStatisticsForPartition = GetColumnStatisticsForPartition'
  { -- | 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.
    GetColumnStatisticsForPartition -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
    -- | The name of the catalog database where the partitions reside.
    GetColumnStatisticsForPartition -> Text
databaseName :: Prelude.Text,
    -- | The name of the partitions\' table.
    GetColumnStatisticsForPartition -> Text
tableName :: Prelude.Text,
    -- | A list of partition values identifying the partition.
    GetColumnStatisticsForPartition -> [Text]
partitionValues :: [Prelude.Text],
    -- | A list of the column names.
    GetColumnStatisticsForPartition -> [Text]
columnNames :: [Prelude.Text]
  }
  deriving (GetColumnStatisticsForPartition
-> GetColumnStatisticsForPartition -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetColumnStatisticsForPartition
-> GetColumnStatisticsForPartition -> Bool
$c/= :: GetColumnStatisticsForPartition
-> GetColumnStatisticsForPartition -> Bool
== :: GetColumnStatisticsForPartition
-> GetColumnStatisticsForPartition -> Bool
$c== :: GetColumnStatisticsForPartition
-> GetColumnStatisticsForPartition -> Bool
Prelude.Eq, ReadPrec [GetColumnStatisticsForPartition]
ReadPrec GetColumnStatisticsForPartition
Int -> ReadS GetColumnStatisticsForPartition
ReadS [GetColumnStatisticsForPartition]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetColumnStatisticsForPartition]
$creadListPrec :: ReadPrec [GetColumnStatisticsForPartition]
readPrec :: ReadPrec GetColumnStatisticsForPartition
$creadPrec :: ReadPrec GetColumnStatisticsForPartition
readList :: ReadS [GetColumnStatisticsForPartition]
$creadList :: ReadS [GetColumnStatisticsForPartition]
readsPrec :: Int -> ReadS GetColumnStatisticsForPartition
$creadsPrec :: Int -> ReadS GetColumnStatisticsForPartition
Prelude.Read, Int -> GetColumnStatisticsForPartition -> ShowS
[GetColumnStatisticsForPartition] -> ShowS
GetColumnStatisticsForPartition -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetColumnStatisticsForPartition] -> ShowS
$cshowList :: [GetColumnStatisticsForPartition] -> ShowS
show :: GetColumnStatisticsForPartition -> String
$cshow :: GetColumnStatisticsForPartition -> String
showsPrec :: Int -> GetColumnStatisticsForPartition -> ShowS
$cshowsPrec :: Int -> GetColumnStatisticsForPartition -> ShowS
Prelude.Show, forall x.
Rep GetColumnStatisticsForPartition x
-> GetColumnStatisticsForPartition
forall x.
GetColumnStatisticsForPartition
-> Rep GetColumnStatisticsForPartition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetColumnStatisticsForPartition x
-> GetColumnStatisticsForPartition
$cfrom :: forall x.
GetColumnStatisticsForPartition
-> Rep GetColumnStatisticsForPartition x
Prelude.Generic)

-- |
-- Create a value of 'GetColumnStatisticsForPartition' 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', 'getColumnStatisticsForPartition_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', 'getColumnStatisticsForPartition_databaseName' - The name of the catalog database where the partitions reside.
--
-- 'tableName', 'getColumnStatisticsForPartition_tableName' - The name of the partitions\' table.
--
-- 'partitionValues', 'getColumnStatisticsForPartition_partitionValues' - A list of partition values identifying the partition.
--
-- 'columnNames', 'getColumnStatisticsForPartition_columnNames' - A list of the column names.
newGetColumnStatisticsForPartition ::
  -- | 'databaseName'
  Prelude.Text ->
  -- | 'tableName'
  Prelude.Text ->
  GetColumnStatisticsForPartition
newGetColumnStatisticsForPartition :: Text -> Text -> GetColumnStatisticsForPartition
newGetColumnStatisticsForPartition
  Text
pDatabaseName_
  Text
pTableName_ =
    GetColumnStatisticsForPartition'
      { $sel:catalogId:GetColumnStatisticsForPartition' :: Maybe Text
catalogId =
          forall a. Maybe a
Prelude.Nothing,
        $sel:databaseName:GetColumnStatisticsForPartition' :: Text
databaseName = Text
pDatabaseName_,
        $sel:tableName:GetColumnStatisticsForPartition' :: Text
tableName = Text
pTableName_,
        $sel:partitionValues:GetColumnStatisticsForPartition' :: [Text]
partitionValues = forall a. Monoid a => a
Prelude.mempty,
        $sel:columnNames:GetColumnStatisticsForPartition' :: [Text]
columnNames = 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.
getColumnStatisticsForPartition_catalogId :: Lens.Lens' GetColumnStatisticsForPartition (Prelude.Maybe Prelude.Text)
getColumnStatisticsForPartition_catalogId :: Lens' GetColumnStatisticsForPartition (Maybe Text)
getColumnStatisticsForPartition_catalogId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetColumnStatisticsForPartition' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: GetColumnStatisticsForPartition
s@GetColumnStatisticsForPartition' {} Maybe Text
a -> GetColumnStatisticsForPartition
s {$sel:catalogId:GetColumnStatisticsForPartition' :: Maybe Text
catalogId = Maybe Text
a} :: GetColumnStatisticsForPartition)

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

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

-- | A list of partition values identifying the partition.
getColumnStatisticsForPartition_partitionValues :: Lens.Lens' GetColumnStatisticsForPartition [Prelude.Text]
getColumnStatisticsForPartition_partitionValues :: Lens' GetColumnStatisticsForPartition [Text]
getColumnStatisticsForPartition_partitionValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetColumnStatisticsForPartition' {[Text]
partitionValues :: [Text]
$sel:partitionValues:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> [Text]
partitionValues} -> [Text]
partitionValues) (\s :: GetColumnStatisticsForPartition
s@GetColumnStatisticsForPartition' {} [Text]
a -> GetColumnStatisticsForPartition
s {$sel:partitionValues:GetColumnStatisticsForPartition' :: [Text]
partitionValues = [Text]
a} :: GetColumnStatisticsForPartition) 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

-- | A list of the column names.
getColumnStatisticsForPartition_columnNames :: Lens.Lens' GetColumnStatisticsForPartition [Prelude.Text]
getColumnStatisticsForPartition_columnNames :: Lens' GetColumnStatisticsForPartition [Text]
getColumnStatisticsForPartition_columnNames = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetColumnStatisticsForPartition' {[Text]
columnNames :: [Text]
$sel:columnNames:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> [Text]
columnNames} -> [Text]
columnNames) (\s :: GetColumnStatisticsForPartition
s@GetColumnStatisticsForPartition' {} [Text]
a -> GetColumnStatisticsForPartition
s {$sel:columnNames:GetColumnStatisticsForPartition' :: [Text]
columnNames = [Text]
a} :: GetColumnStatisticsForPartition) 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
    GetColumnStatisticsForPartition
  where
  type
    AWSResponse GetColumnStatisticsForPartition =
      GetColumnStatisticsForPartitionResponse
  request :: (Service -> Service)
-> GetColumnStatisticsForPartition
-> Request GetColumnStatisticsForPartition
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 GetColumnStatisticsForPartition
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetColumnStatisticsForPartition)))
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 [ColumnStatistics]
-> Maybe [ColumnError]
-> Int
-> GetColumnStatisticsForPartitionResponse
GetColumnStatisticsForPartitionResponse'
            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
"ColumnStatisticsList"
                            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.<*> (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
    GetColumnStatisticsForPartition
  where
  hashWithSalt :: Int -> GetColumnStatisticsForPartition -> Int
hashWithSalt
    Int
_salt
    GetColumnStatisticsForPartition' {[Text]
Maybe Text
Text
columnNames :: [Text]
partitionValues :: [Text]
tableName :: Text
databaseName :: Text
catalogId :: Maybe Text
$sel:columnNames:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> [Text]
$sel:partitionValues:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> [Text]
$sel:tableName:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> Text
$sel:databaseName:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> Text
$sel:catalogId:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> 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` [Text]
partitionValues
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` [Text]
columnNames

instance
  Prelude.NFData
    GetColumnStatisticsForPartition
  where
  rnf :: GetColumnStatisticsForPartition -> ()
rnf GetColumnStatisticsForPartition' {[Text]
Maybe Text
Text
columnNames :: [Text]
partitionValues :: [Text]
tableName :: Text
databaseName :: Text
catalogId :: Maybe Text
$sel:columnNames:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> [Text]
$sel:partitionValues:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> [Text]
$sel:tableName:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> Text
$sel:databaseName:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> Text
$sel:catalogId:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> 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 [Text]
partitionValues
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [Text]
columnNames

instance
  Data.ToHeaders
    GetColumnStatisticsForPartition
  where
  toHeaders :: GetColumnStatisticsForPartition -> 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.GetColumnStatisticsForPartition" ::
                          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 GetColumnStatisticsForPartition where
  toJSON :: GetColumnStatisticsForPartition -> Value
toJSON GetColumnStatisticsForPartition' {[Text]
Maybe Text
Text
columnNames :: [Text]
partitionValues :: [Text]
tableName :: Text
databaseName :: Text
catalogId :: Maybe Text
$sel:columnNames:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> [Text]
$sel:partitionValues:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> [Text]
$sel:tableName:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> Text
$sel:databaseName:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> Text
$sel:catalogId:GetColumnStatisticsForPartition' :: GetColumnStatisticsForPartition -> 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
"PartitionValues" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
partitionValues),
            forall a. a -> Maybe a
Prelude.Just (Key
"ColumnNames" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= [Text]
columnNames)
          ]
      )

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

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

-- | /See:/ 'newGetColumnStatisticsForPartitionResponse' smart constructor.
data GetColumnStatisticsForPartitionResponse = GetColumnStatisticsForPartitionResponse'
  { -- | List of ColumnStatistics that failed to be retrieved.
    GetColumnStatisticsForPartitionResponse -> Maybe [ColumnStatistics]
columnStatisticsList :: Prelude.Maybe [ColumnStatistics],
    -- | Error occurred during retrieving column statistics data.
    GetColumnStatisticsForPartitionResponse -> Maybe [ColumnError]
errors :: Prelude.Maybe [ColumnError],
    -- | The response's http status code.
    GetColumnStatisticsForPartitionResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetColumnStatisticsForPartitionResponse
-> GetColumnStatisticsForPartitionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetColumnStatisticsForPartitionResponse
-> GetColumnStatisticsForPartitionResponse -> Bool
$c/= :: GetColumnStatisticsForPartitionResponse
-> GetColumnStatisticsForPartitionResponse -> Bool
== :: GetColumnStatisticsForPartitionResponse
-> GetColumnStatisticsForPartitionResponse -> Bool
$c== :: GetColumnStatisticsForPartitionResponse
-> GetColumnStatisticsForPartitionResponse -> Bool
Prelude.Eq, ReadPrec [GetColumnStatisticsForPartitionResponse]
ReadPrec GetColumnStatisticsForPartitionResponse
Int -> ReadS GetColumnStatisticsForPartitionResponse
ReadS [GetColumnStatisticsForPartitionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetColumnStatisticsForPartitionResponse]
$creadListPrec :: ReadPrec [GetColumnStatisticsForPartitionResponse]
readPrec :: ReadPrec GetColumnStatisticsForPartitionResponse
$creadPrec :: ReadPrec GetColumnStatisticsForPartitionResponse
readList :: ReadS [GetColumnStatisticsForPartitionResponse]
$creadList :: ReadS [GetColumnStatisticsForPartitionResponse]
readsPrec :: Int -> ReadS GetColumnStatisticsForPartitionResponse
$creadsPrec :: Int -> ReadS GetColumnStatisticsForPartitionResponse
Prelude.Read, Int -> GetColumnStatisticsForPartitionResponse -> ShowS
[GetColumnStatisticsForPartitionResponse] -> ShowS
GetColumnStatisticsForPartitionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetColumnStatisticsForPartitionResponse] -> ShowS
$cshowList :: [GetColumnStatisticsForPartitionResponse] -> ShowS
show :: GetColumnStatisticsForPartitionResponse -> String
$cshow :: GetColumnStatisticsForPartitionResponse -> String
showsPrec :: Int -> GetColumnStatisticsForPartitionResponse -> ShowS
$cshowsPrec :: Int -> GetColumnStatisticsForPartitionResponse -> ShowS
Prelude.Show, forall x.
Rep GetColumnStatisticsForPartitionResponse x
-> GetColumnStatisticsForPartitionResponse
forall x.
GetColumnStatisticsForPartitionResponse
-> Rep GetColumnStatisticsForPartitionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetColumnStatisticsForPartitionResponse x
-> GetColumnStatisticsForPartitionResponse
$cfrom :: forall x.
GetColumnStatisticsForPartitionResponse
-> Rep GetColumnStatisticsForPartitionResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetColumnStatisticsForPartitionResponse' 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:
--
-- 'columnStatisticsList', 'getColumnStatisticsForPartitionResponse_columnStatisticsList' - List of ColumnStatistics that failed to be retrieved.
--
-- 'errors', 'getColumnStatisticsForPartitionResponse_errors' - Error occurred during retrieving column statistics data.
--
-- 'httpStatus', 'getColumnStatisticsForPartitionResponse_httpStatus' - The response's http status code.
newGetColumnStatisticsForPartitionResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetColumnStatisticsForPartitionResponse
newGetColumnStatisticsForPartitionResponse :: Int -> GetColumnStatisticsForPartitionResponse
newGetColumnStatisticsForPartitionResponse
  Int
pHttpStatus_ =
    GetColumnStatisticsForPartitionResponse'
      { $sel:columnStatisticsList:GetColumnStatisticsForPartitionResponse' :: Maybe [ColumnStatistics]
columnStatisticsList =
          forall a. Maybe a
Prelude.Nothing,
        $sel:errors:GetColumnStatisticsForPartitionResponse' :: Maybe [ColumnError]
errors = forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetColumnStatisticsForPartitionResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | List of ColumnStatistics that failed to be retrieved.
getColumnStatisticsForPartitionResponse_columnStatisticsList :: Lens.Lens' GetColumnStatisticsForPartitionResponse (Prelude.Maybe [ColumnStatistics])
getColumnStatisticsForPartitionResponse_columnStatisticsList :: Lens'
  GetColumnStatisticsForPartitionResponse (Maybe [ColumnStatistics])
getColumnStatisticsForPartitionResponse_columnStatisticsList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetColumnStatisticsForPartitionResponse' {Maybe [ColumnStatistics]
columnStatisticsList :: Maybe [ColumnStatistics]
$sel:columnStatisticsList:GetColumnStatisticsForPartitionResponse' :: GetColumnStatisticsForPartitionResponse -> Maybe [ColumnStatistics]
columnStatisticsList} -> Maybe [ColumnStatistics]
columnStatisticsList) (\s :: GetColumnStatisticsForPartitionResponse
s@GetColumnStatisticsForPartitionResponse' {} Maybe [ColumnStatistics]
a -> GetColumnStatisticsForPartitionResponse
s {$sel:columnStatisticsList:GetColumnStatisticsForPartitionResponse' :: Maybe [ColumnStatistics]
columnStatisticsList = Maybe [ColumnStatistics]
a} :: GetColumnStatisticsForPartitionResponse) 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

-- | Error occurred during retrieving column statistics data.
getColumnStatisticsForPartitionResponse_errors :: Lens.Lens' GetColumnStatisticsForPartitionResponse (Prelude.Maybe [ColumnError])
getColumnStatisticsForPartitionResponse_errors :: Lens' GetColumnStatisticsForPartitionResponse (Maybe [ColumnError])
getColumnStatisticsForPartitionResponse_errors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetColumnStatisticsForPartitionResponse' {Maybe [ColumnError]
errors :: Maybe [ColumnError]
$sel:errors:GetColumnStatisticsForPartitionResponse' :: GetColumnStatisticsForPartitionResponse -> Maybe [ColumnError]
errors} -> Maybe [ColumnError]
errors) (\s :: GetColumnStatisticsForPartitionResponse
s@GetColumnStatisticsForPartitionResponse' {} Maybe [ColumnError]
a -> GetColumnStatisticsForPartitionResponse
s {$sel:errors:GetColumnStatisticsForPartitionResponse' :: Maybe [ColumnError]
errors = Maybe [ColumnError]
a} :: GetColumnStatisticsForPartitionResponse) 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.
getColumnStatisticsForPartitionResponse_httpStatus :: Lens.Lens' GetColumnStatisticsForPartitionResponse Prelude.Int
getColumnStatisticsForPartitionResponse_httpStatus :: Lens' GetColumnStatisticsForPartitionResponse Int
getColumnStatisticsForPartitionResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetColumnStatisticsForPartitionResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetColumnStatisticsForPartitionResponse' :: GetColumnStatisticsForPartitionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetColumnStatisticsForPartitionResponse
s@GetColumnStatisticsForPartitionResponse' {} Int
a -> GetColumnStatisticsForPartitionResponse
s {$sel:httpStatus:GetColumnStatisticsForPartitionResponse' :: Int
httpStatus = Int
a} :: GetColumnStatisticsForPartitionResponse)

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