module Stratosphere.ResourceProperties.ELBPolicy where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data ELBPolicy =
ELBPolicy
{ _eLBPolicyAttributes :: Object
, _eLBPolicyInstancePorts :: Maybe [Val Text]
, _eLBPolicyLoadBalancerPorts :: Maybe [Val Text]
, _eLBPolicyPolicyName :: Val Text
, _eLBPolicyPolicyType :: Val Text
} deriving (Show, Generic)
instance ToJSON ELBPolicy where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 10, omitNothingFields = True }
instance FromJSON ELBPolicy where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 10, omitNothingFields = True }
elbPolicy
:: Object
-> Val Text
-> Val Text
-> ELBPolicy
elbPolicy attributesarg policyNamearg policyTypearg =
ELBPolicy
{ _eLBPolicyAttributes = attributesarg
, _eLBPolicyInstancePorts = Nothing
, _eLBPolicyLoadBalancerPorts = Nothing
, _eLBPolicyPolicyName = policyNamearg
, _eLBPolicyPolicyType = policyTypearg
}
elbpAttributes :: Lens' ELBPolicy Object
elbpAttributes = lens _eLBPolicyAttributes (\s a -> s { _eLBPolicyAttributes = a })
elbpInstancePorts :: Lens' ELBPolicy (Maybe [Val Text])
elbpInstancePorts = lens _eLBPolicyInstancePorts (\s a -> s { _eLBPolicyInstancePorts = a })
elbpLoadBalancerPorts :: Lens' ELBPolicy (Maybe [Val Text])
elbpLoadBalancerPorts = lens _eLBPolicyLoadBalancerPorts (\s a -> s { _eLBPolicyLoadBalancerPorts = a })
elbpPolicyName :: Lens' ELBPolicy (Val Text)
elbpPolicyName = lens _eLBPolicyPolicyName (\s a -> s { _eLBPolicyPolicyName = a })
elbpPolicyType :: Lens' ELBPolicy (Val Text)
elbpPolicyType = lens _eLBPolicyPolicyType (\s a -> s { _eLBPolicyPolicyType = a })