{-# 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.Personalize.DeleteSchema
(
DeleteSchema (..),
newDeleteSchema,
deleteSchema_schemaArn,
DeleteSchemaResponse (..),
newDeleteSchemaResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Personalize.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeleteSchema = DeleteSchema'
{
DeleteSchema -> Text
schemaArn :: Prelude.Text
}
deriving (DeleteSchema -> DeleteSchema -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSchema -> DeleteSchema -> Bool
$c/= :: DeleteSchema -> DeleteSchema -> Bool
== :: DeleteSchema -> DeleteSchema -> Bool
$c== :: DeleteSchema -> DeleteSchema -> Bool
Prelude.Eq, ReadPrec [DeleteSchema]
ReadPrec DeleteSchema
Int -> ReadS DeleteSchema
ReadS [DeleteSchema]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSchema]
$creadListPrec :: ReadPrec [DeleteSchema]
readPrec :: ReadPrec DeleteSchema
$creadPrec :: ReadPrec DeleteSchema
readList :: ReadS [DeleteSchema]
$creadList :: ReadS [DeleteSchema]
readsPrec :: Int -> ReadS DeleteSchema
$creadsPrec :: Int -> ReadS DeleteSchema
Prelude.Read, Int -> DeleteSchema -> ShowS
[DeleteSchema] -> ShowS
DeleteSchema -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSchema] -> ShowS
$cshowList :: [DeleteSchema] -> ShowS
show :: DeleteSchema -> String
$cshow :: DeleteSchema -> String
showsPrec :: Int -> DeleteSchema -> ShowS
$cshowsPrec :: Int -> DeleteSchema -> ShowS
Prelude.Show, forall x. Rep DeleteSchema x -> DeleteSchema
forall x. DeleteSchema -> Rep DeleteSchema x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteSchema x -> DeleteSchema
$cfrom :: forall x. DeleteSchema -> Rep DeleteSchema x
Prelude.Generic)
newDeleteSchema ::
Prelude.Text ->
DeleteSchema
newDeleteSchema :: Text -> DeleteSchema
newDeleteSchema Text
pSchemaArn_ =
DeleteSchema' {$sel:schemaArn:DeleteSchema' :: Text
schemaArn = Text
pSchemaArn_}
deleteSchema_schemaArn :: Lens.Lens' DeleteSchema Prelude.Text
deleteSchema_schemaArn :: Lens' DeleteSchema Text
deleteSchema_schemaArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSchema' {Text
schemaArn :: Text
$sel:schemaArn:DeleteSchema' :: DeleteSchema -> Text
schemaArn} -> Text
schemaArn) (\s :: DeleteSchema
s@DeleteSchema' {} Text
a -> DeleteSchema
s {$sel:schemaArn:DeleteSchema' :: Text
schemaArn = Text
a} :: DeleteSchema)
instance Core.AWSRequest DeleteSchema where
type AWSResponse DeleteSchema = DeleteSchemaResponse
request :: (Service -> Service) -> DeleteSchema -> Request DeleteSchema
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 DeleteSchema
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteSchema)))
response = forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteSchemaResponse
DeleteSchemaResponse'
instance Prelude.Hashable DeleteSchema where
hashWithSalt :: Int -> DeleteSchema -> Int
hashWithSalt Int
_salt DeleteSchema' {Text
schemaArn :: Text
$sel:schemaArn:DeleteSchema' :: DeleteSchema -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
schemaArn
instance Prelude.NFData DeleteSchema where
rnf :: DeleteSchema -> ()
rnf DeleteSchema' {Text
schemaArn :: Text
$sel:schemaArn:DeleteSchema' :: DeleteSchema -> Text
..} = forall a. NFData a => a -> ()
Prelude.rnf Text
schemaArn
instance Data.ToHeaders DeleteSchema where
toHeaders :: DeleteSchema -> [Header]
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 -> [Header]
Data.=# ( ByteString
"AmazonPersonalize.DeleteSchema" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteSchema where
toJSON :: DeleteSchema -> Value
toJSON DeleteSchema' {Text
schemaArn :: Text
$sel:schemaArn:DeleteSchema' :: DeleteSchema -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"schemaArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
schemaArn)]
)
instance Data.ToPath DeleteSchema where
toPath :: DeleteSchema -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteSchema where
toQuery :: DeleteSchema -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteSchemaResponse = DeleteSchemaResponse'
{
}
deriving (DeleteSchemaResponse -> DeleteSchemaResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSchemaResponse -> DeleteSchemaResponse -> Bool
$c/= :: DeleteSchemaResponse -> DeleteSchemaResponse -> Bool
== :: DeleteSchemaResponse -> DeleteSchemaResponse -> Bool
$c== :: DeleteSchemaResponse -> DeleteSchemaResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSchemaResponse]
ReadPrec DeleteSchemaResponse
Int -> ReadS DeleteSchemaResponse
ReadS [DeleteSchemaResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSchemaResponse]
$creadListPrec :: ReadPrec [DeleteSchemaResponse]
readPrec :: ReadPrec DeleteSchemaResponse
$creadPrec :: ReadPrec DeleteSchemaResponse
readList :: ReadS [DeleteSchemaResponse]
$creadList :: ReadS [DeleteSchemaResponse]
readsPrec :: Int -> ReadS DeleteSchemaResponse
$creadsPrec :: Int -> ReadS DeleteSchemaResponse
Prelude.Read, Int -> DeleteSchemaResponse -> ShowS
[DeleteSchemaResponse] -> ShowS
DeleteSchemaResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSchemaResponse] -> ShowS
$cshowList :: [DeleteSchemaResponse] -> ShowS
show :: DeleteSchemaResponse -> String
$cshow :: DeleteSchemaResponse -> String
showsPrec :: Int -> DeleteSchemaResponse -> ShowS
$cshowsPrec :: Int -> DeleteSchemaResponse -> ShowS
Prelude.Show, forall x. Rep DeleteSchemaResponse x -> DeleteSchemaResponse
forall x. DeleteSchemaResponse -> Rep DeleteSchemaResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteSchemaResponse x -> DeleteSchemaResponse
$cfrom :: forall x. DeleteSchemaResponse -> Rep DeleteSchemaResponse x
Prelude.Generic)
newDeleteSchemaResponse ::
DeleteSchemaResponse
newDeleteSchemaResponse :: DeleteSchemaResponse
newDeleteSchemaResponse = DeleteSchemaResponse
DeleteSchemaResponse'
instance Prelude.NFData DeleteSchemaResponse where
rnf :: DeleteSchemaResponse -> ()
rnf DeleteSchemaResponse
_ = ()