{-# 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.MediaConnect.RemoveFlowOutput
(
RemoveFlowOutput (..),
newRemoveFlowOutput,
removeFlowOutput_flowArn,
removeFlowOutput_outputArn,
RemoveFlowOutputResponse (..),
newRemoveFlowOutputResponse,
removeFlowOutputResponse_flowArn,
removeFlowOutputResponse_outputArn,
removeFlowOutputResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.MediaConnect.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data RemoveFlowOutput = RemoveFlowOutput'
{
RemoveFlowOutput -> Text
flowArn :: Prelude.Text,
RemoveFlowOutput -> Text
outputArn :: Prelude.Text
}
deriving (RemoveFlowOutput -> RemoveFlowOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveFlowOutput -> RemoveFlowOutput -> Bool
$c/= :: RemoveFlowOutput -> RemoveFlowOutput -> Bool
== :: RemoveFlowOutput -> RemoveFlowOutput -> Bool
$c== :: RemoveFlowOutput -> RemoveFlowOutput -> Bool
Prelude.Eq, ReadPrec [RemoveFlowOutput]
ReadPrec RemoveFlowOutput
Int -> ReadS RemoveFlowOutput
ReadS [RemoveFlowOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveFlowOutput]
$creadListPrec :: ReadPrec [RemoveFlowOutput]
readPrec :: ReadPrec RemoveFlowOutput
$creadPrec :: ReadPrec RemoveFlowOutput
readList :: ReadS [RemoveFlowOutput]
$creadList :: ReadS [RemoveFlowOutput]
readsPrec :: Int -> ReadS RemoveFlowOutput
$creadsPrec :: Int -> ReadS RemoveFlowOutput
Prelude.Read, Int -> RemoveFlowOutput -> ShowS
[RemoveFlowOutput] -> ShowS
RemoveFlowOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveFlowOutput] -> ShowS
$cshowList :: [RemoveFlowOutput] -> ShowS
show :: RemoveFlowOutput -> String
$cshow :: RemoveFlowOutput -> String
showsPrec :: Int -> RemoveFlowOutput -> ShowS
$cshowsPrec :: Int -> RemoveFlowOutput -> ShowS
Prelude.Show, forall x. Rep RemoveFlowOutput x -> RemoveFlowOutput
forall x. RemoveFlowOutput -> Rep RemoveFlowOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RemoveFlowOutput x -> RemoveFlowOutput
$cfrom :: forall x. RemoveFlowOutput -> Rep RemoveFlowOutput x
Prelude.Generic)
newRemoveFlowOutput ::
Prelude.Text ->
Prelude.Text ->
RemoveFlowOutput
newRemoveFlowOutput :: Text -> Text -> RemoveFlowOutput
newRemoveFlowOutput Text
pFlowArn_ Text
pOutputArn_ =
RemoveFlowOutput'
{ $sel:flowArn:RemoveFlowOutput' :: Text
flowArn = Text
pFlowArn_,
$sel:outputArn:RemoveFlowOutput' :: Text
outputArn = Text
pOutputArn_
}
removeFlowOutput_flowArn :: Lens.Lens' RemoveFlowOutput Prelude.Text
removeFlowOutput_flowArn :: Lens' RemoveFlowOutput Text
removeFlowOutput_flowArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowOutput' {Text
flowArn :: Text
$sel:flowArn:RemoveFlowOutput' :: RemoveFlowOutput -> Text
flowArn} -> Text
flowArn) (\s :: RemoveFlowOutput
s@RemoveFlowOutput' {} Text
a -> RemoveFlowOutput
s {$sel:flowArn:RemoveFlowOutput' :: Text
flowArn = Text
a} :: RemoveFlowOutput)
removeFlowOutput_outputArn :: Lens.Lens' RemoveFlowOutput Prelude.Text
removeFlowOutput_outputArn :: Lens' RemoveFlowOutput Text
removeFlowOutput_outputArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowOutput' {Text
outputArn :: Text
$sel:outputArn:RemoveFlowOutput' :: RemoveFlowOutput -> Text
outputArn} -> Text
outputArn) (\s :: RemoveFlowOutput
s@RemoveFlowOutput' {} Text
a -> RemoveFlowOutput
s {$sel:outputArn:RemoveFlowOutput' :: Text
outputArn = Text
a} :: RemoveFlowOutput)
instance Core.AWSRequest RemoveFlowOutput where
type
AWSResponse RemoveFlowOutput =
RemoveFlowOutputResponse
request :: (Service -> Service)
-> RemoveFlowOutput -> Request RemoveFlowOutput
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 RemoveFlowOutput
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse RemoveFlowOutput)))
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 -> RemoveFlowOutputResponse
RemoveFlowOutputResponse'
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
"flowArn")
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
"outputArn")
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 RemoveFlowOutput where
hashWithSalt :: Int -> RemoveFlowOutput -> Int
hashWithSalt Int
_salt RemoveFlowOutput' {Text
outputArn :: Text
flowArn :: Text
$sel:outputArn:RemoveFlowOutput' :: RemoveFlowOutput -> Text
$sel:flowArn:RemoveFlowOutput' :: RemoveFlowOutput -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
flowArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
outputArn
instance Prelude.NFData RemoveFlowOutput where
rnf :: RemoveFlowOutput -> ()
rnf RemoveFlowOutput' {Text
outputArn :: Text
flowArn :: Text
$sel:outputArn:RemoveFlowOutput' :: RemoveFlowOutput -> Text
$sel:flowArn:RemoveFlowOutput' :: RemoveFlowOutput -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
flowArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
outputArn
instance Data.ToHeaders RemoveFlowOutput where
toHeaders :: RemoveFlowOutput -> 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 RemoveFlowOutput where
toPath :: RemoveFlowOutput -> ByteString
toPath RemoveFlowOutput' {Text
outputArn :: Text
flowArn :: Text
$sel:outputArn:RemoveFlowOutput' :: RemoveFlowOutput -> Text
$sel:flowArn:RemoveFlowOutput' :: RemoveFlowOutput -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v1/flows/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
flowArn,
ByteString
"/outputs/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
outputArn
]
instance Data.ToQuery RemoveFlowOutput where
toQuery :: RemoveFlowOutput -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data RemoveFlowOutputResponse = RemoveFlowOutputResponse'
{
RemoveFlowOutputResponse -> Maybe Text
flowArn :: Prelude.Maybe Prelude.Text,
RemoveFlowOutputResponse -> Maybe Text
outputArn :: Prelude.Maybe Prelude.Text,
RemoveFlowOutputResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RemoveFlowOutputResponse -> RemoveFlowOutputResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveFlowOutputResponse -> RemoveFlowOutputResponse -> Bool
$c/= :: RemoveFlowOutputResponse -> RemoveFlowOutputResponse -> Bool
== :: RemoveFlowOutputResponse -> RemoveFlowOutputResponse -> Bool
$c== :: RemoveFlowOutputResponse -> RemoveFlowOutputResponse -> Bool
Prelude.Eq, ReadPrec [RemoveFlowOutputResponse]
ReadPrec RemoveFlowOutputResponse
Int -> ReadS RemoveFlowOutputResponse
ReadS [RemoveFlowOutputResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveFlowOutputResponse]
$creadListPrec :: ReadPrec [RemoveFlowOutputResponse]
readPrec :: ReadPrec RemoveFlowOutputResponse
$creadPrec :: ReadPrec RemoveFlowOutputResponse
readList :: ReadS [RemoveFlowOutputResponse]
$creadList :: ReadS [RemoveFlowOutputResponse]
readsPrec :: Int -> ReadS RemoveFlowOutputResponse
$creadsPrec :: Int -> ReadS RemoveFlowOutputResponse
Prelude.Read, Int -> RemoveFlowOutputResponse -> ShowS
[RemoveFlowOutputResponse] -> ShowS
RemoveFlowOutputResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveFlowOutputResponse] -> ShowS
$cshowList :: [RemoveFlowOutputResponse] -> ShowS
show :: RemoveFlowOutputResponse -> String
$cshow :: RemoveFlowOutputResponse -> String
showsPrec :: Int -> RemoveFlowOutputResponse -> ShowS
$cshowsPrec :: Int -> RemoveFlowOutputResponse -> ShowS
Prelude.Show, forall x.
Rep RemoveFlowOutputResponse x -> RemoveFlowOutputResponse
forall x.
RemoveFlowOutputResponse -> Rep RemoveFlowOutputResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveFlowOutputResponse x -> RemoveFlowOutputResponse
$cfrom :: forall x.
RemoveFlowOutputResponse -> Rep RemoveFlowOutputResponse x
Prelude.Generic)
newRemoveFlowOutputResponse ::
Prelude.Int ->
RemoveFlowOutputResponse
newRemoveFlowOutputResponse :: Int -> RemoveFlowOutputResponse
newRemoveFlowOutputResponse Int
pHttpStatus_ =
RemoveFlowOutputResponse'
{ $sel:flowArn:RemoveFlowOutputResponse' :: Maybe Text
flowArn =
forall a. Maybe a
Prelude.Nothing,
$sel:outputArn:RemoveFlowOutputResponse' :: Maybe Text
outputArn = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RemoveFlowOutputResponse' :: Int
httpStatus = Int
pHttpStatus_
}
removeFlowOutputResponse_flowArn :: Lens.Lens' RemoveFlowOutputResponse (Prelude.Maybe Prelude.Text)
removeFlowOutputResponse_flowArn :: Lens' RemoveFlowOutputResponse (Maybe Text)
removeFlowOutputResponse_flowArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowOutputResponse' {Maybe Text
flowArn :: Maybe Text
$sel:flowArn:RemoveFlowOutputResponse' :: RemoveFlowOutputResponse -> Maybe Text
flowArn} -> Maybe Text
flowArn) (\s :: RemoveFlowOutputResponse
s@RemoveFlowOutputResponse' {} Maybe Text
a -> RemoveFlowOutputResponse
s {$sel:flowArn:RemoveFlowOutputResponse' :: Maybe Text
flowArn = Maybe Text
a} :: RemoveFlowOutputResponse)
removeFlowOutputResponse_outputArn :: Lens.Lens' RemoveFlowOutputResponse (Prelude.Maybe Prelude.Text)
removeFlowOutputResponse_outputArn :: Lens' RemoveFlowOutputResponse (Maybe Text)
removeFlowOutputResponse_outputArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowOutputResponse' {Maybe Text
outputArn :: Maybe Text
$sel:outputArn:RemoveFlowOutputResponse' :: RemoveFlowOutputResponse -> Maybe Text
outputArn} -> Maybe Text
outputArn) (\s :: RemoveFlowOutputResponse
s@RemoveFlowOutputResponse' {} Maybe Text
a -> RemoveFlowOutputResponse
s {$sel:outputArn:RemoveFlowOutputResponse' :: Maybe Text
outputArn = Maybe Text
a} :: RemoveFlowOutputResponse)
removeFlowOutputResponse_httpStatus :: Lens.Lens' RemoveFlowOutputResponse Prelude.Int
removeFlowOutputResponse_httpStatus :: Lens' RemoveFlowOutputResponse Int
removeFlowOutputResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowOutputResponse' {Int
httpStatus :: Int
$sel:httpStatus:RemoveFlowOutputResponse' :: RemoveFlowOutputResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RemoveFlowOutputResponse
s@RemoveFlowOutputResponse' {} Int
a -> RemoveFlowOutputResponse
s {$sel:httpStatus:RemoveFlowOutputResponse' :: Int
httpStatus = Int
a} :: RemoveFlowOutputResponse)
instance Prelude.NFData RemoveFlowOutputResponse where
rnf :: RemoveFlowOutputResponse -> ()
rnf RemoveFlowOutputResponse' {Int
Maybe Text
httpStatus :: Int
outputArn :: Maybe Text
flowArn :: Maybe Text
$sel:httpStatus:RemoveFlowOutputResponse' :: RemoveFlowOutputResponse -> Int
$sel:outputArn:RemoveFlowOutputResponse' :: RemoveFlowOutputResponse -> Maybe Text
$sel:flowArn:RemoveFlowOutputResponse' :: RemoveFlowOutputResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
flowArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
outputArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus