{-# 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.ELB.Types.PolicyAttribute where
import qualified Amazonka.Core as Core
import Amazonka.ELB.Internal
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PolicyAttribute = PolicyAttribute'
{
PolicyAttribute -> Maybe Text
attributeValue :: Prelude.Maybe Prelude.Text,
PolicyAttribute -> Maybe Text
attributeName :: Prelude.Maybe Prelude.Text
}
deriving (PolicyAttribute -> PolicyAttribute -> Bool
(PolicyAttribute -> PolicyAttribute -> Bool)
-> (PolicyAttribute -> PolicyAttribute -> Bool)
-> Eq PolicyAttribute
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolicyAttribute -> PolicyAttribute -> Bool
$c/= :: PolicyAttribute -> PolicyAttribute -> Bool
== :: PolicyAttribute -> PolicyAttribute -> Bool
$c== :: PolicyAttribute -> PolicyAttribute -> Bool
Prelude.Eq, ReadPrec [PolicyAttribute]
ReadPrec PolicyAttribute
Int -> ReadS PolicyAttribute
ReadS [PolicyAttribute]
(Int -> ReadS PolicyAttribute)
-> ReadS [PolicyAttribute]
-> ReadPrec PolicyAttribute
-> ReadPrec [PolicyAttribute]
-> Read PolicyAttribute
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PolicyAttribute]
$creadListPrec :: ReadPrec [PolicyAttribute]
readPrec :: ReadPrec PolicyAttribute
$creadPrec :: ReadPrec PolicyAttribute
readList :: ReadS [PolicyAttribute]
$creadList :: ReadS [PolicyAttribute]
readsPrec :: Int -> ReadS PolicyAttribute
$creadsPrec :: Int -> ReadS PolicyAttribute
Prelude.Read, Int -> PolicyAttribute -> ShowS
[PolicyAttribute] -> ShowS
PolicyAttribute -> String
(Int -> PolicyAttribute -> ShowS)
-> (PolicyAttribute -> String)
-> ([PolicyAttribute] -> ShowS)
-> Show PolicyAttribute
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolicyAttribute] -> ShowS
$cshowList :: [PolicyAttribute] -> ShowS
show :: PolicyAttribute -> String
$cshow :: PolicyAttribute -> String
showsPrec :: Int -> PolicyAttribute -> ShowS
$cshowsPrec :: Int -> PolicyAttribute -> ShowS
Prelude.Show, (forall x. PolicyAttribute -> Rep PolicyAttribute x)
-> (forall x. Rep PolicyAttribute x -> PolicyAttribute)
-> Generic PolicyAttribute
forall x. Rep PolicyAttribute x -> PolicyAttribute
forall x. PolicyAttribute -> Rep PolicyAttribute x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep PolicyAttribute x -> PolicyAttribute
$cfrom :: forall x. PolicyAttribute -> Rep PolicyAttribute x
Prelude.Generic)
newPolicyAttribute ::
PolicyAttribute
newPolicyAttribute :: PolicyAttribute
newPolicyAttribute =
PolicyAttribute' :: Maybe Text -> Maybe Text -> PolicyAttribute
PolicyAttribute'
{ $sel:attributeValue:PolicyAttribute' :: Maybe Text
attributeValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attributeName:PolicyAttribute' :: Maybe Text
attributeName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
policyAttribute_attributeValue :: Lens.Lens' PolicyAttribute (Prelude.Maybe Prelude.Text)
policyAttribute_attributeValue :: (Maybe Text -> f (Maybe Text))
-> PolicyAttribute -> f PolicyAttribute
policyAttribute_attributeValue = (PolicyAttribute -> Maybe Text)
-> (PolicyAttribute -> Maybe Text -> PolicyAttribute)
-> Lens PolicyAttribute PolicyAttribute (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyAttribute' {Maybe Text
attributeValue :: Maybe Text
$sel:attributeValue:PolicyAttribute' :: PolicyAttribute -> Maybe Text
attributeValue} -> Maybe Text
attributeValue) (\s :: PolicyAttribute
s@PolicyAttribute' {} Maybe Text
a -> PolicyAttribute
s {$sel:attributeValue:PolicyAttribute' :: Maybe Text
attributeValue = Maybe Text
a} :: PolicyAttribute)
policyAttribute_attributeName :: Lens.Lens' PolicyAttribute (Prelude.Maybe Prelude.Text)
policyAttribute_attributeName :: (Maybe Text -> f (Maybe Text))
-> PolicyAttribute -> f PolicyAttribute
policyAttribute_attributeName = (PolicyAttribute -> Maybe Text)
-> (PolicyAttribute -> Maybe Text -> PolicyAttribute)
-> Lens PolicyAttribute PolicyAttribute (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyAttribute' {Maybe Text
attributeName :: Maybe Text
$sel:attributeName:PolicyAttribute' :: PolicyAttribute -> Maybe Text
attributeName} -> Maybe Text
attributeName) (\s :: PolicyAttribute
s@PolicyAttribute' {} Maybe Text
a -> PolicyAttribute
s {$sel:attributeName:PolicyAttribute' :: Maybe Text
attributeName = Maybe Text
a} :: PolicyAttribute)
instance Prelude.Hashable PolicyAttribute
instance Prelude.NFData PolicyAttribute
instance Core.ToQuery PolicyAttribute where
toQuery :: PolicyAttribute -> QueryString
toQuery PolicyAttribute' {Maybe Text
attributeName :: Maybe Text
attributeValue :: Maybe Text
$sel:attributeName:PolicyAttribute' :: PolicyAttribute -> Maybe Text
$sel:attributeValue:PolicyAttribute' :: PolicyAttribute -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"AttributeValue" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
attributeValue,
ByteString
"AttributeName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
attributeName
]