module Stratosphere.ResourceProperties.AppCookieStickinessPolicy where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data AppCookieStickinessPolicy =
AppCookieStickinessPolicy
{ _appCookieStickinessPolicyCookieName :: Val Text
, _appCookieStickinessPolicyPolicyName :: Val Text
} deriving (Show, Generic)
instance ToJSON AppCookieStickinessPolicy where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 26, omitNothingFields = True }
instance FromJSON AppCookieStickinessPolicy where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 26, omitNothingFields = True }
appCookieStickinessPolicy
:: Val Text
-> Val Text
-> AppCookieStickinessPolicy
appCookieStickinessPolicy cookieNamearg policyNamearg =
AppCookieStickinessPolicy
{ _appCookieStickinessPolicyCookieName = cookieNamearg
, _appCookieStickinessPolicyPolicyName = policyNamearg
}
acspCookieName :: Lens' AppCookieStickinessPolicy (Val Text)
acspCookieName = lens _appCookieStickinessPolicyCookieName (\s a -> s { _appCookieStickinessPolicyCookieName = a })
acspPolicyName :: Lens' AppCookieStickinessPolicy (Val Text)
acspPolicyName = lens _appCookieStickinessPolicyPolicyName (\s a -> s { _appCookieStickinessPolicyPolicyName = a })