{-# 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.RemoveFlowVpcInterface
(
RemoveFlowVpcInterface (..),
newRemoveFlowVpcInterface,
removeFlowVpcInterface_flowArn,
removeFlowVpcInterface_vpcInterfaceName,
RemoveFlowVpcInterfaceResponse (..),
newRemoveFlowVpcInterfaceResponse,
removeFlowVpcInterfaceResponse_flowArn,
removeFlowVpcInterfaceResponse_nonDeletedNetworkInterfaceIds,
removeFlowVpcInterfaceResponse_vpcInterfaceName,
removeFlowVpcInterfaceResponse_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 RemoveFlowVpcInterface = RemoveFlowVpcInterface'
{
RemoveFlowVpcInterface -> Text
flowArn :: Prelude.Text,
RemoveFlowVpcInterface -> Text
vpcInterfaceName :: Prelude.Text
}
deriving (RemoveFlowVpcInterface -> RemoveFlowVpcInterface -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveFlowVpcInterface -> RemoveFlowVpcInterface -> Bool
$c/= :: RemoveFlowVpcInterface -> RemoveFlowVpcInterface -> Bool
== :: RemoveFlowVpcInterface -> RemoveFlowVpcInterface -> Bool
$c== :: RemoveFlowVpcInterface -> RemoveFlowVpcInterface -> Bool
Prelude.Eq, ReadPrec [RemoveFlowVpcInterface]
ReadPrec RemoveFlowVpcInterface
Int -> ReadS RemoveFlowVpcInterface
ReadS [RemoveFlowVpcInterface]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveFlowVpcInterface]
$creadListPrec :: ReadPrec [RemoveFlowVpcInterface]
readPrec :: ReadPrec RemoveFlowVpcInterface
$creadPrec :: ReadPrec RemoveFlowVpcInterface
readList :: ReadS [RemoveFlowVpcInterface]
$creadList :: ReadS [RemoveFlowVpcInterface]
readsPrec :: Int -> ReadS RemoveFlowVpcInterface
$creadsPrec :: Int -> ReadS RemoveFlowVpcInterface
Prelude.Read, Int -> RemoveFlowVpcInterface -> ShowS
[RemoveFlowVpcInterface] -> ShowS
RemoveFlowVpcInterface -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveFlowVpcInterface] -> ShowS
$cshowList :: [RemoveFlowVpcInterface] -> ShowS
show :: RemoveFlowVpcInterface -> String
$cshow :: RemoveFlowVpcInterface -> String
showsPrec :: Int -> RemoveFlowVpcInterface -> ShowS
$cshowsPrec :: Int -> RemoveFlowVpcInterface -> ShowS
Prelude.Show, forall x. Rep RemoveFlowVpcInterface x -> RemoveFlowVpcInterface
forall x. RemoveFlowVpcInterface -> Rep RemoveFlowVpcInterface x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RemoveFlowVpcInterface x -> RemoveFlowVpcInterface
$cfrom :: forall x. RemoveFlowVpcInterface -> Rep RemoveFlowVpcInterface x
Prelude.Generic)
newRemoveFlowVpcInterface ::
Prelude.Text ->
Prelude.Text ->
RemoveFlowVpcInterface
newRemoveFlowVpcInterface :: Text -> Text -> RemoveFlowVpcInterface
newRemoveFlowVpcInterface
Text
pFlowArn_
Text
pVpcInterfaceName_ =
RemoveFlowVpcInterface'
{ $sel:flowArn:RemoveFlowVpcInterface' :: Text
flowArn = Text
pFlowArn_,
$sel:vpcInterfaceName:RemoveFlowVpcInterface' :: Text
vpcInterfaceName = Text
pVpcInterfaceName_
}
removeFlowVpcInterface_flowArn :: Lens.Lens' RemoveFlowVpcInterface Prelude.Text
removeFlowVpcInterface_flowArn :: Lens' RemoveFlowVpcInterface Text
removeFlowVpcInterface_flowArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowVpcInterface' {Text
flowArn :: Text
$sel:flowArn:RemoveFlowVpcInterface' :: RemoveFlowVpcInterface -> Text
flowArn} -> Text
flowArn) (\s :: RemoveFlowVpcInterface
s@RemoveFlowVpcInterface' {} Text
a -> RemoveFlowVpcInterface
s {$sel:flowArn:RemoveFlowVpcInterface' :: Text
flowArn = Text
a} :: RemoveFlowVpcInterface)
removeFlowVpcInterface_vpcInterfaceName :: Lens.Lens' RemoveFlowVpcInterface Prelude.Text
removeFlowVpcInterface_vpcInterfaceName :: Lens' RemoveFlowVpcInterface Text
removeFlowVpcInterface_vpcInterfaceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowVpcInterface' {Text
vpcInterfaceName :: Text
$sel:vpcInterfaceName:RemoveFlowVpcInterface' :: RemoveFlowVpcInterface -> Text
vpcInterfaceName} -> Text
vpcInterfaceName) (\s :: RemoveFlowVpcInterface
s@RemoveFlowVpcInterface' {} Text
a -> RemoveFlowVpcInterface
s {$sel:vpcInterfaceName:RemoveFlowVpcInterface' :: Text
vpcInterfaceName = Text
a} :: RemoveFlowVpcInterface)
instance Core.AWSRequest RemoveFlowVpcInterface where
type
AWSResponse RemoveFlowVpcInterface =
RemoveFlowVpcInterfaceResponse
request :: (Service -> Service)
-> RemoveFlowVpcInterface -> Request RemoveFlowVpcInterface
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 RemoveFlowVpcInterface
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse RemoveFlowVpcInterface)))
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]
-> Maybe Text
-> Int
-> RemoveFlowVpcInterfaceResponse
RemoveFlowVpcInterfaceResponse'
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
"nonDeletedNetworkInterfaceIds"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
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
"vpcInterfaceName")
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 RemoveFlowVpcInterface where
hashWithSalt :: Int -> RemoveFlowVpcInterface -> Int
hashWithSalt Int
_salt RemoveFlowVpcInterface' {Text
vpcInterfaceName :: Text
flowArn :: Text
$sel:vpcInterfaceName:RemoveFlowVpcInterface' :: RemoveFlowVpcInterface -> Text
$sel:flowArn:RemoveFlowVpcInterface' :: RemoveFlowVpcInterface -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
flowArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vpcInterfaceName
instance Prelude.NFData RemoveFlowVpcInterface where
rnf :: RemoveFlowVpcInterface -> ()
rnf RemoveFlowVpcInterface' {Text
vpcInterfaceName :: Text
flowArn :: Text
$sel:vpcInterfaceName:RemoveFlowVpcInterface' :: RemoveFlowVpcInterface -> Text
$sel:flowArn:RemoveFlowVpcInterface' :: RemoveFlowVpcInterface -> 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
vpcInterfaceName
instance Data.ToHeaders RemoveFlowVpcInterface where
toHeaders :: RemoveFlowVpcInterface -> 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 RemoveFlowVpcInterface where
toPath :: RemoveFlowVpcInterface -> ByteString
toPath RemoveFlowVpcInterface' {Text
vpcInterfaceName :: Text
flowArn :: Text
$sel:vpcInterfaceName:RemoveFlowVpcInterface' :: RemoveFlowVpcInterface -> Text
$sel:flowArn:RemoveFlowVpcInterface' :: RemoveFlowVpcInterface -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/v1/flows/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
flowArn,
ByteString
"/vpcInterfaces/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
vpcInterfaceName
]
instance Data.ToQuery RemoveFlowVpcInterface where
toQuery :: RemoveFlowVpcInterface -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data RemoveFlowVpcInterfaceResponse = RemoveFlowVpcInterfaceResponse'
{
RemoveFlowVpcInterfaceResponse -> Maybe Text
flowArn :: Prelude.Maybe Prelude.Text,
RemoveFlowVpcInterfaceResponse -> Maybe [Text]
nonDeletedNetworkInterfaceIds :: Prelude.Maybe [Prelude.Text],
RemoveFlowVpcInterfaceResponse -> Maybe Text
vpcInterfaceName :: Prelude.Maybe Prelude.Text,
RemoveFlowVpcInterfaceResponse -> Int
httpStatus :: Prelude.Int
}
deriving (RemoveFlowVpcInterfaceResponse
-> RemoveFlowVpcInterfaceResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RemoveFlowVpcInterfaceResponse
-> RemoveFlowVpcInterfaceResponse -> Bool
$c/= :: RemoveFlowVpcInterfaceResponse
-> RemoveFlowVpcInterfaceResponse -> Bool
== :: RemoveFlowVpcInterfaceResponse
-> RemoveFlowVpcInterfaceResponse -> Bool
$c== :: RemoveFlowVpcInterfaceResponse
-> RemoveFlowVpcInterfaceResponse -> Bool
Prelude.Eq, ReadPrec [RemoveFlowVpcInterfaceResponse]
ReadPrec RemoveFlowVpcInterfaceResponse
Int -> ReadS RemoveFlowVpcInterfaceResponse
ReadS [RemoveFlowVpcInterfaceResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RemoveFlowVpcInterfaceResponse]
$creadListPrec :: ReadPrec [RemoveFlowVpcInterfaceResponse]
readPrec :: ReadPrec RemoveFlowVpcInterfaceResponse
$creadPrec :: ReadPrec RemoveFlowVpcInterfaceResponse
readList :: ReadS [RemoveFlowVpcInterfaceResponse]
$creadList :: ReadS [RemoveFlowVpcInterfaceResponse]
readsPrec :: Int -> ReadS RemoveFlowVpcInterfaceResponse
$creadsPrec :: Int -> ReadS RemoveFlowVpcInterfaceResponse
Prelude.Read, Int -> RemoveFlowVpcInterfaceResponse -> ShowS
[RemoveFlowVpcInterfaceResponse] -> ShowS
RemoveFlowVpcInterfaceResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RemoveFlowVpcInterfaceResponse] -> ShowS
$cshowList :: [RemoveFlowVpcInterfaceResponse] -> ShowS
show :: RemoveFlowVpcInterfaceResponse -> String
$cshow :: RemoveFlowVpcInterfaceResponse -> String
showsPrec :: Int -> RemoveFlowVpcInterfaceResponse -> ShowS
$cshowsPrec :: Int -> RemoveFlowVpcInterfaceResponse -> ShowS
Prelude.Show, forall x.
Rep RemoveFlowVpcInterfaceResponse x
-> RemoveFlowVpcInterfaceResponse
forall x.
RemoveFlowVpcInterfaceResponse
-> Rep RemoveFlowVpcInterfaceResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep RemoveFlowVpcInterfaceResponse x
-> RemoveFlowVpcInterfaceResponse
$cfrom :: forall x.
RemoveFlowVpcInterfaceResponse
-> Rep RemoveFlowVpcInterfaceResponse x
Prelude.Generic)
newRemoveFlowVpcInterfaceResponse ::
Prelude.Int ->
RemoveFlowVpcInterfaceResponse
newRemoveFlowVpcInterfaceResponse :: Int -> RemoveFlowVpcInterfaceResponse
newRemoveFlowVpcInterfaceResponse Int
pHttpStatus_ =
RemoveFlowVpcInterfaceResponse'
{ $sel:flowArn:RemoveFlowVpcInterfaceResponse' :: Maybe Text
flowArn =
forall a. Maybe a
Prelude.Nothing,
$sel:nonDeletedNetworkInterfaceIds:RemoveFlowVpcInterfaceResponse' :: Maybe [Text]
nonDeletedNetworkInterfaceIds =
forall a. Maybe a
Prelude.Nothing,
$sel:vpcInterfaceName:RemoveFlowVpcInterfaceResponse' :: Maybe Text
vpcInterfaceName = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:RemoveFlowVpcInterfaceResponse' :: Int
httpStatus = Int
pHttpStatus_
}
removeFlowVpcInterfaceResponse_flowArn :: Lens.Lens' RemoveFlowVpcInterfaceResponse (Prelude.Maybe Prelude.Text)
removeFlowVpcInterfaceResponse_flowArn :: Lens' RemoveFlowVpcInterfaceResponse (Maybe Text)
removeFlowVpcInterfaceResponse_flowArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowVpcInterfaceResponse' {Maybe Text
flowArn :: Maybe Text
$sel:flowArn:RemoveFlowVpcInterfaceResponse' :: RemoveFlowVpcInterfaceResponse -> Maybe Text
flowArn} -> Maybe Text
flowArn) (\s :: RemoveFlowVpcInterfaceResponse
s@RemoveFlowVpcInterfaceResponse' {} Maybe Text
a -> RemoveFlowVpcInterfaceResponse
s {$sel:flowArn:RemoveFlowVpcInterfaceResponse' :: Maybe Text
flowArn = Maybe Text
a} :: RemoveFlowVpcInterfaceResponse)
removeFlowVpcInterfaceResponse_nonDeletedNetworkInterfaceIds :: Lens.Lens' RemoveFlowVpcInterfaceResponse (Prelude.Maybe [Prelude.Text])
removeFlowVpcInterfaceResponse_nonDeletedNetworkInterfaceIds :: Lens' RemoveFlowVpcInterfaceResponse (Maybe [Text])
removeFlowVpcInterfaceResponse_nonDeletedNetworkInterfaceIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowVpcInterfaceResponse' {Maybe [Text]
nonDeletedNetworkInterfaceIds :: Maybe [Text]
$sel:nonDeletedNetworkInterfaceIds:RemoveFlowVpcInterfaceResponse' :: RemoveFlowVpcInterfaceResponse -> Maybe [Text]
nonDeletedNetworkInterfaceIds} -> Maybe [Text]
nonDeletedNetworkInterfaceIds) (\s :: RemoveFlowVpcInterfaceResponse
s@RemoveFlowVpcInterfaceResponse' {} Maybe [Text]
a -> RemoveFlowVpcInterfaceResponse
s {$sel:nonDeletedNetworkInterfaceIds:RemoveFlowVpcInterfaceResponse' :: Maybe [Text]
nonDeletedNetworkInterfaceIds = Maybe [Text]
a} :: RemoveFlowVpcInterfaceResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
removeFlowVpcInterfaceResponse_vpcInterfaceName :: Lens.Lens' RemoveFlowVpcInterfaceResponse (Prelude.Maybe Prelude.Text)
removeFlowVpcInterfaceResponse_vpcInterfaceName :: Lens' RemoveFlowVpcInterfaceResponse (Maybe Text)
removeFlowVpcInterfaceResponse_vpcInterfaceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowVpcInterfaceResponse' {Maybe Text
vpcInterfaceName :: Maybe Text
$sel:vpcInterfaceName:RemoveFlowVpcInterfaceResponse' :: RemoveFlowVpcInterfaceResponse -> Maybe Text
vpcInterfaceName} -> Maybe Text
vpcInterfaceName) (\s :: RemoveFlowVpcInterfaceResponse
s@RemoveFlowVpcInterfaceResponse' {} Maybe Text
a -> RemoveFlowVpcInterfaceResponse
s {$sel:vpcInterfaceName:RemoveFlowVpcInterfaceResponse' :: Maybe Text
vpcInterfaceName = Maybe Text
a} :: RemoveFlowVpcInterfaceResponse)
removeFlowVpcInterfaceResponse_httpStatus :: Lens.Lens' RemoveFlowVpcInterfaceResponse Prelude.Int
removeFlowVpcInterfaceResponse_httpStatus :: Lens' RemoveFlowVpcInterfaceResponse Int
removeFlowVpcInterfaceResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RemoveFlowVpcInterfaceResponse' {Int
httpStatus :: Int
$sel:httpStatus:RemoveFlowVpcInterfaceResponse' :: RemoveFlowVpcInterfaceResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: RemoveFlowVpcInterfaceResponse
s@RemoveFlowVpcInterfaceResponse' {} Int
a -> RemoveFlowVpcInterfaceResponse
s {$sel:httpStatus:RemoveFlowVpcInterfaceResponse' :: Int
httpStatus = Int
a} :: RemoveFlowVpcInterfaceResponse)
instance
Prelude.NFData
RemoveFlowVpcInterfaceResponse
where
rnf :: RemoveFlowVpcInterfaceResponse -> ()
rnf RemoveFlowVpcInterfaceResponse' {Int
Maybe [Text]
Maybe Text
httpStatus :: Int
vpcInterfaceName :: Maybe Text
nonDeletedNetworkInterfaceIds :: Maybe [Text]
flowArn :: Maybe Text
$sel:httpStatus:RemoveFlowVpcInterfaceResponse' :: RemoveFlowVpcInterfaceResponse -> Int
$sel:vpcInterfaceName:RemoveFlowVpcInterfaceResponse' :: RemoveFlowVpcInterfaceResponse -> Maybe Text
$sel:nonDeletedNetworkInterfaceIds:RemoveFlowVpcInterfaceResponse' :: RemoveFlowVpcInterfaceResponse -> Maybe [Text]
$sel:flowArn:RemoveFlowVpcInterfaceResponse' :: RemoveFlowVpcInterfaceResponse -> 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]
nonDeletedNetworkInterfaceIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
vpcInterfaceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus