Skip to content

Commit

Permalink
Updating and regenerating API Gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Nov 21, 2015
1 parent 7c8db1f commit 4128152
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 5 deletions.
1 change: 1 addition & 0 deletions amazonka-apigateway/gen/Network/AWS/APIGateway.hs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ module Network.AWS.APIGateway
, Stage
, stage
, sDeploymentId
, sVariables
, sClientCertificateId
, sCreatedDate
, sCacheClusterStatus
Expand Down
12 changes: 12 additions & 0 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/CreateDeployment.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module Network.AWS.APIGateway.CreateDeployment
, CreateDeployment
-- * Request Lenses
, cdStageDescription
, cdVariables
, cdCacheClusterSize
, cdCacheClusterEnabled
, cdDescription
Expand Down Expand Up @@ -56,6 +57,7 @@ import Network.AWS.Response
-- /See:/ 'createDeployment' smart constructor.
data CreateDeployment = CreateDeployment'
{ _cdStageDescription :: !(Maybe Text)
, _cdVariables :: !(Maybe (Map Text Text))
, _cdCacheClusterSize :: !(Maybe CacheClusterSize)
, _cdCacheClusterEnabled :: !(Maybe Bool)
, _cdDescription :: !(Maybe Text)
Expand All @@ -69,6 +71,8 @@ data CreateDeployment = CreateDeployment'
--
-- * 'cdStageDescription'
--
-- * 'cdVariables'
--
-- * 'cdCacheClusterSize'
--
-- * 'cdCacheClusterEnabled'
Expand All @@ -85,6 +89,7 @@ createDeployment
createDeployment pRestAPIId_ pStageName_ =
CreateDeployment'
{ _cdStageDescription = Nothing
, _cdVariables = Nothing
, _cdCacheClusterSize = Nothing
, _cdCacheClusterEnabled = Nothing
, _cdDescription = Nothing
Expand All @@ -97,6 +102,12 @@ createDeployment pRestAPIId_ pStageName_ =
cdStageDescription :: Lens' CreateDeployment (Maybe Text)
cdStageDescription = lens _cdStageDescription (\ s a -> s{_cdStageDescription = a});

-- | A map that defines the stage variables for the Stage resource that is
-- associated with the new deployment. Variable names can have alphabetic
-- characters, and the values must match [A-Za-z0-9-._~:\/?#&=,]+
cdVariables :: Lens' CreateDeployment (HashMap Text Text)
cdVariables = lens _cdVariables (\ s a -> s{_cdVariables = a}) . _Default . _Map;

-- | Specifies the cache cluster size for the Stage resource specified in the
-- input, if a cache cluster is enabled.
cdCacheClusterSize :: Lens' CreateDeployment (Maybe CacheClusterSize)
Expand Down Expand Up @@ -131,6 +142,7 @@ instance ToJSON CreateDeployment where
= object
(catMaybes
[("stageDescription" .=) <$> _cdStageDescription,
("variables" .=) <$> _cdVariables,
("cacheClusterSize" .=) <$> _cdCacheClusterSize,
("cacheClusterEnabled" .=) <$>
_cdCacheClusterEnabled,
Expand Down
19 changes: 16 additions & 3 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/CreateStage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module Network.AWS.APIGateway.CreateStage
createStage
, CreateStage
-- * Request Lenses
, csVariables
, csCacheClusterSize
, csCacheClusterEnabled
, csDescription
Expand All @@ -39,6 +40,7 @@ module Network.AWS.APIGateway.CreateStage
, Stage
-- * Response Lenses
, sDeploymentId
, sVariables
, sClientCertificateId
, sCreatedDate
, sCacheClusterStatus
Expand All @@ -60,7 +62,8 @@ import Network.AWS.Response
--
-- /See:/ 'createStage' smart constructor.
data CreateStage = CreateStage'
{ _csCacheClusterSize :: !(Maybe CacheClusterSize)
{ _csVariables :: !(Maybe (Map Text Text))
, _csCacheClusterSize :: !(Maybe CacheClusterSize)
, _csCacheClusterEnabled :: !(Maybe Bool)
, _csDescription :: !(Maybe Text)
, _csRestAPIId :: !Text
Expand All @@ -72,6 +75,8 @@ data CreateStage = CreateStage'
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'csVariables'
--
-- * 'csCacheClusterSize'
--
-- * 'csCacheClusterEnabled'
Expand All @@ -90,14 +95,21 @@ createStage
-> CreateStage
createStage pRestAPIId_ pStageName_ pDeploymentId_ =
CreateStage'
{ _csCacheClusterSize = Nothing
{ _csVariables = Nothing
, _csCacheClusterSize = Nothing
, _csCacheClusterEnabled = Nothing
, _csDescription = Nothing
, _csRestAPIId = pRestAPIId_
, _csStageName = pStageName_
, _csDeploymentId = pDeploymentId_
}

-- | A map that defines the stage variables for the new Stage resource.
-- Variable names can have alphabetic characters, and the values must match
-- [A-Za-z0-9-._~:\/?#&=,]+
csVariables :: Lens' CreateStage (HashMap Text Text)
csVariables = lens _csVariables (\ s a -> s{_csVariables = a}) . _Default . _Map;

-- | The stage\'s cache cluster size.
csCacheClusterSize :: Lens' CreateStage (Maybe CacheClusterSize)
csCacheClusterSize = lens _csCacheClusterSize (\ s a -> s{_csCacheClusterSize = a});
Expand Down Expand Up @@ -134,7 +146,8 @@ instance ToJSON CreateStage where
toJSON CreateStage'{..}
= object
(catMaybes
[("cacheClusterSize" .=) <$> _csCacheClusterSize,
[("variables" .=) <$> _csVariables,
("cacheClusterSize" .=) <$> _csCacheClusterSize,
("cacheClusterEnabled" .=) <$>
_csCacheClusterEnabled,
("description" .=) <$> _csDescription,
Expand Down
1 change: 1 addition & 0 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/GetStage.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module Network.AWS.APIGateway.GetStage
, Stage
-- * Response Lenses
, sDeploymentId
, sVariables
, sClientCertificateId
, sCreatedDate
, sCacheClusterStatus
Expand Down
10 changes: 10 additions & 0 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/TestInvokeMethod.hs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module Network.AWS.APIGateway.TestInvokeMethod
, timPathWithQueryString
, timBody
, timClientCertificateId
, timStageVariables
, timHeaders
, timRestAPIId
, timResourceId
Expand Down Expand Up @@ -58,6 +59,7 @@ data TestInvokeMethod = TestInvokeMethod'
{ _timPathWithQueryString :: !(Maybe Text)
, _timBody :: !(Maybe Text)
, _timClientCertificateId :: !(Maybe Text)
, _timStageVariables :: !(Maybe (Map Text Text))
, _timHeaders :: !(Maybe (Map Text Text))
, _timRestAPIId :: !Text
, _timResourceId :: !Text
Expand All @@ -74,6 +76,8 @@ data TestInvokeMethod = TestInvokeMethod'
--
-- * 'timClientCertificateId'
--
-- * 'timStageVariables'
--
-- * 'timHeaders'
--
-- * 'timRestAPIId'
Expand All @@ -91,6 +95,7 @@ testInvokeMethod pRestAPIId_ pResourceId_ pHttpMethod_ =
{ _timPathWithQueryString = Nothing
, _timBody = Nothing
, _timClientCertificateId = Nothing
, _timStageVariables = Nothing
, _timHeaders = Nothing
, _timRestAPIId = pRestAPIId_
, _timResourceId = pResourceId_
Expand All @@ -109,6 +114,10 @@ timBody = lens _timBody (\ s a -> s{_timBody = a});
timClientCertificateId :: Lens' TestInvokeMethod (Maybe Text)
timClientCertificateId = lens _timClientCertificateId (\ s a -> s{_timClientCertificateId = a});

-- | Undocumented member.
timStageVariables :: Lens' TestInvokeMethod (HashMap Text Text)
timStageVariables = lens _timStageVariables (\ s a -> s{_timStageVariables = a}) . _Default . _Map;

-- | Undocumented member.
timHeaders :: Lens' TestInvokeMethod (HashMap Text Text)
timHeaders = lens _timHeaders (\ s a -> s{_timHeaders = a}) . _Default . _Map;
Expand Down Expand Up @@ -149,6 +158,7 @@ instance ToJSON TestInvokeMethod where
("body" .=) <$> _timBody,
("clientCertificateId" .=) <$>
_timClientCertificateId,
("stageVariables" .=) <$> _timStageVariables,
("headers" .=) <$> _timHeaders])

instance ToPath TestInvokeMethod where
Expand Down
1 change: 1 addition & 0 deletions amazonka-apigateway/gen/Network/AWS/APIGateway/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ module Network.AWS.APIGateway.Types
, Stage
, stage
, sDeploymentId
, sVariables
, sClientCertificateId
, sCreatedDate
, sCacheClusterStatus
Expand Down
13 changes: 12 additions & 1 deletion amazonka-apigateway/gen/Network/AWS/APIGateway/Types/Product.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,7 @@ instance FromJSON RestAPI where
-- /See:/ 'stage' smart constructor.
data Stage = Stage'
{ _sDeploymentId :: !(Maybe Text)
, _sVariables :: !(Maybe (Map Text Text))
, _sClientCertificateId :: !(Maybe Text)
, _sCreatedDate :: !(Maybe POSIX)
, _sCacheClusterStatus :: !(Maybe CacheClusterStatus)
Expand All @@ -1163,6 +1164,8 @@ data Stage = Stage'
--
-- * 'sDeploymentId'
--
-- * 'sVariables'
--
-- * 'sClientCertificateId'
--
-- * 'sCreatedDate'
Expand All @@ -1185,6 +1188,7 @@ stage
stage =
Stage'
{ _sDeploymentId = Nothing
, _sVariables = Nothing
, _sClientCertificateId = Nothing
, _sCreatedDate = Nothing
, _sCacheClusterStatus = Nothing
Expand All @@ -1200,6 +1204,12 @@ stage =
sDeploymentId :: Lens' Stage (Maybe Text)
sDeploymentId = lens _sDeploymentId (\ s a -> s{_sDeploymentId = a});

-- | A map that defines the stage variables for a Stage resource. Variable
-- names can have alphabetic characters, and the values must match
-- [A-Za-z0-9-._~:\/?#&=,]+
sVariables :: Lens' Stage (HashMap Text Text)
sVariables = lens _sVariables (\ s a -> s{_sVariables = a}) . _Default . _Map;

-- | Undocumented member.
sClientCertificateId :: Lens' Stage (Maybe Text)
sClientCertificateId = lens _sClientCertificateId (\ s a -> s{_sClientCertificateId = a});
Expand Down Expand Up @@ -1248,7 +1258,8 @@ instance FromJSON Stage where
(\ x ->
Stage' <$>
(x .:? "deploymentId") <*>
(x .:? "clientCertificateId")
(x .:? "variables" .!= mempty)
<*> (x .:? "clientCertificateId")
<*> (x .:? "createdDate")
<*> (x .:? "cacheClusterStatus")
<*> (x .:? "methodSettings" .!= mempty)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ module Network.AWS.APIGateway.UpdateStage
, Stage
-- * Response Lenses
, sDeploymentId
, sVariables
, sClientCertificateId
, sCreatedDate
, sCacheClusterStatus
Expand Down
15 changes: 14 additions & 1 deletion gen/model/apigateway/2015-07-09/service-2.json
Original file line number Diff line number Diff line change
Expand Up @@ -2662,6 +2662,10 @@
"cacheClusterSize":{
"shape":"CacheClusterSize",
"documentation":"<p>Specifies the cache cluster size for the <a>Stage</a> resource specified in the input, if a cache cluster is enabled.</p>"
},
"variables":{
"shape":"MapOfStringToString",
"documentation":"<p>A map that defines the stage variables for the <a>Stage</a> resource that is associated with the new deployment. Variable names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&amp;=,]+</p>"
}
},
"documentation":"<p>Requests Amazon API Gateway to create a <a>Deployment</a> resource.</p>"
Expand Down Expand Up @@ -2811,6 +2815,10 @@
"cacheClusterSize":{
"shape":"CacheClusterSize",
"documentation":"<p>The stage's cache cluster size.</p>"
},
"variables":{
"shape":"MapOfStringToString",
"documentation":"<p>A map that defines the stage variables for the new <a>Stage</a> resource. Variable names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&amp;=,]+</p>"
}
},
"documentation":"<p>Requests Amazon API Gateway to create a <a>Stage</a> resource.</p>"
Expand Down Expand Up @@ -4435,6 +4443,10 @@
"shape":"MapOfMethodSettings",
"documentation":"<p>A map that defines the method settings for a <a>Stage</a> resource. Keys are defined as <code>{resource_path}/{http_method}</code> for an individual method override, or <code>\\*/\\*</code> for the settings applied to all methods in the stage.</p>"
},
"variables":{
"shape":"MapOfStringToString",
"documentation":"<p>A map that defines the stage variables for a <a>Stage</a> resource. Variable names can have alphabetic characters, and the values must match [A-Za-z0-9-._~:/?#&amp;=,]+</p>"
},
"createdDate":{
"shape":"Timestamp",
"documentation":"<p>The date and time that the stage was created, in <a target=\"_blank\" href=\"http://www.iso.org/iso/home/standards/iso8601.htm\">ISO 8601 format</a>.</p>"
Expand Down Expand Up @@ -4512,7 +4524,8 @@
"pathWithQueryString":{"shape":"String"},
"body":{"shape":"String"},
"headers":{"shape":"MapOfHeaderValues"},
"clientCertificateId":{"shape":"String"}
"clientCertificateId":{"shape":"String"},
"stageVariables":{"shape":"MapOfStringToString"}
}
},
"TestInvokeMethodResponse":{
Expand Down

0 comments on commit 4128152

Please sign in to comment.