{-# 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.WorkMail.DeleteMobileDeviceAccessOverride
(
DeleteMobileDeviceAccessOverride (..),
newDeleteMobileDeviceAccessOverride,
deleteMobileDeviceAccessOverride_organizationId,
deleteMobileDeviceAccessOverride_userId,
deleteMobileDeviceAccessOverride_deviceId,
DeleteMobileDeviceAccessOverrideResponse (..),
newDeleteMobileDeviceAccessOverrideResponse,
deleteMobileDeviceAccessOverrideResponse_httpStatus,
)
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.WorkMail.Types
data DeleteMobileDeviceAccessOverride = DeleteMobileDeviceAccessOverride'
{
DeleteMobileDeviceAccessOverride -> Text
organizationId :: Prelude.Text,
DeleteMobileDeviceAccessOverride -> Text
userId :: Prelude.Text,
DeleteMobileDeviceAccessOverride -> Text
deviceId :: Prelude.Text
}
deriving (DeleteMobileDeviceAccessOverride
-> DeleteMobileDeviceAccessOverride -> Bool
(DeleteMobileDeviceAccessOverride
-> DeleteMobileDeviceAccessOverride -> Bool)
-> (DeleteMobileDeviceAccessOverride
-> DeleteMobileDeviceAccessOverride -> Bool)
-> Eq DeleteMobileDeviceAccessOverride
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMobileDeviceAccessOverride
-> DeleteMobileDeviceAccessOverride -> Bool
$c/= :: DeleteMobileDeviceAccessOverride
-> DeleteMobileDeviceAccessOverride -> Bool
== :: DeleteMobileDeviceAccessOverride
-> DeleteMobileDeviceAccessOverride -> Bool
$c== :: DeleteMobileDeviceAccessOverride
-> DeleteMobileDeviceAccessOverride -> Bool
Prelude.Eq, ReadPrec [DeleteMobileDeviceAccessOverride]
ReadPrec DeleteMobileDeviceAccessOverride
Int -> ReadS DeleteMobileDeviceAccessOverride
ReadS [DeleteMobileDeviceAccessOverride]
(Int -> ReadS DeleteMobileDeviceAccessOverride)
-> ReadS [DeleteMobileDeviceAccessOverride]
-> ReadPrec DeleteMobileDeviceAccessOverride
-> ReadPrec [DeleteMobileDeviceAccessOverride]
-> Read DeleteMobileDeviceAccessOverride
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMobileDeviceAccessOverride]
$creadListPrec :: ReadPrec [DeleteMobileDeviceAccessOverride]
readPrec :: ReadPrec DeleteMobileDeviceAccessOverride
$creadPrec :: ReadPrec DeleteMobileDeviceAccessOverride
readList :: ReadS [DeleteMobileDeviceAccessOverride]
$creadList :: ReadS [DeleteMobileDeviceAccessOverride]
readsPrec :: Int -> ReadS DeleteMobileDeviceAccessOverride
$creadsPrec :: Int -> ReadS DeleteMobileDeviceAccessOverride
Prelude.Read, Int -> DeleteMobileDeviceAccessOverride -> ShowS
[DeleteMobileDeviceAccessOverride] -> ShowS
DeleteMobileDeviceAccessOverride -> String
(Int -> DeleteMobileDeviceAccessOverride -> ShowS)
-> (DeleteMobileDeviceAccessOverride -> String)
-> ([DeleteMobileDeviceAccessOverride] -> ShowS)
-> Show DeleteMobileDeviceAccessOverride
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMobileDeviceAccessOverride] -> ShowS
$cshowList :: [DeleteMobileDeviceAccessOverride] -> ShowS
show :: DeleteMobileDeviceAccessOverride -> String
$cshow :: DeleteMobileDeviceAccessOverride -> String
showsPrec :: Int -> DeleteMobileDeviceAccessOverride -> ShowS
$cshowsPrec :: Int -> DeleteMobileDeviceAccessOverride -> ShowS
Prelude.Show, (forall x.
DeleteMobileDeviceAccessOverride
-> Rep DeleteMobileDeviceAccessOverride x)
-> (forall x.
Rep DeleteMobileDeviceAccessOverride x
-> DeleteMobileDeviceAccessOverride)
-> Generic DeleteMobileDeviceAccessOverride
forall x.
Rep DeleteMobileDeviceAccessOverride x
-> DeleteMobileDeviceAccessOverride
forall x.
DeleteMobileDeviceAccessOverride
-> Rep DeleteMobileDeviceAccessOverride x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteMobileDeviceAccessOverride x
-> DeleteMobileDeviceAccessOverride
$cfrom :: forall x.
DeleteMobileDeviceAccessOverride
-> Rep DeleteMobileDeviceAccessOverride x
Prelude.Generic)
newDeleteMobileDeviceAccessOverride ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
DeleteMobileDeviceAccessOverride
newDeleteMobileDeviceAccessOverride :: Text -> Text -> Text -> DeleteMobileDeviceAccessOverride
newDeleteMobileDeviceAccessOverride
Text
pOrganizationId_
Text
pUserId_
Text
pDeviceId_ =
DeleteMobileDeviceAccessOverride' :: Text -> Text -> Text -> DeleteMobileDeviceAccessOverride
DeleteMobileDeviceAccessOverride'
{ $sel:organizationId:DeleteMobileDeviceAccessOverride' :: Text
organizationId =
Text
pOrganizationId_,
$sel:userId:DeleteMobileDeviceAccessOverride' :: Text
userId = Text
pUserId_,
$sel:deviceId:DeleteMobileDeviceAccessOverride' :: Text
deviceId = Text
pDeviceId_
}
deleteMobileDeviceAccessOverride_organizationId :: Lens.Lens' DeleteMobileDeviceAccessOverride Prelude.Text
deleteMobileDeviceAccessOverride_organizationId :: (Text -> f Text)
-> DeleteMobileDeviceAccessOverride
-> f DeleteMobileDeviceAccessOverride
deleteMobileDeviceAccessOverride_organizationId = (DeleteMobileDeviceAccessOverride -> Text)
-> (DeleteMobileDeviceAccessOverride
-> Text -> DeleteMobileDeviceAccessOverride)
-> Lens
DeleteMobileDeviceAccessOverride
DeleteMobileDeviceAccessOverride
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMobileDeviceAccessOverride' {Text
organizationId :: Text
$sel:organizationId:DeleteMobileDeviceAccessOverride' :: DeleteMobileDeviceAccessOverride -> Text
organizationId} -> Text
organizationId) (\s :: DeleteMobileDeviceAccessOverride
s@DeleteMobileDeviceAccessOverride' {} Text
a -> DeleteMobileDeviceAccessOverride
s {$sel:organizationId:DeleteMobileDeviceAccessOverride' :: Text
organizationId = Text
a} :: DeleteMobileDeviceAccessOverride)
deleteMobileDeviceAccessOverride_userId :: Lens.Lens' DeleteMobileDeviceAccessOverride Prelude.Text
deleteMobileDeviceAccessOverride_userId :: (Text -> f Text)
-> DeleteMobileDeviceAccessOverride
-> f DeleteMobileDeviceAccessOverride
deleteMobileDeviceAccessOverride_userId = (DeleteMobileDeviceAccessOverride -> Text)
-> (DeleteMobileDeviceAccessOverride
-> Text -> DeleteMobileDeviceAccessOverride)
-> Lens
DeleteMobileDeviceAccessOverride
DeleteMobileDeviceAccessOverride
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMobileDeviceAccessOverride' {Text
userId :: Text
$sel:userId:DeleteMobileDeviceAccessOverride' :: DeleteMobileDeviceAccessOverride -> Text
userId} -> Text
userId) (\s :: DeleteMobileDeviceAccessOverride
s@DeleteMobileDeviceAccessOverride' {} Text
a -> DeleteMobileDeviceAccessOverride
s {$sel:userId:DeleteMobileDeviceAccessOverride' :: Text
userId = Text
a} :: DeleteMobileDeviceAccessOverride)
deleteMobileDeviceAccessOverride_deviceId :: Lens.Lens' DeleteMobileDeviceAccessOverride Prelude.Text
deleteMobileDeviceAccessOverride_deviceId :: (Text -> f Text)
-> DeleteMobileDeviceAccessOverride
-> f DeleteMobileDeviceAccessOverride
deleteMobileDeviceAccessOverride_deviceId = (DeleteMobileDeviceAccessOverride -> Text)
-> (DeleteMobileDeviceAccessOverride
-> Text -> DeleteMobileDeviceAccessOverride)
-> Lens
DeleteMobileDeviceAccessOverride
DeleteMobileDeviceAccessOverride
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMobileDeviceAccessOverride' {Text
deviceId :: Text
$sel:deviceId:DeleteMobileDeviceAccessOverride' :: DeleteMobileDeviceAccessOverride -> Text
deviceId} -> Text
deviceId) (\s :: DeleteMobileDeviceAccessOverride
s@DeleteMobileDeviceAccessOverride' {} Text
a -> DeleteMobileDeviceAccessOverride
s {$sel:deviceId:DeleteMobileDeviceAccessOverride' :: Text
deviceId = Text
a} :: DeleteMobileDeviceAccessOverride)
instance
Core.AWSRequest
DeleteMobileDeviceAccessOverride
where
type
AWSResponse DeleteMobileDeviceAccessOverride =
DeleteMobileDeviceAccessOverrideResponse
request :: DeleteMobileDeviceAccessOverride
-> Request DeleteMobileDeviceAccessOverride
request = Service
-> DeleteMobileDeviceAccessOverride
-> Request DeleteMobileDeviceAccessOverride
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteMobileDeviceAccessOverride
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteMobileDeviceAccessOverride)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteMobileDeviceAccessOverride))
-> Logger
-> Service
-> Proxy DeleteMobileDeviceAccessOverride
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DeleteMobileDeviceAccessOverride)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteMobileDeviceAccessOverrideResponse
DeleteMobileDeviceAccessOverrideResponse'
(Int -> DeleteMobileDeviceAccessOverrideResponse)
-> Either String Int
-> Either String DeleteMobileDeviceAccessOverrideResponse
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
DeleteMobileDeviceAccessOverride
instance
Prelude.NFData
DeleteMobileDeviceAccessOverride
instance
Core.ToHeaders
DeleteMobileDeviceAccessOverride
where
toHeaders :: DeleteMobileDeviceAccessOverride -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DeleteMobileDeviceAccessOverride -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"WorkMailService.DeleteMobileDeviceAccessOverride" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON DeleteMobileDeviceAccessOverride where
toJSON :: DeleteMobileDeviceAccessOverride -> Value
toJSON DeleteMobileDeviceAccessOverride' {Text
deviceId :: Text
userId :: Text
organizationId :: Text
$sel:deviceId:DeleteMobileDeviceAccessOverride' :: DeleteMobileDeviceAccessOverride -> Text
$sel:userId:DeleteMobileDeviceAccessOverride' :: DeleteMobileDeviceAccessOverride -> Text
$sel:organizationId:DeleteMobileDeviceAccessOverride' :: DeleteMobileDeviceAccessOverride -> 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
"OrganizationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
organizationId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UserId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DeviceId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
deviceId)
]
)
instance Core.ToPath DeleteMobileDeviceAccessOverride where
toPath :: DeleteMobileDeviceAccessOverride -> ByteString
toPath = ByteString -> DeleteMobileDeviceAccessOverride -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
DeleteMobileDeviceAccessOverride
where
toQuery :: DeleteMobileDeviceAccessOverride -> QueryString
toQuery = QueryString -> DeleteMobileDeviceAccessOverride -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteMobileDeviceAccessOverrideResponse = DeleteMobileDeviceAccessOverrideResponse'
{
DeleteMobileDeviceAccessOverrideResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteMobileDeviceAccessOverrideResponse
-> DeleteMobileDeviceAccessOverrideResponse -> Bool
(DeleteMobileDeviceAccessOverrideResponse
-> DeleteMobileDeviceAccessOverrideResponse -> Bool)
-> (DeleteMobileDeviceAccessOverrideResponse
-> DeleteMobileDeviceAccessOverrideResponse -> Bool)
-> Eq DeleteMobileDeviceAccessOverrideResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteMobileDeviceAccessOverrideResponse
-> DeleteMobileDeviceAccessOverrideResponse -> Bool
$c/= :: DeleteMobileDeviceAccessOverrideResponse
-> DeleteMobileDeviceAccessOverrideResponse -> Bool
== :: DeleteMobileDeviceAccessOverrideResponse
-> DeleteMobileDeviceAccessOverrideResponse -> Bool
$c== :: DeleteMobileDeviceAccessOverrideResponse
-> DeleteMobileDeviceAccessOverrideResponse -> Bool
Prelude.Eq, ReadPrec [DeleteMobileDeviceAccessOverrideResponse]
ReadPrec DeleteMobileDeviceAccessOverrideResponse
Int -> ReadS DeleteMobileDeviceAccessOverrideResponse
ReadS [DeleteMobileDeviceAccessOverrideResponse]
(Int -> ReadS DeleteMobileDeviceAccessOverrideResponse)
-> ReadS [DeleteMobileDeviceAccessOverrideResponse]
-> ReadPrec DeleteMobileDeviceAccessOverrideResponse
-> ReadPrec [DeleteMobileDeviceAccessOverrideResponse]
-> Read DeleteMobileDeviceAccessOverrideResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteMobileDeviceAccessOverrideResponse]
$creadListPrec :: ReadPrec [DeleteMobileDeviceAccessOverrideResponse]
readPrec :: ReadPrec DeleteMobileDeviceAccessOverrideResponse
$creadPrec :: ReadPrec DeleteMobileDeviceAccessOverrideResponse
readList :: ReadS [DeleteMobileDeviceAccessOverrideResponse]
$creadList :: ReadS [DeleteMobileDeviceAccessOverrideResponse]
readsPrec :: Int -> ReadS DeleteMobileDeviceAccessOverrideResponse
$creadsPrec :: Int -> ReadS DeleteMobileDeviceAccessOverrideResponse
Prelude.Read, Int -> DeleteMobileDeviceAccessOverrideResponse -> ShowS
[DeleteMobileDeviceAccessOverrideResponse] -> ShowS
DeleteMobileDeviceAccessOverrideResponse -> String
(Int -> DeleteMobileDeviceAccessOverrideResponse -> ShowS)
-> (DeleteMobileDeviceAccessOverrideResponse -> String)
-> ([DeleteMobileDeviceAccessOverrideResponse] -> ShowS)
-> Show DeleteMobileDeviceAccessOverrideResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteMobileDeviceAccessOverrideResponse] -> ShowS
$cshowList :: [DeleteMobileDeviceAccessOverrideResponse] -> ShowS
show :: DeleteMobileDeviceAccessOverrideResponse -> String
$cshow :: DeleteMobileDeviceAccessOverrideResponse -> String
showsPrec :: Int -> DeleteMobileDeviceAccessOverrideResponse -> ShowS
$cshowsPrec :: Int -> DeleteMobileDeviceAccessOverrideResponse -> ShowS
Prelude.Show, (forall x.
DeleteMobileDeviceAccessOverrideResponse
-> Rep DeleteMobileDeviceAccessOverrideResponse x)
-> (forall x.
Rep DeleteMobileDeviceAccessOverrideResponse x
-> DeleteMobileDeviceAccessOverrideResponse)
-> Generic DeleteMobileDeviceAccessOverrideResponse
forall x.
Rep DeleteMobileDeviceAccessOverrideResponse x
-> DeleteMobileDeviceAccessOverrideResponse
forall x.
DeleteMobileDeviceAccessOverrideResponse
-> Rep DeleteMobileDeviceAccessOverrideResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteMobileDeviceAccessOverrideResponse x
-> DeleteMobileDeviceAccessOverrideResponse
$cfrom :: forall x.
DeleteMobileDeviceAccessOverrideResponse
-> Rep DeleteMobileDeviceAccessOverrideResponse x
Prelude.Generic)
newDeleteMobileDeviceAccessOverrideResponse ::
Prelude.Int ->
DeleteMobileDeviceAccessOverrideResponse
newDeleteMobileDeviceAccessOverrideResponse :: Int -> DeleteMobileDeviceAccessOverrideResponse
newDeleteMobileDeviceAccessOverrideResponse
Int
pHttpStatus_ =
DeleteMobileDeviceAccessOverrideResponse' :: Int -> DeleteMobileDeviceAccessOverrideResponse
DeleteMobileDeviceAccessOverrideResponse'
{ $sel:httpStatus:DeleteMobileDeviceAccessOverrideResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteMobileDeviceAccessOverrideResponse_httpStatus :: Lens.Lens' DeleteMobileDeviceAccessOverrideResponse Prelude.Int
deleteMobileDeviceAccessOverrideResponse_httpStatus :: (Int -> f Int)
-> DeleteMobileDeviceAccessOverrideResponse
-> f DeleteMobileDeviceAccessOverrideResponse
deleteMobileDeviceAccessOverrideResponse_httpStatus = (DeleteMobileDeviceAccessOverrideResponse -> Int)
-> (DeleteMobileDeviceAccessOverrideResponse
-> Int -> DeleteMobileDeviceAccessOverrideResponse)
-> Lens
DeleteMobileDeviceAccessOverrideResponse
DeleteMobileDeviceAccessOverrideResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteMobileDeviceAccessOverrideResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteMobileDeviceAccessOverrideResponse' :: DeleteMobileDeviceAccessOverrideResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteMobileDeviceAccessOverrideResponse
s@DeleteMobileDeviceAccessOverrideResponse' {} Int
a -> DeleteMobileDeviceAccessOverrideResponse
s {$sel:httpStatus:DeleteMobileDeviceAccessOverrideResponse' :: Int
httpStatus = Int
a} :: DeleteMobileDeviceAccessOverrideResponse)
instance
Prelude.NFData
DeleteMobileDeviceAccessOverrideResponse