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