Skip to content

Commit

Permalink
Additional EC2 overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
brendanhay committed Dec 7, 2014
1 parent 48dbebe commit b0ac199
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 105 deletions.
61 changes: 33 additions & 28 deletions amazonka-ec2/gen/Network/AWS/EC2/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -7368,74 +7368,79 @@ instance ToQuery VolumeAttachment where
]

data CustomerGateway = CustomerGateway
{ _cgBgpAsn :: Maybe Text
, _cgCustomerGatewayId :: Maybe Text
, _cgIpAddress :: Maybe Text
, _cgState :: Maybe Text
{ _cgBgpAsn :: Text
, _cgCustomerGatewayId :: Text
, _cgIpAddress :: Text
, _cgState :: Text
, _cgTags :: List "item" Tag
, _cgType :: Maybe Text
, _cgType :: Text
} deriving (Eq, Show)

-- | 'CustomerGateway' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'cgBgpAsn' @::@ 'Maybe' 'Text'
-- * 'cgBgpAsn' @::@ 'Text'
--
-- * 'cgCustomerGatewayId' @::@ 'Maybe' 'Text'
-- * 'cgCustomerGatewayId' @::@ 'Text'
--
-- * 'cgIpAddress' @::@ 'Maybe' 'Text'
-- * 'cgIpAddress' @::@ 'Text'
--
-- * 'cgState' @::@ 'Maybe' 'Text'
-- * 'cgState' @::@ 'Text'
--
-- * 'cgTags' @::@ ['Tag']
--
-- * 'cgType' @::@ 'Maybe' 'Text'
--
customerGateway :: CustomerGateway
customerGateway = CustomerGateway
{ _cgCustomerGatewayId = Nothing
, _cgState = Nothing
, _cgType = Nothing
, _cgIpAddress = Nothing
, _cgBgpAsn = Nothing
-- * 'cgType' @::@ 'Text'
--
customerGateway :: Text -- ^ 'cgCustomerGatewayId'
-> Text -- ^ 'cgState'
-> Text -- ^ 'cgType'
-> Text -- ^ 'cgIpAddress'
-> Text -- ^ 'cgBgpAsn'
-> CustomerGateway
customerGateway p1 p2 p3 p4 p5 = CustomerGateway
{ _cgCustomerGatewayId = p1
, _cgState = p2
, _cgType = p3
, _cgIpAddress = p4
, _cgBgpAsn = p5
, _cgTags = mempty
}

-- | The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number
-- (ASN).
cgBgpAsn :: Lens' CustomerGateway (Maybe Text)
cgBgpAsn :: Lens' CustomerGateway Text
cgBgpAsn = lens _cgBgpAsn (\s a -> s { _cgBgpAsn = a })

-- | The ID of the customer gateway.
cgCustomerGatewayId :: Lens' CustomerGateway (Maybe Text)
cgCustomerGatewayId :: Lens' CustomerGateway Text
cgCustomerGatewayId =
lens _cgCustomerGatewayId (\s a -> s { _cgCustomerGatewayId = a })

-- | The Internet-routable IP address of the customer gateway's outside interface.
cgIpAddress :: Lens' CustomerGateway (Maybe Text)
cgIpAddress :: Lens' CustomerGateway Text
cgIpAddress = lens _cgIpAddress (\s a -> s { _cgIpAddress = a })

-- | The current state of the customer gateway ('pending | available | deleting |deleted').
cgState :: Lens' CustomerGateway (Maybe Text)
cgState :: Lens' CustomerGateway Text
cgState = lens _cgState (\s a -> s { _cgState = a })

-- | Any tags assigned to the customer gateway.
cgTags :: Lens' CustomerGateway [Tag]
cgTags = lens _cgTags (\s a -> s { _cgTags = a }) . _List

-- | The type of VPN connection the customer gateway supports ('ipsec.1').
cgType :: Lens' CustomerGateway (Maybe Text)
cgType :: Lens' CustomerGateway Text
cgType = lens _cgType (\s a -> s { _cgType = a })

instance FromXML CustomerGateway where
parseXML x = CustomerGateway
<$> x .@? "bgpAsn"
<*> x .@? "customerGatewayId"
<*> x .@? "ipAddress"
<*> x .@? "state"
<$> x .@ "bgpAsn"
<*> x .@ "customerGatewayId"
<*> x .@ "ipAddress"
<*> x .@ "state"
<*> parseXML x
<*> x .@? "type"
<*> x .@ "type"

instance ToQuery CustomerGateway where
toQuery CustomerGateway{..} = mconcat
Expand Down
11 changes: 0 additions & 11 deletions amazonka-ec2/gen/Network/AWS/EC2/Waiters.hs
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,6 @@ conversionTaskCompleted = Wait
]
}

conversionTaskDeleted :: Wait DescribeConversionTasks
conversionTaskDeleted = Wait
{ _waitName = "ConversionTaskDeleted"
, _waitAttempts = 40
, _waitDelay = 15
, _waitAcceptors =
[ matchAll "deleted" Success
(folding (concatOf dctrConversionTasks) . ctState)
]
}

customerGatewayAvailable :: Wait DescribeCustomerGateways
customerGatewayAvailable = Wait
{ _waitName = "CustomerGatewayAvailable"
Expand Down
4 changes: 1 addition & 3 deletions gen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ vendor/%:
git clone [email protected]:brendanhay/$*.git $@

input:
cp -rf vendor/botocore/botocore/data/aws $@ && \
rm input/cloudfront/2014-10-21.waiters.json && \
rm input/cloudfront/2014-05-31.waiters.json
cp -rf vendor/botocore/botocore/data/aws $@

output:
@mkdir $@
108 changes: 48 additions & 60 deletions gen/output/ec2.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,6 @@
"maxAttempts": 40,
"delay": 15
},
"ConversionTaskDeleted": {
"operation": "DescribeConversionTasks",
"acceptors": [
{
"matcher": "matchAll",
"state": "success",
"argument": "folding (concatOf dctrConversionTasks) . ctState",
"expected": "\"deleted\""
}
],
"maxAttempts": 40,
"delay": 15
},
"InstanceRunning": {
"operation": "DescribeInstances",
"acceptors": [
Expand Down Expand Up @@ -13582,92 +13569,93 @@
"ctor": "customerGateway",
"contents": [],
"payload": null,
"required": [],
"contentPad": 0,
"name": "CustomerGateway",
"locationPad": 18,
"type": "record",
"optional": [
"required": [
{
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgCustomerGatewayId",
"name": "_cgCustomerGatewayId",
"shape": "String",
"locationName": "customerGatewayId",
"documentation": "-- | The ID of the customer gateway.",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
"typeExposed": "Text",
"type": "Text"
},
{
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgState",
"name": "_cgState",
"shape": "String",
"locationName": "state",
"documentation": "-- | The current state of the customer gateway ('pending | available | deleting |deleted').",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
"typeExposed": "Text",
"type": "Text"
},
{
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgType",
"name": "_cgType",
"shape": "String",
"locationName": "type",
"documentation": "-- | The type of VPN connection the customer gateway supports ('ipsec.1').",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
"typeExposed": "Text",
"type": "Text"
},
{
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgIpAddress",
"name": "_cgIpAddress",
"shape": "String",
"locationName": "ipAddress",
"documentation": "-- | The Internet-routable IP address of the customer gateway's outside interface.",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
"typeExposed": "Text",
"type": "Text"
},
{
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgBgpAsn",
"name": "_cgBgpAsn",
"shape": "String",
"locationName": "bgpAsn",
"documentation": "-- | The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number\n-- (ASN).",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
},
"typeExposed": "Text",
"type": "Text"
}
],
"contentPad": 0,
"name": "CustomerGateway",
"locationPad": 18,
"type": "record",
"optional": [
{
"location": "querystring",
"iso": "_List",
Expand All @@ -13690,65 +13678,65 @@
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgBgpAsn",
"name": "_cgBgpAsn",
"shape": "String",
"locationName": "bgpAsn",
"documentation": "-- | The customer gateway's Border Gateway Protocol (BGP) Autonomous System Number\n-- (ASN).",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
"typeExposed": "Text",
"type": "Text"
},
{
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgCustomerGatewayId",
"name": "_cgCustomerGatewayId",
"shape": "String",
"locationName": "customerGatewayId",
"documentation": "-- | The ID of the customer gateway.",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
"typeExposed": "Text",
"type": "Text"
},
{
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgIpAddress",
"name": "_cgIpAddress",
"shape": "String",
"locationName": "ipAddress",
"documentation": "-- | The Internet-routable IP address of the customer gateway's outside interface.",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
"typeExposed": "Text",
"type": "Text"
},
{
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgState",
"name": "_cgState",
"shape": "String",
"locationName": "state",
"documentation": "-- | The current state of the customer gateway ('pending | available | deleting |deleted').",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
"typeExposed": "Text",
"type": "Text"
},
{
"location": "querystring",
Expand All @@ -13770,17 +13758,17 @@
"location": "querystring",
"iso": null,
"lensMapping": null,
"default": "Nothing",
"default": "\u003cerror\u003e",
"monoid": false,
"flattened": false,
"required": false,
"required": true,
"lens": "cgType",
"name": "_cgType",
"shape": "String",
"locationName": "type",
"documentation": "-- | The type of VPN connection the customer gateway supports ('ipsec.1').",
"typeExposed": "Maybe Text",
"type": "Maybe Text"
"typeExposed": "Text",
"type": "Text"
}
]
},
Expand Down
Loading

0 comments on commit b0ac199

Please sign in to comment.