module Stratosphere.ResourceProperties.ListenerProperty where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data ListenerProperty =
ListenerProperty
{ _listenerPropertyInstancePort :: Val Text
, _listenerPropertyInstanceProtocol :: Maybe (Val Text)
, _listenerPropertyLoadBalancerPort :: Val Text
, _listenerPropertyPolicyNames :: Maybe [Val Text]
, _listenerPropertyProtocol :: Val Text
, _listenerPropertySSLCertificateId :: Maybe (Val Text)
} deriving (Show, Generic)
instance ToJSON ListenerProperty where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }
instance FromJSON ListenerProperty where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }
listenerProperty
:: Val Text
-> Val Text
-> Val Text
-> ListenerProperty
listenerProperty instancePortarg loadBalancerPortarg protocolarg =
ListenerProperty
{ _listenerPropertyInstancePort = instancePortarg
, _listenerPropertyInstanceProtocol = Nothing
, _listenerPropertyLoadBalancerPort = loadBalancerPortarg
, _listenerPropertyPolicyNames = Nothing
, _listenerPropertyProtocol = protocolarg
, _listenerPropertySSLCertificateId = Nothing
}
lpInstancePort :: Lens' ListenerProperty (Val Text)
lpInstancePort = lens _listenerPropertyInstancePort (\s a -> s { _listenerPropertyInstancePort = a })
lpInstanceProtocol :: Lens' ListenerProperty (Maybe (Val Text))
lpInstanceProtocol = lens _listenerPropertyInstanceProtocol (\s a -> s { _listenerPropertyInstanceProtocol = a })
lpLoadBalancerPort :: Lens' ListenerProperty (Val Text)
lpLoadBalancerPort = lens _listenerPropertyLoadBalancerPort (\s a -> s { _listenerPropertyLoadBalancerPort = a })
lpPolicyNames :: Lens' ListenerProperty (Maybe [Val Text])
lpPolicyNames = lens _listenerPropertyPolicyNames (\s a -> s { _listenerPropertyPolicyNames = a })
lpProtocol :: Lens' ListenerProperty (Val Text)
lpProtocol = lens _listenerPropertyProtocol (\s a -> s { _listenerPropertyProtocol = a })
lpSSLCertificateId :: Lens' ListenerProperty (Maybe (Val Text))
lpSSLCertificateId = lens _listenerPropertySSLCertificateId (\s a -> s { _listenerPropertySSLCertificateId = a })