{-# 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.Lens as Lens
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
(DisassociateAttributeGroup -> DisassociateAttributeGroup -> Bool)
-> (DisassociateAttributeGroup
-> DisassociateAttributeGroup -> Bool)
-> Eq DisassociateAttributeGroup
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]
(Int -> ReadS DisassociateAttributeGroup)
-> ReadS [DisassociateAttributeGroup]
-> ReadPrec DisassociateAttributeGroup
-> ReadPrec [DisassociateAttributeGroup]
-> Read 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
(Int -> DisassociateAttributeGroup -> ShowS)
-> (DisassociateAttributeGroup -> String)
-> ([DisassociateAttributeGroup] -> ShowS)
-> Show DisassociateAttributeGroup
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.
DisassociateAttributeGroup -> Rep DisassociateAttributeGroup x)
-> (forall x.
Rep DisassociateAttributeGroup x -> DisassociateAttributeGroup)
-> Generic DisassociateAttributeGroup
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' :: Text -> Text -> DisassociateAttributeGroup
DisassociateAttributeGroup'
{ $sel:application:DisassociateAttributeGroup' :: Text
application =
Text
pApplication_,
$sel:attributeGroup:DisassociateAttributeGroup' :: Text
attributeGroup = Text
pAttributeGroup_
}
disassociateAttributeGroup_application :: Lens.Lens' DisassociateAttributeGroup Prelude.Text
disassociateAttributeGroup_application :: (Text -> f Text)
-> DisassociateAttributeGroup -> f DisassociateAttributeGroup
disassociateAttributeGroup_application = (DisassociateAttributeGroup -> Text)
-> (DisassociateAttributeGroup
-> Text -> DisassociateAttributeGroup)
-> Lens
DisassociateAttributeGroup DisassociateAttributeGroup Text Text
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 :: (Text -> f Text)
-> DisassociateAttributeGroup -> f DisassociateAttributeGroup
disassociateAttributeGroup_attributeGroup = (DisassociateAttributeGroup -> Text)
-> (DisassociateAttributeGroup
-> Text -> DisassociateAttributeGroup)
-> Lens
DisassociateAttributeGroup DisassociateAttributeGroup Text Text
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 :: DisassociateAttributeGroup -> Request DisassociateAttributeGroup
request = Service
-> DisassociateAttributeGroup -> Request DisassociateAttributeGroup
forall a. ToRequest a => Service -> a -> Request a
Request.delete Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateAttributeGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateAttributeGroup)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse DisassociateAttributeGroup))
-> Logger
-> Service
-> Proxy DisassociateAttributeGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateAttributeGroup)))
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 -> Int -> DisassociateAttributeGroupResponse
DisassociateAttributeGroupResponse'
(Maybe Text
-> Maybe Text -> Int -> DisassociateAttributeGroupResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Int -> DisassociateAttributeGroupResponse)
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
"applicationArn")
Either
String (Maybe Text -> Int -> DisassociateAttributeGroupResponse)
-> Either String (Maybe Text)
-> Either String (Int -> DisassociateAttributeGroupResponse)
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
"attributeGroupArn")
Either String (Int -> DisassociateAttributeGroupResponse)
-> Either String Int
-> Either String DisassociateAttributeGroupResponse
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 DisassociateAttributeGroup
instance Prelude.NFData DisassociateAttributeGroup
instance Core.ToHeaders DisassociateAttributeGroup where
toHeaders :: DisassociateAttributeGroup -> ResponseHeaders
toHeaders =
ResponseHeaders -> DisassociateAttributeGroup -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Core.ToPath DisassociateAttributeGroup where
toPath :: DisassociateAttributeGroup -> ByteString
toPath DisassociateAttributeGroup' {Text
attributeGroup :: Text
application :: Text
$sel:attributeGroup:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
$sel:application:DisassociateAttributeGroup' :: DisassociateAttributeGroup -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/applications/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
application,
ByteString
"/attribute-groups/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
attributeGroup
]
instance Core.ToQuery DisassociateAttributeGroup where
toQuery :: DisassociateAttributeGroup -> QueryString
toQuery = QueryString -> DisassociateAttributeGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(DisassociateAttributeGroupResponse
-> DisassociateAttributeGroupResponse -> Bool)
-> (DisassociateAttributeGroupResponse
-> DisassociateAttributeGroupResponse -> Bool)
-> Eq DisassociateAttributeGroupResponse
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]
(Int -> ReadS DisassociateAttributeGroupResponse)
-> ReadS [DisassociateAttributeGroupResponse]
-> ReadPrec DisassociateAttributeGroupResponse
-> ReadPrec [DisassociateAttributeGroupResponse]
-> Read 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
(Int -> DisassociateAttributeGroupResponse -> ShowS)
-> (DisassociateAttributeGroupResponse -> String)
-> ([DisassociateAttributeGroupResponse] -> ShowS)
-> Show DisassociateAttributeGroupResponse
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.
DisassociateAttributeGroupResponse
-> Rep DisassociateAttributeGroupResponse x)
-> (forall x.
Rep DisassociateAttributeGroupResponse x
-> DisassociateAttributeGroupResponse)
-> Generic DisassociateAttributeGroupResponse
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' :: Maybe Text
-> Maybe Text -> Int -> DisassociateAttributeGroupResponse
DisassociateAttributeGroupResponse'
{ $sel:applicationArn:DisassociateAttributeGroupResponse' :: Maybe Text
applicationArn =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attributeGroupArn:DisassociateAttributeGroupResponse' :: Maybe Text
attributeGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:DisassociateAttributeGroupResponse' :: Int
httpStatus = Int
pHttpStatus_
}
disassociateAttributeGroupResponse_applicationArn :: Lens.Lens' DisassociateAttributeGroupResponse (Prelude.Maybe Prelude.Text)
disassociateAttributeGroupResponse_applicationArn :: (Maybe Text -> f (Maybe Text))
-> DisassociateAttributeGroupResponse
-> f DisassociateAttributeGroupResponse
disassociateAttributeGroupResponse_applicationArn = (DisassociateAttributeGroupResponse -> Maybe Text)
-> (DisassociateAttributeGroupResponse
-> Maybe Text -> DisassociateAttributeGroupResponse)
-> Lens
DisassociateAttributeGroupResponse
DisassociateAttributeGroupResponse
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> DisassociateAttributeGroupResponse
-> f DisassociateAttributeGroupResponse
disassociateAttributeGroupResponse_attributeGroupArn = (DisassociateAttributeGroupResponse -> Maybe Text)
-> (DisassociateAttributeGroupResponse
-> Maybe Text -> DisassociateAttributeGroupResponse)
-> Lens
DisassociateAttributeGroupResponse
DisassociateAttributeGroupResponse
(Maybe Text)
(Maybe Text)
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 :: (Int -> f Int)
-> DisassociateAttributeGroupResponse
-> f DisassociateAttributeGroupResponse
disassociateAttributeGroupResponse_httpStatus = (DisassociateAttributeGroupResponse -> Int)
-> (DisassociateAttributeGroupResponse
-> Int -> DisassociateAttributeGroupResponse)
-> Lens
DisassociateAttributeGroupResponse
DisassociateAttributeGroupResponse
Int
Int
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