{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.AWS.ELB.Types.Product where
import Network.AWS.ELB.Internal
import Network.AWS.ELB.Types.Sum
import Network.AWS.Lens
import Network.AWS.Prelude
data AccessLog = AccessLog'
{ _alEmitInterval :: !(Maybe Int)
, _alS3BucketPrefix :: !(Maybe Text)
, _alS3BucketName :: !(Maybe Text)
, _alEnabled :: !Bool
} deriving (Eq, Read, Show, Data, Typeable, Generic)
accessLog
:: Bool
-> AccessLog
accessLog pEnabled_ =
AccessLog'
{ _alEmitInterval = Nothing
, _alS3BucketPrefix = Nothing
, _alS3BucketName = Nothing
, _alEnabled = pEnabled_
}
alEmitInterval :: Lens' AccessLog (Maybe Int)
alEmitInterval = lens _alEmitInterval (\ s a -> s{_alEmitInterval = a})
alS3BucketPrefix :: Lens' AccessLog (Maybe Text)
alS3BucketPrefix = lens _alS3BucketPrefix (\ s a -> s{_alS3BucketPrefix = a})
alS3BucketName :: Lens' AccessLog (Maybe Text)
alS3BucketName = lens _alS3BucketName (\ s a -> s{_alS3BucketName = a})
alEnabled :: Lens' AccessLog Bool
alEnabled = lens _alEnabled (\ s a -> s{_alEnabled = a})
instance FromXML AccessLog where
parseXML x
= AccessLog' <$>
(x .@? "EmitInterval") <*> (x .@? "S3BucketPrefix")
<*> (x .@? "S3BucketName")
<*> (x .@ "Enabled")
instance Hashable AccessLog where
instance NFData AccessLog where
instance ToQuery AccessLog where
toQuery AccessLog'{..}
= mconcat
["EmitInterval" =: _alEmitInterval,
"S3BucketPrefix" =: _alS3BucketPrefix,
"S3BucketName" =: _alS3BucketName,
"Enabled" =: _alEnabled]
data AdditionalAttribute = AdditionalAttribute'
{ _aaValue :: !(Maybe Text)
, _aaKey :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
additionalAttribute
:: AdditionalAttribute
additionalAttribute =
AdditionalAttribute' {_aaValue = Nothing, _aaKey = Nothing}
aaValue :: Lens' AdditionalAttribute (Maybe Text)
aaValue = lens _aaValue (\ s a -> s{_aaValue = a})
aaKey :: Lens' AdditionalAttribute (Maybe Text)
aaKey = lens _aaKey (\ s a -> s{_aaKey = a})
instance FromXML AdditionalAttribute where
parseXML x
= AdditionalAttribute' <$>
(x .@? "Value") <*> (x .@? "Key")
instance Hashable AdditionalAttribute where
instance NFData AdditionalAttribute where
instance ToQuery AdditionalAttribute where
toQuery AdditionalAttribute'{..}
= mconcat ["Value" =: _aaValue, "Key" =: _aaKey]
data AppCookieStickinessPolicy = AppCookieStickinessPolicy'
{ _acspPolicyName :: !(Maybe Text)
, _acspCookieName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
appCookieStickinessPolicy
:: AppCookieStickinessPolicy
appCookieStickinessPolicy =
AppCookieStickinessPolicy'
{_acspPolicyName = Nothing, _acspCookieName = Nothing}
acspPolicyName :: Lens' AppCookieStickinessPolicy (Maybe Text)
acspPolicyName = lens _acspPolicyName (\ s a -> s{_acspPolicyName = a})
acspCookieName :: Lens' AppCookieStickinessPolicy (Maybe Text)
acspCookieName = lens _acspCookieName (\ s a -> s{_acspCookieName = a})
instance FromXML AppCookieStickinessPolicy where
parseXML x
= AppCookieStickinessPolicy' <$>
(x .@? "PolicyName") <*> (x .@? "CookieName")
instance Hashable AppCookieStickinessPolicy where
instance NFData AppCookieStickinessPolicy where
data BackendServerDescription = BackendServerDescription'
{ _bsdPolicyNames :: !(Maybe [Text])
, _bsdInstancePort :: !(Maybe Nat)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
backendServerDescription
:: BackendServerDescription
backendServerDescription =
BackendServerDescription'
{_bsdPolicyNames = Nothing, _bsdInstancePort = Nothing}
bsdPolicyNames :: Lens' BackendServerDescription [Text]
bsdPolicyNames = lens _bsdPolicyNames (\ s a -> s{_bsdPolicyNames = a}) . _Default . _Coerce
bsdInstancePort :: Lens' BackendServerDescription (Maybe Natural)
bsdInstancePort = lens _bsdInstancePort (\ s a -> s{_bsdInstancePort = a}) . mapping _Nat
instance FromXML BackendServerDescription where
parseXML x
= BackendServerDescription' <$>
(x .@? "PolicyNames" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "InstancePort")
instance Hashable BackendServerDescription where
instance NFData BackendServerDescription where
data ConnectionDraining = ConnectionDraining'
{ _cdTimeout :: !(Maybe Int)
, _cdEnabled :: !Bool
} deriving (Eq, Read, Show, Data, Typeable, Generic)
connectionDraining
:: Bool
-> ConnectionDraining
connectionDraining pEnabled_ =
ConnectionDraining' {_cdTimeout = Nothing, _cdEnabled = pEnabled_}
cdTimeout :: Lens' ConnectionDraining (Maybe Int)
cdTimeout = lens _cdTimeout (\ s a -> s{_cdTimeout = a})
cdEnabled :: Lens' ConnectionDraining Bool
cdEnabled = lens _cdEnabled (\ s a -> s{_cdEnabled = a})
instance FromXML ConnectionDraining where
parseXML x
= ConnectionDraining' <$>
(x .@? "Timeout") <*> (x .@ "Enabled")
instance Hashable ConnectionDraining where
instance NFData ConnectionDraining where
instance ToQuery ConnectionDraining where
toQuery ConnectionDraining'{..}
= mconcat
["Timeout" =: _cdTimeout, "Enabled" =: _cdEnabled]
newtype ConnectionSettings = ConnectionSettings'
{ _csIdleTimeout :: Nat
} deriving (Eq, Read, Show, Data, Typeable, Generic)
connectionSettings
:: Natural
-> ConnectionSettings
connectionSettings pIdleTimeout_ =
ConnectionSettings' {_csIdleTimeout = _Nat # pIdleTimeout_}
csIdleTimeout :: Lens' ConnectionSettings Natural
csIdleTimeout = lens _csIdleTimeout (\ s a -> s{_csIdleTimeout = a}) . _Nat
instance FromXML ConnectionSettings where
parseXML x
= ConnectionSettings' <$> (x .@ "IdleTimeout")
instance Hashable ConnectionSettings where
instance NFData ConnectionSettings where
instance ToQuery ConnectionSettings where
toQuery ConnectionSettings'{..}
= mconcat ["IdleTimeout" =: _csIdleTimeout]
newtype CrossZoneLoadBalancing = CrossZoneLoadBalancing'
{ _czlbEnabled :: Bool
} deriving (Eq, Read, Show, Data, Typeable, Generic)
crossZoneLoadBalancing
:: Bool
-> CrossZoneLoadBalancing
crossZoneLoadBalancing pEnabled_ =
CrossZoneLoadBalancing' {_czlbEnabled = pEnabled_}
czlbEnabled :: Lens' CrossZoneLoadBalancing Bool
czlbEnabled = lens _czlbEnabled (\ s a -> s{_czlbEnabled = a})
instance FromXML CrossZoneLoadBalancing where
parseXML x
= CrossZoneLoadBalancing' <$> (x .@ "Enabled")
instance Hashable CrossZoneLoadBalancing where
instance NFData CrossZoneLoadBalancing where
instance ToQuery CrossZoneLoadBalancing where
toQuery CrossZoneLoadBalancing'{..}
= mconcat ["Enabled" =: _czlbEnabled]
data HealthCheck = HealthCheck'
{ _hcTarget :: !Text
, _hcInterval :: !Nat
, _hcTimeout :: !Nat
, _hcUnhealthyThreshold :: !Nat
, _hcHealthyThreshold :: !Nat
} deriving (Eq, Read, Show, Data, Typeable, Generic)
healthCheck
:: Text
-> Natural
-> Natural
-> Natural
-> Natural
-> HealthCheck
healthCheck pTarget_ pInterval_ pTimeout_ pUnhealthyThreshold_ pHealthyThreshold_ =
HealthCheck'
{ _hcTarget = pTarget_
, _hcInterval = _Nat # pInterval_
, _hcTimeout = _Nat # pTimeout_
, _hcUnhealthyThreshold = _Nat # pUnhealthyThreshold_
, _hcHealthyThreshold = _Nat # pHealthyThreshold_
}
hcTarget :: Lens' HealthCheck Text
hcTarget = lens _hcTarget (\ s a -> s{_hcTarget = a})
hcInterval :: Lens' HealthCheck Natural
hcInterval = lens _hcInterval (\ s a -> s{_hcInterval = a}) . _Nat
hcTimeout :: Lens' HealthCheck Natural
hcTimeout = lens _hcTimeout (\ s a -> s{_hcTimeout = a}) . _Nat
hcUnhealthyThreshold :: Lens' HealthCheck Natural
hcUnhealthyThreshold = lens _hcUnhealthyThreshold (\ s a -> s{_hcUnhealthyThreshold = a}) . _Nat
hcHealthyThreshold :: Lens' HealthCheck Natural
hcHealthyThreshold = lens _hcHealthyThreshold (\ s a -> s{_hcHealthyThreshold = a}) . _Nat
instance FromXML HealthCheck where
parseXML x
= HealthCheck' <$>
(x .@ "Target") <*> (x .@ "Interval") <*>
(x .@ "Timeout")
<*> (x .@ "UnhealthyThreshold")
<*> (x .@ "HealthyThreshold")
instance Hashable HealthCheck where
instance NFData HealthCheck where
instance ToQuery HealthCheck where
toQuery HealthCheck'{..}
= mconcat
["Target" =: _hcTarget, "Interval" =: _hcInterval,
"Timeout" =: _hcTimeout,
"UnhealthyThreshold" =: _hcUnhealthyThreshold,
"HealthyThreshold" =: _hcHealthyThreshold]
newtype Instance = Instance'
{ _iInstanceId :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instance'
:: Instance
instance' = Instance' {_iInstanceId = Nothing}
iInstanceId :: Lens' Instance (Maybe Text)
iInstanceId = lens _iInstanceId (\ s a -> s{_iInstanceId = a})
instance FromXML Instance where
parseXML x = Instance' <$> (x .@? "InstanceId")
instance Hashable Instance where
instance NFData Instance where
instance ToQuery Instance where
toQuery Instance'{..}
= mconcat ["InstanceId" =: _iInstanceId]
data InstanceState = InstanceState'
{ _isInstanceId :: !(Maybe Text)
, _isState :: !(Maybe Text)
, _isReasonCode :: !(Maybe Text)
, _isDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
instanceState
:: InstanceState
instanceState =
InstanceState'
{ _isInstanceId = Nothing
, _isState = Nothing
, _isReasonCode = Nothing
, _isDescription = Nothing
}
isInstanceId :: Lens' InstanceState (Maybe Text)
isInstanceId = lens _isInstanceId (\ s a -> s{_isInstanceId = a})
isState :: Lens' InstanceState (Maybe Text)
isState = lens _isState (\ s a -> s{_isState = a})
isReasonCode :: Lens' InstanceState (Maybe Text)
isReasonCode = lens _isReasonCode (\ s a -> s{_isReasonCode = a})
isDescription :: Lens' InstanceState (Maybe Text)
isDescription = lens _isDescription (\ s a -> s{_isDescription = a})
instance FromXML InstanceState where
parseXML x
= InstanceState' <$>
(x .@? "InstanceId") <*> (x .@? "State") <*>
(x .@? "ReasonCode")
<*> (x .@? "Description")
instance Hashable InstanceState where
instance NFData InstanceState where
data LBCookieStickinessPolicy = LBCookieStickinessPolicy'
{ _lbcspPolicyName :: !(Maybe Text)
, _lbcspCookieExpirationPeriod :: !(Maybe Integer)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
lBCookieStickinessPolicy
:: LBCookieStickinessPolicy
lBCookieStickinessPolicy =
LBCookieStickinessPolicy'
{_lbcspPolicyName = Nothing, _lbcspCookieExpirationPeriod = Nothing}
lbcspPolicyName :: Lens' LBCookieStickinessPolicy (Maybe Text)
lbcspPolicyName = lens _lbcspPolicyName (\ s a -> s{_lbcspPolicyName = a})
lbcspCookieExpirationPeriod :: Lens' LBCookieStickinessPolicy (Maybe Integer)
lbcspCookieExpirationPeriod = lens _lbcspCookieExpirationPeriod (\ s a -> s{_lbcspCookieExpirationPeriod = a})
instance FromXML LBCookieStickinessPolicy where
parseXML x
= LBCookieStickinessPolicy' <$>
(x .@? "PolicyName") <*>
(x .@? "CookieExpirationPeriod")
instance Hashable LBCookieStickinessPolicy where
instance NFData LBCookieStickinessPolicy where
data Limit = Limit'
{ _lMax :: !(Maybe Text)
, _lName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
limit
:: Limit
limit = Limit' {_lMax = Nothing, _lName = Nothing}
lMax :: Lens' Limit (Maybe Text)
lMax = lens _lMax (\ s a -> s{_lMax = a})
lName :: Lens' Limit (Maybe Text)
lName = lens _lName (\ s a -> s{_lName = a})
instance FromXML Limit where
parseXML x
= Limit' <$> (x .@? "Max") <*> (x .@? "Name")
instance Hashable Limit where
instance NFData Limit where
data Listener = Listener'
{ _lInstanceProtocol :: !(Maybe Text)
, _lSSLCertificateId :: !(Maybe Text)
, _lProtocol :: !Text
, _lLoadBalancerPort :: !Int
, _lInstancePort :: !Nat
} deriving (Eq, Read, Show, Data, Typeable, Generic)
listener
:: Text
-> Int
-> Natural
-> Listener
listener pProtocol_ pLoadBalancerPort_ pInstancePort_ =
Listener'
{ _lInstanceProtocol = Nothing
, _lSSLCertificateId = Nothing
, _lProtocol = pProtocol_
, _lLoadBalancerPort = pLoadBalancerPort_
, _lInstancePort = _Nat # pInstancePort_
}
lInstanceProtocol :: Lens' Listener (Maybe Text)
lInstanceProtocol = lens _lInstanceProtocol (\ s a -> s{_lInstanceProtocol = a})
lSSLCertificateId :: Lens' Listener (Maybe Text)
lSSLCertificateId = lens _lSSLCertificateId (\ s a -> s{_lSSLCertificateId = a})
lProtocol :: Lens' Listener Text
lProtocol = lens _lProtocol (\ s a -> s{_lProtocol = a})
lLoadBalancerPort :: Lens' Listener Int
lLoadBalancerPort = lens _lLoadBalancerPort (\ s a -> s{_lLoadBalancerPort = a})
lInstancePort :: Lens' Listener Natural
lInstancePort = lens _lInstancePort (\ s a -> s{_lInstancePort = a}) . _Nat
instance FromXML Listener where
parseXML x
= Listener' <$>
(x .@? "InstanceProtocol") <*>
(x .@? "SSLCertificateId")
<*> (x .@ "Protocol")
<*> (x .@ "LoadBalancerPort")
<*> (x .@ "InstancePort")
instance Hashable Listener where
instance NFData Listener where
instance ToQuery Listener where
toQuery Listener'{..}
= mconcat
["InstanceProtocol" =: _lInstanceProtocol,
"SSLCertificateId" =: _lSSLCertificateId,
"Protocol" =: _lProtocol,
"LoadBalancerPort" =: _lLoadBalancerPort,
"InstancePort" =: _lInstancePort]
data ListenerDescription = ListenerDescription'
{ _ldPolicyNames :: !(Maybe [Text])
, _ldListener :: !(Maybe Listener)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
listenerDescription
:: ListenerDescription
listenerDescription =
ListenerDescription' {_ldPolicyNames = Nothing, _ldListener = Nothing}
ldPolicyNames :: Lens' ListenerDescription [Text]
ldPolicyNames = lens _ldPolicyNames (\ s a -> s{_ldPolicyNames = a}) . _Default . _Coerce
ldListener :: Lens' ListenerDescription (Maybe Listener)
ldListener = lens _ldListener (\ s a -> s{_ldListener = a})
instance FromXML ListenerDescription where
parseXML x
= ListenerDescription' <$>
(x .@? "PolicyNames" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "Listener")
instance Hashable ListenerDescription where
instance NFData ListenerDescription where
data LoadBalancerAttributes = LoadBalancerAttributes'
{ _lbaCrossZoneLoadBalancing :: !(Maybe CrossZoneLoadBalancing)
, _lbaAccessLog :: !(Maybe AccessLog)
, _lbaAdditionalAttributes :: !(Maybe [AdditionalAttribute])
, _lbaConnectionSettings :: !(Maybe ConnectionSettings)
, _lbaConnectionDraining :: !(Maybe ConnectionDraining)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
loadBalancerAttributes
:: LoadBalancerAttributes
loadBalancerAttributes =
LoadBalancerAttributes'
{ _lbaCrossZoneLoadBalancing = Nothing
, _lbaAccessLog = Nothing
, _lbaAdditionalAttributes = Nothing
, _lbaConnectionSettings = Nothing
, _lbaConnectionDraining = Nothing
}
lbaCrossZoneLoadBalancing :: Lens' LoadBalancerAttributes (Maybe CrossZoneLoadBalancing)
lbaCrossZoneLoadBalancing = lens _lbaCrossZoneLoadBalancing (\ s a -> s{_lbaCrossZoneLoadBalancing = a})
lbaAccessLog :: Lens' LoadBalancerAttributes (Maybe AccessLog)
lbaAccessLog = lens _lbaAccessLog (\ s a -> s{_lbaAccessLog = a})
lbaAdditionalAttributes :: Lens' LoadBalancerAttributes [AdditionalAttribute]
lbaAdditionalAttributes = lens _lbaAdditionalAttributes (\ s a -> s{_lbaAdditionalAttributes = a}) . _Default . _Coerce
lbaConnectionSettings :: Lens' LoadBalancerAttributes (Maybe ConnectionSettings)
lbaConnectionSettings = lens _lbaConnectionSettings (\ s a -> s{_lbaConnectionSettings = a})
lbaConnectionDraining :: Lens' LoadBalancerAttributes (Maybe ConnectionDraining)
lbaConnectionDraining = lens _lbaConnectionDraining (\ s a -> s{_lbaConnectionDraining = a})
instance FromXML LoadBalancerAttributes where
parseXML x
= LoadBalancerAttributes' <$>
(x .@? "CrossZoneLoadBalancing") <*>
(x .@? "AccessLog")
<*>
(x .@? "AdditionalAttributes" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "ConnectionSettings")
<*> (x .@? "ConnectionDraining")
instance Hashable LoadBalancerAttributes where
instance NFData LoadBalancerAttributes where
instance ToQuery LoadBalancerAttributes where
toQuery LoadBalancerAttributes'{..}
= mconcat
["CrossZoneLoadBalancing" =:
_lbaCrossZoneLoadBalancing,
"AccessLog" =: _lbaAccessLog,
"AdditionalAttributes" =:
toQuery
(toQueryList "member" <$> _lbaAdditionalAttributes),
"ConnectionSettings" =: _lbaConnectionSettings,
"ConnectionDraining" =: _lbaConnectionDraining]
data LoadBalancerDescription = LoadBalancerDescription'
{ _lbdSourceSecurityGroup :: !(Maybe SourceSecurityGroup)
, _lbdCanonicalHostedZoneName :: !(Maybe Text)
, _lbdSecurityGroups :: !(Maybe [Text])
, _lbdHealthCheck :: !(Maybe HealthCheck)
, _lbdLoadBalancerName :: !(Maybe Text)
, _lbdCreatedTime :: !(Maybe ISO8601)
, _lbdVPCId :: !(Maybe Text)
, _lbdSubnets :: !(Maybe [Text])
, _lbdAvailabilityZones :: !(Maybe [Text])
, _lbdBackendServerDescriptions :: !(Maybe [BackendServerDescription])
, _lbdCanonicalHostedZoneNameId :: !(Maybe Text)
, _lbdInstances :: !(Maybe [Instance])
, _lbdScheme :: !(Maybe Text)
, _lbdListenerDescriptions :: !(Maybe [ListenerDescription])
, _lbdDNSName :: !(Maybe Text)
, _lbdPolicies :: !(Maybe Policies)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
loadBalancerDescription
:: LoadBalancerDescription
loadBalancerDescription =
LoadBalancerDescription'
{ _lbdSourceSecurityGroup = Nothing
, _lbdCanonicalHostedZoneName = Nothing
, _lbdSecurityGroups = Nothing
, _lbdHealthCheck = Nothing
, _lbdLoadBalancerName = Nothing
, _lbdCreatedTime = Nothing
, _lbdVPCId = Nothing
, _lbdSubnets = Nothing
, _lbdAvailabilityZones = Nothing
, _lbdBackendServerDescriptions = Nothing
, _lbdCanonicalHostedZoneNameId = Nothing
, _lbdInstances = Nothing
, _lbdScheme = Nothing
, _lbdListenerDescriptions = Nothing
, _lbdDNSName = Nothing
, _lbdPolicies = Nothing
}
lbdSourceSecurityGroup :: Lens' LoadBalancerDescription (Maybe SourceSecurityGroup)
lbdSourceSecurityGroup = lens _lbdSourceSecurityGroup (\ s a -> s{_lbdSourceSecurityGroup = a})
lbdCanonicalHostedZoneName :: Lens' LoadBalancerDescription (Maybe Text)
lbdCanonicalHostedZoneName = lens _lbdCanonicalHostedZoneName (\ s a -> s{_lbdCanonicalHostedZoneName = a})
lbdSecurityGroups :: Lens' LoadBalancerDescription [Text]
lbdSecurityGroups = lens _lbdSecurityGroups (\ s a -> s{_lbdSecurityGroups = a}) . _Default . _Coerce
lbdHealthCheck :: Lens' LoadBalancerDescription (Maybe HealthCheck)
lbdHealthCheck = lens _lbdHealthCheck (\ s a -> s{_lbdHealthCheck = a})
lbdLoadBalancerName :: Lens' LoadBalancerDescription (Maybe Text)
lbdLoadBalancerName = lens _lbdLoadBalancerName (\ s a -> s{_lbdLoadBalancerName = a})
lbdCreatedTime :: Lens' LoadBalancerDescription (Maybe UTCTime)
lbdCreatedTime = lens _lbdCreatedTime (\ s a -> s{_lbdCreatedTime = a}) . mapping _Time
lbdVPCId :: Lens' LoadBalancerDescription (Maybe Text)
lbdVPCId = lens _lbdVPCId (\ s a -> s{_lbdVPCId = a})
lbdSubnets :: Lens' LoadBalancerDescription [Text]
lbdSubnets = lens _lbdSubnets (\ s a -> s{_lbdSubnets = a}) . _Default . _Coerce
lbdAvailabilityZones :: Lens' LoadBalancerDescription [Text]
lbdAvailabilityZones = lens _lbdAvailabilityZones (\ s a -> s{_lbdAvailabilityZones = a}) . _Default . _Coerce
lbdBackendServerDescriptions :: Lens' LoadBalancerDescription [BackendServerDescription]
lbdBackendServerDescriptions = lens _lbdBackendServerDescriptions (\ s a -> s{_lbdBackendServerDescriptions = a}) . _Default . _Coerce
lbdCanonicalHostedZoneNameId :: Lens' LoadBalancerDescription (Maybe Text)
lbdCanonicalHostedZoneNameId = lens _lbdCanonicalHostedZoneNameId (\ s a -> s{_lbdCanonicalHostedZoneNameId = a})
lbdInstances :: Lens' LoadBalancerDescription [Instance]
lbdInstances = lens _lbdInstances (\ s a -> s{_lbdInstances = a}) . _Default . _Coerce
lbdScheme :: Lens' LoadBalancerDescription (Maybe Text)
lbdScheme = lens _lbdScheme (\ s a -> s{_lbdScheme = a})
lbdListenerDescriptions :: Lens' LoadBalancerDescription [ListenerDescription]
lbdListenerDescriptions = lens _lbdListenerDescriptions (\ s a -> s{_lbdListenerDescriptions = a}) . _Default . _Coerce
lbdDNSName :: Lens' LoadBalancerDescription (Maybe Text)
lbdDNSName = lens _lbdDNSName (\ s a -> s{_lbdDNSName = a})
lbdPolicies :: Lens' LoadBalancerDescription (Maybe Policies)
lbdPolicies = lens _lbdPolicies (\ s a -> s{_lbdPolicies = a})
instance FromXML LoadBalancerDescription where
parseXML x
= LoadBalancerDescription' <$>
(x .@? "SourceSecurityGroup") <*>
(x .@? "CanonicalHostedZoneName")
<*>
(x .@? "SecurityGroups" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "HealthCheck")
<*> (x .@? "LoadBalancerName")
<*> (x .@? "CreatedTime")
<*> (x .@? "VPCId")
<*>
(x .@? "Subnets" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "AvailabilityZones" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "BackendServerDescriptions" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "CanonicalHostedZoneNameID")
<*>
(x .@? "Instances" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "Scheme")
<*>
(x .@? "ListenerDescriptions" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "DNSName")
<*> (x .@? "Policies")
instance Hashable LoadBalancerDescription where
instance NFData LoadBalancerDescription where
data Policies = Policies'
{ _pOtherPolicies :: !(Maybe [Text])
, _pLBCookieStickinessPolicies :: !(Maybe [LBCookieStickinessPolicy])
, _pAppCookieStickinessPolicies :: !(Maybe [AppCookieStickinessPolicy])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
policies
:: Policies
policies =
Policies'
{ _pOtherPolicies = Nothing
, _pLBCookieStickinessPolicies = Nothing
, _pAppCookieStickinessPolicies = Nothing
}
pOtherPolicies :: Lens' Policies [Text]
pOtherPolicies = lens _pOtherPolicies (\ s a -> s{_pOtherPolicies = a}) . _Default . _Coerce
pLBCookieStickinessPolicies :: Lens' Policies [LBCookieStickinessPolicy]
pLBCookieStickinessPolicies = lens _pLBCookieStickinessPolicies (\ s a -> s{_pLBCookieStickinessPolicies = a}) . _Default . _Coerce
pAppCookieStickinessPolicies :: Lens' Policies [AppCookieStickinessPolicy]
pAppCookieStickinessPolicies = lens _pAppCookieStickinessPolicies (\ s a -> s{_pAppCookieStickinessPolicies = a}) . _Default . _Coerce
instance FromXML Policies where
parseXML x
= Policies' <$>
(x .@? "OtherPolicies" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "LBCookieStickinessPolicies" .!@ mempty >>=
may (parseXMLList "member"))
<*>
(x .@? "AppCookieStickinessPolicies" .!@ mempty >>=
may (parseXMLList "member"))
instance Hashable Policies where
instance NFData Policies where
data PolicyAttribute = PolicyAttribute'
{ _paAttributeValue :: !(Maybe Text)
, _paAttributeName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
policyAttribute
:: PolicyAttribute
policyAttribute =
PolicyAttribute' {_paAttributeValue = Nothing, _paAttributeName = Nothing}
paAttributeValue :: Lens' PolicyAttribute (Maybe Text)
paAttributeValue = lens _paAttributeValue (\ s a -> s{_paAttributeValue = a})
paAttributeName :: Lens' PolicyAttribute (Maybe Text)
paAttributeName = lens _paAttributeName (\ s a -> s{_paAttributeName = a})
instance Hashable PolicyAttribute where
instance NFData PolicyAttribute where
instance ToQuery PolicyAttribute where
toQuery PolicyAttribute'{..}
= mconcat
["AttributeValue" =: _paAttributeValue,
"AttributeName" =: _paAttributeName]
data PolicyAttributeDescription = PolicyAttributeDescription'
{ _padAttributeValue :: !(Maybe Text)
, _padAttributeName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
policyAttributeDescription
:: PolicyAttributeDescription
policyAttributeDescription =
PolicyAttributeDescription'
{_padAttributeValue = Nothing, _padAttributeName = Nothing}
padAttributeValue :: Lens' PolicyAttributeDescription (Maybe Text)
padAttributeValue = lens _padAttributeValue (\ s a -> s{_padAttributeValue = a})
padAttributeName :: Lens' PolicyAttributeDescription (Maybe Text)
padAttributeName = lens _padAttributeName (\ s a -> s{_padAttributeName = a})
instance FromXML PolicyAttributeDescription where
parseXML x
= PolicyAttributeDescription' <$>
(x .@? "AttributeValue") <*> (x .@? "AttributeName")
instance Hashable PolicyAttributeDescription where
instance NFData PolicyAttributeDescription where
data PolicyAttributeTypeDescription = PolicyAttributeTypeDescription'
{ _patdAttributeType :: !(Maybe Text)
, _patdCardinality :: !(Maybe Text)
, _patdDefaultValue :: !(Maybe Text)
, _patdAttributeName :: !(Maybe Text)
, _patdDescription :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
policyAttributeTypeDescription
:: PolicyAttributeTypeDescription
policyAttributeTypeDescription =
PolicyAttributeTypeDescription'
{ _patdAttributeType = Nothing
, _patdCardinality = Nothing
, _patdDefaultValue = Nothing
, _patdAttributeName = Nothing
, _patdDescription = Nothing
}
patdAttributeType :: Lens' PolicyAttributeTypeDescription (Maybe Text)
patdAttributeType = lens _patdAttributeType (\ s a -> s{_patdAttributeType = a})
patdCardinality :: Lens' PolicyAttributeTypeDescription (Maybe Text)
patdCardinality = lens _patdCardinality (\ s a -> s{_patdCardinality = a})
patdDefaultValue :: Lens' PolicyAttributeTypeDescription (Maybe Text)
patdDefaultValue = lens _patdDefaultValue (\ s a -> s{_patdDefaultValue = a})
patdAttributeName :: Lens' PolicyAttributeTypeDescription (Maybe Text)
patdAttributeName = lens _patdAttributeName (\ s a -> s{_patdAttributeName = a})
patdDescription :: Lens' PolicyAttributeTypeDescription (Maybe Text)
patdDescription = lens _patdDescription (\ s a -> s{_patdDescription = a})
instance FromXML PolicyAttributeTypeDescription where
parseXML x
= PolicyAttributeTypeDescription' <$>
(x .@? "AttributeType") <*> (x .@? "Cardinality") <*>
(x .@? "DefaultValue")
<*> (x .@? "AttributeName")
<*> (x .@? "Description")
instance Hashable PolicyAttributeTypeDescription
where
instance NFData PolicyAttributeTypeDescription where
data PolicyDescription = PolicyDescription'
{ _pdPolicyName :: !(Maybe Text)
, _pdPolicyAttributeDescriptions :: !(Maybe [PolicyAttributeDescription])
, _pdPolicyTypeName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
policyDescription
:: PolicyDescription
policyDescription =
PolicyDescription'
{ _pdPolicyName = Nothing
, _pdPolicyAttributeDescriptions = Nothing
, _pdPolicyTypeName = Nothing
}
pdPolicyName :: Lens' PolicyDescription (Maybe Text)
pdPolicyName = lens _pdPolicyName (\ s a -> s{_pdPolicyName = a})
pdPolicyAttributeDescriptions :: Lens' PolicyDescription [PolicyAttributeDescription]
pdPolicyAttributeDescriptions = lens _pdPolicyAttributeDescriptions (\ s a -> s{_pdPolicyAttributeDescriptions = a}) . _Default . _Coerce
pdPolicyTypeName :: Lens' PolicyDescription (Maybe Text)
pdPolicyTypeName = lens _pdPolicyTypeName (\ s a -> s{_pdPolicyTypeName = a})
instance FromXML PolicyDescription where
parseXML x
= PolicyDescription' <$>
(x .@? "PolicyName") <*>
(x .@? "PolicyAttributeDescriptions" .!@ mempty >>=
may (parseXMLList "member"))
<*> (x .@? "PolicyTypeName")
instance Hashable PolicyDescription where
instance NFData PolicyDescription where
data PolicyTypeDescription = PolicyTypeDescription'
{ _ptdPolicyTypeName :: !(Maybe Text)
, _ptdDescription :: !(Maybe Text)
, _ptdPolicyAttributeTypeDescriptions :: !(Maybe [PolicyAttributeTypeDescription])
} deriving (Eq, Read, Show, Data, Typeable, Generic)
policyTypeDescription
:: PolicyTypeDescription
policyTypeDescription =
PolicyTypeDescription'
{ _ptdPolicyTypeName = Nothing
, _ptdDescription = Nothing
, _ptdPolicyAttributeTypeDescriptions = Nothing
}
ptdPolicyTypeName :: Lens' PolicyTypeDescription (Maybe Text)
ptdPolicyTypeName = lens _ptdPolicyTypeName (\ s a -> s{_ptdPolicyTypeName = a})
ptdDescription :: Lens' PolicyTypeDescription (Maybe Text)
ptdDescription = lens _ptdDescription (\ s a -> s{_ptdDescription = a})
ptdPolicyAttributeTypeDescriptions :: Lens' PolicyTypeDescription [PolicyAttributeTypeDescription]
ptdPolicyAttributeTypeDescriptions = lens _ptdPolicyAttributeTypeDescriptions (\ s a -> s{_ptdPolicyAttributeTypeDescriptions = a}) . _Default . _Coerce
instance FromXML PolicyTypeDescription where
parseXML x
= PolicyTypeDescription' <$>
(x .@? "PolicyTypeName") <*> (x .@? "Description")
<*>
(x .@? "PolicyAttributeTypeDescriptions" .!@ mempty
>>= may (parseXMLList "member"))
instance Hashable PolicyTypeDescription where
instance NFData PolicyTypeDescription where
data SourceSecurityGroup = SourceSecurityGroup'
{ _ssgOwnerAlias :: !(Maybe Text)
, _ssgGroupName :: !(Maybe Text)
} deriving (Eq, Read, Show, Data, Typeable, Generic)
sourceSecurityGroup
:: SourceSecurityGroup
sourceSecurityGroup =
SourceSecurityGroup' {_ssgOwnerAlias = Nothing, _ssgGroupName = Nothing}
ssgOwnerAlias :: Lens' SourceSecurityGroup (Maybe Text)
ssgOwnerAlias = lens _ssgOwnerAlias (\ s a -> s{_ssgOwnerAlias = a})
ssgGroupName :: Lens' SourceSecurityGroup (Maybe Text)
ssgGroupName = lens _ssgGroupName (\ s a -> s{_ssgGroupName = a})
instance FromXML SourceSecurityGroup where
parseXML x
= SourceSecurityGroup' <$>
(x .@? "OwnerAlias") <*> (x .@? "GroupName")
instance Hashable SourceSecurityGroup where
instance NFData SourceSecurityGroup where
data Tag = Tag'
{ _tagValue :: !(Maybe Text)
, _tagKey :: !Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
tag
:: Text
-> Tag
tag pKey_ = Tag' {_tagValue = Nothing, _tagKey = pKey_}
tagValue :: Lens' Tag (Maybe Text)
tagValue = lens _tagValue (\ s a -> s{_tagValue = a})
tagKey :: Lens' Tag Text
tagKey = lens _tagKey (\ s a -> s{_tagKey = a})
instance FromXML Tag where
parseXML x
= Tag' <$> (x .@? "Value") <*> (x .@ "Key")
instance Hashable Tag where
instance NFData Tag where
instance ToQuery Tag where
toQuery Tag'{..}
= mconcat ["Value" =: _tagValue, "Key" =: _tagKey]
data TagDescription = TagDescription'
{ _tdLoadBalancerName :: !(Maybe Text)
, _tdTags :: !(Maybe (List1 Tag))
} deriving (Eq, Read, Show, Data, Typeable, Generic)
tagDescription
:: TagDescription
tagDescription =
TagDescription' {_tdLoadBalancerName = Nothing, _tdTags = Nothing}
tdLoadBalancerName :: Lens' TagDescription (Maybe Text)
tdLoadBalancerName = lens _tdLoadBalancerName (\ s a -> s{_tdLoadBalancerName = a})
tdTags :: Lens' TagDescription (Maybe (NonEmpty Tag))
tdTags = lens _tdTags (\ s a -> s{_tdTags = a}) . mapping _List1
instance FromXML TagDescription where
parseXML x
= TagDescription' <$>
(x .@? "LoadBalancerName") <*>
(x .@? "Tags" .!@ mempty >>=
may (parseXMLList1 "member"))
instance Hashable TagDescription where
instance NFData TagDescription where
newtype TagKeyOnly = TagKeyOnly'
{ _tkoKey :: Maybe Text
} deriving (Eq, Read, Show, Data, Typeable, Generic)
tagKeyOnly
:: TagKeyOnly
tagKeyOnly = TagKeyOnly' {_tkoKey = Nothing}
tkoKey :: Lens' TagKeyOnly (Maybe Text)
tkoKey = lens _tkoKey (\ s a -> s{_tkoKey = a})
instance Hashable TagKeyOnly where
instance NFData TagKeyOnly where
instance ToQuery TagKeyOnly where
toQuery TagKeyOnly'{..} = mconcat ["Key" =: _tkoKey]