{-# 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.CreateThingGroup
(
CreateThingGroup (..),
newCreateThingGroup,
createThingGroup_parentGroupName,
createThingGroup_thingGroupProperties,
createThingGroup_tags,
createThingGroup_thingGroupName,
CreateThingGroupResponse (..),
newCreateThingGroupResponse,
createThingGroupResponse_thingGroupArn,
createThingGroupResponse_thingGroupId,
createThingGroupResponse_thingGroupName,
createThingGroupResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import Amazonka.IoT.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateThingGroup = CreateThingGroup'
{
CreateThingGroup -> Maybe Text
parentGroupName :: Prelude.Maybe Prelude.Text,
CreateThingGroup -> Maybe ThingGroupProperties
thingGroupProperties :: Prelude.Maybe ThingGroupProperties,
CreateThingGroup -> Maybe [Tag]
tags :: Prelude.Maybe [Tag],
CreateThingGroup -> Text
thingGroupName :: Prelude.Text
}
deriving (CreateThingGroup -> CreateThingGroup -> Bool
(CreateThingGroup -> CreateThingGroup -> Bool)
-> (CreateThingGroup -> CreateThingGroup -> Bool)
-> Eq CreateThingGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateThingGroup -> CreateThingGroup -> Bool
$c/= :: CreateThingGroup -> CreateThingGroup -> Bool
== :: CreateThingGroup -> CreateThingGroup -> Bool
$c== :: CreateThingGroup -> CreateThingGroup -> Bool
Prelude.Eq, ReadPrec [CreateThingGroup]
ReadPrec CreateThingGroup
Int -> ReadS CreateThingGroup
ReadS [CreateThingGroup]
(Int -> ReadS CreateThingGroup)
-> ReadS [CreateThingGroup]
-> ReadPrec CreateThingGroup
-> ReadPrec [CreateThingGroup]
-> Read CreateThingGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateThingGroup]
$creadListPrec :: ReadPrec [CreateThingGroup]
readPrec :: ReadPrec CreateThingGroup
$creadPrec :: ReadPrec CreateThingGroup
readList :: ReadS [CreateThingGroup]
$creadList :: ReadS [CreateThingGroup]
readsPrec :: Int -> ReadS CreateThingGroup
$creadsPrec :: Int -> ReadS CreateThingGroup
Prelude.Read, Int -> CreateThingGroup -> ShowS
[CreateThingGroup] -> ShowS
CreateThingGroup -> String
(Int -> CreateThingGroup -> ShowS)
-> (CreateThingGroup -> String)
-> ([CreateThingGroup] -> ShowS)
-> Show CreateThingGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateThingGroup] -> ShowS
$cshowList :: [CreateThingGroup] -> ShowS
show :: CreateThingGroup -> String
$cshow :: CreateThingGroup -> String
showsPrec :: Int -> CreateThingGroup -> ShowS
$cshowsPrec :: Int -> CreateThingGroup -> ShowS
Prelude.Show, (forall x. CreateThingGroup -> Rep CreateThingGroup x)
-> (forall x. Rep CreateThingGroup x -> CreateThingGroup)
-> Generic CreateThingGroup
forall x. Rep CreateThingGroup x -> CreateThingGroup
forall x. CreateThingGroup -> Rep CreateThingGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateThingGroup x -> CreateThingGroup
$cfrom :: forall x. CreateThingGroup -> Rep CreateThingGroup x
Prelude.Generic)
newCreateThingGroup ::
Prelude.Text ->
CreateThingGroup
newCreateThingGroup :: Text -> CreateThingGroup
newCreateThingGroup Text
pThingGroupName_ =
CreateThingGroup' :: Maybe Text
-> Maybe ThingGroupProperties
-> Maybe [Tag]
-> Text
-> CreateThingGroup
CreateThingGroup'
{ $sel:parentGroupName:CreateThingGroup' :: Maybe Text
parentGroupName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:thingGroupProperties:CreateThingGroup' :: Maybe ThingGroupProperties
thingGroupProperties = Maybe ThingGroupProperties
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateThingGroup' :: Maybe [Tag]
tags = Maybe [Tag]
forall a. Maybe a
Prelude.Nothing,
$sel:thingGroupName:CreateThingGroup' :: Text
thingGroupName = Text
pThingGroupName_
}
createThingGroup_parentGroupName :: Lens.Lens' CreateThingGroup (Prelude.Maybe Prelude.Text)
createThingGroup_parentGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateThingGroup -> f CreateThingGroup
createThingGroup_parentGroupName = (CreateThingGroup -> Maybe Text)
-> (CreateThingGroup -> Maybe Text -> CreateThingGroup)
-> Lens CreateThingGroup CreateThingGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThingGroup' {Maybe Text
parentGroupName :: Maybe Text
$sel:parentGroupName:CreateThingGroup' :: CreateThingGroup -> Maybe Text
parentGroupName} -> Maybe Text
parentGroupName) (\s :: CreateThingGroup
s@CreateThingGroup' {} Maybe Text
a -> CreateThingGroup
s {$sel:parentGroupName:CreateThingGroup' :: Maybe Text
parentGroupName = Maybe Text
a} :: CreateThingGroup)
createThingGroup_thingGroupProperties :: Lens.Lens' CreateThingGroup (Prelude.Maybe ThingGroupProperties)
createThingGroup_thingGroupProperties :: (Maybe ThingGroupProperties -> f (Maybe ThingGroupProperties))
-> CreateThingGroup -> f CreateThingGroup
createThingGroup_thingGroupProperties = (CreateThingGroup -> Maybe ThingGroupProperties)
-> (CreateThingGroup
-> Maybe ThingGroupProperties -> CreateThingGroup)
-> Lens
CreateThingGroup
CreateThingGroup
(Maybe ThingGroupProperties)
(Maybe ThingGroupProperties)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThingGroup' {Maybe ThingGroupProperties
thingGroupProperties :: Maybe ThingGroupProperties
$sel:thingGroupProperties:CreateThingGroup' :: CreateThingGroup -> Maybe ThingGroupProperties
thingGroupProperties} -> Maybe ThingGroupProperties
thingGroupProperties) (\s :: CreateThingGroup
s@CreateThingGroup' {} Maybe ThingGroupProperties
a -> CreateThingGroup
s {$sel:thingGroupProperties:CreateThingGroup' :: Maybe ThingGroupProperties
thingGroupProperties = Maybe ThingGroupProperties
a} :: CreateThingGroup)
createThingGroup_tags :: Lens.Lens' CreateThingGroup (Prelude.Maybe [Tag])
createThingGroup_tags :: (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateThingGroup -> f CreateThingGroup
createThingGroup_tags = (CreateThingGroup -> Maybe [Tag])
-> (CreateThingGroup -> Maybe [Tag] -> CreateThingGroup)
-> Lens
CreateThingGroup CreateThingGroup (Maybe [Tag]) (Maybe [Tag])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThingGroup' {Maybe [Tag]
tags :: Maybe [Tag]
$sel:tags:CreateThingGroup' :: CreateThingGroup -> Maybe [Tag]
tags} -> Maybe [Tag]
tags) (\s :: CreateThingGroup
s@CreateThingGroup' {} Maybe [Tag]
a -> CreateThingGroup
s {$sel:tags:CreateThingGroup' :: Maybe [Tag]
tags = Maybe [Tag]
a} :: CreateThingGroup) ((Maybe [Tag] -> f (Maybe [Tag]))
-> CreateThingGroup -> f CreateThingGroup)
-> ((Maybe [Tag] -> f (Maybe [Tag]))
-> Maybe [Tag] -> f (Maybe [Tag]))
-> (Maybe [Tag] -> f (Maybe [Tag]))
-> CreateThingGroup
-> f CreateThingGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Tag] [Tag] [Tag] [Tag]
-> Iso (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag]) (Maybe [Tag])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Tag] [Tag] [Tag] [Tag]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createThingGroup_thingGroupName :: Lens.Lens' CreateThingGroup Prelude.Text
createThingGroup_thingGroupName :: (Text -> f Text) -> CreateThingGroup -> f CreateThingGroup
createThingGroup_thingGroupName = (CreateThingGroup -> Text)
-> (CreateThingGroup -> Text -> CreateThingGroup)
-> Lens CreateThingGroup CreateThingGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThingGroup' {Text
thingGroupName :: Text
$sel:thingGroupName:CreateThingGroup' :: CreateThingGroup -> Text
thingGroupName} -> Text
thingGroupName) (\s :: CreateThingGroup
s@CreateThingGroup' {} Text
a -> CreateThingGroup
s {$sel:thingGroupName:CreateThingGroup' :: Text
thingGroupName = Text
a} :: CreateThingGroup)
instance Core.AWSRequest CreateThingGroup where
type
AWSResponse CreateThingGroup =
CreateThingGroupResponse
request :: CreateThingGroup -> Request CreateThingGroup
request = Service -> CreateThingGroup -> Request CreateThingGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateThingGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateThingGroup)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateThingGroup))
-> Logger
-> Service
-> Proxy CreateThingGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateThingGroup)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateThingGroupResponse
CreateThingGroupResponse'
(Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateThingGroupResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text -> Maybe Text -> Int -> CreateThingGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"thingGroupArn")
Either
String
(Maybe Text -> Maybe Text -> Int -> CreateThingGroupResponse)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> Int -> CreateThingGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"thingGroupId")
Either String (Maybe Text -> Int -> CreateThingGroupResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreateThingGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"thingGroupName")
Either String (Int -> CreateThingGroupResponse)
-> Either String Int -> Either String CreateThingGroupResponse
forall (f :: * -> *) a b. Applicative f => 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 CreateThingGroup
instance Prelude.NFData CreateThingGroup
instance Core.ToHeaders CreateThingGroup where
toHeaders :: CreateThingGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateThingGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON CreateThingGroup where
toJSON :: CreateThingGroup -> Value
toJSON CreateThingGroup' {Maybe [Tag]
Maybe Text
Maybe ThingGroupProperties
Text
thingGroupName :: Text
tags :: Maybe [Tag]
thingGroupProperties :: Maybe ThingGroupProperties
parentGroupName :: Maybe Text
$sel:thingGroupName:CreateThingGroup' :: CreateThingGroup -> Text
$sel:tags:CreateThingGroup' :: CreateThingGroup -> Maybe [Tag]
$sel:thingGroupProperties:CreateThingGroup' :: CreateThingGroup -> Maybe ThingGroupProperties
$sel:parentGroupName:CreateThingGroup' :: CreateThingGroup -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"parentGroupName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
parentGroupName,
(Text
"thingGroupProperties" Text -> ThingGroupProperties -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(ThingGroupProperties -> Pair)
-> Maybe ThingGroupProperties -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ThingGroupProperties
thingGroupProperties,
(Text
"tags" Text -> [Tag] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([Tag] -> Pair) -> Maybe [Tag] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Tag]
tags
]
)
instance Core.ToPath CreateThingGroup where
toPath :: CreateThingGroup -> ByteString
toPath CreateThingGroup' {Maybe [Tag]
Maybe Text
Maybe ThingGroupProperties
Text
thingGroupName :: Text
tags :: Maybe [Tag]
thingGroupProperties :: Maybe ThingGroupProperties
parentGroupName :: Maybe Text
$sel:thingGroupName:CreateThingGroup' :: CreateThingGroup -> Text
$sel:tags:CreateThingGroup' :: CreateThingGroup -> Maybe [Tag]
$sel:thingGroupProperties:CreateThingGroup' :: CreateThingGroup -> Maybe ThingGroupProperties
$sel:parentGroupName:CreateThingGroup' :: CreateThingGroup -> Maybe Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/thing-groups/", Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
thingGroupName]
instance Core.ToQuery CreateThingGroup where
toQuery :: CreateThingGroup -> QueryString
toQuery = QueryString -> CreateThingGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateThingGroupResponse = CreateThingGroupResponse'
{
CreateThingGroupResponse -> Maybe Text
thingGroupArn :: Prelude.Maybe Prelude.Text,
CreateThingGroupResponse -> Maybe Text
thingGroupId :: Prelude.Maybe Prelude.Text,
CreateThingGroupResponse -> Maybe Text
thingGroupName :: Prelude.Maybe Prelude.Text,
CreateThingGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateThingGroupResponse -> CreateThingGroupResponse -> Bool
(CreateThingGroupResponse -> CreateThingGroupResponse -> Bool)
-> (CreateThingGroupResponse -> CreateThingGroupResponse -> Bool)
-> Eq CreateThingGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateThingGroupResponse -> CreateThingGroupResponse -> Bool
$c/= :: CreateThingGroupResponse -> CreateThingGroupResponse -> Bool
== :: CreateThingGroupResponse -> CreateThingGroupResponse -> Bool
$c== :: CreateThingGroupResponse -> CreateThingGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateThingGroupResponse]
ReadPrec CreateThingGroupResponse
Int -> ReadS CreateThingGroupResponse
ReadS [CreateThingGroupResponse]
(Int -> ReadS CreateThingGroupResponse)
-> ReadS [CreateThingGroupResponse]
-> ReadPrec CreateThingGroupResponse
-> ReadPrec [CreateThingGroupResponse]
-> Read CreateThingGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateThingGroupResponse]
$creadListPrec :: ReadPrec [CreateThingGroupResponse]
readPrec :: ReadPrec CreateThingGroupResponse
$creadPrec :: ReadPrec CreateThingGroupResponse
readList :: ReadS [CreateThingGroupResponse]
$creadList :: ReadS [CreateThingGroupResponse]
readsPrec :: Int -> ReadS CreateThingGroupResponse
$creadsPrec :: Int -> ReadS CreateThingGroupResponse
Prelude.Read, Int -> CreateThingGroupResponse -> ShowS
[CreateThingGroupResponse] -> ShowS
CreateThingGroupResponse -> String
(Int -> CreateThingGroupResponse -> ShowS)
-> (CreateThingGroupResponse -> String)
-> ([CreateThingGroupResponse] -> ShowS)
-> Show CreateThingGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateThingGroupResponse] -> ShowS
$cshowList :: [CreateThingGroupResponse] -> ShowS
show :: CreateThingGroupResponse -> String
$cshow :: CreateThingGroupResponse -> String
showsPrec :: Int -> CreateThingGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateThingGroupResponse -> ShowS
Prelude.Show, (forall x.
CreateThingGroupResponse -> Rep CreateThingGroupResponse x)
-> (forall x.
Rep CreateThingGroupResponse x -> CreateThingGroupResponse)
-> Generic CreateThingGroupResponse
forall x.
Rep CreateThingGroupResponse x -> CreateThingGroupResponse
forall x.
CreateThingGroupResponse -> Rep CreateThingGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateThingGroupResponse x -> CreateThingGroupResponse
$cfrom :: forall x.
CreateThingGroupResponse -> Rep CreateThingGroupResponse x
Prelude.Generic)
newCreateThingGroupResponse ::
Prelude.Int ->
CreateThingGroupResponse
newCreateThingGroupResponse :: Int -> CreateThingGroupResponse
newCreateThingGroupResponse Int
pHttpStatus_ =
CreateThingGroupResponse' :: Maybe Text
-> Maybe Text -> Maybe Text -> Int -> CreateThingGroupResponse
CreateThingGroupResponse'
{ $sel:thingGroupArn:CreateThingGroupResponse' :: Maybe Text
thingGroupArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:thingGroupId:CreateThingGroupResponse' :: Maybe Text
thingGroupId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:thingGroupName:CreateThingGroupResponse' :: Maybe Text
thingGroupName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateThingGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createThingGroupResponse_thingGroupArn :: Lens.Lens' CreateThingGroupResponse (Prelude.Maybe Prelude.Text)
createThingGroupResponse_thingGroupArn :: (Maybe Text -> f (Maybe Text))
-> CreateThingGroupResponse -> f CreateThingGroupResponse
createThingGroupResponse_thingGroupArn = (CreateThingGroupResponse -> Maybe Text)
-> (CreateThingGroupResponse
-> Maybe Text -> CreateThingGroupResponse)
-> Lens
CreateThingGroupResponse
CreateThingGroupResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThingGroupResponse' {Maybe Text
thingGroupArn :: Maybe Text
$sel:thingGroupArn:CreateThingGroupResponse' :: CreateThingGroupResponse -> Maybe Text
thingGroupArn} -> Maybe Text
thingGroupArn) (\s :: CreateThingGroupResponse
s@CreateThingGroupResponse' {} Maybe Text
a -> CreateThingGroupResponse
s {$sel:thingGroupArn:CreateThingGroupResponse' :: Maybe Text
thingGroupArn = Maybe Text
a} :: CreateThingGroupResponse)
createThingGroupResponse_thingGroupId :: Lens.Lens' CreateThingGroupResponse (Prelude.Maybe Prelude.Text)
createThingGroupResponse_thingGroupId :: (Maybe Text -> f (Maybe Text))
-> CreateThingGroupResponse -> f CreateThingGroupResponse
createThingGroupResponse_thingGroupId = (CreateThingGroupResponse -> Maybe Text)
-> (CreateThingGroupResponse
-> Maybe Text -> CreateThingGroupResponse)
-> Lens
CreateThingGroupResponse
CreateThingGroupResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThingGroupResponse' {Maybe Text
thingGroupId :: Maybe Text
$sel:thingGroupId:CreateThingGroupResponse' :: CreateThingGroupResponse -> Maybe Text
thingGroupId} -> Maybe Text
thingGroupId) (\s :: CreateThingGroupResponse
s@CreateThingGroupResponse' {} Maybe Text
a -> CreateThingGroupResponse
s {$sel:thingGroupId:CreateThingGroupResponse' :: Maybe Text
thingGroupId = Maybe Text
a} :: CreateThingGroupResponse)
createThingGroupResponse_thingGroupName :: Lens.Lens' CreateThingGroupResponse (Prelude.Maybe Prelude.Text)
createThingGroupResponse_thingGroupName :: (Maybe Text -> f (Maybe Text))
-> CreateThingGroupResponse -> f CreateThingGroupResponse
createThingGroupResponse_thingGroupName = (CreateThingGroupResponse -> Maybe Text)
-> (CreateThingGroupResponse
-> Maybe Text -> CreateThingGroupResponse)
-> Lens
CreateThingGroupResponse
CreateThingGroupResponse
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThingGroupResponse' {Maybe Text
thingGroupName :: Maybe Text
$sel:thingGroupName:CreateThingGroupResponse' :: CreateThingGroupResponse -> Maybe Text
thingGroupName} -> Maybe Text
thingGroupName) (\s :: CreateThingGroupResponse
s@CreateThingGroupResponse' {} Maybe Text
a -> CreateThingGroupResponse
s {$sel:thingGroupName:CreateThingGroupResponse' :: Maybe Text
thingGroupName = Maybe Text
a} :: CreateThingGroupResponse)
createThingGroupResponse_httpStatus :: Lens.Lens' CreateThingGroupResponse Prelude.Int
createThingGroupResponse_httpStatus :: (Int -> f Int)
-> CreateThingGroupResponse -> f CreateThingGroupResponse
createThingGroupResponse_httpStatus = (CreateThingGroupResponse -> Int)
-> (CreateThingGroupResponse -> Int -> CreateThingGroupResponse)
-> Lens CreateThingGroupResponse CreateThingGroupResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateThingGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateThingGroupResponse' :: CreateThingGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateThingGroupResponse
s@CreateThingGroupResponse' {} Int
a -> CreateThingGroupResponse
s {$sel:httpStatus:CreateThingGroupResponse' :: Int
httpStatus = Int
a} :: CreateThingGroupResponse)
instance Prelude.NFData CreateThingGroupResponse