{-# 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.ServiceCatalogAppRegistry.DisassociateAttributeGroup
(
DisassociateAttributeGroup (..),
newDisassociateAttributeGroup,
disassociateAttributeGroup_application,
disassociateAttributeGroup_attributeGroup,
DisassociateAttributeGroupResponse (..),
newDisassociateAttributeGroupResponse,
disassociateAttributeGroupResponse_applicationArn,
disassociateAttributeGroupResponse_attributeGroupArn,
disassociateAttributeGroupResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
import Amazonka.ServiceCatalogAppRegistry.Types
data DisassociateAttributeGroup = DisassociateAttributeGroup'
{
DisassociateAttributeGroup -> Text
application :: Prelude.Text,
DisassociateAttributeGroup -> Text
attributeGroup :: Prelude.Text
}
deriving (DisassociateAttributeGroup -> DisassociateAttributeGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateAttributeGroup -> DisassociateAttributeGroup -> Bool
$c/= :: DisassociateAttributeGroup -> DisassociateAttributeGroup -> Bool
== :: DisassociateAttributeGroup -> DisassociateAttributeGroup -> Bool
$c== :: DisassociateAttributeGroup -> DisassociateAttributeGroup -> Bool
Prelude.Eq, ReadPrec [DisassociateAttributeGroup]
ReadPrec DisassociateAttributeGroup
Int -> ReadS DisassociateAttributeGroup
ReadS [DisassociateAttributeGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateAttributeGroup]
$creadListPrec :: ReadPrec [DisassociateAttributeGroup]
readPrec :: ReadPrec DisassociateAttributeGroup
$creadPrec :: ReadPrec DisassociateAttributeGroup
readList :: ReadS [DisassociateAttributeGroup]
$creadList :: ReadS [DisassociateAttributeGroup]
readsPrec :: Int -> ReadS DisassociateAttributeGroup
$creadsPrec :: Int -> ReadS DisassociateAttributeGroup
Prelude.Read, Int -> DisassociateAttributeGroup -> ShowS
[DisassociateAttributeGroup] -> ShowS
DisassociateAttributeGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateAttributeGroup] -> ShowS
$cshowList :: [DisassociateAttributeGroup] -> ShowS
show :: DisassociateAttributeGroup -> String
$cshow :: DisassociateAttributeGroup -> String
showsPrec :: Int -> DisassociateAttributeGroup -> ShowS
$cshowsPrec :: Int -> DisassociateAttributeGroup -> ShowS
Prelude.Show, forall x.
Rep DisassociateAttributeGroup x -> DisassociateAttributeGroup
forall x.
DisassociateAttributeGroup -> Rep DisassociateAttributeGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateAttributeGroup x -> DisassociateAttributeGroup
$cfrom :: forall x.
DisassociateAttributeGroup -> Rep DisassociateAttributeGroup x
Prelude.Generic)
newDisassociateAttributeGroup ::
Prelude.Text ->
Prelude.Text ->
DisassociateAttributeGroup
newDisassociateAttributeGroup :: Text -> Text -> DisassociateAttributeGroup
newDisassociateAttributeGroup
Text
pApplication_
Text
pAttributeGroup_ =
DisassociateAttributeGroup'
{ $sel:application:DisassociateAttributeGroup' :: Text
application =
Text
pApplication_,
$sel:attributeGroup:DisassociateAttributeGroup' :: Text
attributeGroup = Text
pAttributeGroup_
}
disassociateAttributeGroup_application :: Lens.Lens' DisassociateAttributeGroup Prelude.Text
disassociateAttributeGroup_application :: Lens' DisassociateAttributeGroup Text
disassociateAttributeGroup_application = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateAttributeGroup' {Text
application :: Text
$sel:application:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
application} -> Text
application) (\s :: DisassociateAttributeGroup
s@DisassociateAttributeGroup' {} Text
a -> DisassociateAttributeGroup
s {$sel:application:DisassociateAttributeGroup' :: Text
application = Text
a} :: DisassociateAttributeGroup)
disassociateAttributeGroup_attributeGroup :: Lens.Lens' DisassociateAttributeGroup Prelude.Text
disassociateAttributeGroup_attributeGroup :: Lens' DisassociateAttributeGroup Text
disassociateAttributeGroup_attributeGroup = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateAttributeGroup' {Text
attributeGroup :: Text
$sel:attributeGroup:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
attributeGroup} -> Text
attributeGroup) (\s :: DisassociateAttributeGroup
s@DisassociateAttributeGroup' {} Text
a -> DisassociateAttributeGroup
s {$sel:attributeGroup:DisassociateAttributeGroup' :: Text
attributeGroup = Text
a} :: DisassociateAttributeGroup)
instance Core.AWSRequest DisassociateAttributeGroup where
type
AWSResponse DisassociateAttributeGroup =
DisassociateAttributeGroupResponse
request :: (Service -> Service)
-> DisassociateAttributeGroup -> Request DisassociateAttributeGroup
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DisassociateAttributeGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateAttributeGroup)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text -> Int -> DisassociateAttributeGroupResponse
DisassociateAttributeGroupResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"applicationArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"attributeGroupArn")
forall (f :: * -> *) a b. Applicative f => 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 DisassociateAttributeGroup where
hashWithSalt :: Int -> DisassociateAttributeGroup -> Int
hashWithSalt Int
_salt DisassociateAttributeGroup' {Text
attributeGroup :: Text
application :: Text
$sel:attributeGroup:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
$sel:application:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
application
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
attributeGroup
instance Prelude.NFData DisassociateAttributeGroup where
rnf :: DisassociateAttributeGroup -> ()
rnf DisassociateAttributeGroup' {Text
attributeGroup :: Text
application :: Text
$sel:attributeGroup:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
$sel:application:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
application
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
attributeGroup
instance Data.ToHeaders DisassociateAttributeGroup where
toHeaders :: DisassociateAttributeGroup -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToPath DisassociateAttributeGroup where
toPath :: DisassociateAttributeGroup -> ByteString
toPath DisassociateAttributeGroup' {Text
attributeGroup :: Text
application :: Text
$sel:attributeGroup:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
$sel:application:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/applications/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
application,
ByteString
"/attribute-groups/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
attributeGroup
]
instance Data.ToQuery DisassociateAttributeGroup where
toQuery :: DisassociateAttributeGroup -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DisassociateAttributeGroupResponse = DisassociateAttributeGroupResponse'
{
DisassociateAttributeGroupResponse -> Maybe Text
applicationArn :: Prelude.Maybe Prelude.Text,
DisassociateAttributeGroupResponse -> Maybe Text
attributeGroupArn :: Prelude.Maybe Prelude.Text,
DisassociateAttributeGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateAttributeGroupResponse
-> DisassociateAttributeGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateAttributeGroupResponse
-> DisassociateAttributeGroupResponse -> Bool
$c/= :: DisassociateAttributeGroupResponse
-> DisassociateAttributeGroupResponse -> Bool
== :: DisassociateAttributeGroupResponse
-> DisassociateAttributeGroupResponse -> Bool
$c== :: DisassociateAttributeGroupResponse
-> DisassociateAttributeGroupResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateAttributeGroupResponse]
ReadPrec DisassociateAttributeGroupResponse
Int -> ReadS DisassociateAttributeGroupResponse
ReadS [DisassociateAttributeGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateAttributeGroupResponse]
$creadListPrec :: ReadPrec [DisassociateAttributeGroupResponse]
readPrec :: ReadPrec DisassociateAttributeGroupResponse
$creadPrec :: ReadPrec DisassociateAttributeGroupResponse
readList :: ReadS [DisassociateAttributeGroupResponse]
$creadList :: ReadS [DisassociateAttributeGroupResponse]
readsPrec :: Int -> ReadS DisassociateAttributeGroupResponse
$creadsPrec :: Int -> ReadS DisassociateAttributeGroupResponse
Prelude.Read, Int -> DisassociateAttributeGroupResponse -> ShowS
[DisassociateAttributeGroupResponse] -> ShowS
DisassociateAttributeGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateAttributeGroupResponse] -> ShowS
$cshowList :: [DisassociateAttributeGroupResponse] -> ShowS
show :: DisassociateAttributeGroupResponse -> String
$cshow :: DisassociateAttributeGroupResponse -> String
showsPrec :: Int -> DisassociateAttributeGroupResponse -> ShowS
$cshowsPrec :: Int -> DisassociateAttributeGroupResponse -> ShowS
Prelude.Show, forall x.
Rep DisassociateAttributeGroupResponse x
-> DisassociateAttributeGroupResponse
forall x.
DisassociateAttributeGroupResponse
-> Rep DisassociateAttributeGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateAttributeGroupResponse x
-> DisassociateAttributeGroupResponse
$cfrom :: forall x.
DisassociateAttributeGroupResponse
-> Rep DisassociateAttributeGroupResponse x
Prelude.Generic)
newDisassociateAttributeGroupResponse ::
Prelude.Int ->
DisassociateAttributeGroupResponse
newDisassociateAttributeGroupResponse :: Int -> DisassociateAttributeGroupResponse
newDisassociateAttributeGroupResponse Int
pHttpStatus_ =
DisassociateAttributeGroupResponse'
{ $sel:applicationArn:DisassociateAttributeGroupResponse' :: Maybe Text
applicationArn =
forall a. Maybe a
Prelude.Nothing,
$sel:attributeGroupArn:DisassociateAttributeGroupResponse' :: Maybe Text
attributeGroupArn = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DisassociateAttributeGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
disassociateAttributeGroupResponse_applicationArn :: Lens.Lens' DisassociateAttributeGroupResponse (Prelude.Maybe Prelude.Text)
disassociateAttributeGroupResponse_applicationArn :: Lens' DisassociateAttributeGroupResponse (Maybe Text)
disassociateAttributeGroupResponse_applicationArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateAttributeGroupResponse' {Maybe Text
applicationArn :: Maybe Text
$sel:applicationArn:DisassociateAttributeGroupResponse' :: DisassociateAttributeGroupResponse -> Maybe Text
applicationArn} -> Maybe Text
applicationArn) (\s :: DisassociateAttributeGroupResponse
s@DisassociateAttributeGroupResponse' {} Maybe Text
a -> DisassociateAttributeGroupResponse
s {$sel:applicationArn:DisassociateAttributeGroupResponse' :: Maybe Text
applicationArn = Maybe Text
a} :: DisassociateAttributeGroupResponse)
disassociateAttributeGroupResponse_attributeGroupArn :: Lens.Lens' DisassociateAttributeGroupResponse (Prelude.Maybe Prelude.Text)
disassociateAttributeGroupResponse_attributeGroupArn :: Lens' DisassociateAttributeGroupResponse (Maybe Text)
disassociateAttributeGroupResponse_attributeGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateAttributeGroupResponse' {Maybe Text
attributeGroupArn :: Maybe Text
$sel:attributeGroupArn:DisassociateAttributeGroupResponse' :: DisassociateAttributeGroupResponse -> Maybe Text
attributeGroupArn} -> Maybe Text
attributeGroupArn) (\s :: DisassociateAttributeGroupResponse
s@DisassociateAttributeGroupResponse' {} Maybe Text
a -> DisassociateAttributeGroupResponse
s {$sel:attributeGroupArn:DisassociateAttributeGroupResponse' :: Maybe Text
attributeGroupArn = Maybe Text
a} :: DisassociateAttributeGroupResponse)
disassociateAttributeGroupResponse_httpStatus :: Lens.Lens' DisassociateAttributeGroupResponse Prelude.Int
disassociateAttributeGroupResponse_httpStatus :: Lens' DisassociateAttributeGroupResponse Int
disassociateAttributeGroupResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateAttributeGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateAttributeGroupResponse' :: DisassociateAttributeGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateAttributeGroupResponse
s@DisassociateAttributeGroupResponse' {} Int
a -> DisassociateAttributeGroupResponse
s {$sel:httpStatus:DisassociateAttributeGroupResponse' :: Int
httpStatus = Int
a} :: DisassociateAttributeGroupResponse)
instance
Prelude.NFData
DisassociateAttributeGroupResponse
where
rnf :: DisassociateAttributeGroupResponse -> ()
rnf DisassociateAttributeGroupResponse' {Int
Maybe Text
httpStatus :: Int
attributeGroupArn :: Maybe Text
applicationArn :: Maybe Text
$sel:httpStatus:DisassociateAttributeGroupResponse' :: DisassociateAttributeGroupResponse -> Int
$sel:attributeGroupArn:DisassociateAttributeGroupResponse' :: DisassociateAttributeGroupResponse -> Maybe Text
$sel:applicationArn:DisassociateAttributeGroupResponse' :: DisassociateAttributeGroupResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
applicationArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
attributeGroupArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus