module Stratosphere.ResourceProperties.LBCookieStickinessPolicy where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data LBCookieStickinessPolicy =
LBCookieStickinessPolicy
{ _lBCookieStickinessPolicyCookieExpirationPeriod :: Maybe (Val Text)
, _lBCookieStickinessPolicyPolicyName :: Val Text
} deriving (Show, Generic)
instance ToJSON LBCookieStickinessPolicy where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 25, omitNothingFields = True }
instance FromJSON LBCookieStickinessPolicy where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 25, omitNothingFields = True }
lbCookieStickinessPolicy
:: Val Text
-> LBCookieStickinessPolicy
lbCookieStickinessPolicy policyNamearg =
LBCookieStickinessPolicy
{ _lBCookieStickinessPolicyCookieExpirationPeriod = Nothing
, _lBCookieStickinessPolicyPolicyName = policyNamearg
}
lbcspCookieExpirationPeriod :: Lens' LBCookieStickinessPolicy (Maybe (Val Text))
lbcspCookieExpirationPeriod = lens _lBCookieStickinessPolicyCookieExpirationPeriod (\s a -> s { _lBCookieStickinessPolicyCookieExpirationPeriod = a })
lbcspPolicyName :: Lens' LBCookieStickinessPolicy (Val Text)
lbcspPolicyName = lens _lBCookieStickinessPolicyPolicyName (\s a -> s { _lBCookieStickinessPolicyPolicyName = a })