{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.EC2.Types.TrafficMirrorPortRangeRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude
data TrafficMirrorPortRangeRequest = TrafficMirrorPortRangeRequest'
{
TrafficMirrorPortRangeRequest -> Maybe Int
fromPort :: Prelude.Maybe Prelude.Int,
TrafficMirrorPortRangeRequest -> Maybe Int
toPort :: Prelude.Maybe Prelude.Int
}
deriving (TrafficMirrorPortRangeRequest
-> TrafficMirrorPortRangeRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TrafficMirrorPortRangeRequest
-> TrafficMirrorPortRangeRequest -> Bool
$c/= :: TrafficMirrorPortRangeRequest
-> TrafficMirrorPortRangeRequest -> Bool
== :: TrafficMirrorPortRangeRequest
-> TrafficMirrorPortRangeRequest -> Bool
$c== :: TrafficMirrorPortRangeRequest
-> TrafficMirrorPortRangeRequest -> Bool
Prelude.Eq, ReadPrec [TrafficMirrorPortRangeRequest]
ReadPrec TrafficMirrorPortRangeRequest
Int -> ReadS TrafficMirrorPortRangeRequest
ReadS [TrafficMirrorPortRangeRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TrafficMirrorPortRangeRequest]
$creadListPrec :: ReadPrec [TrafficMirrorPortRangeRequest]
readPrec :: ReadPrec TrafficMirrorPortRangeRequest
$creadPrec :: ReadPrec TrafficMirrorPortRangeRequest
readList :: ReadS [TrafficMirrorPortRangeRequest]
$creadList :: ReadS [TrafficMirrorPortRangeRequest]
readsPrec :: Int -> ReadS TrafficMirrorPortRangeRequest
$creadsPrec :: Int -> ReadS TrafficMirrorPortRangeRequest
Prelude.Read, Int -> TrafficMirrorPortRangeRequest -> ShowS
[TrafficMirrorPortRangeRequest] -> ShowS
TrafficMirrorPortRangeRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TrafficMirrorPortRangeRequest] -> ShowS
$cshowList :: [TrafficMirrorPortRangeRequest] -> ShowS
show :: TrafficMirrorPortRangeRequest -> String
$cshow :: TrafficMirrorPortRangeRequest -> String
showsPrec :: Int -> TrafficMirrorPortRangeRequest -> ShowS
$cshowsPrec :: Int -> TrafficMirrorPortRangeRequest -> ShowS
Prelude.Show, forall x.
Rep TrafficMirrorPortRangeRequest x
-> TrafficMirrorPortRangeRequest
forall x.
TrafficMirrorPortRangeRequest
-> Rep TrafficMirrorPortRangeRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep TrafficMirrorPortRangeRequest x
-> TrafficMirrorPortRangeRequest
$cfrom :: forall x.
TrafficMirrorPortRangeRequest
-> Rep TrafficMirrorPortRangeRequest x
Prelude.Generic)
newTrafficMirrorPortRangeRequest ::
TrafficMirrorPortRangeRequest
newTrafficMirrorPortRangeRequest :: TrafficMirrorPortRangeRequest
newTrafficMirrorPortRangeRequest =
TrafficMirrorPortRangeRequest'
{ $sel:fromPort:TrafficMirrorPortRangeRequest' :: Maybe Int
fromPort =
forall a. Maybe a
Prelude.Nothing,
$sel:toPort:TrafficMirrorPortRangeRequest' :: Maybe Int
toPort = forall a. Maybe a
Prelude.Nothing
}
trafficMirrorPortRangeRequest_fromPort :: Lens.Lens' TrafficMirrorPortRangeRequest (Prelude.Maybe Prelude.Int)
trafficMirrorPortRangeRequest_fromPort :: Lens' TrafficMirrorPortRangeRequest (Maybe Int)
trafficMirrorPortRangeRequest_fromPort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrafficMirrorPortRangeRequest' {Maybe Int
fromPort :: Maybe Int
$sel:fromPort:TrafficMirrorPortRangeRequest' :: TrafficMirrorPortRangeRequest -> Maybe Int
fromPort} -> Maybe Int
fromPort) (\s :: TrafficMirrorPortRangeRequest
s@TrafficMirrorPortRangeRequest' {} Maybe Int
a -> TrafficMirrorPortRangeRequest
s {$sel:fromPort:TrafficMirrorPortRangeRequest' :: Maybe Int
fromPort = Maybe Int
a} :: TrafficMirrorPortRangeRequest)
trafficMirrorPortRangeRequest_toPort :: Lens.Lens' TrafficMirrorPortRangeRequest (Prelude.Maybe Prelude.Int)
trafficMirrorPortRangeRequest_toPort :: Lens' TrafficMirrorPortRangeRequest (Maybe Int)
trafficMirrorPortRangeRequest_toPort = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\TrafficMirrorPortRangeRequest' {Maybe Int
toPort :: Maybe Int
$sel:toPort:TrafficMirrorPortRangeRequest' :: TrafficMirrorPortRangeRequest -> Maybe Int
toPort} -> Maybe Int
toPort) (\s :: TrafficMirrorPortRangeRequest
s@TrafficMirrorPortRangeRequest' {} Maybe Int
a -> TrafficMirrorPortRangeRequest
s {$sel:toPort:TrafficMirrorPortRangeRequest' :: Maybe Int
toPort = Maybe Int
a} :: TrafficMirrorPortRangeRequest)
instance
Prelude.Hashable
TrafficMirrorPortRangeRequest
where
hashWithSalt :: Int -> TrafficMirrorPortRangeRequest -> Int
hashWithSalt Int
_salt TrafficMirrorPortRangeRequest' {Maybe Int
toPort :: Maybe Int
fromPort :: Maybe Int
$sel:toPort:TrafficMirrorPortRangeRequest' :: TrafficMirrorPortRangeRequest -> Maybe Int
$sel:fromPort:TrafficMirrorPortRangeRequest' :: TrafficMirrorPortRangeRequest -> Maybe Int
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
fromPort
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
toPort
instance Prelude.NFData TrafficMirrorPortRangeRequest where
rnf :: TrafficMirrorPortRangeRequest -> ()
rnf TrafficMirrorPortRangeRequest' {Maybe Int
toPort :: Maybe Int
fromPort :: Maybe Int
$sel:toPort:TrafficMirrorPortRangeRequest' :: TrafficMirrorPortRangeRequest -> Maybe Int
$sel:fromPort:TrafficMirrorPortRangeRequest' :: TrafficMirrorPortRangeRequest -> Maybe Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
fromPort
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
toPort
instance Data.ToQuery TrafficMirrorPortRangeRequest where
toQuery :: TrafficMirrorPortRangeRequest -> QueryString
toQuery TrafficMirrorPortRangeRequest' {Maybe Int
toPort :: Maybe Int
fromPort :: Maybe Int
$sel:toPort:TrafficMirrorPortRangeRequest' :: TrafficMirrorPortRangeRequest -> Maybe Int
$sel:fromPort:TrafficMirrorPortRangeRequest' :: TrafficMirrorPortRangeRequest -> Maybe Int
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"FromPort" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
fromPort,
ByteString
"ToPort" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Int
toPort
]