{-# 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.PolicyAttributeTypeDescription where
import qualified Amazonka.Core as Core
import Amazonka.ELB.Internal
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data PolicyAttributeTypeDescription = PolicyAttributeTypeDescription'
{
PolicyAttributeTypeDescription -> Maybe Text
attributeType :: Prelude.Maybe Prelude.Text,
PolicyAttributeTypeDescription -> Maybe Text
cardinality :: Prelude.Maybe Prelude.Text,
PolicyAttributeTypeDescription -> Maybe Text
defaultValue :: Prelude.Maybe Prelude.Text,
PolicyAttributeTypeDescription -> Maybe Text
attributeName :: Prelude.Maybe Prelude.Text,
PolicyAttributeTypeDescription -> Maybe Text
description :: Prelude.Maybe Prelude.Text
}
deriving (PolicyAttributeTypeDescription
-> PolicyAttributeTypeDescription -> Bool
(PolicyAttributeTypeDescription
-> PolicyAttributeTypeDescription -> Bool)
-> (PolicyAttributeTypeDescription
-> PolicyAttributeTypeDescription -> Bool)
-> Eq PolicyAttributeTypeDescription
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PolicyAttributeTypeDescription
-> PolicyAttributeTypeDescription -> Bool
$c/= :: PolicyAttributeTypeDescription
-> PolicyAttributeTypeDescription -> Bool
== :: PolicyAttributeTypeDescription
-> PolicyAttributeTypeDescription -> Bool
$c== :: PolicyAttributeTypeDescription
-> PolicyAttributeTypeDescription -> Bool
Prelude.Eq, ReadPrec [PolicyAttributeTypeDescription]
ReadPrec PolicyAttributeTypeDescription
Int -> ReadS PolicyAttributeTypeDescription
ReadS [PolicyAttributeTypeDescription]
(Int -> ReadS PolicyAttributeTypeDescription)
-> ReadS [PolicyAttributeTypeDescription]
-> ReadPrec PolicyAttributeTypeDescription
-> ReadPrec [PolicyAttributeTypeDescription]
-> Read PolicyAttributeTypeDescription
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PolicyAttributeTypeDescription]
$creadListPrec :: ReadPrec [PolicyAttributeTypeDescription]
readPrec :: ReadPrec PolicyAttributeTypeDescription
$creadPrec :: ReadPrec PolicyAttributeTypeDescription
readList :: ReadS [PolicyAttributeTypeDescription]
$creadList :: ReadS [PolicyAttributeTypeDescription]
readsPrec :: Int -> ReadS PolicyAttributeTypeDescription
$creadsPrec :: Int -> ReadS PolicyAttributeTypeDescription
Prelude.Read, Int -> PolicyAttributeTypeDescription -> ShowS
[PolicyAttributeTypeDescription] -> ShowS
PolicyAttributeTypeDescription -> String
(Int -> PolicyAttributeTypeDescription -> ShowS)
-> (PolicyAttributeTypeDescription -> String)
-> ([PolicyAttributeTypeDescription] -> ShowS)
-> Show PolicyAttributeTypeDescription
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PolicyAttributeTypeDescription] -> ShowS
$cshowList :: [PolicyAttributeTypeDescription] -> ShowS
show :: PolicyAttributeTypeDescription -> String
$cshow :: PolicyAttributeTypeDescription -> String
showsPrec :: Int -> PolicyAttributeTypeDescription -> ShowS
$cshowsPrec :: Int -> PolicyAttributeTypeDescription -> ShowS
Prelude.Show, (forall x.
PolicyAttributeTypeDescription
-> Rep PolicyAttributeTypeDescription x)
-> (forall x.
Rep PolicyAttributeTypeDescription x
-> PolicyAttributeTypeDescription)
-> Generic PolicyAttributeTypeDescription
forall x.
Rep PolicyAttributeTypeDescription x
-> PolicyAttributeTypeDescription
forall x.
PolicyAttributeTypeDescription
-> Rep PolicyAttributeTypeDescription x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PolicyAttributeTypeDescription x
-> PolicyAttributeTypeDescription
$cfrom :: forall x.
PolicyAttributeTypeDescription
-> Rep PolicyAttributeTypeDescription x
Prelude.Generic)
newPolicyAttributeTypeDescription ::
PolicyAttributeTypeDescription
newPolicyAttributeTypeDescription :: PolicyAttributeTypeDescription
newPolicyAttributeTypeDescription =
PolicyAttributeTypeDescription' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PolicyAttributeTypeDescription
PolicyAttributeTypeDescription'
{ $sel:attributeType:PolicyAttributeTypeDescription' :: Maybe Text
attributeType =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:cardinality:PolicyAttributeTypeDescription' :: Maybe Text
cardinality = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:defaultValue:PolicyAttributeTypeDescription' :: Maybe Text
defaultValue = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attributeName:PolicyAttributeTypeDescription' :: Maybe Text
attributeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:PolicyAttributeTypeDescription' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
policyAttributeTypeDescription_attributeType :: Lens.Lens' PolicyAttributeTypeDescription (Prelude.Maybe Prelude.Text)
policyAttributeTypeDescription_attributeType :: (Maybe Text -> f (Maybe Text))
-> PolicyAttributeTypeDescription
-> f PolicyAttributeTypeDescription
policyAttributeTypeDescription_attributeType = (PolicyAttributeTypeDescription -> Maybe Text)
-> (PolicyAttributeTypeDescription
-> Maybe Text -> PolicyAttributeTypeDescription)
-> Lens
PolicyAttributeTypeDescription
PolicyAttributeTypeDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyAttributeTypeDescription' {Maybe Text
attributeType :: Maybe Text
$sel:attributeType:PolicyAttributeTypeDescription' :: PolicyAttributeTypeDescription -> Maybe Text
attributeType} -> Maybe Text
attributeType) (\s :: PolicyAttributeTypeDescription
s@PolicyAttributeTypeDescription' {} Maybe Text
a -> PolicyAttributeTypeDescription
s {$sel:attributeType:PolicyAttributeTypeDescription' :: Maybe Text
attributeType = Maybe Text
a} :: PolicyAttributeTypeDescription)
policyAttributeTypeDescription_cardinality :: Lens.Lens' PolicyAttributeTypeDescription (Prelude.Maybe Prelude.Text)
policyAttributeTypeDescription_cardinality :: (Maybe Text -> f (Maybe Text))
-> PolicyAttributeTypeDescription
-> f PolicyAttributeTypeDescription
policyAttributeTypeDescription_cardinality = (PolicyAttributeTypeDescription -> Maybe Text)
-> (PolicyAttributeTypeDescription
-> Maybe Text -> PolicyAttributeTypeDescription)
-> Lens
PolicyAttributeTypeDescription
PolicyAttributeTypeDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyAttributeTypeDescription' {Maybe Text
cardinality :: Maybe Text
$sel:cardinality:PolicyAttributeTypeDescription' :: PolicyAttributeTypeDescription -> Maybe Text
cardinality} -> Maybe Text
cardinality) (\s :: PolicyAttributeTypeDescription
s@PolicyAttributeTypeDescription' {} Maybe Text
a -> PolicyAttributeTypeDescription
s {$sel:cardinality:PolicyAttributeTypeDescription' :: Maybe Text
cardinality = Maybe Text
a} :: PolicyAttributeTypeDescription)
policyAttributeTypeDescription_defaultValue :: Lens.Lens' PolicyAttributeTypeDescription (Prelude.Maybe Prelude.Text)
policyAttributeTypeDescription_defaultValue :: (Maybe Text -> f (Maybe Text))
-> PolicyAttributeTypeDescription
-> f PolicyAttributeTypeDescription
policyAttributeTypeDescription_defaultValue = (PolicyAttributeTypeDescription -> Maybe Text)
-> (PolicyAttributeTypeDescription
-> Maybe Text -> PolicyAttributeTypeDescription)
-> Lens
PolicyAttributeTypeDescription
PolicyAttributeTypeDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyAttributeTypeDescription' {Maybe Text
defaultValue :: Maybe Text
$sel:defaultValue:PolicyAttributeTypeDescription' :: PolicyAttributeTypeDescription -> Maybe Text
defaultValue} -> Maybe Text
defaultValue) (\s :: PolicyAttributeTypeDescription
s@PolicyAttributeTypeDescription' {} Maybe Text
a -> PolicyAttributeTypeDescription
s {$sel:defaultValue:PolicyAttributeTypeDescription' :: Maybe Text
defaultValue = Maybe Text
a} :: PolicyAttributeTypeDescription)
policyAttributeTypeDescription_attributeName :: Lens.Lens' PolicyAttributeTypeDescription (Prelude.Maybe Prelude.Text)
policyAttributeTypeDescription_attributeName :: (Maybe Text -> f (Maybe Text))
-> PolicyAttributeTypeDescription
-> f PolicyAttributeTypeDescription
policyAttributeTypeDescription_attributeName = (PolicyAttributeTypeDescription -> Maybe Text)
-> (PolicyAttributeTypeDescription
-> Maybe Text -> PolicyAttributeTypeDescription)
-> Lens
PolicyAttributeTypeDescription
PolicyAttributeTypeDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyAttributeTypeDescription' {Maybe Text
attributeName :: Maybe Text
$sel:attributeName:PolicyAttributeTypeDescription' :: PolicyAttributeTypeDescription -> Maybe Text
attributeName} -> Maybe Text
attributeName) (\s :: PolicyAttributeTypeDescription
s@PolicyAttributeTypeDescription' {} Maybe Text
a -> PolicyAttributeTypeDescription
s {$sel:attributeName:PolicyAttributeTypeDescription' :: Maybe Text
attributeName = Maybe Text
a} :: PolicyAttributeTypeDescription)
policyAttributeTypeDescription_description :: Lens.Lens' PolicyAttributeTypeDescription (Prelude.Maybe Prelude.Text)
policyAttributeTypeDescription_description :: (Maybe Text -> f (Maybe Text))
-> PolicyAttributeTypeDescription
-> f PolicyAttributeTypeDescription
policyAttributeTypeDescription_description = (PolicyAttributeTypeDescription -> Maybe Text)
-> (PolicyAttributeTypeDescription
-> Maybe Text -> PolicyAttributeTypeDescription)
-> Lens
PolicyAttributeTypeDescription
PolicyAttributeTypeDescription
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PolicyAttributeTypeDescription' {Maybe Text
description :: Maybe Text
$sel:description:PolicyAttributeTypeDescription' :: PolicyAttributeTypeDescription -> Maybe Text
description} -> Maybe Text
description) (\s :: PolicyAttributeTypeDescription
s@PolicyAttributeTypeDescription' {} Maybe Text
a -> PolicyAttributeTypeDescription
s {$sel:description:PolicyAttributeTypeDescription' :: Maybe Text
description = Maybe Text
a} :: PolicyAttributeTypeDescription)
instance Core.FromXML PolicyAttributeTypeDescription where
parseXML :: [Node] -> Either String PolicyAttributeTypeDescription
parseXML [Node]
x =
Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PolicyAttributeTypeDescription
PolicyAttributeTypeDescription'
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PolicyAttributeTypeDescription)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PolicyAttributeTypeDescription)
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
"AttributeType")
Either
String
(Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> PolicyAttributeTypeDescription)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> PolicyAttributeTypeDescription)
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
"Cardinality")
Either
String
(Maybe Text
-> Maybe Text -> Maybe Text -> PolicyAttributeTypeDescription)
-> Either String (Maybe Text)
-> Either
String (Maybe Text -> Maybe Text -> PolicyAttributeTypeDescription)
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
"DefaultValue")
Either
String (Maybe Text -> Maybe Text -> PolicyAttributeTypeDescription)
-> Either String (Maybe Text)
-> Either String (Maybe Text -> PolicyAttributeTypeDescription)
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")
Either String (Maybe Text -> PolicyAttributeTypeDescription)
-> Either String (Maybe Text)
-> Either String PolicyAttributeTypeDescription
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
"Description")
instance
Prelude.Hashable
PolicyAttributeTypeDescription
instance
Prelude.NFData
PolicyAttributeTypeDescription