{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
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
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]
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
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. 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'
{ $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 :: Lens' DeleteSchemaVersion Text
deleteSchemaVersion_schemaVersion = 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 :: Lens' DeleteSchemaVersion Text
deleteSchemaVersion_registryName = 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 :: Lens' DeleteSchemaVersion Text
deleteSchemaVersion_schemaName = 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 :: (Service -> Service)
-> DeleteSchemaVersion -> Request DeleteSchemaVersion
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteSchemaVersion
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteSchemaVersion)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteSchemaVersionResponse
DeleteSchemaVersionResponse'
instance Prelude.Hashable DeleteSchemaVersion where
hashWithSalt :: Int -> DeleteSchemaVersion -> Int
hashWithSalt Int
_salt DeleteSchemaVersion' {Text
schemaName :: Text
registryName :: Text
schemaVersion :: Text
$sel:schemaName:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
$sel:registryName:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
$sel:schemaVersion:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
schemaVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
registryName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
schemaName
instance Prelude.NFData DeleteSchemaVersion where
rnf :: DeleteSchemaVersion -> ()
rnf DeleteSchemaVersion' {Text
schemaName :: Text
registryName :: Text
schemaVersion :: Text
$sel:schemaName:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
$sel:registryName:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
$sel:schemaVersion:DeleteSchemaVersion' :: DeleteSchemaVersion -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
schemaVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
registryName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
schemaName
instance Data.ToHeaders DeleteSchemaVersion where
toHeaders :: DeleteSchemaVersion -> [Header]
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v1/registries/name/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
registryName,
ByteString
"/schemas/name/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
schemaName,
ByteString
"/version/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
schemaVersion
]
instance Data.ToQuery DeleteSchemaVersion where
toQuery :: DeleteSchemaVersion -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteSchemaVersionResponse = DeleteSchemaVersionResponse'
{
}
deriving (DeleteSchemaVersionResponse -> DeleteSchemaVersionResponse -> Bool
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]
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
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.
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 where
rnf :: DeleteSchemaVersionResponse -> ()
rnf DeleteSchemaVersionResponse
_ = ()