{-# 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 #-}
module Amazonka.Glue.DeleteColumnStatisticsForTable
(
DeleteColumnStatisticsForTable (..),
newDeleteColumnStatisticsForTable,
deleteColumnStatisticsForTable_catalogId,
deleteColumnStatisticsForTable_databaseName,
deleteColumnStatisticsForTable_tableName,
deleteColumnStatisticsForTable_columnName,
DeleteColumnStatisticsForTableResponse (..),
newDeleteColumnStatisticsForTableResponse,
deleteColumnStatisticsForTableResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteColumnStatisticsForTable = DeleteColumnStatisticsForTable'
{
DeleteColumnStatisticsForTable -> Maybe Text
catalogId :: Prelude.Maybe Prelude.Text,
DeleteColumnStatisticsForTable -> Text
databaseName :: Prelude.Text,
DeleteColumnStatisticsForTable -> Text
tableName :: Prelude.Text,
DeleteColumnStatisticsForTable -> Text
columnName :: Prelude.Text
}
deriving (DeleteColumnStatisticsForTable
-> DeleteColumnStatisticsForTable -> Bool
(DeleteColumnStatisticsForTable
-> DeleteColumnStatisticsForTable -> Bool)
-> (DeleteColumnStatisticsForTable
-> DeleteColumnStatisticsForTable -> Bool)
-> Eq DeleteColumnStatisticsForTable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteColumnStatisticsForTable
-> DeleteColumnStatisticsForTable -> Bool
$c/= :: DeleteColumnStatisticsForTable
-> DeleteColumnStatisticsForTable -> Bool
== :: DeleteColumnStatisticsForTable
-> DeleteColumnStatisticsForTable -> Bool
$c== :: DeleteColumnStatisticsForTable
-> DeleteColumnStatisticsForTable -> Bool
Prelude.Eq, ReadPrec [DeleteColumnStatisticsForTable]
ReadPrec DeleteColumnStatisticsForTable
Int -> ReadS DeleteColumnStatisticsForTable
ReadS [DeleteColumnStatisticsForTable]
(Int -> ReadS DeleteColumnStatisticsForTable)
-> ReadS [DeleteColumnStatisticsForTable]
-> ReadPrec DeleteColumnStatisticsForTable
-> ReadPrec [DeleteColumnStatisticsForTable]
-> Read DeleteColumnStatisticsForTable
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteColumnStatisticsForTable]
$creadListPrec :: ReadPrec [DeleteColumnStatisticsForTable]
readPrec :: ReadPrec DeleteColumnStatisticsForTable
$creadPrec :: ReadPrec DeleteColumnStatisticsForTable
readList :: ReadS [DeleteColumnStatisticsForTable]
$creadList :: ReadS [DeleteColumnStatisticsForTable]
readsPrec :: Int -> ReadS DeleteColumnStatisticsForTable
$creadsPrec :: Int -> ReadS DeleteColumnStatisticsForTable
Prelude.Read, Int -> DeleteColumnStatisticsForTable -> ShowS
[DeleteColumnStatisticsForTable] -> ShowS
DeleteColumnStatisticsForTable -> String
(Int -> DeleteColumnStatisticsForTable -> ShowS)
-> (DeleteColumnStatisticsForTable -> String)
-> ([DeleteColumnStatisticsForTable] -> ShowS)
-> Show DeleteColumnStatisticsForTable
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteColumnStatisticsForTable] -> ShowS
$cshowList :: [DeleteColumnStatisticsForTable] -> ShowS
show :: DeleteColumnStatisticsForTable -> String
$cshow :: DeleteColumnStatisticsForTable -> String
showsPrec :: Int -> DeleteColumnStatisticsForTable -> ShowS
$cshowsPrec :: Int -> DeleteColumnStatisticsForTable -> ShowS
Prelude.Show, (forall x.
DeleteColumnStatisticsForTable
-> Rep DeleteColumnStatisticsForTable x)
-> (forall x.
Rep DeleteColumnStatisticsForTable x
-> DeleteColumnStatisticsForTable)
-> Generic DeleteColumnStatisticsForTable
forall x.
Rep DeleteColumnStatisticsForTable x
-> DeleteColumnStatisticsForTable
forall x.
DeleteColumnStatisticsForTable
-> Rep DeleteColumnStatisticsForTable x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteColumnStatisticsForTable x
-> DeleteColumnStatisticsForTable
$cfrom :: forall x.
DeleteColumnStatisticsForTable
-> Rep DeleteColumnStatisticsForTable x
Prelude.Generic)
newDeleteColumnStatisticsForTable ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteColumnStatisticsForTable
newDeleteColumnStatisticsForTable :: Text -> Text -> Text -> DeleteColumnStatisticsForTable
newDeleteColumnStatisticsForTable
Text
pDatabaseName_
Text
pTableName_
Text
pColumnName_ =
DeleteColumnStatisticsForTable' :: Maybe Text
-> Text -> Text -> Text -> DeleteColumnStatisticsForTable
DeleteColumnStatisticsForTable'
{ $sel:catalogId:DeleteColumnStatisticsForTable' :: Maybe Text
catalogId =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:databaseName:DeleteColumnStatisticsForTable' :: Text
databaseName = Text
pDatabaseName_,
$sel:tableName:DeleteColumnStatisticsForTable' :: Text
tableName = Text
pTableName_,
$sel:columnName:DeleteColumnStatisticsForTable' :: Text
columnName = Text
pColumnName_
}
deleteColumnStatisticsForTable_catalogId :: Lens.Lens' DeleteColumnStatisticsForTable (Prelude.Maybe Prelude.Text)
deleteColumnStatisticsForTable_catalogId :: (Maybe Text -> f (Maybe Text))
-> DeleteColumnStatisticsForTable
-> f DeleteColumnStatisticsForTable
deleteColumnStatisticsForTable_catalogId = (DeleteColumnStatisticsForTable -> Maybe Text)
-> (DeleteColumnStatisticsForTable
-> Maybe Text -> DeleteColumnStatisticsForTable)
-> Lens
DeleteColumnStatisticsForTable
DeleteColumnStatisticsForTable
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteColumnStatisticsForTable' {Maybe Text
catalogId :: Maybe Text
$sel:catalogId:DeleteColumnStatisticsForTable' :: DeleteColumnStatisticsForTable -> Maybe Text
catalogId} -> Maybe Text
catalogId) (\s :: DeleteColumnStatisticsForTable
s@DeleteColumnStatisticsForTable' {} Maybe Text
a -> DeleteColumnStatisticsForTable
s {$sel:catalogId:DeleteColumnStatisticsForTable' :: Maybe Text
catalogId = Maybe Text
a} :: DeleteColumnStatisticsForTable)
deleteColumnStatisticsForTable_databaseName :: Lens.Lens' DeleteColumnStatisticsForTable Prelude.Text
deleteColumnStatisticsForTable_databaseName :: (Text -> f Text)
-> DeleteColumnStatisticsForTable
-> f DeleteColumnStatisticsForTable
deleteColumnStatisticsForTable_databaseName = (DeleteColumnStatisticsForTable -> Text)
-> (DeleteColumnStatisticsForTable
-> Text -> DeleteColumnStatisticsForTable)
-> Lens
DeleteColumnStatisticsForTable
DeleteColumnStatisticsForTable
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteColumnStatisticsForTable' {Text
databaseName :: Text
$sel:databaseName:DeleteColumnStatisticsForTable' :: DeleteColumnStatisticsForTable -> Text
databaseName} -> Text
databaseName) (\s :: DeleteColumnStatisticsForTable
s@DeleteColumnStatisticsForTable' {} Text
a -> DeleteColumnStatisticsForTable
s {$sel:databaseName:DeleteColumnStatisticsForTable' :: Text
databaseName = Text
a} :: DeleteColumnStatisticsForTable)
deleteColumnStatisticsForTable_tableName :: Lens.Lens' DeleteColumnStatisticsForTable Prelude.Text
deleteColumnStatisticsForTable_tableName :: (Text -> f Text)
-> DeleteColumnStatisticsForTable
-> f DeleteColumnStatisticsForTable
deleteColumnStatisticsForTable_tableName = (DeleteColumnStatisticsForTable -> Text)
-> (DeleteColumnStatisticsForTable
-> Text -> DeleteColumnStatisticsForTable)
-> Lens
DeleteColumnStatisticsForTable
DeleteColumnStatisticsForTable
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteColumnStatisticsForTable' {Text
tableName :: Text
$sel:tableName:DeleteColumnStatisticsForTable' :: DeleteColumnStatisticsForTable -> Text
tableName} -> Text
tableName) (\s :: DeleteColumnStatisticsForTable
s@DeleteColumnStatisticsForTable' {} Text
a -> DeleteColumnStatisticsForTable
s {$sel:tableName:DeleteColumnStatisticsForTable' :: Text
tableName = Text
a} :: DeleteColumnStatisticsForTable)
deleteColumnStatisticsForTable_columnName :: Lens.Lens' DeleteColumnStatisticsForTable Prelude.Text
deleteColumnStatisticsForTable_columnName :: (Text -> f Text)
-> DeleteColumnStatisticsForTable
-> f DeleteColumnStatisticsForTable
deleteColumnStatisticsForTable_columnName = (DeleteColumnStatisticsForTable -> Text)
-> (DeleteColumnStatisticsForTable
-> Text -> DeleteColumnStatisticsForTable)
-> Lens
DeleteColumnStatisticsForTable
DeleteColumnStatisticsForTable
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteColumnStatisticsForTable' {Text
columnName :: Text
$sel:columnName:DeleteColumnStatisticsForTable' :: DeleteColumnStatisticsForTable -> Text
columnName} -> Text
columnName) (\s :: DeleteColumnStatisticsForTable
s@DeleteColumnStatisticsForTable' {} Text
a -> DeleteColumnStatisticsForTable
s {$sel:columnName:DeleteColumnStatisticsForTable' :: Text
columnName = Text
a} :: DeleteColumnStatisticsForTable)
instance
Core.AWSRequest
DeleteColumnStatisticsForTable
where
type
AWSResponse DeleteColumnStatisticsForTable =
DeleteColumnStatisticsForTableResponse
request :: DeleteColumnStatisticsForTable
-> Request DeleteColumnStatisticsForTable
request = Service
-> DeleteColumnStatisticsForTable
-> Request DeleteColumnStatisticsForTable
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteColumnStatisticsForTable
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteColumnStatisticsForTable)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteColumnStatisticsForTable))
-> Logger
-> Service
-> Proxy DeleteColumnStatisticsForTable
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteColumnStatisticsForTable)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteColumnStatisticsForTableResponse
DeleteColumnStatisticsForTableResponse'
(Int -> DeleteColumnStatisticsForTableResponse)
-> Either String Int
-> Either String DeleteColumnStatisticsForTableResponse
forall (f :: * -> *) a b. Functor 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
DeleteColumnStatisticsForTable
instance
Prelude.NFData
DeleteColumnStatisticsForTable
instance
Core.ToHeaders
DeleteColumnStatisticsForTable
where
toHeaders :: DeleteColumnStatisticsForTable -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DeleteColumnStatisticsForTable -> 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
"AWSGlue.DeleteColumnStatisticsForTable" ::
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 DeleteColumnStatisticsForTable where
toJSON :: DeleteColumnStatisticsForTable -> Value
toJSON DeleteColumnStatisticsForTable' {Maybe Text
Text
columnName :: Text
tableName :: Text
databaseName :: Text
catalogId :: Maybe Text
$sel:columnName:DeleteColumnStatisticsForTable' :: DeleteColumnStatisticsForTable -> Text
$sel:tableName:DeleteColumnStatisticsForTable' :: DeleteColumnStatisticsForTable -> Text
$sel:databaseName:DeleteColumnStatisticsForTable' :: DeleteColumnStatisticsForTable -> Text
$sel:catalogId:DeleteColumnStatisticsForTable' :: DeleteColumnStatisticsForTable -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"CatalogId" 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
catalogId,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DatabaseName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
databaseName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"TableName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
tableName),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"ColumnName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
columnName)
]
)
instance Core.ToPath DeleteColumnStatisticsForTable where
toPath :: DeleteColumnStatisticsForTable -> ByteString
toPath = ByteString -> DeleteColumnStatisticsForTable -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteColumnStatisticsForTable where
toQuery :: DeleteColumnStatisticsForTable -> QueryString
toQuery = QueryString -> DeleteColumnStatisticsForTable -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteColumnStatisticsForTableResponse = DeleteColumnStatisticsForTableResponse'
{
DeleteColumnStatisticsForTableResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteColumnStatisticsForTableResponse
-> DeleteColumnStatisticsForTableResponse -> Bool
(DeleteColumnStatisticsForTableResponse
-> DeleteColumnStatisticsForTableResponse -> Bool)
-> (DeleteColumnStatisticsForTableResponse
-> DeleteColumnStatisticsForTableResponse -> Bool)
-> Eq DeleteColumnStatisticsForTableResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteColumnStatisticsForTableResponse
-> DeleteColumnStatisticsForTableResponse -> Bool
$c/= :: DeleteColumnStatisticsForTableResponse
-> DeleteColumnStatisticsForTableResponse -> Bool
== :: DeleteColumnStatisticsForTableResponse
-> DeleteColumnStatisticsForTableResponse -> Bool
$c== :: DeleteColumnStatisticsForTableResponse
-> DeleteColumnStatisticsForTableResponse -> Bool
Prelude.Eq, ReadPrec [DeleteColumnStatisticsForTableResponse]
ReadPrec DeleteColumnStatisticsForTableResponse
Int -> ReadS DeleteColumnStatisticsForTableResponse
ReadS [DeleteColumnStatisticsForTableResponse]
(Int -> ReadS DeleteColumnStatisticsForTableResponse)
-> ReadS [DeleteColumnStatisticsForTableResponse]
-> ReadPrec DeleteColumnStatisticsForTableResponse
-> ReadPrec [DeleteColumnStatisticsForTableResponse]
-> Read DeleteColumnStatisticsForTableResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteColumnStatisticsForTableResponse]
$creadListPrec :: ReadPrec [DeleteColumnStatisticsForTableResponse]
readPrec :: ReadPrec DeleteColumnStatisticsForTableResponse
$creadPrec :: ReadPrec DeleteColumnStatisticsForTableResponse
readList :: ReadS [DeleteColumnStatisticsForTableResponse]
$creadList :: ReadS [DeleteColumnStatisticsForTableResponse]
readsPrec :: Int -> ReadS DeleteColumnStatisticsForTableResponse
$creadsPrec :: Int -> ReadS DeleteColumnStatisticsForTableResponse
Prelude.Read, Int -> DeleteColumnStatisticsForTableResponse -> ShowS
[DeleteColumnStatisticsForTableResponse] -> ShowS
DeleteColumnStatisticsForTableResponse -> String
(Int -> DeleteColumnStatisticsForTableResponse -> ShowS)
-> (DeleteColumnStatisticsForTableResponse -> String)
-> ([DeleteColumnStatisticsForTableResponse] -> ShowS)
-> Show DeleteColumnStatisticsForTableResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteColumnStatisticsForTableResponse] -> ShowS
$cshowList :: [DeleteColumnStatisticsForTableResponse] -> ShowS
show :: DeleteColumnStatisticsForTableResponse -> String
$cshow :: DeleteColumnStatisticsForTableResponse -> String
showsPrec :: Int -> DeleteColumnStatisticsForTableResponse -> ShowS
$cshowsPrec :: Int -> DeleteColumnStatisticsForTableResponse -> ShowS
Prelude.Show, (forall x.
DeleteColumnStatisticsForTableResponse
-> Rep DeleteColumnStatisticsForTableResponse x)
-> (forall x.
Rep DeleteColumnStatisticsForTableResponse x
-> DeleteColumnStatisticsForTableResponse)
-> Generic DeleteColumnStatisticsForTableResponse
forall x.
Rep DeleteColumnStatisticsForTableResponse x
-> DeleteColumnStatisticsForTableResponse
forall x.
DeleteColumnStatisticsForTableResponse
-> Rep DeleteColumnStatisticsForTableResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteColumnStatisticsForTableResponse x
-> DeleteColumnStatisticsForTableResponse
$cfrom :: forall x.
DeleteColumnStatisticsForTableResponse
-> Rep DeleteColumnStatisticsForTableResponse x
Prelude.Generic)
newDeleteColumnStatisticsForTableResponse ::
Prelude.Int ->
DeleteColumnStatisticsForTableResponse
newDeleteColumnStatisticsForTableResponse :: Int -> DeleteColumnStatisticsForTableResponse
newDeleteColumnStatisticsForTableResponse
Int
pHttpStatus_ =
DeleteColumnStatisticsForTableResponse' :: Int -> DeleteColumnStatisticsForTableResponse
DeleteColumnStatisticsForTableResponse'
{ $sel:httpStatus:DeleteColumnStatisticsForTableResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteColumnStatisticsForTableResponse_httpStatus :: Lens.Lens' DeleteColumnStatisticsForTableResponse Prelude.Int
deleteColumnStatisticsForTableResponse_httpStatus :: (Int -> f Int)
-> DeleteColumnStatisticsForTableResponse
-> f DeleteColumnStatisticsForTableResponse
deleteColumnStatisticsForTableResponse_httpStatus = (DeleteColumnStatisticsForTableResponse -> Int)
-> (DeleteColumnStatisticsForTableResponse
-> Int -> DeleteColumnStatisticsForTableResponse)
-> Lens
DeleteColumnStatisticsForTableResponse
DeleteColumnStatisticsForTableResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteColumnStatisticsForTableResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteColumnStatisticsForTableResponse' :: DeleteColumnStatisticsForTableResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteColumnStatisticsForTableResponse
s@DeleteColumnStatisticsForTableResponse' {} Int
a -> DeleteColumnStatisticsForTableResponse
s {$sel:httpStatus:DeleteColumnStatisticsForTableResponse' :: Int
httpStatus = Int
a} :: DeleteColumnStatisticsForTableResponse)
instance
Prelude.NFData
DeleteColumnStatisticsForTableResponse