Skip to content

Commit

Permalink
Regenerating amazonka-apigateway from latest service definition
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Nov 29, 2016
1 parent afe61b0 commit 1b724ac
Show file tree
Hide file tree
Showing 17 changed files with 214 additions and 90 deletions.
14 changes: 10 additions & 4 deletions amazonka-apigateway/gen/Network/AWS/APIGateway.hs
Expand Up @@ -331,6 +331,9 @@ module Network.AWS.APIGateway
-- ** CacheClusterStatus
, CacheClusterStatus (..)

-- ** ContentHandlingStrategy
, ContentHandlingStrategy (..)

-- ** IntegrationType
, IntegrationType (..)

Expand Down Expand Up @@ -425,6 +428,7 @@ module Network.AWS.APIGateway
, iRequestTemplates
, iCredentials
, iRequestParameters
, iContentHandling
, iPassthroughBehavior
, iUri
, iIntegrationResponses
Expand All @@ -435,10 +439,11 @@ module Network.AWS.APIGateway
-- ** IntegrationResponse
, IntegrationResponse
, integrationResponse
, iResponseTemplates
, iSelectionPattern
, iStatusCode
, iResponseParameters
, intContentHandling
, intResponseTemplates
, intSelectionPattern
, intStatusCode
, intResponseParameters

-- ** Method
, Method
Expand Down Expand Up @@ -515,6 +520,7 @@ module Network.AWS.APIGateway
-- ** RestAPI
, RestAPI
, restAPI
, raBinaryMediaTypes
, raWarnings
, raCreatedDate
, raName
Expand Down
25 changes: 12 additions & 13 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/CreateDeployment.hs
Expand Up @@ -31,9 +31,9 @@ module Network.AWS.APIGateway.CreateDeployment
, cdVariables
, cdCacheClusterSize
, cdCacheClusterEnabled
, cdStageName
, cdDescription
, cdRestAPIId
, cdStageName

-- * Destructuring the Response
, deployment
Expand Down Expand Up @@ -62,9 +62,9 @@ data CreateDeployment = CreateDeployment'
, _cdVariables :: !(Maybe (Map Text Text))
, _cdCacheClusterSize :: !(Maybe CacheClusterSize)
, _cdCacheClusterEnabled :: !(Maybe Bool)
, _cdStageName :: !(Maybe Text)
, _cdDescription :: !(Maybe Text)
, _cdRestAPIId :: !Text
, _cdStageName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateDeployment' with the minimum fields required to make a request.
Expand All @@ -79,24 +79,23 @@ data CreateDeployment = CreateDeployment'
--
-- * 'cdCacheClusterEnabled' - Enables a cache cluster for the 'Stage' resource specified in the input.
--
-- * 'cdStageName' - The name of the 'Stage' resource for the 'Deployment' resource to create.
--
-- * 'cdDescription' - The description for the 'Deployment' resource to create.
--
-- * 'cdRestAPIId' - The 'RestApi' resource identifier for the 'Deployment' resource to create.
--
-- * 'cdStageName' - The name of the 'Stage' resource for the 'Deployment' resource to create.
createDeployment
:: Text -- ^ 'cdRestAPIId'
-> Text -- ^ 'cdStageName'
-> CreateDeployment
createDeployment pRestAPIId_ pStageName_ =
createDeployment pRestAPIId_ =
CreateDeployment'
{ _cdStageDescription = Nothing
, _cdVariables = Nothing
, _cdCacheClusterSize = Nothing
, _cdCacheClusterEnabled = Nothing
, _cdStageName = Nothing
, _cdDescription = Nothing
, _cdRestAPIId = pRestAPIId_
, _cdStageName = pStageName_
}

