{-# 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.IoT.RemoveThingFromThingGroup
(
RemoveThingFromThingGroup (..),
newRemoveThingFromThingGroup,
removeThingFromThingGroup_thingArn,
removeThingFromThingGroup_thingGroupArn,
removeThingFromThingGroup_thingGroupName,
removeThingFromThingGroup_thingName,
RemoveThingFromThingGroupResponse (..),
newRemoveThingFromThingGroupResponse,
removeThingFromThingGroupResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IoT.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RemoveThingFromThingGroup = RemoveThingFromThingGroup'
{
RemoveThingFromThingGroup -> Maybe Text
thingArn :: Prelude.Maybe Prelude.Text,
RemoveThingFromThingGroup -> Maybe Text
thingGroupArn :: Prelude.Maybe Prelude.Text,
RemoveThingFromThingGroup -> Maybe Text
thingGroupName :: Prelude.Maybe Prelude.Text,
RemoveThingFromThingGroup -> Maybe Text
thingName :: Prelude.Maybe Prelude.Text
}
deriving (RemoveThingFromThingGroup -> RemoveThingFromThingGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveThingFromThingGroup -> RemoveThingFromThingGroup -> Bool
$c/= :: RemoveThingFromThingGroup -> RemoveThingFromThingGroup -> Bool
== :: RemoveThingFromThingGroup -> RemoveThingFromThingGroup -> Bool
$c== :: RemoveThingFromThingGroup -> RemoveThingFromThingGroup -> Bool
Prelude.Eq, ReadPrec [RemoveThingFromThingGroup]
ReadPrec RemoveThingFromThingGroup
Int -> ReadS RemoveThingFromThingGroup
ReadS [RemoveThingFromThingGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveThingFromThingGroup]
$creadListPrec :: ReadPrec [RemoveThingFromThingGroup]
readPrec :: ReadPrec RemoveThingFromThingGroup
$creadPrec :: ReadPrec RemoveThingFromThingGroup
readList :: ReadS [RemoveThingFromThingGroup]
$creadList :: ReadS [RemoveThingFromThingGroup]
readsPrec :: Int -> ReadS RemoveThingFromThingGroup
$creadsPrec :: Int -> ReadS RemoveThingFromThingGroup
Prelude.Read, Int -> RemoveThingFromThingGroup -> ShowS
[RemoveThingFromThingGroup] -> ShowS
RemoveThingFromThingGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveThingFromThingGroup] -> ShowS
$cshowList :: [RemoveThingFromThingGroup] -> ShowS
show :: RemoveThingFromThingGroup -> String
$cshow :: RemoveThingFromThingGroup -> String
showsPrec :: Int -> RemoveThingFromThingGroup -> ShowS
$cshowsPrec :: Int -> RemoveThingFromThingGroup -> ShowS
Prelude.Show, forall x.
Rep RemoveThingFromThingGroup x -> RemoveThingFromThingGroup
forall x.
RemoveThingFromThingGroup -> Rep RemoveThingFromThingGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveThingFromThingGroup x -> RemoveThingFromThingGroup
$cfrom :: forall x.
RemoveThingFromThingGroup -> Rep RemoveThingFromThingGroup x
Prelude.Generic)
newRemoveThingFromThingGroup ::
RemoveThingFromThingGroup
newRemoveThingFromThingGroup :: RemoveThingFromThingGroup
newRemoveThingFromThingGroup =
RemoveThingFromThingGroup'
{ $sel:thingArn:RemoveThingFromThingGroup' :: Maybe Text
thingArn =
forall a. Maybe a
Prelude.Nothing,
$sel:thingGroupArn:RemoveThingFromThingGroup' :: Maybe Text
thingGroupArn = forall a. Maybe a
Prelude.Nothing,
$sel:thingGroupName:RemoveThingFromThingGroup' :: Maybe Text
thingGroupName = forall a. Maybe a
Prelude.Nothing,
$sel:thingName:RemoveThingFromThingGroup' :: Maybe Text
thingName = forall a. Maybe a
Prelude.Nothing
}
removeThingFromThingGroup_thingArn :: Lens.Lens' RemoveThingFromThingGroup (Prelude.Maybe Prelude.Text)
removeThingFromThingGroup_thingArn :: Lens' RemoveThingFromThingGroup (Maybe Text)
removeThingFromThingGroup_thingArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveThingFromThingGroup' {Maybe Text
thingArn :: Maybe Text
$sel:thingArn:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
thingArn} -> Maybe Text
thingArn) (\s :: RemoveThingFromThingGroup
s@RemoveThingFromThingGroup' {} Maybe Text
a -> RemoveThingFromThingGroup
s {$sel:thingArn:RemoveThingFromThingGroup' :: Maybe Text
thingArn = Maybe Text
a} :: RemoveThingFromThingGroup)
removeThingFromThingGroup_thingGroupArn :: Lens.Lens' RemoveThingFromThingGroup (Prelude.Maybe Prelude.Text)
removeThingFromThingGroup_thingGroupArn :: Lens' RemoveThingFromThingGroup (Maybe Text)
removeThingFromThingGroup_thingGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveThingFromThingGroup' {Maybe Text
thingGroupArn :: Maybe Text
$sel:thingGroupArn:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
thingGroupArn} -> Maybe Text
thingGroupArn) (\s :: RemoveThingFromThingGroup
s@RemoveThingFromThingGroup' {} Maybe Text
a -> RemoveThingFromThingGroup
s {$sel:thingGroupArn:RemoveThingFromThingGroup' :: Maybe Text
thingGroupArn = Maybe Text
a} :: RemoveThingFromThingGroup)
removeThingFromThingGroup_thingGroupName :: Lens.Lens' RemoveThingFromThingGroup (Prelude.Maybe Prelude.Text)
removeThingFromThingGroup_thingGroupName :: Lens' RemoveThingFromThingGroup (Maybe Text)
removeThingFromThingGroup_thingGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveThingFromThingGroup' {Maybe Text
thingGroupName :: Maybe Text
$sel:thingGroupName:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
thingGroupName} -> Maybe Text
thingGroupName) (\s :: RemoveThingFromThingGroup
s@RemoveThingFromThingGroup' {} Maybe Text
a -> RemoveThingFromThingGroup
s {$sel:thingGroupName:RemoveThingFromThingGroup' :: Maybe Text
thingGroupName = Maybe Text
a} :: RemoveThingFromThingGroup)
removeThingFromThingGroup_thingName :: Lens.Lens' RemoveThingFromThingGroup (Prelude.Maybe Prelude.Text)
removeThingFromThingGroup_thingName :: Lens' RemoveThingFromThingGroup (Maybe Text)
removeThingFromThingGroup_thingName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveThingFromThingGroup' {Maybe Text
thingName :: Maybe Text
$sel:thingName:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
thingName} -> Maybe Text
thingName) (\s :: RemoveThingFromThingGroup
s@RemoveThingFromThingGroup' {} Maybe Text
a -> RemoveThingFromThingGroup
s {$sel:thingName:RemoveThingFromThingGroup' :: Maybe Text
thingName = Maybe Text
a} :: RemoveThingFromThingGroup)
instance Core.AWSRequest RemoveThingFromThingGroup where
type
AWSResponse RemoveThingFromThingGroup =
RemoveThingFromThingGroupResponse
request :: (Service -> Service)
-> RemoveThingFromThingGroup -> Request RemoveThingFromThingGroup
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.putJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy RemoveThingFromThingGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveThingFromThingGroup)))
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 -> RemoveThingFromThingGroupResponse
RemoveThingFromThingGroupResponse'
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 RemoveThingFromThingGroup where
hashWithSalt :: Int -> RemoveThingFromThingGroup -> Int
hashWithSalt Int
_salt RemoveThingFromThingGroup' {Maybe Text
thingName :: Maybe Text
thingGroupName :: Maybe Text
thingGroupArn :: Maybe Text
thingArn :: Maybe Text
$sel:thingName:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
$sel:thingGroupName:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
$sel:thingGroupArn:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
$sel:thingArn:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
thingArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
thingGroupArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
thingGroupName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
thingName
instance Prelude.NFData RemoveThingFromThingGroup where
rnf :: RemoveThingFromThingGroup -> ()
rnf RemoveThingFromThingGroup' {Maybe Text
thingName :: Maybe Text
thingGroupName :: Maybe Text
thingGroupArn :: Maybe Text
thingArn :: Maybe Text
$sel:thingName:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
$sel:thingGroupName:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
$sel:thingGroupArn:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
$sel:thingArn:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
thingArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
thingGroupArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
thingGroupName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
thingName
instance Data.ToHeaders RemoveThingFromThingGroup where
toHeaders :: RemoveThingFromThingGroup -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToJSON RemoveThingFromThingGroup where
toJSON :: RemoveThingFromThingGroup -> Value
toJSON RemoveThingFromThingGroup' {Maybe Text
thingName :: Maybe Text
thingGroupName :: Maybe Text
thingGroupArn :: Maybe Text
thingArn :: Maybe Text
$sel:thingName:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
$sel:thingGroupName:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
$sel:thingGroupArn:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
$sel:thingArn:RemoveThingFromThingGroup' :: RemoveThingFromThingGroup -> Maybe Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"thingArn" 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
thingArn,
(Key
"thingGroupArn" 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
thingGroupArn,
(Key
"thingGroupName" 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
thingGroupName,
(Key
"thingName" 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
thingName
]
)
instance Data.ToPath RemoveThingFromThingGroup where
toPath :: RemoveThingFromThingGroup -> ByteString
toPath =
forall a b. a -> b -> a
Prelude.const
ByteString
"/thing-groups/removeThingFromThingGroup"
instance Data.ToQuery RemoveThingFromThingGroup where
toQuery :: RemoveThingFromThingGroup -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data RemoveThingFromThingGroupResponse = RemoveThingFromThingGroupResponse'
{
RemoveThingFromThingGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RemoveThingFromThingGroupResponse
-> RemoveThingFromThingGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveThingFromThingGroupResponse
-> RemoveThingFromThingGroupResponse -> Bool
$c/= :: RemoveThingFromThingGroupResponse
-> RemoveThingFromThingGroupResponse -> Bool
== :: RemoveThingFromThingGroupResponse
-> RemoveThingFromThingGroupResponse -> Bool
$c== :: RemoveThingFromThingGroupResponse
-> RemoveThingFromThingGroupResponse -> Bool
Prelude.Eq, ReadPrec [RemoveThingFromThingGroupResponse]
ReadPrec RemoveThingFromThingGroupResponse
Int -> ReadS RemoveThingFromThingGroupResponse
ReadS [RemoveThingFromThingGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveThingFromThingGroupResponse]
$creadListPrec :: ReadPrec [RemoveThingFromThingGroupResponse]
readPrec :: ReadPrec RemoveThingFromThingGroupResponse
$creadPrec :: ReadPrec RemoveThingFromThingGroupResponse
readList :: ReadS [RemoveThingFromThingGroupResponse]
$creadList :: ReadS [RemoveThingFromThingGroupResponse]
readsPrec :: Int -> ReadS RemoveThingFromThingGroupResponse
$creadsPrec :: Int -> ReadS RemoveThingFromThingGroupResponse
Prelude.Read, Int -> RemoveThingFromThingGroupResponse -> ShowS
[RemoveThingFromThingGroupResponse] -> ShowS
RemoveThingFromThingGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveThingFromThingGroupResponse] -> ShowS
$cshowList :: [RemoveThingFromThingGroupResponse] -> ShowS
show :: RemoveThingFromThingGroupResponse -> String
$cshow :: RemoveThingFromThingGroupResponse -> String
showsPrec :: Int -> RemoveThingFromThingGroupResponse -> ShowS
$cshowsPrec :: Int -> RemoveThingFromThingGroupResponse -> ShowS
Prelude.Show, forall x.
Rep RemoveThingFromThingGroupResponse x
-> RemoveThingFromThingGroupResponse
forall x.
RemoveThingFromThingGroupResponse
-> Rep RemoveThingFromThingGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveThingFromThingGroupResponse x
-> RemoveThingFromThingGroupResponse
$cfrom :: forall x.
RemoveThingFromThingGroupResponse
-> Rep RemoveThingFromThingGroupResponse x
Prelude.Generic)
newRemoveThingFromThingGroupResponse ::
Prelude.Int ->
RemoveThingFromThingGroupResponse
newRemoveThingFromThingGroupResponse :: Int -> RemoveThingFromThingGroupResponse
newRemoveThingFromThingGroupResponse Int
pHttpStatus_ =
RemoveThingFromThingGroupResponse'
{ $sel:httpStatus:RemoveThingFromThingGroupResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
removeThingFromThingGroupResponse_httpStatus :: Lens.Lens' RemoveThingFromThingGroupResponse Prelude.Int
removeThingFromThingGroupResponse_httpStatus :: Lens' RemoveThingFromThingGroupResponse Int
removeThingFromThingGroupResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveThingFromThingGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:RemoveThingFromThingGroupResponse' :: RemoveThingFromThingGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RemoveThingFromThingGroupResponse
s@RemoveThingFromThingGroupResponse' {} Int
a -> RemoveThingFromThingGroupResponse
s {$sel:httpStatus:RemoveThingFromThingGroupResponse' :: Int
httpStatus = Int
a} :: RemoveThingFromThingGroupResponse)
instance
Prelude.NFData
RemoveThingFromThingGroupResponse
where
rnf :: RemoveThingFromThingGroupResponse -> ()
rnf RemoveThingFromThingGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:RemoveThingFromThingGroupResponse' :: RemoveThingFromThingGroupResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus