{-# 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.ELBV2.Types.RulePriorityPair where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data RulePriorityPair = RulePriorityPair'
{
RulePriorityPair -> Maybe Natural
priority :: Prelude.Maybe Prelude.Natural,
RulePriorityPair -> Maybe Text
ruleArn :: Prelude.Maybe Prelude.Text
}
deriving (RulePriorityPair -> RulePriorityPair -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RulePriorityPair -> RulePriorityPair -> Bool
$c/= :: RulePriorityPair -> RulePriorityPair -> Bool
== :: RulePriorityPair -> RulePriorityPair -> Bool
$c== :: RulePriorityPair -> RulePriorityPair -> Bool
Prelude.Eq, ReadPrec [RulePriorityPair]
ReadPrec RulePriorityPair
Int -> ReadS RulePriorityPair
ReadS [RulePriorityPair]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [RulePriorityPair]
$creadListPrec :: ReadPrec [RulePriorityPair]
readPrec :: ReadPrec RulePriorityPair
$creadPrec :: ReadPrec RulePriorityPair
readList :: ReadS [RulePriorityPair]
$creadList :: ReadS [RulePriorityPair]
readsPrec :: Int -> ReadS RulePriorityPair
$creadsPrec :: Int -> ReadS RulePriorityPair
Prelude.Read, Int -> RulePriorityPair -> ShowS
[RulePriorityPair] -> ShowS
RulePriorityPair -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [RulePriorityPair] -> ShowS
$cshowList :: [RulePriorityPair] -> ShowS
show :: RulePriorityPair -> String
$cshow :: RulePriorityPair -> String
showsPrec :: Int -> RulePriorityPair -> ShowS
$cshowsPrec :: Int -> RulePriorityPair -> ShowS
Prelude.Show, forall x. Rep RulePriorityPair x -> RulePriorityPair
forall x. RulePriorityPair -> Rep RulePriorityPair x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep RulePriorityPair x -> RulePriorityPair
$cfrom :: forall x. RulePriorityPair -> Rep RulePriorityPair x
Prelude.Generic)
newRulePriorityPair ::
RulePriorityPair
newRulePriorityPair :: RulePriorityPair
newRulePriorityPair =
RulePriorityPair'
{ $sel:priority:RulePriorityPair' :: Maybe Natural
priority = forall a. Maybe a
Prelude.Nothing,
$sel:ruleArn:RulePriorityPair' :: Maybe Text
ruleArn = forall a. Maybe a
Prelude.Nothing
}
rulePriorityPair_priority :: Lens.Lens' RulePriorityPair (Prelude.Maybe Prelude.Natural)
rulePriorityPair_priority :: Lens' RulePriorityPair (Maybe Natural)
rulePriorityPair_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RulePriorityPair' {Maybe Natural
priority :: Maybe Natural
$sel:priority:RulePriorityPair' :: RulePriorityPair -> Maybe Natural
priority} -> Maybe Natural
priority) (\s :: RulePriorityPair
s@RulePriorityPair' {} Maybe Natural
a -> RulePriorityPair
s {$sel:priority:RulePriorityPair' :: Maybe Natural
priority = Maybe Natural
a} :: RulePriorityPair)
rulePriorityPair_ruleArn :: Lens.Lens' RulePriorityPair (Prelude.Maybe Prelude.Text)
rulePriorityPair_ruleArn :: Lens' RulePriorityPair (Maybe Text)
rulePriorityPair_ruleArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\RulePriorityPair' {Maybe Text
ruleArn :: Maybe Text
$sel:ruleArn:RulePriorityPair' :: RulePriorityPair -> Maybe Text
ruleArn} -> Maybe Text
ruleArn) (\s :: RulePriorityPair
s@RulePriorityPair' {} Maybe Text
a -> RulePriorityPair
s {$sel:ruleArn:RulePriorityPair' :: Maybe Text
ruleArn = Maybe Text
a} :: RulePriorityPair)
instance Prelude.Hashable RulePriorityPair where
hashWithSalt :: Int -> RulePriorityPair -> Int
hashWithSalt Int
_salt RulePriorityPair' {Maybe Natural
Maybe Text
ruleArn :: Maybe Text
priority :: Maybe Natural
$sel:ruleArn:RulePriorityPair' :: RulePriorityPair -> Maybe Text
$sel:priority:RulePriorityPair' :: RulePriorityPair -> Maybe Natural
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
priority
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ruleArn
instance Prelude.NFData RulePriorityPair where
rnf :: RulePriorityPair -> ()
rnf RulePriorityPair' {Maybe Natural
Maybe Text
ruleArn :: Maybe Text
priority :: Maybe Natural
$sel:ruleArn:RulePriorityPair' :: RulePriorityPair -> Maybe Text
$sel:priority:RulePriorityPair' :: RulePriorityPair -> Maybe Natural
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
priority
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ruleArn
instance Data.ToQuery RulePriorityPair where
toQuery :: RulePriorityPair -> QueryString
toQuery RulePriorityPair' {Maybe Natural
Maybe Text
ruleArn :: Maybe Text
priority :: Maybe Natural
$sel:ruleArn:RulePriorityPair' :: RulePriorityPair -> Maybe Text
$sel:priority:RulePriorityPair' :: RulePriorityPair -> Maybe Natural
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Priority" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
priority,
ByteString
"RuleArn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
ruleArn
]