module Stratosphere.Resources.ApiGatewayDeployment where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
import Stratosphere.ResourceProperties.APIGatewayDeploymentStageDescription
data ApiGatewayDeployment =
ApiGatewayDeployment
{ _apiGatewayDeploymentDescription :: Maybe (Val Text)
, _apiGatewayDeploymentRestApiId :: Val Text
, _apiGatewayDeploymentStageDescription :: Maybe APIGatewayDeploymentStageDescription
, _apiGatewayDeploymentStageName :: Maybe (Val Text)
} deriving (Show, Generic)
instance ToJSON ApiGatewayDeployment where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }
instance FromJSON ApiGatewayDeployment where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 21, omitNothingFields = True }
apiGatewayDeployment
:: Val Text
-> ApiGatewayDeployment
apiGatewayDeployment restApiIdarg =
ApiGatewayDeployment
{ _apiGatewayDeploymentDescription = Nothing
, _apiGatewayDeploymentRestApiId = restApiIdarg
, _apiGatewayDeploymentStageDescription = Nothing
, _apiGatewayDeploymentStageName = Nothing
}
agdDescription :: Lens' ApiGatewayDeployment (Maybe (Val Text))
agdDescription = lens _apiGatewayDeploymentDescription (\s a -> s { _apiGatewayDeploymentDescription = a })
agdRestApiId :: Lens' ApiGatewayDeployment (Val Text)
agdRestApiId = lens _apiGatewayDeploymentRestApiId (\s a -> s { _apiGatewayDeploymentRestApiId = a })
agdStageDescription :: Lens' ApiGatewayDeployment (Maybe APIGatewayDeploymentStageDescription)
agdStageDescription = lens _apiGatewayDeploymentStageDescription (\s a -> s { _apiGatewayDeploymentStageDescription = a })
agdStageName :: Lens' ApiGatewayDeployment (Maybe (Val Text))
agdStageName = lens _apiGatewayDeploymentStageName (\s a -> s { _apiGatewayDeploymentStageName = a })