module Stratosphere.Resources.ApiGatewayModel where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
data ApiGatewayModel =
ApiGatewayModel
{ _apiGatewayModelContentType :: Maybe (Val Text)
, _apiGatewayModelDescription :: Maybe (Val Text)
, _apiGatewayModelName :: Maybe (Val Text)
, _apiGatewayModelRestApiId :: Val Text
, _apiGatewayModelSchema :: Maybe Object
} deriving (Show, Generic)
instance ToJSON ApiGatewayModel where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 16, omitNothingFields = True }
instance FromJSON ApiGatewayModel where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 16, omitNothingFields = True }
apiGatewayModel
:: Val Text
-> ApiGatewayModel
apiGatewayModel restApiIdarg =
ApiGatewayModel
{ _apiGatewayModelContentType = Nothing
, _apiGatewayModelDescription = Nothing
, _apiGatewayModelName = Nothing
, _apiGatewayModelRestApiId = restApiIdarg
, _apiGatewayModelSchema = Nothing
}
agmContentType :: Lens' ApiGatewayModel (Maybe (Val Text))
agmContentType = lens _apiGatewayModelContentType (\s a -> s { _apiGatewayModelContentType = a })
agmDescription :: Lens' ApiGatewayModel (Maybe (Val Text))
agmDescription = lens _apiGatewayModelDescription (\s a -> s { _apiGatewayModelDescription = a })
agmName :: Lens' ApiGatewayModel (Maybe (Val Text))
agmName = lens _apiGatewayModelName (\s a -> s { _apiGatewayModelName = a })
agmRestApiId :: Lens' ApiGatewayModel (Val Text)
agmRestApiId = lens _apiGatewayModelRestApiId (\s a -> s { _apiGatewayModelRestApiId = a })
agmSchema :: Lens' ApiGatewayModel (Maybe Object)
agmSchema = lens _apiGatewayModelSchema (\s a -> s { _apiGatewayModelSchema = a })