-- | The description of the 'Stage' resource for the 'Deployment' resource to create.
Expand All @@ -115,6 +114,10 @@ cdCacheClusterSize = lens _cdCacheClusterSize (\ s a -> s{_cdCacheClusterSize =
cdCacheClusterEnabled :: Lens' CreateDeployment (Maybe Bool)
cdCacheClusterEnabled = lens _cdCacheClusterEnabled (\ s a -> s{_cdCacheClusterEnabled = a});

-- | The name of the 'Stage' resource for the 'Deployment' resource to create.
cdStageName :: Lens' CreateDeployment (Maybe Text)
cdStageName = lens _cdStageName (\ s a -> s{_cdStageName = a});

-- | The description for the 'Deployment' resource to create.
cdDescription :: Lens' CreateDeployment (Maybe Text)
cdDescription = lens _cdDescription (\ s a -> s{_cdDescription = a});
Expand All @@ -123,10 +126,6 @@ cdDescription = lens _cdDescription (\ s a -> s{_cdDescription = a});
cdRestAPIId :: Lens' CreateDeployment Text
cdRestAPIId = lens _cdRestAPIId (\ s a -> s{_cdRestAPIId = a});

-- | The name of the 'Stage' resource for the 'Deployment' resource to create.
cdStageName :: Lens' CreateDeployment Text
cdStageName = lens _cdStageName (\ s a -> s{_cdStageName = a});

instance AWSRequest CreateDeployment where
type Rs CreateDeployment = Deployment
request = postJSON apiGateway
Expand All @@ -151,8 +150,8 @@ instance ToJSON CreateDeployment where
("cacheClusterSize" .=) <$> _cdCacheClusterSize,
("cacheClusterEnabled" .=) <$>
_cdCacheClusterEnabled,
("description" .=) <$> _cdDescription,
Just ("stageName" .= _cdStageName)])
("stageName" .=) <$> _cdStageName,
("description" .=) <$> _cdDescription])

