{-# 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.PolicyAttributeDescription where
import qualified Amazonka.Core as Core
import Amazonka.ELB.Internal
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PolicyAttributeDescription = PolicyAttributeDescription'
{
PolicyAttributeDescription -> Maybe Text
attributeValue :: Prelude.Maybe Prelude.Text,
PolicyAttributeDescription -> Maybe Text
attributeName :: Prelude.Maybe Prelude.Text
}
deriving (PolicyAttributeDescription -> PolicyAttributeDescription -> Bool
(PolicyAttributeDescription -> PolicyAttributeDescription -> Bool)
-> (PolicyAttributeDescription
-> PolicyAttributeDescription -> Bool)
-> Eq PolicyAttributeDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolicyAttributeDescription -> PolicyAttributeDescription -> Bool
$c/= :: PolicyAttributeDescription -> PolicyAttributeDescription -> Bool
== :: PolicyAttributeDescription -> PolicyAttributeDescription -> Bool
$c== :: PolicyAttributeDescription -> PolicyAttributeDescription -> Bool
Prelude.Eq, ReadPrec [PolicyAttributeDescription]
ReadPrec PolicyAttributeDescription
Int -> ReadS PolicyAttributeDescription
ReadS [PolicyAttributeDescription]
(Int -> ReadS PolicyAttributeDescription)
-> ReadS [PolicyAttributeDescription]
-> ReadPrec PolicyAttributeDescription
-> ReadPrec [PolicyAttributeDescription]
-> Read PolicyAttributeDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PolicyAttributeDescription]
$creadListPrec :: ReadPrec [PolicyAttributeDescription]
readPrec :: ReadPrec PolicyAttributeDescription
$creadPrec :: ReadPrec PolicyAttributeDescription
readList :: ReadS [PolicyAttributeDescription]
$creadList :: ReadS [PolicyAttributeDescription]
readsPrec :: Int -> ReadS PolicyAttributeDescription
$creadsPrec :: Int -> ReadS PolicyAttributeDescription
Prelude.Read, Int -> PolicyAttributeDescription -> ShowS
[PolicyAttributeDescription] -> ShowS
PolicyAttributeDescription -> String
(Int -> PolicyAttributeDescription -> ShowS)
-> (PolicyAttributeDescription -> String)
-> ([PolicyAttributeDescription] -> ShowS)
-> Show PolicyAttributeDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolicyAttributeDescription] -> ShowS
$cshowList :: [PolicyAttributeDescription] -> ShowS
show :: PolicyAttributeDescription -> String
$cshow :: PolicyAttributeDescription -> String
showsPrec :: Int -> PolicyAttributeDescription -> ShowS
$cshowsPrec :: Int -> PolicyAttributeDescription -> ShowS
Prelude.Show, (forall x.
PolicyAttributeDescription -> Rep PolicyAttributeDescription x)
-> (forall x.
Rep PolicyAttributeDescription x -> PolicyAttributeDescription)
-> Generic PolicyAttributeDescription
forall x.
Rep PolicyAttributeDescription x -> PolicyAttributeDescription
forall x.
PolicyAttributeDescription -> Rep PolicyAttributeDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PolicyAttributeDescription x -> PolicyAttributeDescription
$cfrom :: forall x.
PolicyAttributeDescription -> Rep PolicyAttributeDescription x
Prelude.Generic)
newPolicyAttributeDescription ::
PolicyAttributeDescription
newPolicyAttributeDescription :: PolicyAttributeDescription
newPolicyAttributeDescription =
PolicyAttributeDescription' :: Maybe Text -> Maybe Text -> PolicyAttributeDescription
PolicyAttributeDescription'
{ $sel:attributeValue:PolicyAttributeDescription' :: Maybe Text
attributeValue =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attributeName:PolicyAttributeDescription' :: Maybe Text
attributeName = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
policyAttributeDescription_attributeValue :: Lens.Lens' PolicyAttributeDescription (Prelude.Maybe Prelude.Text)
policyAttributeDescription_attributeValue :: (Maybe Text -> f (Maybe Text))
-> PolicyAttributeDescription -> f PolicyAttributeDescription
policyAttributeDescription_attributeValue = (PolicyAttributeDescription -> Maybe Text)
-> (PolicyAttributeDescription
-> Maybe Text -> PolicyAttributeDescription)
-> Lens
PolicyAttributeDescription
PolicyAttributeDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyAttributeDescription' {Maybe Text
attributeValue :: Maybe Text
$sel:attributeValue:PolicyAttributeDescription' :: PolicyAttributeDescription -> Maybe Text
attributeValue} -> Maybe Text
attributeValue) (\s :: PolicyAttributeDescription
s@PolicyAttributeDescription' {} Maybe Text
a -> PolicyAttributeDescription
s {$sel:attributeValue:PolicyAttributeDescription' :: Maybe Text
attributeValue = Maybe Text
a} :: PolicyAttributeDescription)
policyAttributeDescription_attributeName :: Lens.Lens' PolicyAttributeDescription (Prelude.Maybe Prelude.Text)
policyAttributeDescription_attributeName :: (Maybe Text -> f (Maybe Text))
-> PolicyAttributeDescription -> f PolicyAttributeDescription
policyAttributeDescription_attributeName = (PolicyAttributeDescription -> Maybe Text)
-> (PolicyAttributeDescription
-> Maybe Text -> PolicyAttributeDescription)
-> Lens
PolicyAttributeDescription
PolicyAttributeDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyAttributeDescription' {Maybe Text
attributeName :: Maybe Text
$sel:attributeName:PolicyAttributeDescription' :: PolicyAttributeDescription -> Maybe Text
attributeName} -> Maybe Text
attributeName) (\s :: PolicyAttributeDescription
s@PolicyAttributeDescription' {} Maybe Text
a -> PolicyAttributeDescription
s {$sel:attributeName:PolicyAttributeDescription' :: Maybe Text
attributeName = Maybe Text
a} :: PolicyAttributeDescription)
instance Core.FromXML PolicyAttributeDescription where
parseXML :: [Node] -> Either String PolicyAttributeDescription
parseXML [Node]
x =
Maybe Text -> Maybe Text -> PolicyAttributeDescription
PolicyAttributeDescription'
(Maybe Text -> Maybe Text -> PolicyAttributeDescription)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> PolicyAttributeDescription)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AttributeValue")
Either String (Maybe Text -> PolicyAttributeDescription)
-> Either String (Maybe Text)
-> Either String PolicyAttributeDescription
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"AttributeName")
instance Prelude.Hashable PolicyAttributeDescription
instance Prelude.NFData PolicyAttributeDescription