{-# 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.RobOMaker.DeleteRobotApplication
(
DeleteRobotApplication (..),
newDeleteRobotApplication,
deleteRobotApplication_applicationVersion,
deleteRobotApplication_application,
DeleteRobotApplicationResponse (..),
newDeleteRobotApplicationResponse,
deleteRobotApplicationResponse_httpStatus,
)
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.RobOMaker.Types
data DeleteRobotApplication = DeleteRobotApplication'
{
DeleteRobotApplication -> Maybe Text
applicationVersion :: Prelude.Maybe Prelude.Text,
DeleteRobotApplication -> Text
application :: Prelude.Text
}
deriving (DeleteRobotApplication -> DeleteRobotApplication -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRobotApplication -> DeleteRobotApplication -> Bool
$c/= :: DeleteRobotApplication -> DeleteRobotApplication -> Bool
== :: DeleteRobotApplication -> DeleteRobotApplication -> Bool
$c== :: DeleteRobotApplication -> DeleteRobotApplication -> Bool
Prelude.Eq, ReadPrec [DeleteRobotApplication]
ReadPrec DeleteRobotApplication
Int -> ReadS DeleteRobotApplication
ReadS [DeleteRobotApplication]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRobotApplication]
$creadListPrec :: ReadPrec [DeleteRobotApplication]
readPrec :: ReadPrec DeleteRobotApplication
$creadPrec :: ReadPrec DeleteRobotApplication
readList :: ReadS [DeleteRobotApplication]
$creadList :: ReadS [DeleteRobotApplication]
readsPrec :: Int -> ReadS DeleteRobotApplication
$creadsPrec :: Int -> ReadS DeleteRobotApplication
Prelude.Read, Int -> DeleteRobotApplication -> ShowS
[DeleteRobotApplication] -> ShowS
DeleteRobotApplication -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRobotApplication] -> ShowS
$cshowList :: [DeleteRobotApplication] -> ShowS
show :: DeleteRobotApplication -> String
$cshow :: DeleteRobotApplication -> String
showsPrec :: Int -> DeleteRobotApplication -> ShowS
$cshowsPrec :: Int -> DeleteRobotApplication -> ShowS
Prelude.Show, forall x. Rep DeleteRobotApplication x -> DeleteRobotApplication
forall x. DeleteRobotApplication -> Rep DeleteRobotApplication x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteRobotApplication x -> DeleteRobotApplication
$cfrom :: forall x. DeleteRobotApplication -> Rep DeleteRobotApplication x
Prelude.Generic)
newDeleteRobotApplication ::
Prelude.Text ->
DeleteRobotApplication
newDeleteRobotApplication :: Text -> DeleteRobotApplication
newDeleteRobotApplication Text
pApplication_ =
DeleteRobotApplication'
{ $sel:applicationVersion:DeleteRobotApplication' :: Maybe Text
applicationVersion =
forall a. Maybe a
Prelude.Nothing,
$sel:application:DeleteRobotApplication' :: Text
application = Text
pApplication_
}
deleteRobotApplication_applicationVersion :: Lens.Lens' DeleteRobotApplication (Prelude.Maybe Prelude.Text)
deleteRobotApplication_applicationVersion :: Lens' DeleteRobotApplication (Maybe Text)
deleteRobotApplication_applicationVersion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRobotApplication' {Maybe Text
applicationVersion :: Maybe Text
$sel:applicationVersion:DeleteRobotApplication' :: DeleteRobotApplication -> Maybe Text
applicationVersion} -> Maybe Text
applicationVersion) (\s :: DeleteRobotApplication
s@DeleteRobotApplication' {} Maybe Text
a -> DeleteRobotApplication
s {$sel:applicationVersion:DeleteRobotApplication' :: Maybe Text
applicationVersion = Maybe Text
a} :: DeleteRobotApplication)
deleteRobotApplication_application :: Lens.Lens' DeleteRobotApplication Prelude.Text
deleteRobotApplication_application :: Lens' DeleteRobotApplication Text
deleteRobotApplication_application = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRobotApplication' {Text
application :: Text
$sel:application:DeleteRobotApplication' :: DeleteRobotApplication -> Text
application} -> Text
application) (\s :: DeleteRobotApplication
s@DeleteRobotApplication' {} Text
a -> DeleteRobotApplication
s {$sel:application:DeleteRobotApplication' :: Text
application = Text
a} :: DeleteRobotApplication)
instance Core.AWSRequest DeleteRobotApplication where
type
AWSResponse DeleteRobotApplication =
DeleteRobotApplicationResponse
request :: (Service -> Service)
-> DeleteRobotApplication -> Request DeleteRobotApplication
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 DeleteRobotApplication
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteRobotApplication)))
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 -> DeleteRobotApplicationResponse
DeleteRobotApplicationResponse'
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 DeleteRobotApplication where
hashWithSalt :: Int -> DeleteRobotApplication -> Int
hashWithSalt Int
_salt DeleteRobotApplication' {Maybe Text
Text
application :: Text
applicationVersion :: Maybe Text
$sel:application:DeleteRobotApplication' :: DeleteRobotApplication -> Text
$sel:applicationVersion:DeleteRobotApplication' :: DeleteRobotApplication -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
applicationVersion
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
application
instance Prelude.NFData DeleteRobotApplication where
rnf :: DeleteRobotApplication -> ()
rnf DeleteRobotApplication' {Maybe Text
Text
application :: Text
applicationVersion :: Maybe Text
$sel:application:DeleteRobotApplication' :: DeleteRobotApplication -> Text
$sel:applicationVersion:DeleteRobotApplication' :: DeleteRobotApplication -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationVersion
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
application
instance Data.ToHeaders DeleteRobotApplication where
toHeaders :: DeleteRobotApplication -> ResponseHeaders
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 -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteRobotApplication where
toJSON :: DeleteRobotApplication -> Value
toJSON DeleteRobotApplication' {Maybe Text
Text
application :: Text
applicationVersion :: Maybe Text
$sel:application:DeleteRobotApplication' :: DeleteRobotApplication -> Text
$sel:applicationVersion:DeleteRobotApplication' :: DeleteRobotApplication -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"applicationVersion" 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
applicationVersion,
forall a. a -> Maybe a
Prelude.Just (Key
"application" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
application)
]
)
instance Data.ToPath DeleteRobotApplication where
toPath :: DeleteRobotApplication -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/deleteRobotApplication"
instance Data.ToQuery DeleteRobotApplication where
toQuery :: DeleteRobotApplication -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteRobotApplicationResponse = DeleteRobotApplicationResponse'
{
DeleteRobotApplicationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteRobotApplicationResponse
-> DeleteRobotApplicationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteRobotApplicationResponse
-> DeleteRobotApplicationResponse -> Bool
$c/= :: DeleteRobotApplicationResponse
-> DeleteRobotApplicationResponse -> Bool
== :: DeleteRobotApplicationResponse
-> DeleteRobotApplicationResponse -> Bool
$c== :: DeleteRobotApplicationResponse
-> DeleteRobotApplicationResponse -> Bool
Prelude.Eq, ReadPrec [DeleteRobotApplicationResponse]
ReadPrec DeleteRobotApplicationResponse
Int -> ReadS DeleteRobotApplicationResponse
ReadS [DeleteRobotApplicationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteRobotApplicationResponse]
$creadListPrec :: ReadPrec [DeleteRobotApplicationResponse]
readPrec :: ReadPrec DeleteRobotApplicationResponse
$creadPrec :: ReadPrec DeleteRobotApplicationResponse
readList :: ReadS [DeleteRobotApplicationResponse]
$creadList :: ReadS [DeleteRobotApplicationResponse]
readsPrec :: Int -> ReadS DeleteRobotApplicationResponse
$creadsPrec :: Int -> ReadS DeleteRobotApplicationResponse
Prelude.Read, Int -> DeleteRobotApplicationResponse -> ShowS
[DeleteRobotApplicationResponse] -> ShowS
DeleteRobotApplicationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteRobotApplicationResponse] -> ShowS
$cshowList :: [DeleteRobotApplicationResponse] -> ShowS
show :: DeleteRobotApplicationResponse -> String
$cshow :: DeleteRobotApplicationResponse -> String
showsPrec :: Int -> DeleteRobotApplicationResponse -> ShowS
$cshowsPrec :: Int -> DeleteRobotApplicationResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteRobotApplicationResponse x
-> DeleteRobotApplicationResponse
forall x.
DeleteRobotApplicationResponse
-> Rep DeleteRobotApplicationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteRobotApplicationResponse x
-> DeleteRobotApplicationResponse
$cfrom :: forall x.
DeleteRobotApplicationResponse
-> Rep DeleteRobotApplicationResponse x
Prelude.Generic)
newDeleteRobotApplicationResponse ::
Prelude.Int ->
DeleteRobotApplicationResponse
newDeleteRobotApplicationResponse :: Int -> DeleteRobotApplicationResponse
newDeleteRobotApplicationResponse Int
pHttpStatus_ =
DeleteRobotApplicationResponse'
{ $sel:httpStatus:DeleteRobotApplicationResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteRobotApplicationResponse_httpStatus :: Lens.Lens' DeleteRobotApplicationResponse Prelude.Int
deleteRobotApplicationResponse_httpStatus :: Lens' DeleteRobotApplicationResponse Int
deleteRobotApplicationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteRobotApplicationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteRobotApplicationResponse' :: DeleteRobotApplicationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteRobotApplicationResponse
s@DeleteRobotApplicationResponse' {} Int
a -> DeleteRobotApplicationResponse
s {$sel:httpStatus:DeleteRobotApplicationResponse' :: Int
httpStatus = Int
a} :: DeleteRobotApplicationResponse)
instance
Prelude.NFData
DeleteRobotApplicationResponse
where
rnf :: DeleteRobotApplicationResponse -> ()
rnf DeleteRobotApplicationResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteRobotApplicationResponse' :: DeleteRobotApplicationResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus