{-# 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.IAM.UpdateGroup
(
UpdateGroup (..),
newUpdateGroup,
updateGroup_newGroupName,
updateGroup_newPath,
updateGroup_groupName,
UpdateGroupResponse (..),
newUpdateGroupResponse,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.IAM.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data UpdateGroup = UpdateGroup'
{
UpdateGroup -> Maybe Text
newGroupName' :: Prelude.Maybe Prelude.Text,
UpdateGroup -> Maybe Text
newPath' :: Prelude.Maybe Prelude.Text,
UpdateGroup -> Text
groupName :: Prelude.Text
}
deriving (UpdateGroup -> UpdateGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGroup -> UpdateGroup -> Bool
$c/= :: UpdateGroup -> UpdateGroup -> Bool
== :: UpdateGroup -> UpdateGroup -> Bool
$c== :: UpdateGroup -> UpdateGroup -> Bool
Prelude.Eq, ReadPrec [UpdateGroup]
ReadPrec UpdateGroup
Int -> ReadS UpdateGroup
ReadS [UpdateGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGroup]
$creadListPrec :: ReadPrec [UpdateGroup]
readPrec :: ReadPrec UpdateGroup
$creadPrec :: ReadPrec UpdateGroup
readList :: ReadS [UpdateGroup]
$creadList :: ReadS [UpdateGroup]
readsPrec :: Int -> ReadS UpdateGroup
$creadsPrec :: Int -> ReadS UpdateGroup
Prelude.Read, Int -> UpdateGroup -> ShowS
[UpdateGroup] -> ShowS
UpdateGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGroup] -> ShowS
$cshowList :: [UpdateGroup] -> ShowS
show :: UpdateGroup -> String
$cshow :: UpdateGroup -> String
showsPrec :: Int -> UpdateGroup -> ShowS
$cshowsPrec :: Int -> UpdateGroup -> ShowS
Prelude.Show, forall x. Rep UpdateGroup x -> UpdateGroup
forall x. UpdateGroup -> Rep UpdateGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateGroup x -> UpdateGroup
$cfrom :: forall x. UpdateGroup -> Rep UpdateGroup x
Prelude.Generic)
newUpdateGroup ::
Prelude.Text ->
UpdateGroup
newUpdateGroup :: Text -> UpdateGroup
newUpdateGroup Text
pGroupName_ =
UpdateGroup'
{ $sel:newGroupName':UpdateGroup' :: Maybe Text
newGroupName' = forall a. Maybe a
Prelude.Nothing,
$sel:newPath':UpdateGroup' :: Maybe Text
newPath' = forall a. Maybe a
Prelude.Nothing,
$sel:groupName:UpdateGroup' :: Text
groupName = Text
pGroupName_
}
updateGroup_newGroupName :: Lens.Lens' UpdateGroup (Prelude.Maybe Prelude.Text)
updateGroup_newGroupName :: Lens' UpdateGroup (Maybe Text)
updateGroup_newGroupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGroup' {Maybe Text
newGroupName' :: Maybe Text
$sel:newGroupName':UpdateGroup' :: UpdateGroup -> Maybe Text
newGroupName'} -> Maybe Text
newGroupName') (\s :: UpdateGroup
s@UpdateGroup' {} Maybe Text
a -> UpdateGroup
s {$sel:newGroupName':UpdateGroup' :: Maybe Text
newGroupName' = Maybe Text
a} :: UpdateGroup)
updateGroup_newPath :: Lens.Lens' UpdateGroup (Prelude.Maybe Prelude.Text)
updateGroup_newPath :: Lens' UpdateGroup (Maybe Text)
updateGroup_newPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGroup' {Maybe Text
newPath' :: Maybe Text
$sel:newPath':UpdateGroup' :: UpdateGroup -> Maybe Text
newPath'} -> Maybe Text
newPath') (\s :: UpdateGroup
s@UpdateGroup' {} Maybe Text
a -> UpdateGroup
s {$sel:newPath':UpdateGroup' :: Maybe Text
newPath' = Maybe Text
a} :: UpdateGroup)
updateGroup_groupName :: Lens.Lens' UpdateGroup Prelude.Text
updateGroup_groupName :: Lens' UpdateGroup Text
updateGroup_groupName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateGroup' {Text
groupName :: Text
$sel:groupName:UpdateGroup' :: UpdateGroup -> Text
groupName} -> Text
groupName) (\s :: UpdateGroup
s@UpdateGroup' {} Text
a -> UpdateGroup
s {$sel:groupName:UpdateGroup' :: Text
groupName = Text
a} :: UpdateGroup)
instance Core.AWSRequest UpdateGroup where
type AWSResponse UpdateGroup = UpdateGroupResponse
request :: (Service -> Service) -> UpdateGroup -> Request UpdateGroup
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse UpdateGroup)))
response = forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull UpdateGroupResponse
UpdateGroupResponse'
instance Prelude.Hashable UpdateGroup where
hashWithSalt :: Int -> UpdateGroup -> Int
hashWithSalt Int
_salt UpdateGroup' {Maybe Text
Text
groupName :: Text
newPath' :: Maybe Text
newGroupName' :: Maybe Text
$sel:groupName:UpdateGroup' :: UpdateGroup -> Text
$sel:newPath':UpdateGroup' :: UpdateGroup -> Maybe Text
$sel:newGroupName':UpdateGroup' :: UpdateGroup -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
newGroupName'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
newPath'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
groupName
instance Prelude.NFData UpdateGroup where
rnf :: UpdateGroup -> ()
rnf UpdateGroup' {Maybe Text
Text
groupName :: Text
newPath' :: Maybe Text
newGroupName' :: Maybe Text
$sel:groupName:UpdateGroup' :: UpdateGroup -> Text
$sel:newPath':UpdateGroup' :: UpdateGroup -> Maybe Text
$sel:newGroupName':UpdateGroup' :: UpdateGroup -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
newGroupName'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
newPath'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
groupName
instance Data.ToHeaders UpdateGroup where
toHeaders :: UpdateGroup -> [Header]
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath UpdateGroup where
toPath :: UpdateGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery UpdateGroup where
toQuery :: UpdateGroup -> QueryString
toQuery UpdateGroup' {Maybe Text
Text
groupName :: Text
newPath' :: Maybe Text
newGroupName' :: Maybe Text
$sel:groupName:UpdateGroup' :: UpdateGroup -> Text
$sel:newPath':UpdateGroup' :: UpdateGroup -> Maybe Text
$sel:newGroupName':UpdateGroup' :: UpdateGroup -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"UpdateGroup" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-08" :: Prelude.ByteString),
ByteString
"NewGroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
newGroupName',
ByteString
"NewPath" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
newPath',
ByteString
"GroupName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
groupName
]
data UpdateGroupResponse = UpdateGroupResponse'
{
}
deriving (UpdateGroupResponse -> UpdateGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateGroupResponse -> UpdateGroupResponse -> Bool
$c/= :: UpdateGroupResponse -> UpdateGroupResponse -> Bool
== :: UpdateGroupResponse -> UpdateGroupResponse -> Bool
$c== :: UpdateGroupResponse -> UpdateGroupResponse -> Bool
Prelude.Eq, ReadPrec [UpdateGroupResponse]
ReadPrec UpdateGroupResponse
Int -> ReadS UpdateGroupResponse
ReadS [UpdateGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateGroupResponse]
$creadListPrec :: ReadPrec [UpdateGroupResponse]
readPrec :: ReadPrec UpdateGroupResponse
$creadPrec :: ReadPrec UpdateGroupResponse
readList :: ReadS [UpdateGroupResponse]
$creadList :: ReadS [UpdateGroupResponse]
readsPrec :: Int -> ReadS UpdateGroupResponse
$creadsPrec :: Int -> ReadS UpdateGroupResponse
Prelude.Read, Int -> UpdateGroupResponse -> ShowS
[UpdateGroupResponse] -> ShowS
UpdateGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateGroupResponse] -> ShowS
$cshowList :: [UpdateGroupResponse] -> ShowS
show :: UpdateGroupResponse -> String
$cshow :: UpdateGroupResponse -> String
showsPrec :: Int -> UpdateGroupResponse -> ShowS
$cshowsPrec :: Int -> UpdateGroupResponse -> ShowS
Prelude.Show, forall x. Rep UpdateGroupResponse x -> UpdateGroupResponse
forall x. UpdateGroupResponse -> Rep UpdateGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateGroupResponse x -> UpdateGroupResponse
$cfrom :: forall x. UpdateGroupResponse -> Rep UpdateGroupResponse x
Prelude.Generic)
newUpdateGroupResponse ::
UpdateGroupResponse
newUpdateGroupResponse :: UpdateGroupResponse
newUpdateGroupResponse = UpdateGroupResponse
UpdateGroupResponse'
instance Prelude.NFData UpdateGroupResponse where
rnf :: UpdateGroupResponse -> ()
rnf UpdateGroupResponse
_ = ()