module Stratosphere.Resources.LoadBalancer where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
import Stratosphere.ResourceProperties.AccessLoggingPolicy
import Stratosphere.ResourceProperties.AppCookieStickinessPolicy
import Stratosphere.ResourceProperties.ConnectionDrainingPolicy
import Stratosphere.ResourceProperties.ConnectionSettings
import Stratosphere.ResourceProperties.HealthCheck
import Stratosphere.ResourceProperties.LBCookieStickinessPolicy
import Stratosphere.ResourceProperties.ListenerProperty
import Stratosphere.ResourceProperties.ELBPolicy
import Stratosphere.ResourceProperties.ResourceTag
data LoadBalancer =
LoadBalancer
{ _loadBalancerAccessLoggingPolicy :: Maybe AccessLoggingPolicy
, _loadBalancerAppCookieStickinessPolicy :: Maybe [AppCookieStickinessPolicy]
, _loadBalancerAvailabilityZones :: Maybe [Val Text]
, _loadBalancerConnectionDrainingPolicy :: Maybe ConnectionDrainingPolicy
, _loadBalancerConnectionSettings :: Maybe ConnectionSettings
, _loadBalancerCrossZone :: Maybe (Val Bool')
, _loadBalancerHealthCheck :: Maybe HealthCheck
, _loadBalancerInstances :: Maybe [Val Text]
, _loadBalancerLBCookieStickinessPolicy :: Maybe [LBCookieStickinessPolicy]
, _loadBalancerLoadBalancerName :: Maybe (Val Text)
, _loadBalancerListeners :: [ListenerProperty]
, _loadBalancerPolicies :: Maybe [ELBPolicy]
, _loadBalancerScheme :: Maybe (Val Text)
, _loadBalancerSecurityGroups :: Maybe [Val Text]
, _loadBalancerSubnets :: Maybe [Val Text]
, _loadBalancerTags :: Maybe [ResourceTag]
} deriving (Show, Generic)
instance ToJSON LoadBalancer where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 13, omitNothingFields = True }
instance FromJSON LoadBalancer where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 13, omitNothingFields = True }
loadBalancer
:: [ListenerProperty]
-> LoadBalancer
loadBalancer listenersarg =
LoadBalancer
{ _loadBalancerAccessLoggingPolicy = Nothing
, _loadBalancerAppCookieStickinessPolicy = Nothing
, _loadBalancerAvailabilityZones = Nothing
, _loadBalancerConnectionDrainingPolicy = Nothing
, _loadBalancerConnectionSettings = Nothing
, _loadBalancerCrossZone = Nothing
, _loadBalancerHealthCheck = Nothing
, _loadBalancerInstances = Nothing
, _loadBalancerLBCookieStickinessPolicy = Nothing
, _loadBalancerLoadBalancerName = Nothing
, _loadBalancerListeners = listenersarg
, _loadBalancerPolicies = Nothing
, _loadBalancerScheme = Nothing
, _loadBalancerSecurityGroups = Nothing
, _loadBalancerSubnets = Nothing
, _loadBalancerTags = Nothing
}
lbAccessLoggingPolicy :: Lens' LoadBalancer (Maybe AccessLoggingPolicy)
lbAccessLoggingPolicy = lens _loadBalancerAccessLoggingPolicy (\s a -> s { _loadBalancerAccessLoggingPolicy = a })
lbAppCookieStickinessPolicy :: Lens' LoadBalancer (Maybe [AppCookieStickinessPolicy])
lbAppCookieStickinessPolicy = lens _loadBalancerAppCookieStickinessPolicy (\s a -> s { _loadBalancerAppCookieStickinessPolicy = a })
lbAvailabilityZones :: Lens' LoadBalancer (Maybe [Val Text])
lbAvailabilityZones = lens _loadBalancerAvailabilityZones (\s a -> s { _loadBalancerAvailabilityZones = a })
lbConnectionDrainingPolicy :: Lens' LoadBalancer (Maybe ConnectionDrainingPolicy)
lbConnectionDrainingPolicy = lens _loadBalancerConnectionDrainingPolicy (\s a -> s { _loadBalancerConnectionDrainingPolicy = a })
lbConnectionSettings :: Lens' LoadBalancer (Maybe ConnectionSettings)
lbConnectionSettings = lens _loadBalancerConnectionSettings (\s a -> s { _loadBalancerConnectionSettings = a })
lbCrossZone :: Lens' LoadBalancer (Maybe (Val Bool'))
lbCrossZone = lens _loadBalancerCrossZone (\s a -> s { _loadBalancerCrossZone = a })
lbHealthCheck :: Lens' LoadBalancer (Maybe HealthCheck)
lbHealthCheck = lens _loadBalancerHealthCheck (\s a -> s { _loadBalancerHealthCheck = a })
lbInstances :: Lens' LoadBalancer (Maybe [Val Text])
lbInstances = lens _loadBalancerInstances (\s a -> s { _loadBalancerInstances = a })
lbLBCookieStickinessPolicy :: Lens' LoadBalancer (Maybe [LBCookieStickinessPolicy])
lbLBCookieStickinessPolicy = lens _loadBalancerLBCookieStickinessPolicy (\s a -> s { _loadBalancerLBCookieStickinessPolicy = a })
lbLoadBalancerName :: Lens' LoadBalancer (Maybe (Val Text))
lbLoadBalancerName = lens _loadBalancerLoadBalancerName (\s a -> s { _loadBalancerLoadBalancerName = a })
lbListeners :: Lens' LoadBalancer [ListenerProperty]
lbListeners = lens _loadBalancerListeners (\s a -> s { _loadBalancerListeners = a })
lbPolicies :: Lens' LoadBalancer (Maybe [ELBPolicy])
lbPolicies = lens _loadBalancerPolicies (\s a -> s { _loadBalancerPolicies = a })
lbScheme :: Lens' LoadBalancer (Maybe (Val Text))
lbScheme = lens _loadBalancerScheme (\s a -> s { _loadBalancerScheme = a })
lbSecurityGroups :: Lens' LoadBalancer (Maybe [Val Text])
lbSecurityGroups = lens _loadBalancerSecurityGroups (\s a -> s { _loadBalancerSecurityGroups = a })
lbSubnets :: Lens' LoadBalancer (Maybe [Val Text])
lbSubnets = lens _loadBalancerSubnets (\s a -> s { _loadBalancerSubnets = a })
lbTags :: Lens' LoadBalancer (Maybe [ResourceTag])
lbTags = lens _loadBalancerTags (\s a -> s { _loadBalancerTags = a })