instance ToPath CreateDeployment where
toPath CreateDeployment'{..}
Expand Down
21 changes: 16 additions & 5 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/CreateRestAPI.hs
Expand Up @@ -27,6 +27,7 @@ module Network.AWS.APIGateway.CreateRestAPI
createRestAPI
, CreateRestAPI
-- * Request Lenses
, craBinaryMediaTypes
, craCloneFrom
, craDescription
, craName
Expand All @@ -35,6 +36,7 @@ module Network.AWS.APIGateway.CreateRestAPI
, restAPI
, RestAPI
-- * Response Lenses
, raBinaryMediaTypes
, raWarnings
, raCreatedDate
, raName
Expand All @@ -55,15 +57,18 @@ import Network.AWS.Response
--
-- /See:/ 'createRestAPI' smart constructor.
data CreateRestAPI = CreateRestAPI'
{ _craCloneFrom :: !(Maybe Text)
, _craDescription :: !(Maybe Text)
, _craName :: !Text
{ _craBinaryMediaTypes :: !(Maybe [Text])
, _craCloneFrom :: !(Maybe Text)
, _craDescription :: !(Maybe Text)
, _craName :: !Text
} deriving (Eq,Read,Show,Data,Typeable,Generic)

-- | Creates a value of 'CreateRestAPI' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'craBinaryMediaTypes' - The list of binary media types supported by the 'RestApi' . By default, the 'RestApi' supports only UTF-8-encoded text payloads.
--
-- * 'craCloneFrom' - The ID of the 'RestApi' that you want to clone from.
--
-- * 'craDescription' - The description of the 'RestApi' .
Expand All @@ -74,11 +79,16 @@ createRestAPI
-> CreateRestAPI
createRestAPI pName_ =
CreateRestAPI'
{ _craCloneFrom = Nothing
{ _craBinaryMediaTypes = Nothing
, _craCloneFrom = Nothing
, _craDescription = Nothing
, _craName = pName_
}

-- | The list of binary media types supported by the 'RestApi' . By default, the 'RestApi' supports only UTF-8-encoded text payloads.
craBinaryMediaTypes :: Lens' CreateRestAPI [Text]
craBinaryMediaTypes = lens _craBinaryMediaTypes (\ s a -> s{_craBinaryMediaTypes = a}) . _Default . _Coerce;

-- | The ID of the 'RestApi' that you want to clone from.
craCloneFrom :: Lens' CreateRestAPI (Maybe Text)
craCloneFrom = lens _craCloneFrom (\ s a -> s{_craCloneFrom = a});
Expand Down Expand Up @@ -110,7 +120,8 @@ instance ToJSON CreateRestAPI where
toJSON CreateRestAPI'{..}
= object
(catMaybes
[("cloneFrom" .=) <$> _craCloneFrom,
[("binaryMediaTypes" .=) <$> _craBinaryMediaTypes,
("cloneFrom" .=) <$> _craCloneFrom,
("description" .=) <$> _craDescription,
Just ("name" .= _craName)])

Expand Down
10 changes: 10 additions & 0 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/GetAPIKeys.hs
Expand Up @@ -30,6 +30,7 @@ module Network.AWS.APIGateway.GetAPIKeys
, GetAPIKeys
-- * Request Lenses
, gakIncludeValues
, gakCustomerId
, gakNameQuery
, gakLimit
, gakPosition
Expand Down Expand Up @@ -59,6 +60,7 @@ import Network.AWS.Response
-- /See:/ 'getAPIKeys' smart constructor.
data GetAPIKeys = GetAPIKeys'
{ _gakIncludeValues :: !(Maybe Bool)
, _gakCustomerId :: !(Maybe Text)
, _gakNameQuery :: !(Maybe Text)
, _gakLimit :: !(Maybe Int)
, _gakPosition :: !(Maybe Text)
Expand All @@ -70,6 +72,8 @@ data GetAPIKeys = GetAPIKeys'
--
-- * 'gakIncludeValues' - A boolean flag to specify whether (@true@ ) or not (@false@ ) the result contains key values.
--
-- * 'gakCustomerId' - Undocumented member.
--
-- * 'gakNameQuery' - The name of queried API keys.
--
-- * 'gakLimit' - The maximum number of 'ApiKeys' to get information about.
Expand All @@ -80,6 +84,7 @@ getAPIKeys
getAPIKeys =
GetAPIKeys'
{ _gakIncludeValues = Nothing
, _gakCustomerId = Nothing
, _gakNameQuery = Nothing
, _gakLimit = Nothing
, _gakPosition = Nothing
Expand All @@ -89,6 +94,10 @@ getAPIKeys =
gakIncludeValues :: Lens' GetAPIKeys (Maybe Bool)
gakIncludeValues = lens _gakIncludeValues (\ s a -> s{_gakIncludeValues = a});

-- | Undocumented member.
gakCustomerId :: Lens' GetAPIKeys (Maybe Text)
gakCustomerId = lens _gakCustomerId (\ s a -> s{_gakCustomerId = a});

-- | The name of queried API keys.
gakNameQuery :: Lens' GetAPIKeys (Maybe Text)
gakNameQuery = lens _gakNameQuery (\ s a -> s{_gakNameQuery = a});
Expand Down Expand Up @@ -137,6 +146,7 @@ instance ToQuery GetAPIKeys where
toQuery GetAPIKeys'{..}
= mconcat
["includeValues" =: _gakIncludeValues,
"customerId" =: _gakCustomerId,
"name" =: _gakNameQuery, "limit" =: _gakLimit,
"position" =: _gakPosition]

Expand Down
Expand Up @@ -39,6 +39,7 @@ module Network.AWS.APIGateway.GetIntegration
, iRequestTemplates
, iCredentials
, iRequestParameters
, iContentHandling
, iPassthroughBehavior
, iUri
, iIntegrationResponses
Expand Down
Expand Up @@ -36,10 +36,11 @@ module Network.AWS.APIGateway.GetIntegrationResponse
, integrationResponse
, IntegrationResponse
-- * Response Lenses
, iResponseTemplates
, iSelectionPattern
, iStatusCode
, iResponseParameters
, intContentHandling
, intResponseTemplates
, intSelectionPattern
, intStatusCode
, intResponseParameters
) where

import Network.AWS.APIGateway.Types
Expand Down
Expand Up @@ -33,6 +33,7 @@ module Network.AWS.APIGateway.GetRestAPI
, restAPI
, RestAPI
-- * Response Lenses
, raBinaryMediaTypes
, raWarnings
, raCreatedDate
, raName
Expand Down
Expand Up @@ -35,6 +35,7 @@ module Network.AWS.APIGateway.ImportRestAPI
, restAPI
, RestAPI
-- * Response Lenses
, raBinaryMediaTypes
, raWarnings
, raCreatedDate
, raName
Expand Down
11 changes: 11 additions & 0 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/PutIntegration.hs
Expand Up @@ -30,6 +30,7 @@ module Network.AWS.APIGateway.PutIntegration
, pRequestTemplates
, pCredentials
, pRequestParameters
, pContentHandling
, pPassthroughBehavior
, pUri
, pCacheNamespace
Expand All @@ -48,6 +49,7 @@ module Network.AWS.APIGateway.PutIntegration
, iRequestTemplates
, iCredentials
, iRequestParameters
, iContentHandling
, iPassthroughBehavior
, iUri
, iIntegrationResponses
Expand All @@ -72,6 +74,7 @@ data PutIntegration = PutIntegration'
{ _pRequestTemplates :: !(Maybe (Map Text Text))
, _pCredentials :: !(Maybe Text)
, _pRequestParameters :: !(Maybe (Map Text Text))
, _pContentHandling :: !(Maybe ContentHandlingStrategy)
, _pPassthroughBehavior :: !(Maybe Text)
, _pUri :: !(Maybe Text)
, _pCacheNamespace :: !(Maybe Text)
Expand All @@ -93,6 +96,8 @@ data PutIntegration = PutIntegration'
--
-- * 'pRequestParameters' - A key-value map specifying request parameters that are passed from the method request to the back end. The key is an integration request parameter name and the associated value is a method request parameter value or static value that must be enclosed within single quotes and pre-encoded as required by the back end. The method request parameter value must match the pattern of @method.request.{location}.{name}@ , where @location@ is @querystring@ , @path@ , or @header@ and @name@ must be a valid and unique method request parameter name.
--
-- * 'pContentHandling' - Specifies how to handle request payload content type conversions. Supported values are @CONVERT_TO_BINARY@ and @CONVERT_TO_TEXT@ , with the following behaviors: * @CONVERT_TO_BINARY@ : Converts a request payload from a Base64-encoded string to the corresponding binary blob. * @CONVERT_TO_TEXT@ : Converts a request payload from a binary blob to a Base64-encoded string. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the @passthroughBehaviors@ is configured to support payload pass-through.
--
-- * 'pPassthroughBehavior' - Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the @requestTemplates@ property on the Integration resource. There are three valid values: @WHEN_NO_MATCH@ , @WHEN_NO_TEMPLATES@ , and @NEVER@ . * @WHEN_NO_MATCH@ passes the request body for unmapped content types through to the integration back end without transformation. * @NEVER@ rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response. * @WHEN_NO_TEMPLATES@ allows pass-through when the integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.
--
-- * 'pUri' - Specifies a put integration input's Uniform Resource Identifier (URI). When the integration type is HTTP or AWS, this field is required. For integration with Lambda as an AWS service proxy, this value is of the 'arn:aws:apigateway:<region>:lambda:path/2015-03-31/functions/<functionArn>/invocations' format.
Expand Down Expand Up @@ -121,6 +126,7 @@ putIntegration pRestAPIId_ pResourceId_ pHttpMethod_ pType_ =
{ _pRequestTemplates = Nothing
, _pCredentials = Nothing
, _pRequestParameters = Nothing
, _pContentHandling = Nothing
, _pPassthroughBehavior = Nothing
, _pUri = Nothing
, _pCacheNamespace = Nothing
Expand All @@ -144,6 +150,10 @@ pCredentials = lens _pCredentials (\ s a -> s{_pCredentials = a});
pRequestParameters :: Lens' PutIntegration (HashMap Text Text)
pRequestParameters = lens _pRequestParameters (\ s a -> s{_pRequestParameters = a}) . _Default . _Map;

-- | Specifies how to handle request payload content type conversions. Supported values are @CONVERT_TO_BINARY@ and @CONVERT_TO_TEXT@ , with the following behaviors: * @CONVERT_TO_BINARY@ : Converts a request payload from a Base64-encoded string to the corresponding binary blob. * @CONVERT_TO_TEXT@ : Converts a request payload from a binary blob to a Base64-encoded string. If this property is not defined, the request payload will be passed through from the method request to integration request without modification, provided that the @passthroughBehaviors@ is configured to support payload pass-through.
pContentHandling :: Lens' PutIntegration (Maybe ContentHandlingStrategy)
pContentHandling = lens _pContentHandling (\ s a -> s{_pContentHandling = a});

-- | Specifies the pass-through behavior for incoming requests based on the Content-Type header in the request, and the available mapping templates specified as the @requestTemplates@ property on the Integration resource. There are three valid values: @WHEN_NO_MATCH@ , @WHEN_NO_TEMPLATES@ , and @NEVER@ . * @WHEN_NO_MATCH@ passes the request body for unmapped content types through to the integration back end without transformation. * @NEVER@ rejects unmapped content types with an HTTP 415 'Unsupported Media Type' response. * @WHEN_NO_TEMPLATES@ allows pass-through when the integration has NO content types mapped to templates. However if there is at least one content type defined, unmapped content types will be rejected with the same 415 response.
pPassthroughBehavior :: Lens' PutIntegration (Maybe Text)
pPassthroughBehavior = lens _pPassthroughBehavior (\ s a -> s{_pPassthroughBehavior = a});
Expand Down Expand Up @@ -202,6 +212,7 @@ instance ToJSON PutIntegration where
[("requestTemplates" .=) <$> _pRequestTemplates,
("credentials" .=) <$> _pCredentials,
("requestParameters" .=) <$> _pRequestParameters,
("contentHandling" .=) <$> _pContentHandling,
("passthroughBehavior" .=) <$> _pPassthroughBehavior,
("uri" .=) <$> _pUri,
("cacheNamespace" .=) <$> _pCacheNamespace,
Expand Down

0 comments on commit 1b724ac

Please sign in to comment.