{-# 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.Schemas.DeleteSchemaVersion
(
DeleteSchemaVersion (..),
newDeleteSchemaVersion,
deleteSchemaVersion_schemaVersion,
deleteSchemaVersion_registryName,
deleteSchemaVersion_schemaName,
DeleteSchemaVersionResponse (..),
newDeleteSchemaVersionResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.Schemas.Types
data DeleteSchemaVersion = DeleteSchemaVersion'
{
DeleteSchemaVersion -> Text
schemaVersion :: Prelude.Text,
DeleteSchemaVersion -> Text
registryName :: Prelude.Text,
DeleteSchemaVersion -> Text
schemaName :: Prelude.Text
}
deriving (DeleteSchemaVersion -> DeleteSchemaVersion -> Bool
(DeleteSchemaVersion -> DeleteSchemaVersion -> Bool)
-> (DeleteSchemaVersion -> DeleteSchemaVersion -> Bool)
-> Eq DeleteSchemaVersion
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSchemaVersion -> DeleteSchemaVersion -> Bool
$c/= :: DeleteSchemaVersion -> DeleteSchemaVersion -> Bool
== :: DeleteSchemaVersion -> DeleteSchemaVersion -> Bool
$c== :: DeleteSchemaVersion -> DeleteSchemaVersion -> Bool
Prelude.Eq, ReadPrec [DeleteSchemaVersion]
ReadPrec DeleteSchemaVersion
Int -> ReadS DeleteSchemaVersion
ReadS [DeleteSchemaVersion]
(Int -> ReadS DeleteSchemaVersion)
-> ReadS [DeleteSchemaVersion]
-> ReadPrec DeleteSchemaVersion
-> ReadPrec [DeleteSchemaVersion]
-> Read DeleteSchemaVersion
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSchemaVersion]
$creadListPrec :: ReadPrec [DeleteSchemaVersion]
readPrec :: ReadPrec DeleteSchemaVersion
$creadPrec :: ReadPrec DeleteSchemaVersion
readList :: ReadS [DeleteSchemaVersion]
$creadList :: ReadS [DeleteSchemaVersion]
readsPrec :: Int -> ReadS DeleteSchemaVersion
$creadsPrec :: Int -> ReadS DeleteSchemaVersion
Prelude.Read, Int -> DeleteSchemaVersion -> ShowS
[DeleteSchemaVersion] -> ShowS
DeleteSchemaVersion -> String
(Int -> DeleteSchemaVersion -> ShowS)
-> (DeleteSchemaVersion -> String)
-> ([DeleteSchemaVersion] -> ShowS)
-> Show DeleteSchemaVersion
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSchemaVersion] -> ShowS
$cshowList :: [DeleteSchemaVersion] -> ShowS
show :: DeleteSchemaVersion -> String
$cshow :: DeleteSchemaVersion -> String
showsPrec :: Int -> DeleteSchemaVersion -> ShowS
$cshowsPrec :: Int -> DeleteSchemaVersion -> ShowS
Prelude.Show, (forall x. DeleteSchemaVersion -> Rep DeleteSchemaVersion x)
-> (forall x. Rep DeleteSchemaVersion x -> DeleteSchemaVersion)
-> Generic DeleteSchemaVersion
forall x. Rep DeleteSchemaVersion x -> DeleteSchemaVersion
forall x. DeleteSchemaVersion -> Rep DeleteSchemaVersion x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteSchemaVersion x -> DeleteSchemaVersion
$cfrom :: forall x. DeleteSchemaVersion -> Rep DeleteSchemaVersion x
Prelude.Generic)
newDeleteSchemaVersion ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteSchemaVersion
newDeleteSchemaVersion :: Text -> Text -> Text -> DeleteSchemaVersion
newDeleteSchemaVersion
Text
pSchemaVersion_
Text
pRegistryName_
Text
pSchemaName_ =
DeleteSchemaVersion' :: Text -> Text -> Text -> DeleteSchemaVersion
DeleteSchemaVersion'
{ $sel:schemaVersion:DeleteSchemaVersion' :: Text
schemaVersion =
Text
pSchemaVersion_,
$sel:registryName:DeleteSchemaVersion' :: Text
registryName = Text
pRegistryName_,
$sel:schemaName:DeleteSchemaVersion' :: Text
schemaName = Text
pSchemaName_
}
deleteSchemaVersion_schemaVersion :: Lens.Lens' DeleteSchemaVersion Prelude.Text
deleteSchemaVersion_schemaVersion :: (Text -> f Text) -> DeleteSchemaVersion -> f DeleteSchemaVersion
deleteSchemaVersion_schemaVersion = (DeleteSchemaVersion -> Text)
-> (DeleteSchemaVersion -> Text -> DeleteSchemaVersion)
-> Lens DeleteSchemaVersion DeleteSchemaVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSchemaVersion' {Text
schemaVersion :: Text
$sel:schemaVersion:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
schemaVersion} -> Text
schemaVersion) (\s :: DeleteSchemaVersion
s@DeleteSchemaVersion' {} Text
a -> DeleteSchemaVersion
s {$sel:schemaVersion:DeleteSchemaVersion' :: Text
schemaVersion = Text
a} :: DeleteSchemaVersion)
deleteSchemaVersion_registryName :: Lens.Lens' DeleteSchemaVersion Prelude.Text
deleteSchemaVersion_registryName :: (Text -> f Text) -> DeleteSchemaVersion -> f DeleteSchemaVersion
deleteSchemaVersion_registryName = (DeleteSchemaVersion -> Text)
-> (DeleteSchemaVersion -> Text -> DeleteSchemaVersion)
-> Lens DeleteSchemaVersion DeleteSchemaVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSchemaVersion' {Text
registryName :: Text
$sel:registryName:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
registryName} -> Text
registryName) (\s :: DeleteSchemaVersion
s@DeleteSchemaVersion' {} Text
a -> DeleteSchemaVersion
s {$sel:registryName:DeleteSchemaVersion' :: Text
registryName = Text
a} :: DeleteSchemaVersion)
deleteSchemaVersion_schemaName :: Lens.Lens' DeleteSchemaVersion Prelude.Text
deleteSchemaVersion_schemaName :: (Text -> f Text) -> DeleteSchemaVersion -> f DeleteSchemaVersion
deleteSchemaVersion_schemaName = (DeleteSchemaVersion -> Text)
-> (DeleteSchemaVersion -> Text -> DeleteSchemaVersion)
-> Lens DeleteSchemaVersion DeleteSchemaVersion Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSchemaVersion' {Text
schemaName :: Text
$sel:schemaName:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
schemaName} -> Text
schemaName) (\s :: DeleteSchemaVersion
s@DeleteSchemaVersion' {} Text
a -> DeleteSchemaVersion
s {$sel:schemaName:DeleteSchemaVersion' :: Text
schemaName = Text
a} :: DeleteSchemaVersion)
instance Core.AWSRequest DeleteSchemaVersion where
type
AWSResponse DeleteSchemaVersion =
DeleteSchemaVersionResponse
request :: DeleteSchemaVersion -> Request DeleteSchemaVersion
request = Service -> DeleteSchemaVersion -> Request DeleteSchemaVersion
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteSchemaVersion
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSchemaVersion)))
response =
AWSResponse DeleteSchemaVersion
-> Logger
-> Service
-> Proxy DeleteSchemaVersion
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSchemaVersion)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteSchemaVersion
DeleteSchemaVersionResponse
DeleteSchemaVersionResponse'
instance Prelude.Hashable DeleteSchemaVersion
instance Prelude.NFData DeleteSchemaVersion
instance Core.ToHeaders DeleteSchemaVersion where
toHeaders :: DeleteSchemaVersion -> [Header]
toHeaders =
[Header] -> DeleteSchemaVersion -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DeleteSchemaVersion where
toPath :: DeleteSchemaVersion -> ByteString
toPath DeleteSchemaVersion' {Text
schemaName :: Text
registryName :: Text
schemaVersion :: Text
$sel:schemaName:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
$sel:registryName:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
$sel:schemaVersion:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v1/registries/name/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
registryName,
ByteString
"/schemas/name/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
schemaName,
ByteString
"/version/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
schemaVersion
]
instance Core.ToQuery DeleteSchemaVersion where
toQuery :: DeleteSchemaVersion -> QueryString
toQuery = QueryString -> DeleteSchemaVersion -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteSchemaVersionResponse = DeleteSchemaVersionResponse'
{
}
deriving (DeleteSchemaVersionResponse -> DeleteSchemaVersionResponse -> Bool
(DeleteSchemaVersionResponse
-> DeleteSchemaVersionResponse -> Bool)
-> (DeleteSchemaVersionResponse
-> DeleteSchemaVersionResponse -> Bool)
-> Eq DeleteSchemaVersionResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSchemaVersionResponse -> DeleteSchemaVersionResponse -> Bool
$c/= :: DeleteSchemaVersionResponse -> DeleteSchemaVersionResponse -> Bool
== :: DeleteSchemaVersionResponse -> DeleteSchemaVersionResponse -> Bool
$c== :: DeleteSchemaVersionResponse -> DeleteSchemaVersionResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSchemaVersionResponse]
ReadPrec DeleteSchemaVersionResponse
Int -> ReadS DeleteSchemaVersionResponse
ReadS [DeleteSchemaVersionResponse]
(Int -> ReadS DeleteSchemaVersionResponse)
-> ReadS [DeleteSchemaVersionResponse]
-> ReadPrec DeleteSchemaVersionResponse
-> ReadPrec [DeleteSchemaVersionResponse]
-> Read DeleteSchemaVersionResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSchemaVersionResponse]
$creadListPrec :: ReadPrec [DeleteSchemaVersionResponse]
readPrec :: ReadPrec DeleteSchemaVersionResponse
$creadPrec :: ReadPrec DeleteSchemaVersionResponse
readList :: ReadS [DeleteSchemaVersionResponse]
$creadList :: ReadS [DeleteSchemaVersionResponse]
readsPrec :: Int -> ReadS DeleteSchemaVersionResponse
$creadsPrec :: Int -> ReadS DeleteSchemaVersionResponse
Prelude.Read, Int -> DeleteSchemaVersionResponse -> ShowS
[DeleteSchemaVersionResponse] -> ShowS
DeleteSchemaVersionResponse -> String
(Int -> DeleteSchemaVersionResponse -> ShowS)
-> (DeleteSchemaVersionResponse -> String)
-> ([DeleteSchemaVersionResponse] -> ShowS)
-> Show DeleteSchemaVersionResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSchemaVersionResponse] -> ShowS
$cshowList :: [DeleteSchemaVersionResponse] -> ShowS
show :: DeleteSchemaVersionResponse -> String
$cshow :: DeleteSchemaVersionResponse -> String
showsPrec :: Int -> DeleteSchemaVersionResponse -> ShowS
$cshowsPrec :: Int -> DeleteSchemaVersionResponse -> ShowS
Prelude.Show, (forall x.
DeleteSchemaVersionResponse -> Rep DeleteSchemaVersionResponse x)
-> (forall x.
Rep DeleteSchemaVersionResponse x -> DeleteSchemaVersionResponse)
-> Generic DeleteSchemaVersionResponse
forall x.
Rep DeleteSchemaVersionResponse x -> DeleteSchemaVersionResponse
forall x.
DeleteSchemaVersionResponse -> Rep DeleteSchemaVersionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSchemaVersionResponse x -> DeleteSchemaVersionResponse
$cfrom :: forall x.
DeleteSchemaVersionResponse -> Rep DeleteSchemaVersionResponse x
Prelude.Generic)
newDeleteSchemaVersionResponse ::
DeleteSchemaVersionResponse
newDeleteSchemaVersionResponse :: DeleteSchemaVersionResponse
newDeleteSchemaVersionResponse =
DeleteSchemaVersionResponse
DeleteSchemaVersionResponse'
instance Prelude.NFData DeleteSchemaVersionResponse