{-# 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.SSM.DisassociateOpsItemRelatedItem
(
DisassociateOpsItemRelatedItem (..),
newDisassociateOpsItemRelatedItem,
disassociateOpsItemRelatedItem_opsItemId,
disassociateOpsItemRelatedItem_associationId,
DisassociateOpsItemRelatedItemResponse (..),
newDisassociateOpsItemRelatedItemResponse,
disassociateOpsItemRelatedItemResponse_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.SSM.Types
data DisassociateOpsItemRelatedItem = DisassociateOpsItemRelatedItem'
{
DisassociateOpsItemRelatedItem -> Text
opsItemId :: Prelude.Text,
DisassociateOpsItemRelatedItem -> Text
associationId :: Prelude.Text
}
deriving (DisassociateOpsItemRelatedItem
-> DisassociateOpsItemRelatedItem -> Bool
(DisassociateOpsItemRelatedItem
-> DisassociateOpsItemRelatedItem -> Bool)
-> (DisassociateOpsItemRelatedItem
-> DisassociateOpsItemRelatedItem -> Bool)
-> Eq DisassociateOpsItemRelatedItem
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateOpsItemRelatedItem
-> DisassociateOpsItemRelatedItem -> Bool
$c/= :: DisassociateOpsItemRelatedItem
-> DisassociateOpsItemRelatedItem -> Bool
== :: DisassociateOpsItemRelatedItem
-> DisassociateOpsItemRelatedItem -> Bool
$c== :: DisassociateOpsItemRelatedItem
-> DisassociateOpsItemRelatedItem -> Bool
Prelude.Eq, ReadPrec [DisassociateOpsItemRelatedItem]
ReadPrec DisassociateOpsItemRelatedItem
Int -> ReadS DisassociateOpsItemRelatedItem
ReadS [DisassociateOpsItemRelatedItem]
(Int -> ReadS DisassociateOpsItemRelatedItem)
-> ReadS [DisassociateOpsItemRelatedItem]
-> ReadPrec DisassociateOpsItemRelatedItem
-> ReadPrec [DisassociateOpsItemRelatedItem]
-> Read DisassociateOpsItemRelatedItem
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateOpsItemRelatedItem]
$creadListPrec :: ReadPrec [DisassociateOpsItemRelatedItem]
readPrec :: ReadPrec DisassociateOpsItemRelatedItem
$creadPrec :: ReadPrec DisassociateOpsItemRelatedItem
readList :: ReadS [DisassociateOpsItemRelatedItem]
$creadList :: ReadS [DisassociateOpsItemRelatedItem]
readsPrec :: Int -> ReadS DisassociateOpsItemRelatedItem
$creadsPrec :: Int -> ReadS DisassociateOpsItemRelatedItem
Prelude.Read, Int -> DisassociateOpsItemRelatedItem -> ShowS
[DisassociateOpsItemRelatedItem] -> ShowS
DisassociateOpsItemRelatedItem -> String
(Int -> DisassociateOpsItemRelatedItem -> ShowS)
-> (DisassociateOpsItemRelatedItem -> String)
-> ([DisassociateOpsItemRelatedItem] -> ShowS)
-> Show DisassociateOpsItemRelatedItem
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateOpsItemRelatedItem] -> ShowS
$cshowList :: [DisassociateOpsItemRelatedItem] -> ShowS
show :: DisassociateOpsItemRelatedItem -> String
$cshow :: DisassociateOpsItemRelatedItem -> String
showsPrec :: Int -> DisassociateOpsItemRelatedItem -> ShowS
$cshowsPrec :: Int -> DisassociateOpsItemRelatedItem -> ShowS
Prelude.Show, (forall x.
DisassociateOpsItemRelatedItem
-> Rep DisassociateOpsItemRelatedItem x)
-> (forall x.
Rep DisassociateOpsItemRelatedItem x
-> DisassociateOpsItemRelatedItem)
-> Generic DisassociateOpsItemRelatedItem
forall x.
Rep DisassociateOpsItemRelatedItem x
-> DisassociateOpsItemRelatedItem
forall x.
DisassociateOpsItemRelatedItem
-> Rep DisassociateOpsItemRelatedItem x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateOpsItemRelatedItem x
-> DisassociateOpsItemRelatedItem
$cfrom :: forall x.
DisassociateOpsItemRelatedItem
-> Rep DisassociateOpsItemRelatedItem x
Prelude.Generic)
newDisassociateOpsItemRelatedItem ::
Prelude.Text ->
Prelude.Text ->
DisassociateOpsItemRelatedItem
newDisassociateOpsItemRelatedItem :: Text -> Text -> DisassociateOpsItemRelatedItem
newDisassociateOpsItemRelatedItem
Text
pOpsItemId_
Text
pAssociationId_ =
DisassociateOpsItemRelatedItem' :: Text -> Text -> DisassociateOpsItemRelatedItem
DisassociateOpsItemRelatedItem'
{ $sel:opsItemId:DisassociateOpsItemRelatedItem' :: Text
opsItemId =
Text
pOpsItemId_,
$sel:associationId:DisassociateOpsItemRelatedItem' :: Text
associationId = Text
pAssociationId_
}
disassociateOpsItemRelatedItem_opsItemId :: Lens.Lens' DisassociateOpsItemRelatedItem Prelude.Text
disassociateOpsItemRelatedItem_opsItemId :: (Text -> f Text)
-> DisassociateOpsItemRelatedItem
-> f DisassociateOpsItemRelatedItem
disassociateOpsItemRelatedItem_opsItemId = (DisassociateOpsItemRelatedItem -> Text)
-> (DisassociateOpsItemRelatedItem
-> Text -> DisassociateOpsItemRelatedItem)
-> Lens
DisassociateOpsItemRelatedItem
DisassociateOpsItemRelatedItem
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateOpsItemRelatedItem' {Text
opsItemId :: Text
$sel:opsItemId:DisassociateOpsItemRelatedItem' :: DisassociateOpsItemRelatedItem -> Text
opsItemId} -> Text
opsItemId) (\s :: DisassociateOpsItemRelatedItem
s@DisassociateOpsItemRelatedItem' {} Text
a -> DisassociateOpsItemRelatedItem
s {$sel:opsItemId:DisassociateOpsItemRelatedItem' :: Text
opsItemId = Text
a} :: DisassociateOpsItemRelatedItem)
disassociateOpsItemRelatedItem_associationId :: Lens.Lens' DisassociateOpsItemRelatedItem Prelude.Text
disassociateOpsItemRelatedItem_associationId :: (Text -> f Text)
-> DisassociateOpsItemRelatedItem
-> f DisassociateOpsItemRelatedItem
disassociateOpsItemRelatedItem_associationId = (DisassociateOpsItemRelatedItem -> Text)
-> (DisassociateOpsItemRelatedItem
-> Text -> DisassociateOpsItemRelatedItem)
-> Lens
DisassociateOpsItemRelatedItem
DisassociateOpsItemRelatedItem
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateOpsItemRelatedItem' {Text
associationId :: Text
$sel:associationId:DisassociateOpsItemRelatedItem' :: DisassociateOpsItemRelatedItem -> Text
associationId} -> Text
associationId) (\s :: DisassociateOpsItemRelatedItem
s@DisassociateOpsItemRelatedItem' {} Text
a -> DisassociateOpsItemRelatedItem
s {$sel:associationId:DisassociateOpsItemRelatedItem' :: Text
associationId = Text
a} :: DisassociateOpsItemRelatedItem)
instance
Core.AWSRequest
DisassociateOpsItemRelatedItem
where
type
AWSResponse DisassociateOpsItemRelatedItem =
DisassociateOpsItemRelatedItemResponse
request :: DisassociateOpsItemRelatedItem
-> Request DisassociateOpsItemRelatedItem
request = Service
-> DisassociateOpsItemRelatedItem
-> Request DisassociateOpsItemRelatedItem
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DisassociateOpsItemRelatedItem
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DisassociateOpsItemRelatedItem)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DisassociateOpsItemRelatedItem))
-> Logger
-> Service
-> Proxy DisassociateOpsItemRelatedItem
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse DisassociateOpsItemRelatedItem)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DisassociateOpsItemRelatedItemResponse
DisassociateOpsItemRelatedItemResponse'
(Int -> DisassociateOpsItemRelatedItemResponse)
-> Either String Int
-> Either String DisassociateOpsItemRelatedItemResponse
forall (f :: * -> *) a b. Functor 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
DisassociateOpsItemRelatedItem
instance
Prelude.NFData
DisassociateOpsItemRelatedItem
instance
Core.ToHeaders
DisassociateOpsItemRelatedItem
where
toHeaders :: DisassociateOpsItemRelatedItem -> ResponseHeaders
toHeaders =
ResponseHeaders
-> DisassociateOpsItemRelatedItem -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"AmazonSSM.DisassociateOpsItemRelatedItem" ::
Prelude.ByteString
),
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.ToJSON DisassociateOpsItemRelatedItem where
toJSON :: DisassociateOpsItemRelatedItem -> Value
toJSON DisassociateOpsItemRelatedItem' {Text
associationId :: Text
opsItemId :: Text
$sel:associationId:DisassociateOpsItemRelatedItem' :: DisassociateOpsItemRelatedItem -> Text
$sel:opsItemId:DisassociateOpsItemRelatedItem' :: DisassociateOpsItemRelatedItem -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"OpsItemId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
opsItemId),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"AssociationId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
associationId)
]
)
instance Core.ToPath DisassociateOpsItemRelatedItem where
toPath :: DisassociateOpsItemRelatedItem -> ByteString
toPath = ByteString -> DisassociateOpsItemRelatedItem -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DisassociateOpsItemRelatedItem where
toQuery :: DisassociateOpsItemRelatedItem -> QueryString
toQuery = QueryString -> DisassociateOpsItemRelatedItem -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DisassociateOpsItemRelatedItemResponse = DisassociateOpsItemRelatedItemResponse'
{
DisassociateOpsItemRelatedItemResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DisassociateOpsItemRelatedItemResponse
-> DisassociateOpsItemRelatedItemResponse -> Bool
(DisassociateOpsItemRelatedItemResponse
-> DisassociateOpsItemRelatedItemResponse -> Bool)
-> (DisassociateOpsItemRelatedItemResponse
-> DisassociateOpsItemRelatedItemResponse -> Bool)
-> Eq DisassociateOpsItemRelatedItemResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateOpsItemRelatedItemResponse
-> DisassociateOpsItemRelatedItemResponse -> Bool
$c/= :: DisassociateOpsItemRelatedItemResponse
-> DisassociateOpsItemRelatedItemResponse -> Bool
== :: DisassociateOpsItemRelatedItemResponse
-> DisassociateOpsItemRelatedItemResponse -> Bool
$c== :: DisassociateOpsItemRelatedItemResponse
-> DisassociateOpsItemRelatedItemResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateOpsItemRelatedItemResponse]
ReadPrec DisassociateOpsItemRelatedItemResponse
Int -> ReadS DisassociateOpsItemRelatedItemResponse
ReadS [DisassociateOpsItemRelatedItemResponse]
(Int -> ReadS DisassociateOpsItemRelatedItemResponse)
-> ReadS [DisassociateOpsItemRelatedItemResponse]
-> ReadPrec DisassociateOpsItemRelatedItemResponse
-> ReadPrec [DisassociateOpsItemRelatedItemResponse]
-> Read DisassociateOpsItemRelatedItemResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateOpsItemRelatedItemResponse]
$creadListPrec :: ReadPrec [DisassociateOpsItemRelatedItemResponse]
readPrec :: ReadPrec DisassociateOpsItemRelatedItemResponse
$creadPrec :: ReadPrec DisassociateOpsItemRelatedItemResponse
readList :: ReadS [DisassociateOpsItemRelatedItemResponse]
$creadList :: ReadS [DisassociateOpsItemRelatedItemResponse]
readsPrec :: Int -> ReadS DisassociateOpsItemRelatedItemResponse
$creadsPrec :: Int -> ReadS DisassociateOpsItemRelatedItemResponse
Prelude.Read, Int -> DisassociateOpsItemRelatedItemResponse -> ShowS
[DisassociateOpsItemRelatedItemResponse] -> ShowS
DisassociateOpsItemRelatedItemResponse -> String
(Int -> DisassociateOpsItemRelatedItemResponse -> ShowS)
-> (DisassociateOpsItemRelatedItemResponse -> String)
-> ([DisassociateOpsItemRelatedItemResponse] -> ShowS)
-> Show DisassociateOpsItemRelatedItemResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateOpsItemRelatedItemResponse] -> ShowS
$cshowList :: [DisassociateOpsItemRelatedItemResponse] -> ShowS
show :: DisassociateOpsItemRelatedItemResponse -> String
$cshow :: DisassociateOpsItemRelatedItemResponse -> String
showsPrec :: Int -> DisassociateOpsItemRelatedItemResponse -> ShowS
$cshowsPrec :: Int -> DisassociateOpsItemRelatedItemResponse -> ShowS
Prelude.Show, (forall x.
DisassociateOpsItemRelatedItemResponse
-> Rep DisassociateOpsItemRelatedItemResponse x)
-> (forall x.
Rep DisassociateOpsItemRelatedItemResponse x
-> DisassociateOpsItemRelatedItemResponse)
-> Generic DisassociateOpsItemRelatedItemResponse
forall x.
Rep DisassociateOpsItemRelatedItemResponse x
-> DisassociateOpsItemRelatedItemResponse
forall x.
DisassociateOpsItemRelatedItemResponse
-> Rep DisassociateOpsItemRelatedItemResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateOpsItemRelatedItemResponse x
-> DisassociateOpsItemRelatedItemResponse
$cfrom :: forall x.
DisassociateOpsItemRelatedItemResponse
-> Rep DisassociateOpsItemRelatedItemResponse x
Prelude.Generic)
newDisassociateOpsItemRelatedItemResponse ::
Prelude.Int ->
DisassociateOpsItemRelatedItemResponse
newDisassociateOpsItemRelatedItemResponse :: Int -> DisassociateOpsItemRelatedItemResponse
newDisassociateOpsItemRelatedItemResponse
Int
pHttpStatus_ =
DisassociateOpsItemRelatedItemResponse' :: Int -> DisassociateOpsItemRelatedItemResponse
DisassociateOpsItemRelatedItemResponse'
{ $sel:httpStatus:DisassociateOpsItemRelatedItemResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
disassociateOpsItemRelatedItemResponse_httpStatus :: Lens.Lens' DisassociateOpsItemRelatedItemResponse Prelude.Int
disassociateOpsItemRelatedItemResponse_httpStatus :: (Int -> f Int)
-> DisassociateOpsItemRelatedItemResponse
-> f DisassociateOpsItemRelatedItemResponse
disassociateOpsItemRelatedItemResponse_httpStatus = (DisassociateOpsItemRelatedItemResponse -> Int)
-> (DisassociateOpsItemRelatedItemResponse
-> Int -> DisassociateOpsItemRelatedItemResponse)
-> Lens
DisassociateOpsItemRelatedItemResponse
DisassociateOpsItemRelatedItemResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateOpsItemRelatedItemResponse' {Int
httpStatus :: Int
$sel:httpStatus:DisassociateOpsItemRelatedItemResponse' :: DisassociateOpsItemRelatedItemResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DisassociateOpsItemRelatedItemResponse
s@DisassociateOpsItemRelatedItemResponse' {} Int
a -> DisassociateOpsItemRelatedItemResponse
s {$sel:httpStatus:DisassociateOpsItemRelatedItemResponse' :: Int
httpStatus = Int
a} :: DisassociateOpsItemRelatedItemResponse)
instance
Prelude.NFData
DisassociateOpsItemRelatedItemResponse