module Stratosphere.Resources.ApiGatewayUsagePlan where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
import Stratosphere.ResourceProperties.ApiGatewayUsagePlanApiStage
import Stratosphere.ResourceProperties.ApiGatewayUsagePlanQuotaSettings
import Stratosphere.ResourceProperties.ApiGatewayUsagePlanThrottleSettings
data ApiGatewayUsagePlan =
ApiGatewayUsagePlan
{ _apiGatewayUsagePlanApiStages :: Maybe [ApiGatewayUsagePlanApiStage]
, _apiGatewayUsagePlanDescription :: Maybe (Val Text)
, _apiGatewayUsagePlanQuota :: Maybe ApiGatewayUsagePlanQuotaSettings
, _apiGatewayUsagePlanThrottle :: Maybe ApiGatewayUsagePlanThrottleSettings
, _apiGatewayUsagePlanUsagePlanName :: Maybe (Val Text)
} deriving (Show, Generic)
instance ToJSON ApiGatewayUsagePlan where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 20, omitNothingFields = True }
instance FromJSON ApiGatewayUsagePlan where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 20, omitNothingFields = True }
apiGatewayUsagePlan
:: ApiGatewayUsagePlan
apiGatewayUsagePlan =
ApiGatewayUsagePlan
{ _apiGatewayUsagePlanApiStages = Nothing
, _apiGatewayUsagePlanDescription = Nothing
, _apiGatewayUsagePlanQuota = Nothing
, _apiGatewayUsagePlanThrottle = Nothing
, _apiGatewayUsagePlanUsagePlanName = Nothing
}
agupApiStages :: Lens' ApiGatewayUsagePlan (Maybe [ApiGatewayUsagePlanApiStage])
agupApiStages = lens _apiGatewayUsagePlanApiStages (\s a -> s { _apiGatewayUsagePlanApiStages = a })
agupDescription :: Lens' ApiGatewayUsagePlan (Maybe (Val Text))
agupDescription = lens _apiGatewayUsagePlanDescription (\s a -> s { _apiGatewayUsagePlanDescription = a })
agupQuota :: Lens' ApiGatewayUsagePlan (Maybe ApiGatewayUsagePlanQuotaSettings)
agupQuota = lens _apiGatewayUsagePlanQuota (\s a -> s { _apiGatewayUsagePlanQuota = a })
agupThrottle :: Lens' ApiGatewayUsagePlan (Maybe ApiGatewayUsagePlanThrottleSettings)
agupThrottle = lens _apiGatewayUsagePlanThrottle (\s a -> s { _apiGatewayUsagePlanThrottle = a })
agupUsagePlanName :: Lens' ApiGatewayUsagePlan (Maybe (Val Text))
agupUsagePlanName = lens _apiGatewayUsagePlanUsagePlanName (\s a -> s { _apiGatewayUsagePlanUsagePlanName = a })