{-# 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.ResourceGroups.CreateGroup
(
CreateGroup (..),
newCreateGroup,
createGroup_resourceQuery,
createGroup_configuration,
createGroup_description,
createGroup_tags,
createGroup_name,
CreateGroupResponse (..),
newCreateGroupResponse,
createGroupResponse_group,
createGroupResponse_groupConfiguration,
createGroupResponse_resourceQuery,
createGroupResponse_tags,
createGroupResponse_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 Amazonka.ResourceGroups.Types
import qualified Amazonka.Response as Response
data CreateGroup = CreateGroup'
{
CreateGroup -> Maybe ResourceQuery
resourceQuery :: Prelude.Maybe ResourceQuery,
CreateGroup -> Maybe [GroupConfigurationItem]
configuration :: Prelude.Maybe [GroupConfigurationItem],
CreateGroup -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateGroup -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateGroup -> Text
name :: Prelude.Text
}
deriving (CreateGroup -> CreateGroup -> Bool
(CreateGroup -> CreateGroup -> Bool)
-> (CreateGroup -> CreateGroup -> Bool) -> Eq CreateGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGroup -> CreateGroup -> Bool
$c/= :: CreateGroup -> CreateGroup -> Bool
== :: CreateGroup -> CreateGroup -> Bool
$c== :: CreateGroup -> CreateGroup -> Bool
Prelude.Eq, ReadPrec [CreateGroup]
ReadPrec CreateGroup
Int -> ReadS CreateGroup
ReadS [CreateGroup]
(Int -> ReadS CreateGroup)
-> ReadS [CreateGroup]
-> ReadPrec CreateGroup
-> ReadPrec [CreateGroup]
-> Read CreateGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGroup]
$creadListPrec :: ReadPrec [CreateGroup]
readPrec :: ReadPrec CreateGroup
$creadPrec :: ReadPrec CreateGroup
readList :: ReadS [CreateGroup]
$creadList :: ReadS [CreateGroup]
readsPrec :: Int -> ReadS CreateGroup
$creadsPrec :: Int -> ReadS CreateGroup
Prelude.Read, Int -> CreateGroup -> ShowS
[CreateGroup] -> ShowS
CreateGroup -> String
(Int -> CreateGroup -> ShowS)
-> (CreateGroup -> String)
-> ([CreateGroup] -> ShowS)
-> Show CreateGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGroup] -> ShowS
$cshowList :: [CreateGroup] -> ShowS
show :: CreateGroup -> String
$cshow :: CreateGroup -> String
showsPrec :: Int -> CreateGroup -> ShowS
$cshowsPrec :: Int -> CreateGroup -> ShowS
Prelude.Show, (forall x. CreateGroup -> Rep CreateGroup x)
-> (forall x. Rep CreateGroup x -> CreateGroup)
-> Generic CreateGroup
forall x. Rep CreateGroup x -> CreateGroup
forall x. CreateGroup -> Rep CreateGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateGroup x -> CreateGroup
$cfrom :: forall x. CreateGroup -> Rep CreateGroup x
Prelude.Generic)
newCreateGroup ::
Prelude.Text ->
CreateGroup
newCreateGroup :: Text -> CreateGroup
newCreateGroup Text
pName_ =
CreateGroup' :: Maybe ResourceQuery
-> Maybe [GroupConfigurationItem]
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Text
-> CreateGroup
CreateGroup'
{ $sel:resourceQuery:CreateGroup' :: Maybe ResourceQuery
resourceQuery = Maybe ResourceQuery
forall a. Maybe a
Prelude.Nothing,
$sel:configuration:CreateGroup' :: Maybe [GroupConfigurationItem]
configuration = Maybe [GroupConfigurationItem]
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateGroup' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateGroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:name:CreateGroup' :: Text
name = Text
pName_
}
createGroup_resourceQuery :: Lens.Lens' CreateGroup (Prelude.Maybe ResourceQuery)
createGroup_resourceQuery :: (Maybe ResourceQuery -> f (Maybe ResourceQuery))
-> CreateGroup -> f CreateGroup
createGroup_resourceQuery = (CreateGroup -> Maybe ResourceQuery)
-> (CreateGroup -> Maybe ResourceQuery -> CreateGroup)
-> Lens
CreateGroup CreateGroup (Maybe ResourceQuery) (Maybe ResourceQuery)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroup' {Maybe ResourceQuery
resourceQuery :: Maybe ResourceQuery
$sel:resourceQuery:CreateGroup' :: CreateGroup -> Maybe ResourceQuery
resourceQuery} -> Maybe ResourceQuery
resourceQuery) (\s :: CreateGroup
s@CreateGroup' {} Maybe ResourceQuery
a -> CreateGroup
s {$sel:resourceQuery:CreateGroup' :: Maybe ResourceQuery
resourceQuery = Maybe ResourceQuery
a} :: CreateGroup)
createGroup_configuration :: Lens.Lens' CreateGroup (Prelude.Maybe [GroupConfigurationItem])
createGroup_configuration :: (Maybe [GroupConfigurationItem]
-> f (Maybe [GroupConfigurationItem]))
-> CreateGroup -> f CreateGroup
createGroup_configuration = (CreateGroup -> Maybe [GroupConfigurationItem])
-> (CreateGroup -> Maybe [GroupConfigurationItem] -> CreateGroup)
-> Lens
CreateGroup
CreateGroup
(Maybe [GroupConfigurationItem])
(Maybe [GroupConfigurationItem])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroup' {Maybe [GroupConfigurationItem]
configuration :: Maybe [GroupConfigurationItem]
$sel:configuration:CreateGroup' :: CreateGroup -> Maybe [GroupConfigurationItem]
configuration} -> Maybe [GroupConfigurationItem]
configuration) (\s :: CreateGroup
s@CreateGroup' {} Maybe [GroupConfigurationItem]
a -> CreateGroup
s {$sel:configuration:CreateGroup' :: Maybe [GroupConfigurationItem]
configuration = Maybe [GroupConfigurationItem]
a} :: CreateGroup) ((Maybe [GroupConfigurationItem]
-> f (Maybe [GroupConfigurationItem]))
-> CreateGroup -> f CreateGroup)
-> ((Maybe [GroupConfigurationItem]
-> f (Maybe [GroupConfigurationItem]))
-> Maybe [GroupConfigurationItem]
-> f (Maybe [GroupConfigurationItem]))
-> (Maybe [GroupConfigurationItem]
-> f (Maybe [GroupConfigurationItem]))
-> CreateGroup
-> f CreateGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
[GroupConfigurationItem]
[GroupConfigurationItem]
[GroupConfigurationItem]
[GroupConfigurationItem]
-> Iso
(Maybe [GroupConfigurationItem])
(Maybe [GroupConfigurationItem])
(Maybe [GroupConfigurationItem])
(Maybe [GroupConfigurationItem])
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
[GroupConfigurationItem]
[GroupConfigurationItem]
[GroupConfigurationItem]
[GroupConfigurationItem]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createGroup_description :: Lens.Lens' CreateGroup (Prelude.Maybe Prelude.Text)
createGroup_description :: (Maybe Text -> f (Maybe Text)) -> CreateGroup -> f CreateGroup
createGroup_description = (CreateGroup -> Maybe Text)
-> (CreateGroup -> Maybe Text -> CreateGroup)
-> Lens CreateGroup CreateGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroup' {Maybe Text
description :: Maybe Text
$sel:description:CreateGroup' :: CreateGroup -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateGroup
s@CreateGroup' {} Maybe Text
a -> CreateGroup
s {$sel:description:CreateGroup' :: Maybe Text
description = Maybe Text
a} :: CreateGroup)
createGroup_tags :: Lens.Lens' CreateGroup (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createGroup_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateGroup -> f CreateGroup
createGroup_tags = (CreateGroup -> Maybe (HashMap Text Text))
-> (CreateGroup -> Maybe (HashMap Text Text) -> CreateGroup)
-> Lens
CreateGroup
CreateGroup
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroup' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateGroup' :: CreateGroup -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateGroup
s@CreateGroup' {} Maybe (HashMap Text Text)
a -> CreateGroup
s {$sel:tags:CreateGroup' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateGroup) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateGroup -> f CreateGroup)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateGroup
-> f CreateGroup
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createGroup_name :: Lens.Lens' CreateGroup Prelude.Text
createGroup_name :: (Text -> f Text) -> CreateGroup -> f CreateGroup
createGroup_name = (CreateGroup -> Text)
-> (CreateGroup -> Text -> CreateGroup)
-> Lens CreateGroup CreateGroup Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroup' {Text
name :: Text
$sel:name:CreateGroup' :: CreateGroup -> Text
name} -> Text
name) (\s :: CreateGroup
s@CreateGroup' {} Text
a -> CreateGroup
s {$sel:name:CreateGroup' :: Text
name = Text
a} :: CreateGroup)
instance Core.AWSRequest CreateGroup where
type AWSResponse CreateGroup = CreateGroupResponse
request :: CreateGroup -> Request CreateGroup
request = Service -> CreateGroup -> Request CreateGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateGroup)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateGroup))
-> Logger
-> Service
-> Proxy CreateGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreateGroup)))
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 Group
-> Maybe GroupConfiguration
-> Maybe ResourceQuery
-> Maybe (HashMap Text Text)
-> Int
-> CreateGroupResponse
CreateGroupResponse'
(Maybe Group
-> Maybe GroupConfiguration
-> Maybe ResourceQuery
-> Maybe (HashMap Text Text)
-> Int
-> CreateGroupResponse)
-> Either String (Maybe Group)
-> Either
String
(Maybe GroupConfiguration
-> Maybe ResourceQuery
-> Maybe (HashMap Text Text)
-> Int
-> CreateGroupResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Group)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Group")
Either
String
(Maybe GroupConfiguration
-> Maybe ResourceQuery
-> Maybe (HashMap Text Text)
-> Int
-> CreateGroupResponse)
-> Either String (Maybe GroupConfiguration)
-> Either
String
(Maybe ResourceQuery
-> Maybe (HashMap Text Text) -> Int -> CreateGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe GroupConfiguration)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"GroupConfiguration")
Either
String
(Maybe ResourceQuery
-> Maybe (HashMap Text Text) -> Int -> CreateGroupResponse)
-> Either String (Maybe ResourceQuery)
-> Either
String (Maybe (HashMap Text Text) -> Int -> CreateGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe ResourceQuery)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ResourceQuery")
Either
String (Maybe (HashMap Text Text) -> Int -> CreateGroupResponse)
-> Either String (Maybe (HashMap Text Text))
-> Either String (Int -> CreateGroupResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe (HashMap Text Text)))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"Tags" Either String (Maybe (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text)
-> Either String (Maybe (HashMap Text Text))
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe (HashMap Text Text)
forall a. Monoid a => a
Prelude.mempty)
Either String (Int -> CreateGroupResponse)
-> Either String Int -> Either String CreateGroupResponse
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 CreateGroup
instance Prelude.NFData CreateGroup
instance Core.ToHeaders CreateGroup where
toHeaders :: CreateGroup -> ResponseHeaders
toHeaders = ResponseHeaders -> CreateGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToJSON CreateGroup where
toJSON :: CreateGroup -> Value
toJSON CreateGroup' {Maybe [GroupConfigurationItem]
Maybe Text
Maybe (HashMap Text Text)
Maybe ResourceQuery
Text
name :: Text
tags :: Maybe (HashMap Text Text)
description :: Maybe Text
configuration :: Maybe [GroupConfigurationItem]
resourceQuery :: Maybe ResourceQuery
$sel:name:CreateGroup' :: CreateGroup -> Text
$sel:tags:CreateGroup' :: CreateGroup -> Maybe (HashMap Text Text)
$sel:description:CreateGroup' :: CreateGroup -> Maybe Text
$sel:configuration:CreateGroup' :: CreateGroup -> Maybe [GroupConfigurationItem]
$sel:resourceQuery:CreateGroup' :: CreateGroup -> Maybe ResourceQuery
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"ResourceQuery" Text -> ResourceQuery -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (ResourceQuery -> Pair) -> Maybe ResourceQuery -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ResourceQuery
resourceQuery,
(Text
"Configuration" Text -> [GroupConfigurationItem] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) ([GroupConfigurationItem] -> Pair)
-> Maybe [GroupConfigurationItem] -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [GroupConfigurationItem]
configuration,
(Text
"Description" 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
description,
(Text
"Tags" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
tags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
name)
]
)
instance Core.ToPath CreateGroup where
toPath :: CreateGroup -> ByteString
toPath = ByteString -> CreateGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/groups"
instance Core.ToQuery CreateGroup where
toQuery :: CreateGroup -> QueryString
toQuery = QueryString -> CreateGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateGroupResponse = CreateGroupResponse'
{
CreateGroupResponse -> Maybe Group
group' :: Prelude.Maybe Group,
CreateGroupResponse -> Maybe GroupConfiguration
groupConfiguration :: Prelude.Maybe GroupConfiguration,
CreateGroupResponse -> Maybe ResourceQuery
resourceQuery :: Prelude.Maybe ResourceQuery,
CreateGroupResponse -> Maybe (HashMap Text Text)
tags :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
CreateGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateGroupResponse -> CreateGroupResponse -> Bool
(CreateGroupResponse -> CreateGroupResponse -> Bool)
-> (CreateGroupResponse -> CreateGroupResponse -> Bool)
-> Eq CreateGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateGroupResponse -> CreateGroupResponse -> Bool
$c/= :: CreateGroupResponse -> CreateGroupResponse -> Bool
== :: CreateGroupResponse -> CreateGroupResponse -> Bool
$c== :: CreateGroupResponse -> CreateGroupResponse -> Bool
Prelude.Eq, ReadPrec [CreateGroupResponse]
ReadPrec CreateGroupResponse
Int -> ReadS CreateGroupResponse
ReadS [CreateGroupResponse]
(Int -> ReadS CreateGroupResponse)
-> ReadS [CreateGroupResponse]
-> ReadPrec CreateGroupResponse
-> ReadPrec [CreateGroupResponse]
-> Read CreateGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateGroupResponse]
$creadListPrec :: ReadPrec [CreateGroupResponse]
readPrec :: ReadPrec CreateGroupResponse
$creadPrec :: ReadPrec CreateGroupResponse
readList :: ReadS [CreateGroupResponse]
$creadList :: ReadS [CreateGroupResponse]
readsPrec :: Int -> ReadS CreateGroupResponse
$creadsPrec :: Int -> ReadS CreateGroupResponse
Prelude.Read, Int -> CreateGroupResponse -> ShowS
[CreateGroupResponse] -> ShowS
CreateGroupResponse -> String
(Int -> CreateGroupResponse -> ShowS)
-> (CreateGroupResponse -> String)
-> ([CreateGroupResponse] -> ShowS)
-> Show CreateGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateGroupResponse] -> ShowS
$cshowList :: [CreateGroupResponse] -> ShowS
show :: CreateGroupResponse -> String
$cshow :: CreateGroupResponse -> String
showsPrec :: Int -> CreateGroupResponse -> ShowS
$cshowsPrec :: Int -> CreateGroupResponse -> ShowS
Prelude.Show, (forall x. CreateGroupResponse -> Rep CreateGroupResponse x)
-> (forall x. Rep CreateGroupResponse x -> CreateGroupResponse)
-> Generic CreateGroupResponse
forall x. Rep CreateGroupResponse x -> CreateGroupResponse
forall x. CreateGroupResponse -> Rep CreateGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreateGroupResponse x -> CreateGroupResponse
$cfrom :: forall x. CreateGroupResponse -> Rep CreateGroupResponse x
Prelude.Generic)
newCreateGroupResponse ::
Prelude.Int ->
CreateGroupResponse
newCreateGroupResponse :: Int -> CreateGroupResponse
newCreateGroupResponse Int
pHttpStatus_ =
CreateGroupResponse' :: Maybe Group
-> Maybe GroupConfiguration
-> Maybe ResourceQuery
-> Maybe (HashMap Text Text)
-> Int
-> CreateGroupResponse
CreateGroupResponse'
{ $sel:group':CreateGroupResponse' :: Maybe Group
group' = Maybe Group
forall a. Maybe a
Prelude.Nothing,
$sel:groupConfiguration:CreateGroupResponse' :: Maybe GroupConfiguration
groupConfiguration = Maybe GroupConfiguration
forall a. Maybe a
Prelude.Nothing,
$sel:resourceQuery:CreateGroupResponse' :: Maybe ResourceQuery
resourceQuery = Maybe ResourceQuery
forall a. Maybe a
Prelude.Nothing,
$sel:tags:CreateGroupResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createGroupResponse_group :: Lens.Lens' CreateGroupResponse (Prelude.Maybe Group)
createGroupResponse_group :: (Maybe Group -> f (Maybe Group))
-> CreateGroupResponse -> f CreateGroupResponse
createGroupResponse_group = (CreateGroupResponse -> Maybe Group)
-> (CreateGroupResponse -> Maybe Group -> CreateGroupResponse)
-> Lens
CreateGroupResponse CreateGroupResponse (Maybe Group) (Maybe Group)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe Group
group' :: Maybe Group
$sel:group':CreateGroupResponse' :: CreateGroupResponse -> Maybe Group
group'} -> Maybe Group
group') (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe Group
a -> CreateGroupResponse
s {$sel:group':CreateGroupResponse' :: Maybe Group
group' = Maybe Group
a} :: CreateGroupResponse)
createGroupResponse_groupConfiguration :: Lens.Lens' CreateGroupResponse (Prelude.Maybe GroupConfiguration)
createGroupResponse_groupConfiguration :: (Maybe GroupConfiguration -> f (Maybe GroupConfiguration))
-> CreateGroupResponse -> f CreateGroupResponse
createGroupResponse_groupConfiguration = (CreateGroupResponse -> Maybe GroupConfiguration)
-> (CreateGroupResponse
-> Maybe GroupConfiguration -> CreateGroupResponse)
-> Lens
CreateGroupResponse
CreateGroupResponse
(Maybe GroupConfiguration)
(Maybe GroupConfiguration)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe GroupConfiguration
groupConfiguration :: Maybe GroupConfiguration
$sel:groupConfiguration:CreateGroupResponse' :: CreateGroupResponse -> Maybe GroupConfiguration
groupConfiguration} -> Maybe GroupConfiguration
groupConfiguration) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe GroupConfiguration
a -> CreateGroupResponse
s {$sel:groupConfiguration:CreateGroupResponse' :: Maybe GroupConfiguration
groupConfiguration = Maybe GroupConfiguration
a} :: CreateGroupResponse)
createGroupResponse_resourceQuery :: Lens.Lens' CreateGroupResponse (Prelude.Maybe ResourceQuery)
createGroupResponse_resourceQuery :: (Maybe ResourceQuery -> f (Maybe ResourceQuery))
-> CreateGroupResponse -> f CreateGroupResponse
createGroupResponse_resourceQuery = (CreateGroupResponse -> Maybe ResourceQuery)
-> (CreateGroupResponse
-> Maybe ResourceQuery -> CreateGroupResponse)
-> Lens
CreateGroupResponse
CreateGroupResponse
(Maybe ResourceQuery)
(Maybe ResourceQuery)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe ResourceQuery
resourceQuery :: Maybe ResourceQuery
$sel:resourceQuery:CreateGroupResponse' :: CreateGroupResponse -> Maybe ResourceQuery
resourceQuery} -> Maybe ResourceQuery
resourceQuery) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe ResourceQuery
a -> CreateGroupResponse
s {$sel:resourceQuery:CreateGroupResponse' :: Maybe ResourceQuery
resourceQuery = Maybe ResourceQuery
a} :: CreateGroupResponse)
createGroupResponse_tags :: Lens.Lens' CreateGroupResponse (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createGroupResponse_tags :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateGroupResponse -> f CreateGroupResponse
createGroupResponse_tags = (CreateGroupResponse -> Maybe (HashMap Text Text))
-> (CreateGroupResponse
-> Maybe (HashMap Text Text) -> CreateGroupResponse)
-> Lens
CreateGroupResponse
CreateGroupResponse
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Maybe (HashMap Text Text)
tags :: Maybe (HashMap Text Text)
$sel:tags:CreateGroupResponse' :: CreateGroupResponse -> Maybe (HashMap Text Text)
tags} -> Maybe (HashMap Text Text)
tags) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Maybe (HashMap Text Text)
a -> CreateGroupResponse
s {$sel:tags:CreateGroupResponse' :: Maybe (HashMap Text Text)
tags = Maybe (HashMap Text Text)
a} :: CreateGroupResponse) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateGroupResponse -> f CreateGroupResponse)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> CreateGroupResponse
-> f CreateGroupResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
createGroupResponse_httpStatus :: Lens.Lens' CreateGroupResponse Prelude.Int
createGroupResponse_httpStatus :: (Int -> f Int) -> CreateGroupResponse -> f CreateGroupResponse
createGroupResponse_httpStatus = (CreateGroupResponse -> Int)
-> (CreateGroupResponse -> Int -> CreateGroupResponse)
-> Lens CreateGroupResponse CreateGroupResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateGroupResponse' :: CreateGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateGroupResponse
s@CreateGroupResponse' {} Int
a -> CreateGroupResponse
s {$sel:httpStatus:CreateGroupResponse' :: Int
httpStatus = Int
a} :: CreateGroupResponse)
instance Prelude.NFData CreateGroupResponse