{-# 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.SageMaker.DeleteUserProfile
(
DeleteUserProfile (..),
newDeleteUserProfile,
deleteUserProfile_domainId,
deleteUserProfile_userProfileName,
DeleteUserProfileResponse (..),
newDeleteUserProfileResponse,
)
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.SageMaker.Types
data DeleteUserProfile = DeleteUserProfile'
{
DeleteUserProfile -> Text
domainId :: Prelude.Text,
DeleteUserProfile -> Text
userProfileName :: Prelude.Text
}
deriving (DeleteUserProfile -> DeleteUserProfile -> Bool
(DeleteUserProfile -> DeleteUserProfile -> Bool)
-> (DeleteUserProfile -> DeleteUserProfile -> Bool)
-> Eq DeleteUserProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteUserProfile -> DeleteUserProfile -> Bool
$c/= :: DeleteUserProfile -> DeleteUserProfile -> Bool
== :: DeleteUserProfile -> DeleteUserProfile -> Bool
$c== :: DeleteUserProfile -> DeleteUserProfile -> Bool
Prelude.Eq, ReadPrec [DeleteUserProfile]
ReadPrec DeleteUserProfile
Int -> ReadS DeleteUserProfile
ReadS [DeleteUserProfile]
(Int -> ReadS DeleteUserProfile)
-> ReadS [DeleteUserProfile]
-> ReadPrec DeleteUserProfile
-> ReadPrec [DeleteUserProfile]
-> Read DeleteUserProfile
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteUserProfile]
$creadListPrec :: ReadPrec [DeleteUserProfile]
readPrec :: ReadPrec DeleteUserProfile
$creadPrec :: ReadPrec DeleteUserProfile
readList :: ReadS [DeleteUserProfile]
$creadList :: ReadS [DeleteUserProfile]
readsPrec :: Int -> ReadS DeleteUserProfile
$creadsPrec :: Int -> ReadS DeleteUserProfile
Prelude.Read, Int -> DeleteUserProfile -> ShowS
[DeleteUserProfile] -> ShowS
DeleteUserProfile -> String
(Int -> DeleteUserProfile -> ShowS)
-> (DeleteUserProfile -> String)
-> ([DeleteUserProfile] -> ShowS)
-> Show DeleteUserProfile
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteUserProfile] -> ShowS
$cshowList :: [DeleteUserProfile] -> ShowS
show :: DeleteUserProfile -> String
$cshow :: DeleteUserProfile -> String
showsPrec :: Int -> DeleteUserProfile -> ShowS
$cshowsPrec :: Int -> DeleteUserProfile -> ShowS
Prelude.Show, (forall x. DeleteUserProfile -> Rep DeleteUserProfile x)
-> (forall x. Rep DeleteUserProfile x -> DeleteUserProfile)
-> Generic DeleteUserProfile
forall x. Rep DeleteUserProfile x -> DeleteUserProfile
forall x. DeleteUserProfile -> Rep DeleteUserProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteUserProfile x -> DeleteUserProfile
$cfrom :: forall x. DeleteUserProfile -> Rep DeleteUserProfile x
Prelude.Generic)
newDeleteUserProfile ::
Prelude.Text ->
Prelude.Text ->
DeleteUserProfile
newDeleteUserProfile :: Text -> Text -> DeleteUserProfile
newDeleteUserProfile Text
pDomainId_ Text
pUserProfileName_ =
DeleteUserProfile' :: Text -> Text -> DeleteUserProfile
DeleteUserProfile'
{ $sel:domainId:DeleteUserProfile' :: Text
domainId = Text
pDomainId_,
$sel:userProfileName:DeleteUserProfile' :: Text
userProfileName = Text
pUserProfileName_
}
deleteUserProfile_domainId :: Lens.Lens' DeleteUserProfile Prelude.Text
deleteUserProfile_domainId :: (Text -> f Text) -> DeleteUserProfile -> f DeleteUserProfile
deleteUserProfile_domainId = (DeleteUserProfile -> Text)
-> (DeleteUserProfile -> Text -> DeleteUserProfile)
-> Lens DeleteUserProfile DeleteUserProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteUserProfile' {Text
domainId :: Text
$sel:domainId:DeleteUserProfile' :: DeleteUserProfile -> Text
domainId} -> Text
domainId) (\s :: DeleteUserProfile
s@DeleteUserProfile' {} Text
a -> DeleteUserProfile
s {$sel:domainId:DeleteUserProfile' :: Text
domainId = Text
a} :: DeleteUserProfile)
deleteUserProfile_userProfileName :: Lens.Lens' DeleteUserProfile Prelude.Text
deleteUserProfile_userProfileName :: (Text -> f Text) -> DeleteUserProfile -> f DeleteUserProfile
deleteUserProfile_userProfileName = (DeleteUserProfile -> Text)
-> (DeleteUserProfile -> Text -> DeleteUserProfile)
-> Lens DeleteUserProfile DeleteUserProfile Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteUserProfile' {Text
userProfileName :: Text
$sel:userProfileName:DeleteUserProfile' :: DeleteUserProfile -> Text
userProfileName} -> Text
userProfileName) (\s :: DeleteUserProfile
s@DeleteUserProfile' {} Text
a -> DeleteUserProfile
s {$sel:userProfileName:DeleteUserProfile' :: Text
userProfileName = Text
a} :: DeleteUserProfile)
instance Core.AWSRequest DeleteUserProfile where
type
AWSResponse DeleteUserProfile =
DeleteUserProfileResponse
request :: DeleteUserProfile -> Request DeleteUserProfile
request = Service -> DeleteUserProfile -> Request DeleteUserProfile
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteUserProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteUserProfile)))
response =
AWSResponse DeleteUserProfile
-> Logger
-> Service
-> Proxy DeleteUserProfile
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteUserProfile)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull AWSResponse DeleteUserProfile
DeleteUserProfileResponse
DeleteUserProfileResponse'
instance Prelude.Hashable DeleteUserProfile
instance Prelude.NFData DeleteUserProfile
instance Core.ToHeaders DeleteUserProfile where
toHeaders :: DeleteUserProfile -> [Header]
toHeaders =
[Header] -> DeleteUserProfile -> [Header]
forall a b. a -> b -> a
Prelude.const
( [[Header]] -> [Header]
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> [Header]
forall a. ToHeader a => HeaderName -> a -> [Header]
Core.=# ( ByteString
"SageMaker.DeleteUserProfile" ::
Prelude.ByteString
),
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.ToJSON DeleteUserProfile where
toJSON :: DeleteUserProfile -> Value
toJSON DeleteUserProfile' {Text
userProfileName :: Text
domainId :: Text
$sel:userProfileName:DeleteUserProfile' :: DeleteUserProfile -> Text
$sel:domainId:DeleteUserProfile' :: DeleteUserProfile -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"UserProfileName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userProfileName)
]
)
instance Core.ToPath DeleteUserProfile where
toPath :: DeleteUserProfile -> ByteString
toPath = ByteString -> DeleteUserProfile -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteUserProfile where
toQuery :: DeleteUserProfile -> QueryString
toQuery = QueryString -> DeleteUserProfile -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteUserProfileResponse = DeleteUserProfileResponse'
{
}
deriving (DeleteUserProfileResponse -> DeleteUserProfileResponse -> Bool
(DeleteUserProfileResponse -> DeleteUserProfileResponse -> Bool)
-> (DeleteUserProfileResponse -> DeleteUserProfileResponse -> Bool)
-> Eq DeleteUserProfileResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteUserProfileResponse -> DeleteUserProfileResponse -> Bool
$c/= :: DeleteUserProfileResponse -> DeleteUserProfileResponse -> Bool
== :: DeleteUserProfileResponse -> DeleteUserProfileResponse -> Bool
$c== :: DeleteUserProfileResponse -> DeleteUserProfileResponse -> Bool
Prelude.Eq, ReadPrec [DeleteUserProfileResponse]
ReadPrec DeleteUserProfileResponse
Int -> ReadS DeleteUserProfileResponse
ReadS [DeleteUserProfileResponse]
(Int -> ReadS DeleteUserProfileResponse)
-> ReadS [DeleteUserProfileResponse]
-> ReadPrec DeleteUserProfileResponse
-> ReadPrec [DeleteUserProfileResponse]
-> Read DeleteUserProfileResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteUserProfileResponse]
$creadListPrec :: ReadPrec [DeleteUserProfileResponse]
readPrec :: ReadPrec DeleteUserProfileResponse
$creadPrec :: ReadPrec DeleteUserProfileResponse
readList :: ReadS [DeleteUserProfileResponse]
$creadList :: ReadS [DeleteUserProfileResponse]
readsPrec :: Int -> ReadS DeleteUserProfileResponse
$creadsPrec :: Int -> ReadS DeleteUserProfileResponse
Prelude.Read, Int -> DeleteUserProfileResponse -> ShowS
[DeleteUserProfileResponse] -> ShowS
DeleteUserProfileResponse -> String
(Int -> DeleteUserProfileResponse -> ShowS)
-> (DeleteUserProfileResponse -> String)
-> ([DeleteUserProfileResponse] -> ShowS)
-> Show DeleteUserProfileResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteUserProfileResponse] -> ShowS
$cshowList :: [DeleteUserProfileResponse] -> ShowS
show :: DeleteUserProfileResponse -> String
$cshow :: DeleteUserProfileResponse -> String
showsPrec :: Int -> DeleteUserProfileResponse -> ShowS
$cshowsPrec :: Int -> DeleteUserProfileResponse -> ShowS
Prelude.Show, (forall x.
DeleteUserProfileResponse -> Rep DeleteUserProfileResponse x)
-> (forall x.
Rep DeleteUserProfileResponse x -> DeleteUserProfileResponse)
-> Generic DeleteUserProfileResponse
forall x.
Rep DeleteUserProfileResponse x -> DeleteUserProfileResponse
forall x.
DeleteUserProfileResponse -> Rep DeleteUserProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteUserProfileResponse x -> DeleteUserProfileResponse
$cfrom :: forall x.
DeleteUserProfileResponse -> Rep DeleteUserProfileResponse x
Prelude.Generic)
newDeleteUserProfileResponse ::
DeleteUserProfileResponse
newDeleteUserProfileResponse :: DeleteUserProfileResponse
newDeleteUserProfileResponse =
DeleteUserProfileResponse
DeleteUserProfileResponse'
instance Prelude.NFData DeleteUserProfileResponse