module Stratosphere.Resources.ApiGatewayMethod where
import Control.Lens
import Data.Aeson
import Data.Aeson.Types
import Data.Text
import GHC.Generics
import Stratosphere.Values
import Stratosphere.ResourceProperties.ApiGatewayIntegration
import Stratosphere.ResourceProperties.ApiGatewayMethodResponse
data ApiGatewayMethod =
ApiGatewayMethod
{ _apiGatewayMethodApiKeyRequired :: Maybe (Val Bool')
, _apiGatewayMethodAuthorizationType :: Val Text
, _apiGatewayMethodAuthorizerId :: Maybe (Val Text)
, _apiGatewayMethodHttpMethod :: Val Text
, _apiGatewayMethodIntegration :: Maybe ApiGatewayIntegration
, _apiGatewayMethodMethodResponses :: Maybe [ApiGatewayMethodResponse]
, _apiGatewayMethodRequestModels :: Maybe Object
, _apiGatewayMethodRequestParameters :: Maybe Object
, _apiGatewayMethodResourceId :: Val Text
, _apiGatewayMethodRestApiId :: Val Text
} deriving (Show, Generic)
instance ToJSON ApiGatewayMethod where
toJSON = genericToJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }
instance FromJSON ApiGatewayMethod where
parseJSON = genericParseJSON defaultOptions { fieldLabelModifier = Prelude.drop 17, omitNothingFields = True }
apiGatewayMethod
:: Val Text
-> Val Text
-> Val Text
-> Val Text
-> ApiGatewayMethod
apiGatewayMethod authorizationTypearg httpMethodarg resourceIdarg restApiIdarg =
ApiGatewayMethod
{ _apiGatewayMethodApiKeyRequired = Nothing
, _apiGatewayMethodAuthorizationType = authorizationTypearg
, _apiGatewayMethodAuthorizerId = Nothing
, _apiGatewayMethodHttpMethod = httpMethodarg
, _apiGatewayMethodIntegration = Nothing
, _apiGatewayMethodMethodResponses = Nothing
, _apiGatewayMethodRequestModels = Nothing
, _apiGatewayMethodRequestParameters = Nothing
, _apiGatewayMethodResourceId = resourceIdarg
, _apiGatewayMethodRestApiId = restApiIdarg
}
agmeApiKeyRequired :: Lens' ApiGatewayMethod (Maybe (Val Bool'))
agmeApiKeyRequired = lens _apiGatewayMethodApiKeyRequired (\s a -> s { _apiGatewayMethodApiKeyRequired = a })
agmeAuthorizationType :: Lens' ApiGatewayMethod (Val Text)
agmeAuthorizationType = lens _apiGatewayMethodAuthorizationType (\s a -> s { _apiGatewayMethodAuthorizationType = a })
agmeAuthorizerId :: Lens' ApiGatewayMethod (Maybe (Val Text))
agmeAuthorizerId = lens _apiGatewayMethodAuthorizerId (\s a -> s { _apiGatewayMethodAuthorizerId = a })
agmeHttpMethod :: Lens' ApiGatewayMethod (Val Text)
agmeHttpMethod = lens _apiGatewayMethodHttpMethod (\s a -> s { _apiGatewayMethodHttpMethod = a })
agmeIntegration :: Lens' ApiGatewayMethod (Maybe ApiGatewayIntegration)
agmeIntegration = lens _apiGatewayMethodIntegration (\s a -> s { _apiGatewayMethodIntegration = a })
agmeMethodResponses :: Lens' ApiGatewayMethod (Maybe [ApiGatewayMethodResponse])
agmeMethodResponses = lens _apiGatewayMethodMethodResponses (\s a -> s { _apiGatewayMethodMethodResponses = a })
agmeRequestModels :: Lens' ApiGatewayMethod (Maybe Object)
agmeRequestModels = lens _apiGatewayMethodRequestModels (\s a -> s { _apiGatewayMethodRequestModels = a })
agmeRequestParameters :: Lens' ApiGatewayMethod (Maybe Object)
agmeRequestParameters = lens _apiGatewayMethodRequestParameters (\s a -> s { _apiGatewayMethodRequestParameters = a })
agmeResourceId :: Lens' ApiGatewayMethod (Val Text)
agmeResourceId = lens _apiGatewayMethodResourceId (\s a -> s { _apiGatewayMethodResourceId = a })
agmeRestApiId :: Lens' ApiGatewayMethod (Val Text)
agmeRestApiId = lens _apiGatewayMethodRestApiId (\s a -> s { _apiGatewayMethodRestApiId = a })