{-# 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.EC2.CreateTrafficMirrorSession
(
CreateTrafficMirrorSession (..),
newCreateTrafficMirrorSession,
createTrafficMirrorSession_clientToken,
createTrafficMirrorSession_description,
createTrafficMirrorSession_dryRun,
createTrafficMirrorSession_packetLength,
createTrafficMirrorSession_tagSpecifications,
createTrafficMirrorSession_virtualNetworkId,
createTrafficMirrorSession_networkInterfaceId,
createTrafficMirrorSession_trafficMirrorTargetId,
createTrafficMirrorSession_trafficMirrorFilterId,
createTrafficMirrorSession_sessionNumber,
CreateTrafficMirrorSessionResponse (..),
newCreateTrafficMirrorSessionResponse,
createTrafficMirrorSessionResponse_clientToken,
createTrafficMirrorSessionResponse_trafficMirrorSession,
createTrafficMirrorSessionResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateTrafficMirrorSession = CreateTrafficMirrorSession'
{
CreateTrafficMirrorSession -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateTrafficMirrorSession -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
CreateTrafficMirrorSession -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
CreateTrafficMirrorSession -> Maybe Int
packetLength :: Prelude.Maybe Prelude.Int,
CreateTrafficMirrorSession -> Maybe [TagSpecification]
tagSpecifications :: Prelude.Maybe [TagSpecification],
CreateTrafficMirrorSession -> Maybe Int
virtualNetworkId :: Prelude.Maybe Prelude.Int,
CreateTrafficMirrorSession -> Text
networkInterfaceId :: Prelude.Text,
CreateTrafficMirrorSession -> Text
trafficMirrorTargetId :: Prelude.Text,
CreateTrafficMirrorSession -> Text
trafficMirrorFilterId :: Prelude.Text,
CreateTrafficMirrorSession -> Int
sessionNumber :: Prelude.Int
}
deriving (CreateTrafficMirrorSession -> CreateTrafficMirrorSession -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTrafficMirrorSession -> CreateTrafficMirrorSession -> Bool
$c/= :: CreateTrafficMirrorSession -> CreateTrafficMirrorSession -> Bool
== :: CreateTrafficMirrorSession -> CreateTrafficMirrorSession -> Bool
$c== :: CreateTrafficMirrorSession -> CreateTrafficMirrorSession -> Bool
Prelude.Eq, ReadPrec [CreateTrafficMirrorSession]
ReadPrec CreateTrafficMirrorSession
Int -> ReadS CreateTrafficMirrorSession
ReadS [CreateTrafficMirrorSession]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTrafficMirrorSession]
$creadListPrec :: ReadPrec [CreateTrafficMirrorSession]
readPrec :: ReadPrec CreateTrafficMirrorSession
$creadPrec :: ReadPrec CreateTrafficMirrorSession
readList :: ReadS [CreateTrafficMirrorSession]
$creadList :: ReadS [CreateTrafficMirrorSession]
readsPrec :: Int -> ReadS CreateTrafficMirrorSession
$creadsPrec :: Int -> ReadS CreateTrafficMirrorSession
Prelude.Read, Int -> CreateTrafficMirrorSession -> ShowS
[CreateTrafficMirrorSession] -> ShowS
CreateTrafficMirrorSession -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTrafficMirrorSession] -> ShowS
$cshowList :: [CreateTrafficMirrorSession] -> ShowS
show :: CreateTrafficMirrorSession -> String
$cshow :: CreateTrafficMirrorSession -> String
showsPrec :: Int -> CreateTrafficMirrorSession -> ShowS
$cshowsPrec :: Int -> CreateTrafficMirrorSession -> ShowS
Prelude.Show, forall x.
Rep CreateTrafficMirrorSession x -> CreateTrafficMirrorSession
forall x.
CreateTrafficMirrorSession -> Rep CreateTrafficMirrorSession x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateTrafficMirrorSession x -> CreateTrafficMirrorSession
$cfrom :: forall x.
CreateTrafficMirrorSession -> Rep CreateTrafficMirrorSession x
Prelude.Generic)
newCreateTrafficMirrorSession ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Int ->
CreateTrafficMirrorSession
newCreateTrafficMirrorSession :: Text -> Text -> Text -> Int -> CreateTrafficMirrorSession
newCreateTrafficMirrorSession
Text
pNetworkInterfaceId_
Text
pTrafficMirrorTargetId_
Text
pTrafficMirrorFilterId_
Int
pSessionNumber_ =
CreateTrafficMirrorSession'
{ $sel:clientToken:CreateTrafficMirrorSession' :: Maybe Text
clientToken =
forall a. Maybe a
Prelude.Nothing,
$sel:description:CreateTrafficMirrorSession' :: Maybe Text
description = forall a. Maybe a
Prelude.Nothing,
$sel:dryRun:CreateTrafficMirrorSession' :: Maybe Bool
dryRun = forall a. Maybe a
Prelude.Nothing,
$sel:packetLength:CreateTrafficMirrorSession' :: Maybe Int
packetLength = forall a. Maybe a
Prelude.Nothing,
$sel:tagSpecifications:CreateTrafficMirrorSession' :: Maybe [TagSpecification]
tagSpecifications = forall a. Maybe a
Prelude.Nothing,
$sel:virtualNetworkId:CreateTrafficMirrorSession' :: Maybe Int
virtualNetworkId = forall a. Maybe a
Prelude.Nothing,
$sel:networkInterfaceId:CreateTrafficMirrorSession' :: Text
networkInterfaceId = Text
pNetworkInterfaceId_,
$sel:trafficMirrorTargetId:CreateTrafficMirrorSession' :: Text
trafficMirrorTargetId = Text
pTrafficMirrorTargetId_,
$sel:trafficMirrorFilterId:CreateTrafficMirrorSession' :: Text
trafficMirrorFilterId = Text
pTrafficMirrorFilterId_,
$sel:sessionNumber:CreateTrafficMirrorSession' :: Int
sessionNumber = Int
pSessionNumber_
}
createTrafficMirrorSession_clientToken :: Lens.Lens' CreateTrafficMirrorSession (Prelude.Maybe Prelude.Text)
createTrafficMirrorSession_clientToken :: Lens' CreateTrafficMirrorSession (Maybe Text)
createTrafficMirrorSession_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Maybe Text
a -> CreateTrafficMirrorSession
s {$sel:clientToken:CreateTrafficMirrorSession' :: Maybe Text
clientToken = Maybe Text
a} :: CreateTrafficMirrorSession)
createTrafficMirrorSession_description :: Lens.Lens' CreateTrafficMirrorSession (Prelude.Maybe Prelude.Text)
createTrafficMirrorSession_description :: Lens' CreateTrafficMirrorSession (Maybe Text)
createTrafficMirrorSession_description = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Maybe Text
description :: Maybe Text
$sel:description:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Text
description} -> Maybe Text
description) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Maybe Text
a -> CreateTrafficMirrorSession
s {$sel:description:CreateTrafficMirrorSession' :: Maybe Text
description = Maybe Text
a} :: CreateTrafficMirrorSession)
createTrafficMirrorSession_dryRun :: Lens.Lens' CreateTrafficMirrorSession (Prelude.Maybe Prelude.Bool)
createTrafficMirrorSession_dryRun :: Lens' CreateTrafficMirrorSession (Maybe Bool)
createTrafficMirrorSession_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Maybe Bool
a -> CreateTrafficMirrorSession
s {$sel:dryRun:CreateTrafficMirrorSession' :: Maybe Bool
dryRun = Maybe Bool
a} :: CreateTrafficMirrorSession)
createTrafficMirrorSession_packetLength :: Lens.Lens' CreateTrafficMirrorSession (Prelude.Maybe Prelude.Int)
createTrafficMirrorSession_packetLength :: Lens' CreateTrafficMirrorSession (Maybe Int)
createTrafficMirrorSession_packetLength = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Maybe Int
packetLength :: Maybe Int
$sel:packetLength:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Int
packetLength} -> Maybe Int
packetLength) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Maybe Int
a -> CreateTrafficMirrorSession
s {$sel:packetLength:CreateTrafficMirrorSession' :: Maybe Int
packetLength = Maybe Int
a} :: CreateTrafficMirrorSession)
createTrafficMirrorSession_tagSpecifications :: Lens.Lens' CreateTrafficMirrorSession (Prelude.Maybe [TagSpecification])
createTrafficMirrorSession_tagSpecifications :: Lens' CreateTrafficMirrorSession (Maybe [TagSpecification])
createTrafficMirrorSession_tagSpecifications = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Maybe [TagSpecification]
tagSpecifications :: Maybe [TagSpecification]
$sel:tagSpecifications:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe [TagSpecification]
tagSpecifications} -> Maybe [TagSpecification]
tagSpecifications) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Maybe [TagSpecification]
a -> CreateTrafficMirrorSession
s {$sel:tagSpecifications:CreateTrafficMirrorSession' :: Maybe [TagSpecification]
tagSpecifications = Maybe [TagSpecification]
a} :: CreateTrafficMirrorSession) 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
createTrafficMirrorSession_virtualNetworkId :: Lens.Lens' CreateTrafficMirrorSession (Prelude.Maybe Prelude.Int)
createTrafficMirrorSession_virtualNetworkId :: Lens' CreateTrafficMirrorSession (Maybe Int)
createTrafficMirrorSession_virtualNetworkId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Maybe Int
virtualNetworkId :: Maybe Int
$sel:virtualNetworkId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Int
virtualNetworkId} -> Maybe Int
virtualNetworkId) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Maybe Int
a -> CreateTrafficMirrorSession
s {$sel:virtualNetworkId:CreateTrafficMirrorSession' :: Maybe Int
virtualNetworkId = Maybe Int
a} :: CreateTrafficMirrorSession)
createTrafficMirrorSession_networkInterfaceId :: Lens.Lens' CreateTrafficMirrorSession Prelude.Text
createTrafficMirrorSession_networkInterfaceId :: Lens' CreateTrafficMirrorSession Text
createTrafficMirrorSession_networkInterfaceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Text
networkInterfaceId :: Text
$sel:networkInterfaceId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
networkInterfaceId} -> Text
networkInterfaceId) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Text
a -> CreateTrafficMirrorSession
s {$sel:networkInterfaceId:CreateTrafficMirrorSession' :: Text
networkInterfaceId = Text
a} :: CreateTrafficMirrorSession)
createTrafficMirrorSession_trafficMirrorTargetId :: Lens.Lens' CreateTrafficMirrorSession Prelude.Text
createTrafficMirrorSession_trafficMirrorTargetId :: Lens' CreateTrafficMirrorSession Text
createTrafficMirrorSession_trafficMirrorTargetId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Text
trafficMirrorTargetId :: Text
$sel:trafficMirrorTargetId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
trafficMirrorTargetId} -> Text
trafficMirrorTargetId) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Text
a -> CreateTrafficMirrorSession
s {$sel:trafficMirrorTargetId:CreateTrafficMirrorSession' :: Text
trafficMirrorTargetId = Text
a} :: CreateTrafficMirrorSession)
createTrafficMirrorSession_trafficMirrorFilterId :: Lens.Lens' CreateTrafficMirrorSession Prelude.Text
createTrafficMirrorSession_trafficMirrorFilterId :: Lens' CreateTrafficMirrorSession Text
createTrafficMirrorSession_trafficMirrorFilterId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Text
trafficMirrorFilterId :: Text
$sel:trafficMirrorFilterId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
trafficMirrorFilterId} -> Text
trafficMirrorFilterId) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Text
a -> CreateTrafficMirrorSession
s {$sel:trafficMirrorFilterId:CreateTrafficMirrorSession' :: Text
trafficMirrorFilterId = Text
a} :: CreateTrafficMirrorSession)
createTrafficMirrorSession_sessionNumber :: Lens.Lens' CreateTrafficMirrorSession Prelude.Int
createTrafficMirrorSession_sessionNumber :: Lens' CreateTrafficMirrorSession Int
createTrafficMirrorSession_sessionNumber = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSession' {Int
sessionNumber :: Int
$sel:sessionNumber:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Int
sessionNumber} -> Int
sessionNumber) (\s :: CreateTrafficMirrorSession
s@CreateTrafficMirrorSession' {} Int
a -> CreateTrafficMirrorSession
s {$sel:sessionNumber:CreateTrafficMirrorSession' :: Int
sessionNumber = Int
a} :: CreateTrafficMirrorSession)
instance Core.AWSRequest CreateTrafficMirrorSession where
type
AWSResponse CreateTrafficMirrorSession =
CreateTrafficMirrorSessionResponse
request :: (Service -> Service)
-> CreateTrafficMirrorSession -> Request CreateTrafficMirrorSession
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy CreateTrafficMirrorSession
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse CreateTrafficMirrorSession)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
( \Int
s ResponseHeaders
h [Node]
x ->
Maybe Text
-> Maybe TrafficMirrorSession
-> Int
-> CreateTrafficMirrorSessionResponse
CreateTrafficMirrorSessionResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"clientToken")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"trafficMirrorSession")
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 CreateTrafficMirrorSession where
hashWithSalt :: Int -> CreateTrafficMirrorSession -> Int
hashWithSalt Int
_salt CreateTrafficMirrorSession' {Int
Maybe Bool
Maybe Int
Maybe [TagSpecification]
Maybe Text
Text
sessionNumber :: Int
trafficMirrorFilterId :: Text
trafficMirrorTargetId :: Text
networkInterfaceId :: Text
virtualNetworkId :: Maybe Int
tagSpecifications :: Maybe [TagSpecification]
packetLength :: Maybe Int
dryRun :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
$sel:sessionNumber:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Int
$sel:trafficMirrorFilterId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
$sel:trafficMirrorTargetId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
$sel:networkInterfaceId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
$sel:virtualNetworkId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Int
$sel:tagSpecifications:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe [TagSpecification]
$sel:packetLength:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Int
$sel:dryRun:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Bool
$sel:description:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Text
$sel:clientToken:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
description
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
packetLength
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [TagSpecification]
tagSpecifications
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
virtualNetworkId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
networkInterfaceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
trafficMirrorTargetId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
trafficMirrorFilterId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Int
sessionNumber
instance Prelude.NFData CreateTrafficMirrorSession where
rnf :: CreateTrafficMirrorSession -> ()
rnf CreateTrafficMirrorSession' {Int
Maybe Bool
Maybe Int
Maybe [TagSpecification]
Maybe Text
Text
sessionNumber :: Int
trafficMirrorFilterId :: Text
trafficMirrorTargetId :: Text
networkInterfaceId :: Text
virtualNetworkId :: Maybe Int
tagSpecifications :: Maybe [TagSpecification]
packetLength :: Maybe Int
dryRun :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
$sel:sessionNumber:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Int
$sel:trafficMirrorFilterId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
$sel:trafficMirrorTargetId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
$sel:networkInterfaceId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
$sel:virtualNetworkId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Int
$sel:tagSpecifications:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe [TagSpecification]
$sel:packetLength:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Int
$sel:dryRun:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Bool
$sel:description:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Text
$sel:clientToken:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
description
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
packetLength
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [TagSpecification]
tagSpecifications
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
virtualNetworkId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
networkInterfaceId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
trafficMirrorTargetId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
trafficMirrorFilterId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
sessionNumber
instance Data.ToHeaders CreateTrafficMirrorSession where
toHeaders :: CreateTrafficMirrorSession -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath CreateTrafficMirrorSession where
toPath :: CreateTrafficMirrorSession -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery CreateTrafficMirrorSession where
toQuery :: CreateTrafficMirrorSession -> QueryString
toQuery CreateTrafficMirrorSession' {Int
Maybe Bool
Maybe Int
Maybe [TagSpecification]
Maybe Text
Text
sessionNumber :: Int
trafficMirrorFilterId :: Text
trafficMirrorTargetId :: Text
networkInterfaceId :: Text
virtualNetworkId :: Maybe Int
tagSpecifications :: Maybe [TagSpecification]
packetLength :: Maybe Int
dryRun :: Maybe Bool
description :: Maybe Text
clientToken :: Maybe Text
$sel:sessionNumber:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Int
$sel:trafficMirrorFilterId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
$sel:trafficMirrorTargetId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
$sel:networkInterfaceId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Text
$sel:virtualNetworkId:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Int
$sel:tagSpecifications:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe [TagSpecification]
$sel:packetLength:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Int
$sel:dryRun:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Bool
$sel:description:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Text
$sel:clientToken:CreateTrafficMirrorSession' :: CreateTrafficMirrorSession -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"CreateTrafficMirrorSession" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
ByteString
"ClientToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
clientToken,
ByteString
"Description" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
description,
ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
ByteString
"PacketLength" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
packetLength,
forall a. ToQuery a => a -> QueryString
Data.toQuery
( forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"TagSpecification"
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [TagSpecification]
tagSpecifications
),
ByteString
"VirtualNetworkId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
virtualNetworkId,
ByteString
"NetworkInterfaceId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
networkInterfaceId,
ByteString
"TrafficMirrorTargetId"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
trafficMirrorTargetId,
ByteString
"TrafficMirrorFilterId"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
trafficMirrorFilterId,
ByteString
"SessionNumber" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Int
sessionNumber
]
data CreateTrafficMirrorSessionResponse = CreateTrafficMirrorSessionResponse'
{
CreateTrafficMirrorSessionResponse -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
CreateTrafficMirrorSessionResponse -> Maybe TrafficMirrorSession
trafficMirrorSession :: Prelude.Maybe TrafficMirrorSession,
CreateTrafficMirrorSessionResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateTrafficMirrorSessionResponse
-> CreateTrafficMirrorSessionResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateTrafficMirrorSessionResponse
-> CreateTrafficMirrorSessionResponse -> Bool
$c/= :: CreateTrafficMirrorSessionResponse
-> CreateTrafficMirrorSessionResponse -> Bool
== :: CreateTrafficMirrorSessionResponse
-> CreateTrafficMirrorSessionResponse -> Bool
$c== :: CreateTrafficMirrorSessionResponse
-> CreateTrafficMirrorSessionResponse -> Bool
Prelude.Eq, ReadPrec [CreateTrafficMirrorSessionResponse]
ReadPrec CreateTrafficMirrorSessionResponse
Int -> ReadS CreateTrafficMirrorSessionResponse
ReadS [CreateTrafficMirrorSessionResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateTrafficMirrorSessionResponse]
$creadListPrec :: ReadPrec [CreateTrafficMirrorSessionResponse]
readPrec :: ReadPrec CreateTrafficMirrorSessionResponse
$creadPrec :: ReadPrec CreateTrafficMirrorSessionResponse
readList :: ReadS [CreateTrafficMirrorSessionResponse]
$creadList :: ReadS [CreateTrafficMirrorSessionResponse]
readsPrec :: Int -> ReadS CreateTrafficMirrorSessionResponse
$creadsPrec :: Int -> ReadS CreateTrafficMirrorSessionResponse
Prelude.Read, Int -> CreateTrafficMirrorSessionResponse -> ShowS
[CreateTrafficMirrorSessionResponse] -> ShowS
CreateTrafficMirrorSessionResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateTrafficMirrorSessionResponse] -> ShowS
$cshowList :: [CreateTrafficMirrorSessionResponse] -> ShowS
show :: CreateTrafficMirrorSessionResponse -> String
$cshow :: CreateTrafficMirrorSessionResponse -> String
showsPrec :: Int -> CreateTrafficMirrorSessionResponse -> ShowS
$cshowsPrec :: Int -> CreateTrafficMirrorSessionResponse -> ShowS
Prelude.Show, forall x.
Rep CreateTrafficMirrorSessionResponse x
-> CreateTrafficMirrorSessionResponse
forall x.
CreateTrafficMirrorSessionResponse
-> Rep CreateTrafficMirrorSessionResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateTrafficMirrorSessionResponse x
-> CreateTrafficMirrorSessionResponse
$cfrom :: forall x.
CreateTrafficMirrorSessionResponse
-> Rep CreateTrafficMirrorSessionResponse x
Prelude.Generic)
newCreateTrafficMirrorSessionResponse ::
Prelude.Int ->
CreateTrafficMirrorSessionResponse
newCreateTrafficMirrorSessionResponse :: Int -> CreateTrafficMirrorSessionResponse
newCreateTrafficMirrorSessionResponse Int
pHttpStatus_ =
CreateTrafficMirrorSessionResponse'
{ $sel:clientToken:CreateTrafficMirrorSessionResponse' :: Maybe Text
clientToken =
forall a. Maybe a
Prelude.Nothing,
$sel:trafficMirrorSession:CreateTrafficMirrorSessionResponse' :: Maybe TrafficMirrorSession
trafficMirrorSession = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateTrafficMirrorSessionResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createTrafficMirrorSessionResponse_clientToken :: Lens.Lens' CreateTrafficMirrorSessionResponse (Prelude.Maybe Prelude.Text)
createTrafficMirrorSessionResponse_clientToken :: Lens' CreateTrafficMirrorSessionResponse (Maybe Text)
createTrafficMirrorSessionResponse_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSessionResponse' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreateTrafficMirrorSessionResponse' :: CreateTrafficMirrorSessionResponse -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreateTrafficMirrorSessionResponse
s@CreateTrafficMirrorSessionResponse' {} Maybe Text
a -> CreateTrafficMirrorSessionResponse
s {$sel:clientToken:CreateTrafficMirrorSessionResponse' :: Maybe Text
clientToken = Maybe Text
a} :: CreateTrafficMirrorSessionResponse)
createTrafficMirrorSessionResponse_trafficMirrorSession :: Lens.Lens' CreateTrafficMirrorSessionResponse (Prelude.Maybe TrafficMirrorSession)
createTrafficMirrorSessionResponse_trafficMirrorSession :: Lens'
CreateTrafficMirrorSessionResponse (Maybe TrafficMirrorSession)
createTrafficMirrorSessionResponse_trafficMirrorSession = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSessionResponse' {Maybe TrafficMirrorSession
trafficMirrorSession :: Maybe TrafficMirrorSession
$sel:trafficMirrorSession:CreateTrafficMirrorSessionResponse' :: CreateTrafficMirrorSessionResponse -> Maybe TrafficMirrorSession
trafficMirrorSession} -> Maybe TrafficMirrorSession
trafficMirrorSession) (\s :: CreateTrafficMirrorSessionResponse
s@CreateTrafficMirrorSessionResponse' {} Maybe TrafficMirrorSession
a -> CreateTrafficMirrorSessionResponse
s {$sel:trafficMirrorSession:CreateTrafficMirrorSessionResponse' :: Maybe TrafficMirrorSession
trafficMirrorSession = Maybe TrafficMirrorSession
a} :: CreateTrafficMirrorSessionResponse)
createTrafficMirrorSessionResponse_httpStatus :: Lens.Lens' CreateTrafficMirrorSessionResponse Prelude.Int
createTrafficMirrorSessionResponse_httpStatus :: Lens' CreateTrafficMirrorSessionResponse Int
createTrafficMirrorSessionResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateTrafficMirrorSessionResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateTrafficMirrorSessionResponse' :: CreateTrafficMirrorSessionResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateTrafficMirrorSessionResponse
s@CreateTrafficMirrorSessionResponse' {} Int
a -> CreateTrafficMirrorSessionResponse
s {$sel:httpStatus:CreateTrafficMirrorSessionResponse' :: Int
httpStatus = Int
a} :: CreateTrafficMirrorSessionResponse)
instance
Prelude.NFData
CreateTrafficMirrorSessionResponse
where
rnf :: CreateTrafficMirrorSessionResponse -> ()
rnf CreateTrafficMirrorSessionResponse' {Int
Maybe Text
Maybe TrafficMirrorSession
httpStatus :: Int
trafficMirrorSession :: Maybe TrafficMirrorSession
clientToken :: Maybe Text
$sel:httpStatus:CreateTrafficMirrorSessionResponse' :: CreateTrafficMirrorSessionResponse -> Int
$sel:trafficMirrorSession:CreateTrafficMirrorSessionResponse' :: CreateTrafficMirrorSessionResponse -> Maybe TrafficMirrorSession
$sel:clientToken:CreateTrafficMirrorSessionResponse' :: CreateTrafficMirrorSessionResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe TrafficMirrorSession
trafficMirrorSession
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus