{-# 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 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
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
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]
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
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.
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'
{ $sel:catalogId:DeleteColumnStatisticsForTable' :: Maybe Text
catalogId =
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 :: Lens' DeleteColumnStatisticsForTable (Maybe Text)
deleteColumnStatisticsForTable_catalogId = 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 :: Lens' DeleteColumnStatisticsForTable Text
deleteColumnStatisticsForTable_databaseName = 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 :: Lens' DeleteColumnStatisticsForTable Text
deleteColumnStatisticsForTable_tableName = 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 :: Lens' DeleteColumnStatisticsForTable Text
deleteColumnStatisticsForTable_columnName = 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 :: (Service -> Service)
-> DeleteColumnStatisticsForTable
-> Request DeleteColumnStatisticsForTable
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 DeleteColumnStatisticsForTable
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteColumnStatisticsForTable)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteColumnStatisticsForTableResponse
DeleteColumnStatisticsForTableResponse'
forall (f :: * -> *) a b. Functor 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
DeleteColumnStatisticsForTable
where
hashWithSalt :: Int -> DeleteColumnStatisticsForTable -> Int
hashWithSalt
Int
_salt
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
..} =
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
columnName
instance
Prelude.NFData
DeleteColumnStatisticsForTable
where
rnf :: DeleteColumnStatisticsForTable -> ()
rnf 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
..} =
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
columnName
instance
Data.ToHeaders
DeleteColumnStatisticsForTable
where
toHeaders :: DeleteColumnStatisticsForTable -> 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.DeleteColumnStatisticsForTable" ::
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 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
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
"ColumnName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
columnName)
]
)
instance Data.ToPath DeleteColumnStatisticsForTable where
toPath :: DeleteColumnStatisticsForTable -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteColumnStatisticsForTable where
toQuery :: DeleteColumnStatisticsForTable -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteColumnStatisticsForTableResponse = DeleteColumnStatisticsForTableResponse'
{
DeleteColumnStatisticsForTableResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteColumnStatisticsForTableResponse
-> DeleteColumnStatisticsForTableResponse -> Bool
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]
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
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.
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'
{ $sel:httpStatus:DeleteColumnStatisticsForTableResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteColumnStatisticsForTableResponse_httpStatus :: Lens.Lens' DeleteColumnStatisticsForTableResponse Prelude.Int
deleteColumnStatisticsForTableResponse_httpStatus :: Lens' DeleteColumnStatisticsForTableResponse Int
deleteColumnStatisticsForTableResponse_httpStatus = 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
where
rnf :: DeleteColumnStatisticsForTableResponse -> ()
rnf DeleteColumnStatisticsForTableResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteColumnStatisticsForTableResponse' :: DeleteColumnStatisticsForTableResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus