You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ab...@apache.org on 2013/09/06 19:39:56 UTC

[07/11] JCLOUDS-209. Move to GCE v1beta15 API, with new features/methods included

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/RouteApi.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/RouteApi.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/RouteApi.java
new file mode 100644
index 0000000..1eac669
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/RouteApi.java
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.features;
+
+import static org.jclouds.googlecomputeengine.GoogleComputeEngineConstants.COMPUTE_READONLY_SCOPE;
+import static org.jclouds.googlecomputeengine.GoogleComputeEngineConstants.COMPUTE_SCOPE;
+
+import java.net.URI;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptyIterableWithMarkerOnNotFoundOr404;
+import org.jclouds.Fallbacks.EmptyPagedIterableOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.collect.PagedIterable;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Operation;
+import org.jclouds.googlecomputeengine.domain.Route;
+import org.jclouds.googlecomputeengine.functions.internal.ParseRoutes;
+import org.jclouds.googlecomputeengine.handlers.RouteBinder;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.googlecomputeengine.options.RouteOptions;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.oauth.v2.config.OAuthScopes;
+import org.jclouds.oauth.v2.filters.OAuthAuthenticator;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.MapBinder;
+import org.jclouds.rest.annotations.PayloadParam;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.ResponseParser;
+import org.jclouds.rest.annotations.SkipEncoding;
+import org.jclouds.rest.annotations.Transform;
+
+/**
+ * Provides access to Routes via their REST API.
+ *
+ * @author Andrew Bayer
+ * @see <a href="https://developers.google.com/compute/docs/reference/v1beta15/routess"/>
+ */
+@SkipEncoding({'/', '='})
+@RequestFilters(OAuthAuthenticator.class)
+@Consumes(MediaType.APPLICATION_JSON)
+public interface RouteApi {
+
+   /**
+    * Returns the specified route resource
+    *
+    * @param routeName name of the region resource to return.
+    * @return If successful, this method returns a Route resource
+    */
+   @Named("Routes:get")
+   @GET
+   @Path("/global/routes/{route}")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @Fallback(NullOnNotFoundOr404.class)
+   Route get(@PathParam("route") String routeName);
+
+   /**
+    * @see org.jclouds.googlecomputeengine.features.RouteApi#listAtMarker(String, org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("Routes:list")
+   @GET
+   @Path("/global/routes")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseRoutes.class)
+   @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+   ListPage<Route> listFirstPage();
+
+   /**
+    * @see org.jclouds.googlecomputeengine.features.RouteApi#listAtMarker(String, org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("Routes:list")
+   @GET
+   @Path("/global/routes")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseRoutes.class)
+   @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+   ListPage<Route> listAtMarker(String marker);
+
+   /**
+    * Retrieves the listFirstPage of route resources available to the specified project.
+    * By default the listFirstPage as a maximum size of 100, if no options are provided or ListOptions#getMaxResults()
+    * has not been set.
+    *
+    * @param marker      marks the beginning of the next list page
+    * @param listOptions listing options
+    * @return a page of the listFirstPage
+    * @see org.jclouds.googlecomputeengine.options.ListOptions
+    * @see org.jclouds.googlecomputeengine.domain.ListPage
+    */
+   @Named("Routes:list")
+   @GET
+   @Path("/global/routes")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseRoutes.class)
+   @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+   ListPage<Route> listAtMarker(String marker, ListOptions listOptions);
+
+   /**
+    * @see org.jclouds.googlecomputeengine.features.RouteApi#list(org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("Routes:list")
+   @GET
+   @Path("/global/routes")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseRoutes.class)
+   @Transform(ParseRoutes.ToPagedIterable.class)
+   @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+   PagedIterable<Route> list();
+
+   /**
+    * A paged version of RegionApi#listFirstPage()
+    *
+    * @return a Paged, Fluent Iterable that is able to fetch additional pages when required
+    * @see org.jclouds.googlecomputeengine.features.RouteApi#listAtMarker(String, org.jclouds.googlecomputeengine.options.ListOptions)
+    * @see org.jclouds.collect.PagedIterable
+    */
+   @Named("Routes:list")
+   @GET
+   @Path("/global/routes")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseRoutes.class)
+   @Transform(ParseRoutes.ToPagedIterable.class)
+   @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+   PagedIterable<Route> list(ListOptions listOptions);
+
+   /**
+    * Deletes the specified route resource.
+    *
+    * @param routeName name of the route resource to delete.
+    * @return an Operation resource. To check on the status of an operation, poll the Operations resource returned to
+    *         you, and look for the status field.  If the route did not exist the result is null.
+    */
+   @Named("Routes:delete")
+   @DELETE
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Path("/global/routes/{route}")
+   @OAuthScopes(COMPUTE_SCOPE)
+   @Fallback(NullOnNotFoundOr404.class)
+   @Nullable
+   Operation delete(@PathParam("route") String routeName);
+
+   /**
+    * Creates a route resource in the specified project using the data included in the request.
+    *
+    * @param name            the name of the route to be inserted.
+    * @param network         the network to which to add the route
+    * @param routeOptions the options of the route to add
+    * @return an Operation resource. To check on the status of an operation, poll the Operations resource returned to
+    *         you, and look for the status field.
+    */
+   @Named("Routes:insert")
+   @POST
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Produces(MediaType.APPLICATION_JSON)
+   @Path("/global/routes")
+   @OAuthScopes({COMPUTE_SCOPE})
+   @MapBinder(RouteBinder.class)
+   Operation createInNetwork(@PayloadParam("name") String name,
+                             @PayloadParam("network") URI network,
+                             @PayloadParam("options") RouteOptions routeOptions);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/SnapshotApi.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/SnapshotApi.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/SnapshotApi.java
new file mode 100644
index 0000000..6af9a9f
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/SnapshotApi.java
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.features;
+
+import static org.jclouds.googlecomputeengine.GoogleComputeEngineConstants.COMPUTE_READONLY_SCOPE;
+import static org.jclouds.googlecomputeengine.GoogleComputeEngineConstants.COMPUTE_SCOPE;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptyIterableWithMarkerOnNotFoundOr404;
+import org.jclouds.Fallbacks.EmptyPagedIterableOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.collect.PagedIterable;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Operation;
+import org.jclouds.googlecomputeengine.domain.Snapshot;
+import org.jclouds.googlecomputeengine.functions.internal.ParseSnapshots;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.oauth.v2.config.OAuthScopes;
+import org.jclouds.oauth.v2.filters.OAuthAuthenticator;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.ResponseParser;
+import org.jclouds.rest.annotations.SkipEncoding;
+import org.jclouds.rest.annotations.Transform;
+
+/**
+ * Provides access to Snapshots via their REST API.
+ *
+ * @author Andrew Bayer
+ * @see <a href="https://developers.google.com/compute/docs/reference/v1beta15/snapshots"/>
+ */
+@SkipEncoding({'/', '='})
+@RequestFilters(OAuthAuthenticator.class)
+public interface SnapshotApi {
+
+   /**
+    * Returns the specified snapshot resource.
+    *
+    * @param snapshotName name of the snapshot resource to return.
+    * @return a Snapshot resource.
+    */
+   @Named("Snapshots:get")
+   @GET
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Path("/global/snapshots/{snapshot}")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @Fallback(NullOnNotFoundOr404.class)
+   @Nullable
+   Snapshot get(@PathParam("snapshot") String snapshotName);
+
+   /**
+    * Deletes the specified snapshot resource.
+    *
+    * @param snapshotName name of the snapshot resource to delete.
+    * @return an Operation resource. To check on the status of an operation, poll the Operations resource returned to
+    *         you, and look for the status field.
+    */
+   @Named("Snapshots:delete")
+   @DELETE
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Path("/global/snapshots/{snapshot}")
+   @OAuthScopes(COMPUTE_SCOPE)
+   @Fallback(NullOnNotFoundOr404.class)
+   @Nullable
+   Operation delete(@PathParam("snapshot") String snapshotName);
+
+   /**
+    * @see org.jclouds.googlecomputeengine.features.SnapshotApi#listAtMarker(String, org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("Snapshots:list")
+   @GET
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Path("/global/snapshots")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseSnapshots.class)
+   @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+   ListPage<Snapshot> listFirstPage();
+
+   /**
+    * @see org.jclouds.googlecomputeengine.features.SnapshotApi#listAtMarker(String, org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("Snapshots:list")
+   @GET
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Path("/global/snapshots")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseSnapshots.class)
+   @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+   ListPage<Snapshot> listAtMarker(@QueryParam("pageToken") @Nullable String marker);
+
+   /**
+    * Retrieves the listPage of persistent disk resources contained within the specified project and zone.
+    * By default the listPage as a maximum size of 100, if no options are provided or ListOptions#getMaxResults() has
+    * not been set.
+    *
+    * @param marker      marks the beginning of the next list page
+    * @param listOptions listing options
+    * @return a page of the listPage
+    * @see org.jclouds.googlecomputeengine.options.ListOptions
+    * @see org.jclouds.googlecomputeengine.domain.ListPage
+    */
+   @Named("Snapshots:list")
+   @GET
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Path("/global/snapshots")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseSnapshots.class)
+   @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+   ListPage<Snapshot> listAtMarker(@QueryParam("pageToken") @Nullable String marker, ListOptions listOptions);
+
+   /**
+    * A paged version of SnapshotApi#listPage(String)
+    *
+    * @return a Paged, Fluent Iterable that is able to fetch additional pages when required
+    * @see org.jclouds.collect.PagedIterable
+    * @see org.jclouds.googlecomputeengine.features.SnapshotApi#listAtMarker(String, org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("Snapshots:list")
+   @GET
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Path("/global/snapshots")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseSnapshots.class)
+   @Transform(ParseSnapshots.ToPagedIterable.class)
+   @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+   PagedIterable<Snapshot> list();
+
+   @Named("Snapshots:list")
+   @GET
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Path("/global/snapshots")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @ResponseParser(ParseSnapshots.class)
+   @Transform(ParseSnapshots.ToPagedIterable.class)
+   @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+   PagedIterable<Snapshot> list(ListOptions options);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneApi.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneApi.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneApi.java
index fcf9618..0542842 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneApi.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneApi.java
@@ -45,7 +45,7 @@ import org.jclouds.rest.annotations.Transform;
  * Provides access to Zones via their REST API.
  *
  * @author David Alves
- * @see <a href="https://developers.google.com/compute/docs/reference/v1beta13/zones"/>
+ * @see <a href="https://developers.google.com/compute/docs/reference/v1beta15/zones"/>
  */
 @SkipEncoding({'/', '='})
 @RequestFilters(OAuthAuthenticator.class)

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneOperationApi.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneOperationApi.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneOperationApi.java
new file mode 100644
index 0000000..e96bd6e
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/ZoneOperationApi.java
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.features;
+
+import static org.jclouds.googlecomputeengine.GoogleComputeEngineConstants.COMPUTE_READONLY_SCOPE;
+import static org.jclouds.googlecomputeengine.GoogleComputeEngineConstants.COMPUTE_SCOPE;
+
+import javax.inject.Named;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+
+import org.jclouds.Fallbacks.EmptyIterableWithMarkerOnNotFoundOr404;
+import org.jclouds.Fallbacks.EmptyPagedIterableOnNotFoundOr404;
+import org.jclouds.Fallbacks.NullOnNotFoundOr404;
+import org.jclouds.collect.PagedIterable;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Operation;
+import org.jclouds.googlecomputeengine.functions.internal.ParseZoneOperations;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.javax.annotation.Nullable;
+import org.jclouds.oauth.v2.config.OAuthScopes;
+import org.jclouds.oauth.v2.filters.OAuthAuthenticator;
+import org.jclouds.rest.annotations.Fallback;
+import org.jclouds.rest.annotations.RequestFilters;
+import org.jclouds.rest.annotations.ResponseParser;
+import org.jclouds.rest.annotations.SkipEncoding;
+import org.jclouds.rest.annotations.Transform;
+
+/**
+ * Provides access to Operations via their REST API.
+ *
+ * @author David Alves
+ * @see <a href="https://developers.google.com/compute/docs/reference/v1beta15/operations"/>
+ */
+@SkipEncoding({'/', '='})
+@RequestFilters(OAuthAuthenticator.class)
+public interface ZoneOperationApi {
+
+   /**
+    * Retrieves the specified operation resource.
+    *
+    * @param zone          the zone the operation is in
+    * @param operationName name of the operation resource to return.
+    * @return If successful, this method returns an Operation resource
+    */
+   @Named("ZoneOperations:get")
+   @GET
+   @Path("/zones/{zone}/operations/{operation}")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @Consumes(MediaType.APPLICATION_JSON)
+   @Fallback(NullOnNotFoundOr404.class)
+   Operation getInZone(@PathParam("zone") String zone, @PathParam("operation") String operationName);
+
+   /**
+    * Deletes the specified operation resource.
+    *
+    * @param zone          the zone the operation is in
+    * @param operationName name of the operation resource to delete.
+    */
+   @Named("ZoneOperations:delete")
+   @DELETE
+   @Path("/zones/{zone}/operations/{operation}")
+   @OAuthScopes(COMPUTE_SCOPE)
+   @Fallback(NullOnNotFoundOr404.class)
+   void deleteInZone(@PathParam("zone") String zone, @PathParam("operation") String operationName);
+
+   /**
+    * @see ZoneOperationApi#listAtMarkerInZone(String, String, org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("ZoneOperations:list")
+   @GET
+   @Path("/zones/{zone}/operations")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @Consumes(MediaType.APPLICATION_JSON)
+   @ResponseParser(ParseZoneOperations.class)
+   @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+   ListPage<Operation> listFirstPageInZone(@PathParam("zone") String zone);
+
+   /**
+    * @see ZoneOperationApi#listAtMarkerInZone(String, String, org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("ZoneOperations:list")
+   @GET
+   @Path("/zones/{zone}/operations")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @Consumes(MediaType.APPLICATION_JSON)
+   @ResponseParser(ParseZoneOperations.class)
+   @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+   ListPage<Operation> listAtMarkerInZone(@PathParam("zone") String zone,
+                                          @QueryParam("pageToken") @Nullable String marker);
+
+   /**
+    * Retrieves the listFirstPage of operation resources contained within the specified project.
+    * By default the listFirstPage as a maximum size of 100, if no options are provided or ListOptions#getMaxResults()
+    * has not been set.
+    *
+    * @param zone        the zone to list in
+    * @param marker      marks the beginning of the next list page
+    * @param listOptions listing options
+    * @return a page of the list, starting at marker
+    * @see ListOptions
+    * @see org.jclouds.googlecomputeengine.domain.ListPage
+    */
+   @Named("ZoneOperations:list")
+   @GET
+   @Path("/zones/{zone}/operations")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @Consumes(MediaType.APPLICATION_JSON)
+   @ResponseParser(ParseZoneOperations.class)
+   @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+   ListPage<Operation> listAtMarkerInZone(@PathParam("zone") String zone,
+                                          @QueryParam("pageToken") @Nullable String marker,
+                                          ListOptions listOptions);
+
+   /**
+    * @see ZoneOperationApi#listInZone(String, org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("ZoneOperations:list")
+   @GET
+   @Path("/zones/{zone}/operations")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @Consumes(MediaType.APPLICATION_JSON)
+   @ResponseParser(ParseZoneOperations.class)
+   @Transform(ParseZoneOperations.ToPagedIterable.class)
+   @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+   PagedIterable<Operation> listInZone(@PathParam("zone") String zone);
+
+   /**
+    * A paged version of ZoneOperationApi#listFirstPageInZone(String)
+    *
+    * @return a Paged, Fluent Iterable that is able to fetch additional pages when required
+    * @see PagedIterable
+    * @see ZoneOperationApi#listAtMarkerInZone(String, String, org.jclouds.googlecomputeengine.options.ListOptions)
+    */
+   @Named("ZoneOperations:list")
+   @GET
+   @Path("/zones/{zone}/operations")
+   @OAuthScopes(COMPUTE_READONLY_SCOPE)
+   @Consumes(MediaType.APPLICATION_JSON)
+   @ResponseParser(ParseZoneOperations.class)
+   @Transform(ParseZoneOperations.ToPagedIterable.class)
+   @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+   PagedIterable<Operation> listInZone(@PathParam("zone") String zone, ListOptions listOptions);
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java
index 8542a37..cc3142b 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseToPagedIterable.java
@@ -16,9 +16,9 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import com.google.common.annotations.Beta;
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
+import static com.google.common.base.Predicates.instanceOf;
+import static com.google.common.collect.Iterables.tryFind;
+
 import org.jclouds.collect.IterableWithMarker;
 import org.jclouds.collect.PagedIterable;
 import org.jclouds.collect.PagedIterables;
@@ -28,15 +28,16 @@ import org.jclouds.http.HttpRequest;
 import org.jclouds.rest.InvocationContext;
 import org.jclouds.rest.internal.GeneratedHttpRequest;
 
-import static com.google.common.base.Predicates.instanceOf;
-import static com.google.common.collect.Iterables.tryFind;
+import com.google.common.annotations.Beta;
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
 
 /**
  * @author Adrian Cole
  */
 @Beta
 public abstract class BaseToPagedIterable<T, I extends BaseToPagedIterable<T, I>> implements
-      Function<ListPage<T>, PagedIterable<T>>, InvocationContext<I> {
+        Function<ListPage<T>, PagedIterable<T>>, InvocationContext<I> {
 
    private GeneratedHttpRequest request;
 
@@ -50,7 +51,7 @@ public abstract class BaseToPagedIterable<T, I extends BaseToPagedIterable<T, I>
       Optional<Object> listOptions = tryFind(request.getInvocation().getArgs(), instanceOf(ListOptions.class));
 
       assert project.isPresent() : String.format("programming error, method %s should have a string param for the "
-            + "project", request.getCaller().get().getInvokable());
+              + "project", request.getCaller().get().getInvokable());
 
       return PagedIterables.advance(
               input, fetchNextPage(project.get().toString(), (ListOptions) listOptions.orNull()));

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithRegionToPagedIterable.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithRegionToPagedIterable.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithRegionToPagedIterable.java
new file mode 100644
index 0000000..3c348c4
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithRegionToPagedIterable.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.functions.internal;
+
+import static com.google.common.base.Predicates.instanceOf;
+import static com.google.common.collect.Iterables.tryFind;
+
+import org.jclouds.collect.IterableWithMarker;
+import org.jclouds.collect.PagedIterable;
+import org.jclouds.collect.PagedIterables;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.InvocationContext;
+import org.jclouds.rest.internal.GeneratedHttpRequest;
+
+import com.google.common.annotations.Beta;
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+
+/**
+ * @author Adrian Cole
+ * @author Andrew Bayer
+ */
+@Beta
+public abstract class BaseWithRegionToPagedIterable<T, I extends BaseWithRegionToPagedIterable<T, I>> implements
+        Function<ListPage<T>, PagedIterable<T>>, InvocationContext<I> {
+
+   private GeneratedHttpRequest request;
+
+   @Override
+   public PagedIterable<T> apply(ListPage<T> input) {
+      if (input.nextMarker() == null)
+         return PagedIterables.of(input);
+
+      Optional <Object> project = tryFind(request.getCaller().get().getArgs(), instanceOf(String.class));
+
+      Optional<Object> region = tryFind(request.getInvocation().getArgs(), instanceOf(String.class));
+
+      Optional<Object> listOptions = tryFind(request.getInvocation().getArgs(), instanceOf(ListOptions.class));
+
+      assert project.isPresent() : String.format("programming error, method %s should have a string param for the "
+              + "project", request.getCaller().get().getInvokable());
+
+      assert region.isPresent() : String.format("programming error, method %s should have a string param for the "
+              + "region", request.getCaller().get().getInvokable());
+
+      return PagedIterables.advance(
+              input, fetchNextPage(project.get().toString(), region.get().toString(), (ListOptions) listOptions.orNull()));
+   }
+
+   protected abstract Function<Object, IterableWithMarker<T>> fetchNextPage(String projectName,
+                                                                            String regionName,
+                                                                            ListOptions listOptions);
+
+   @SuppressWarnings("unchecked")
+   @Override
+   public I setContext(HttpRequest request) {
+      this.request = GeneratedHttpRequest.class.cast(request);
+      return (I) this;
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithZoneToPagedIterable.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithZoneToPagedIterable.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithZoneToPagedIterable.java
new file mode 100644
index 0000000..1f5317b
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/BaseWithZoneToPagedIterable.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.functions.internal;
+
+import static com.google.common.base.Predicates.instanceOf;
+import static com.google.common.collect.Iterables.tryFind;
+
+import org.jclouds.collect.IterableWithMarker;
+import org.jclouds.collect.PagedIterable;
+import org.jclouds.collect.PagedIterables;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.InvocationContext;
+import org.jclouds.rest.internal.GeneratedHttpRequest;
+
+import com.google.common.annotations.Beta;
+import com.google.common.base.Function;
+import com.google.common.base.Optional;
+
+/**
+ * @author Adrian Cole
+ * @author Andrew Bayer
+ */
+@Beta
+public abstract class BaseWithZoneToPagedIterable<T, I extends BaseWithZoneToPagedIterable<T, I>> implements
+        Function<ListPage<T>, PagedIterable<T>>, InvocationContext<I> {
+
+   private GeneratedHttpRequest request;
+
+   @Override
+   public PagedIterable<T> apply(ListPage<T> input) {
+      if (input.nextMarker() == null)
+         return PagedIterables.of(input);
+
+      Optional<Object> project = tryFind(request.getCaller().get().getArgs(), instanceOf(String.class));
+
+      Optional<Object> zone = tryFind(request.getInvocation().getArgs(), instanceOf(String.class));
+
+      Optional<Object> listOptions = tryFind(request.getInvocation().getArgs(), instanceOf(ListOptions.class));
+
+      assert project.isPresent() : String.format("programming error, method %s should have a string param for the "
+              + "project", request.getCaller().get().getInvokable());
+
+      assert zone.isPresent() : String.format("programming error, method %s should have a string param for the "
+              + "zone", request.getCaller().get().getInvokable());
+
+      return PagedIterables.advance(
+              input, fetchNextPage(project.get().toString(), zone.get().toString(), (ListOptions) listOptions.orNull()));
+   }
+
+   protected abstract Function<Object, IterableWithMarker<T>> fetchNextPage(String projectName,
+                                                                            String zoneName,
+                                                                            ListOptions listOptions);
+
+   @SuppressWarnings("unchecked")
+   @Override
+   public I setContext(HttpRequest request) {
+      this.request = GeneratedHttpRequest.class.cast(request);
+      return (I) this;
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/PATCH.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/PATCH.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/PATCH.java
index 70875bf..04d9138 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/PATCH.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/PATCH.java
@@ -16,12 +16,13 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import javax.ws.rs.HttpMethod;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
+import javax.ws.rs.HttpMethod;
+
 /**
  * Indicates that the annotated method responds to HTTP PATCH requests
  *

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseAddresses.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseAddresses.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseAddresses.java
new file mode 100644
index 0000000..c59afaa
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseAddresses.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.functions.internal;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+import org.jclouds.collect.IterableWithMarker;
+import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
+import org.jclouds.googlecomputeengine.domain.Address;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.http.functions.ParseJson;
+import org.jclouds.json.Json;
+
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
+
+/**
+ * @author Andrew Bayer
+ */
+@Singleton
+public class ParseAddresses extends ParseJson<ListPage<Address>> {
+
+   @Inject
+   public ParseAddresses(Json json) {
+      super(json, new TypeLiteral<ListPage<Address>>() {
+      });
+   }
+
+   public static class ToPagedIterable extends BaseWithRegionToPagedIterable<Address, ToPagedIterable> {
+
+      private final GoogleComputeEngineApi api;
+
+      @Inject
+      protected ToPagedIterable(GoogleComputeEngineApi api) {
+         this.api = checkNotNull(api, "api");
+      }
+
+      @Override
+      protected Function<Object, IterableWithMarker<Address>> fetchNextPage(final String projectName,
+                                                                            final String regionName,
+                                                                         final ListOptions options) {
+         return new Function<Object, IterableWithMarker<Address>>() {
+
+            @Override
+            public IterableWithMarker<Address> apply(Object input) {
+               return api.getAddressApiForProject(projectName)
+                       .listAtMarkerInRegion(regionName, input.toString(), options);
+            }
+         };
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java
index 18bb6ba..13e1946 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDisks.java
@@ -16,8 +16,11 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
 import org.jclouds.collect.IterableWithMarker;
 import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
 import org.jclouds.googlecomputeengine.domain.Disk;
@@ -26,10 +29,8 @@ import org.jclouds.googlecomputeengine.options.ListOptions;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.json.Json;
 
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
 
 /**
  * @author David Alves
@@ -39,10 +40,11 @@ public class ParseDisks extends ParseJson<ListPage<Disk>> {
 
    @Inject
    public ParseDisks(Json json) {
-      super(json, new TypeLiteral<ListPage<Disk>>() {});
+      super(json, new TypeLiteral<ListPage<Disk>>() {
+      });
    }
 
-   public static class ToPagedIterable extends BaseToPagedIterable<Disk, ToPagedIterable> {
+   public static class ToPagedIterable extends BaseWithZoneToPagedIterable<Disk, ToPagedIterable> {
 
       private final GoogleComputeEngineApi api;
 
@@ -53,12 +55,14 @@ public class ParseDisks extends ParseJson<ListPage<Disk>> {
 
       @Override
       protected Function<Object, IterableWithMarker<Disk>> fetchNextPage(final String projectName,
+                                                                         final String zoneName,
                                                                          final ListOptions options) {
          return new Function<Object, IterableWithMarker<Disk>>() {
 
             @Override
             public IterableWithMarker<Disk> apply(Object input) {
-               return api.getDiskApiForProject(projectName).listAtMarker(input.toString(), options);
+               return api.getDiskApiForProject(projectName)
+                       .listAtMarkerInZone(zoneName, input.toString(), options);
             }
          };
       }

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java
index 6b977e4..41181ac 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseFirewalls.java
@@ -16,8 +16,10 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
 import org.jclouds.collect.IterableWithMarker;
 import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
 import org.jclouds.googlecomputeengine.domain.Firewall;
@@ -26,9 +28,8 @@ import org.jclouds.googlecomputeengine.options.ListOptions;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.json.Json;
 
-import javax.inject.Inject;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
 
 /**
  * @author David Alves
@@ -37,7 +38,8 @@ public class ParseFirewalls extends ParseJson<ListPage<Firewall>> {
 
    @Inject
    public ParseFirewalls(Json json) {
-      super(json, new TypeLiteral<ListPage<Firewall>>() {});
+      super(json, new TypeLiteral<ListPage<Firewall>>() {
+      });
    }
 
    public static class ToPagedIterable extends BaseToPagedIterable<Firewall, ToPagedIterable> {

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseGlobalOperations.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseGlobalOperations.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseGlobalOperations.java
new file mode 100644
index 0000000..bee5c28
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseGlobalOperations.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.functions.internal;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
+import org.jclouds.collect.IterableWithMarker;
+import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Operation;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.http.functions.ParseJson;
+import org.jclouds.json.Json;
+
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
+
+/**
+ * @author David Alves
+ */
+public class ParseGlobalOperations extends ParseJson<ListPage<Operation>> {
+
+   @Inject
+   public ParseGlobalOperations(Json json) {
+      super(json, new TypeLiteral<ListPage<Operation>>() {
+      });
+   }
+
+   public static class ToPagedIterable extends BaseToPagedIterable<Operation, ToPagedIterable> {
+
+      private final GoogleComputeEngineApi api;
+
+      @Inject
+      protected ToPagedIterable(GoogleComputeEngineApi api) {
+         this.api = checkNotNull(api, "api");
+      }
+
+      @Override
+      protected Function<Object, IterableWithMarker<Operation>> fetchNextPage(final String projectName,
+                                                                              final ListOptions options) {
+         return new Function<Object, IterableWithMarker<Operation>>() {
+
+            @Override
+            public IterableWithMarker<Operation> apply(Object input) {
+               return api.getGlobalOperationApiForProject(projectName).listAtMarker(input.toString(), options);
+            }
+         };
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java
index 75bbb33..df28631 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseImages.java
@@ -16,8 +16,10 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
 import org.jclouds.collect.IterableWithMarker;
 import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
 import org.jclouds.googlecomputeengine.domain.Image;
@@ -26,9 +28,8 @@ import org.jclouds.googlecomputeengine.options.ListOptions;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.json.Json;
 
-import javax.inject.Inject;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
 
 /**
  * @author David Alves
@@ -37,7 +38,8 @@ public class ParseImages extends ParseJson<ListPage<Image>> {
 
    @Inject
    public ParseImages(Json json) {
-      super(json, new TypeLiteral<ListPage<Image>>() {});
+      super(json, new TypeLiteral<ListPage<Image>>() {
+      });
    }
 
    public static class ToPagedIterable extends BaseToPagedIterable<Image, ToPagedIterable> {

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java
index 638d916..b063e80 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseInstances.java
@@ -16,8 +16,10 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
 import org.jclouds.collect.IterableWithMarker;
 import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
 import org.jclouds.googlecomputeengine.domain.Instance;
@@ -26,9 +28,8 @@ import org.jclouds.googlecomputeengine.options.ListOptions;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.json.Json;
 
-import javax.inject.Inject;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
 
 /**
  * @author David Alves
@@ -37,10 +38,11 @@ public class ParseInstances extends ParseJson<ListPage<Instance>> {
 
    @Inject
    public ParseInstances(Json json) {
-      super(json, new TypeLiteral<ListPage<Instance>>() {});
+      super(json, new TypeLiteral<ListPage<Instance>>() {
+      });
    }
 
-   public static class ToPagedIterable extends BaseToPagedIterable<Instance, ToPagedIterable> {
+   public static class ToPagedIterable extends BaseWithZoneToPagedIterable<Instance, ToPagedIterable> {
 
       private final GoogleComputeEngineApi api;
 
@@ -50,13 +52,15 @@ public class ParseInstances extends ParseJson<ListPage<Instance>> {
       }
 
       @Override
-      protected Function<Object, IterableWithMarker<Instance>> fetchNextPage(final String projectName,
+      protected Function<Object, IterableWithMarker<Instance>> fetchNextPage(final String project,
+                                                                             final String zone,
                                                                              final ListOptions options) {
          return new Function<Object, IterableWithMarker<Instance>>() {
 
             @Override
             public IterableWithMarker<Instance> apply(Object input) {
-               return api.getInstanceApiForProject(projectName).listAtMarker(input.toString(), options);
+               return api.getInstanceApiForProject(project)
+                       .listAtMarkerInZone(zone, input.toString(), options);
             }
          };
       }

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseKernels.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseKernels.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseKernels.java
index 9f181a4..121677f 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseKernels.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseKernels.java
@@ -16,8 +16,10 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
 import org.jclouds.collect.IterableWithMarker;
 import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
 import org.jclouds.googlecomputeengine.domain.Kernel;
@@ -26,9 +28,8 @@ import org.jclouds.googlecomputeengine.options.ListOptions;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.json.Json;
 
-import javax.inject.Inject;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
 
 /**
  * @author David Alves
@@ -37,7 +38,8 @@ public class ParseKernels extends ParseJson<ListPage<Kernel>> {
 
    @Inject
    public ParseKernels(Json json) {
-      super(json, new TypeLiteral<ListPage<Kernel>>() {});
+      super(json, new TypeLiteral<ListPage<Kernel>>() {
+      });
    }
 
    public static class ToPagedIterable extends BaseToPagedIterable<Kernel, ToPagedIterable> {

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java
index 3db1519..e18b5c4 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseMachineTypes.java
@@ -16,8 +16,10 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
 import org.jclouds.collect.IterableWithMarker;
 import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
 import org.jclouds.googlecomputeengine.domain.ListPage;
@@ -26,9 +28,8 @@ import org.jclouds.googlecomputeengine.options.ListOptions;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.json.Json;
 
-import javax.inject.Inject;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
 
 /**
  * @author David Alves
@@ -40,7 +41,7 @@ public class ParseMachineTypes extends ParseJson<ListPage<MachineType>> {
       super(json, new TypeLiteral<ListPage<MachineType>>() {});
    }
 
-   public static class ToPagedIterable extends BaseToPagedIterable<MachineType, ToPagedIterable> {
+   public static class ToPagedIterable extends BaseWithZoneToPagedIterable<MachineType, ToPagedIterable> {
 
       private final GoogleComputeEngineApi api;
 
@@ -50,13 +51,15 @@ public class ParseMachineTypes extends ParseJson<ListPage<MachineType>> {
       }
 
       @Override
-      protected Function<Object, IterableWithMarker<MachineType>> fetchNextPage(final String projectName,
+      protected Function<Object, IterableWithMarker<MachineType>> fetchNextPage(final String project,
+                                                                                final String zone,
                                                                                 final ListOptions options) {
          return new Function<Object, IterableWithMarker<MachineType>>() {
 
             @Override
             public IterableWithMarker<MachineType> apply(Object input) {
-               return api.getMachineTypeApiForProject(projectName).listAtMarker(input.toString(), options);
+               return api.getMachineTypeApiForProject(project)
+                       .listAtMarkerInZone(zone, input.toString(), options);
             }
          };
       }

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java
index 195e162..aad984b 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseNetworks.java
@@ -16,8 +16,10 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
 import org.jclouds.collect.IterableWithMarker;
 import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
 import org.jclouds.googlecomputeengine.domain.ListPage;
@@ -26,9 +28,8 @@ import org.jclouds.googlecomputeengine.options.ListOptions;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.json.Json;
 
-import javax.inject.Inject;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
 
 /**
  * @author David Alves
@@ -37,7 +38,8 @@ public class ParseNetworks extends ParseJson<ListPage<Network>> {
 
    @Inject
    public ParseNetworks(Json json) {
-      super(json, new TypeLiteral<ListPage<Network>>() {});
+      super(json, new TypeLiteral<ListPage<Network>>() {
+      });
    }
 
    public static class ToPagedIterable extends BaseToPagedIterable<Network, ToPagedIterable> {

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseOperations.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseOperations.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseOperations.java
deleted file mode 100644
index 3749a2f..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseOperations.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jclouds.googlecomputeengine.functions.internal;
-
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
-import org.jclouds.collect.IterableWithMarker;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.ListPage;
-import org.jclouds.googlecomputeengine.domain.Operation;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.http.functions.ParseJson;
-import org.jclouds.json.Json;
-
-import javax.inject.Inject;
-
-import static com.google.common.base.Preconditions.checkNotNull;
-
-/**
- * @author David Alves
- */
-public class ParseOperations extends ParseJson<ListPage<Operation>> {
-
-   @Inject
-   public ParseOperations(Json json) {
-      super(json, new TypeLiteral<ListPage<Operation>>() {});
-   }
-
-   public static class ToPagedIterable extends BaseToPagedIterable<Operation, ToPagedIterable> {
-
-      private final GoogleComputeEngineApi api;
-
-      @Inject
-      protected ToPagedIterable(GoogleComputeEngineApi api) {
-         this.api = checkNotNull(api, "api");
-      }
-
-      @Override
-      protected Function<Object, IterableWithMarker<Operation>> fetchNextPage(final String projectName,
-                                                                              final ListOptions options) {
-         return new Function<Object, IterableWithMarker<Operation>>() {
-
-            @Override
-            public IterableWithMarker<Operation> apply(Object input) {
-               return api.getOperationApiForProject(projectName).listAtMarker(input.toString(), options);
-            }
-         };
-      }
-   }
-}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegionOperations.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegionOperations.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegionOperations.java
new file mode 100644
index 0000000..23b2327
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegionOperations.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.functions.internal;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
+import org.jclouds.collect.IterableWithMarker;
+import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Operation;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.http.functions.ParseJson;
+import org.jclouds.json.Json;
+
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
+
+/**
+ * @author David Alves
+ */
+public class ParseRegionOperations extends ParseJson<ListPage<Operation>> {
+
+   @Inject
+   public ParseRegionOperations(Json json) {
+      super(json, new TypeLiteral<ListPage<Operation>>() {
+      });
+   }
+
+   public static class ToPagedIterable extends BaseWithRegionToPagedIterable<Operation, ToPagedIterable> {
+
+      private final GoogleComputeEngineApi api;
+
+      @Inject
+      protected ToPagedIterable(GoogleComputeEngineApi api) {
+         this.api = checkNotNull(api, "api");
+      }
+
+      @Override
+      protected Function<Object, IterableWithMarker<Operation>> fetchNextPage(final String projectName,
+                                                                              final String regionName,
+                                                                              final ListOptions options) {
+         return new Function<Object, IterableWithMarker<Operation>>() {
+
+            @Override
+            public IterableWithMarker<Operation> apply(Object input) {
+               return api.getRegionOperationApiForProject(projectName)
+                       .listAtMarkerInRegion(regionName, input.toString(), options);
+            }
+         };
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegions.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegions.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegions.java
new file mode 100644
index 0000000..fbc97ab
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRegions.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.functions.internal;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
+import org.jclouds.collect.IterableWithMarker;
+import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Region;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.http.functions.ParseJson;
+import org.jclouds.json.Json;
+
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
+
+/**
+ * @author David Alves
+ */
+public class ParseRegions extends ParseJson<ListPage<Region>> {
+
+   @Inject
+   public ParseRegions(Json json) {
+      super(json, new TypeLiteral<ListPage<Region>>() {
+      });
+   }
+
+   public static class ToPagedIterable extends BaseToPagedIterable<Region, ToPagedIterable> {
+
+      private final GoogleComputeEngineApi api;
+
+      @Inject
+      protected ToPagedIterable(GoogleComputeEngineApi api) {
+         this.api = checkNotNull(api, "api");
+      }
+
+      @Override
+      protected Function<Object, IterableWithMarker<Region>> fetchNextPage(final String projectName,
+                                                                           final ListOptions options) {
+         return new Function<Object, IterableWithMarker<Region>>() {
+
+            @Override
+            public IterableWithMarker<Region> apply(Object input) {
+               return api.getRegionApiForProject(projectName).listAtMarker(input.toString(), options);
+            }
+         };
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRoutes.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRoutes.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRoutes.java
new file mode 100644
index 0000000..6207294
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseRoutes.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.functions.internal;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
+import org.jclouds.collect.IterableWithMarker;
+import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Route;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.http.functions.ParseJson;
+import org.jclouds.json.Json;
+
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
+
+/**
+ * @author Andrew Bayer
+ */
+public class ParseRoutes extends ParseJson<ListPage<Route>> {
+
+   @Inject
+   public ParseRoutes(Json json) {
+      super(json, new TypeLiteral<ListPage<Route>>() {
+      });
+   }
+
+   public static class ToPagedIterable extends BaseToPagedIterable<Route, ToPagedIterable> {
+
+      private final GoogleComputeEngineApi api;
+
+      @Inject
+      protected ToPagedIterable(GoogleComputeEngineApi api) {
+         this.api = checkNotNull(api, "api");
+      }
+
+      @Override
+      protected Function<Object, IterableWithMarker<Route>> fetchNextPage(final String projectName,
+                                                                          final ListOptions options) {
+         return new Function<Object, IterableWithMarker<Route>>() {
+
+            @Override
+            public IterableWithMarker<Route> apply(Object input) {
+               return api.getRouteApiForProject(projectName).listAtMarker(input.toString(), options);
+            }
+         };
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseSnapshots.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseSnapshots.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseSnapshots.java
new file mode 100644
index 0000000..cece552
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseSnapshots.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.functions.internal;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+import org.jclouds.collect.IterableWithMarker;
+import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Snapshot;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.http.functions.ParseJson;
+import org.jclouds.json.Json;
+
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
+
+/**
+ * @author David Alves
+ * @author Andrew Bayer
+ */
+@Singleton
+public class ParseSnapshots extends ParseJson<ListPage<Snapshot>> {
+
+   @Inject
+   public ParseSnapshots(Json json) {
+      super(json, new TypeLiteral<ListPage<Snapshot>>() {
+      });
+   }
+
+   public static class ToPagedIterable extends BaseToPagedIterable<Snapshot, ToPagedIterable> {
+
+      private final GoogleComputeEngineApi api;
+
+      @Inject
+      protected ToPagedIterable(GoogleComputeEngineApi api) {
+         this.api = checkNotNull(api, "api");
+      }
+
+      @Override
+      protected Function<Object, IterableWithMarker<Snapshot>> fetchNextPage(final String projectName,
+                                                                         final ListOptions options) {
+         return new Function<Object, IterableWithMarker<Snapshot>>() {
+
+            @Override
+            public IterableWithMarker<Snapshot> apply(Object input) {
+               return api.getSnapshotApiForProject(projectName)
+                       .listAtMarker(input.toString(), options);
+            }
+         };
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZoneOperations.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZoneOperations.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZoneOperations.java
new file mode 100644
index 0000000..11431af
--- /dev/null
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZoneOperations.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jclouds.googlecomputeengine.functions.internal;
+
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
+import org.jclouds.collect.IterableWithMarker;
+import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.domain.Operation;
+import org.jclouds.googlecomputeengine.options.ListOptions;
+import org.jclouds.http.functions.ParseJson;
+import org.jclouds.json.Json;
+
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
+
+/**
+ * @author David Alves
+ */
+public class ParseZoneOperations extends ParseJson<ListPage<Operation>> {
+
+   @Inject
+   public ParseZoneOperations(Json json) {
+      super(json, new TypeLiteral<ListPage<Operation>>() {
+      });
+   }
+
+   public static class ToPagedIterable extends BaseWithZoneToPagedIterable<Operation, ToPagedIterable> {
+
+      private final GoogleComputeEngineApi api;
+
+      @Inject
+      protected ToPagedIterable(GoogleComputeEngineApi api) {
+         this.api = checkNotNull(api, "api");
+      }
+
+      @Override
+      protected Function<Object, IterableWithMarker<Operation>> fetchNextPage(final String projectName,
+                                                                              final String zoneName,
+                                                                              final ListOptions options) {
+         return new Function<Object, IterableWithMarker<Operation>>() {
+
+            @Override
+            public IterableWithMarker<Operation> apply(Object input) {
+               return api.getZoneOperationApiForProject(projectName)
+                       .listAtMarkerInZone(zoneName, input.toString(), options);
+            }
+         };
+      }
+   }
+}

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java
index dd640bd..76aa158 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseZones.java
@@ -16,8 +16,10 @@
  */
 package org.jclouds.googlecomputeengine.functions.internal;
 
-import com.google.common.base.Function;
-import com.google.inject.TypeLiteral;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import javax.inject.Inject;
+
 import org.jclouds.collect.IterableWithMarker;
 import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
 import org.jclouds.googlecomputeengine.domain.ListPage;
@@ -26,9 +28,8 @@ import org.jclouds.googlecomputeengine.options.ListOptions;
 import org.jclouds.http.functions.ParseJson;
 import org.jclouds.json.Json;
 
-import javax.inject.Inject;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Function;
+import com.google.inject.TypeLiteral;
 
 /**
  * @author David Alves
@@ -37,7 +38,8 @@ public class ParseZones extends ParseJson<ListPage<Zone>> {
 
    @Inject
    public ParseZones(Json json) {
-      super(json, new TypeLiteral<ListPage<Zone>>() {});
+      super(json, new TypeLiteral<ListPage<Zone>>() {
+      });
    }
 
    public static class ToPagedIterable extends BaseToPagedIterable<Zone, ToPagedIterable> {

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/FirewallBinder.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/FirewallBinder.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/FirewallBinder.java
index da53104..6c3b8b8 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/FirewallBinder.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/FirewallBinder.java
@@ -16,16 +16,17 @@
  */
 package org.jclouds.googlecomputeengine.handlers;
 
-import org.jclouds.googlecomputeengine.options.FirewallOptions;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.MapBinder;
-import org.jclouds.rest.binders.BindToJsonPayload;
+import static com.google.common.base.Preconditions.checkNotNull;
 
-import javax.inject.Inject;
 import java.net.URI;
 import java.util.Map;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import javax.inject.Inject;
+
+import org.jclouds.googlecomputeengine.options.FirewallOptions;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.MapBinder;
+import org.jclouds.rest.binders.BindToJsonPayload;
 
 /**
  * @author David Alves

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/GoogleComputeEngineErrorHandler.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/GoogleComputeEngineErrorHandler.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/GoogleComputeEngineErrorHandler.java
index ed2dc2f..4324c01 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/GoogleComputeEngineErrorHandler.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/GoogleComputeEngineErrorHandler.java
@@ -16,6 +16,10 @@
  */
 package org.jclouds.googlecomputeengine.handlers;
 
+import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream;
+
+import javax.inject.Singleton;
+
 import org.jclouds.http.HttpCommand;
 import org.jclouds.http.HttpErrorHandler;
 import org.jclouds.http.HttpResponse;
@@ -23,10 +27,6 @@ import org.jclouds.http.HttpResponseException;
 import org.jclouds.rest.AuthorizationException;
 import org.jclouds.rest.ResourceNotFoundException;
 
-import javax.inject.Singleton;
-
-import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream;
-
 /**
  * This will parse and set an appropriate exception on the command object.
  *

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/InstanceBinder.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/InstanceBinder.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/InstanceBinder.java
index ae73d9c..c221969 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/InstanceBinder.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/InstanceBinder.java
@@ -16,18 +16,20 @@
  */
 package org.jclouds.googlecomputeengine.handlers;
 
-import com.google.common.base.Function;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import java.net.URI;
+import java.util.Map;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
 import org.jclouds.googlecomputeengine.domain.InstanceTemplate;
 import org.jclouds.http.HttpRequest;
 import org.jclouds.rest.MapBinder;
 import org.jclouds.rest.binders.BindToJsonPayload;
 
-import javax.inject.Inject;
-import javax.inject.Named;
-import java.net.URI;
-import java.util.Map;
-
-import static com.google.common.base.Preconditions.checkNotNull;
+import com.google.common.base.Function;
 
 /**
  * @author David Alves
@@ -38,13 +40,9 @@ public class InstanceBinder implements MapBinder {
    private BindToJsonPayload jsonBinder;
 
    @Inject
-   @Named("machineTypes")
+   @Named("machineTypeToURI")
    Function<String, URI> machineTypesToURI;
 
-   @Inject
-   @Named("zones")
-   Function<String, URI> zonesToURI;
-
    /**
     * {@inheritDoc}
     */
@@ -52,12 +50,10 @@ public class InstanceBinder implements MapBinder {
    public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
       InstanceTemplate template = (InstanceTemplate) checkNotNull(postParams.get("template"), "template");
       template.name(checkNotNull(postParams.get("name"), "name").toString());
-      template.zone(zonesToURI.apply((String) checkNotNull(postParams.get("zone"), "zone")));
 
       if (template.getMachineTypeName() != null) {
          template.machineType(machineTypesToURI.apply(template.getMachineTypeName()));
       }
-      template.zone((String) null);
       template.machineType((String) null);
       return bindToRequest(request, template);
    }

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-labs-google/blob/53386380/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/MetadataBinder.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/MetadataBinder.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/MetadataBinder.java
index f741d08..87a2b68 100644
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/MetadataBinder.java
+++ b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/handlers/MetadataBinder.java
@@ -16,28 +16,47 @@
  */
 package org.jclouds.googlecomputeengine.handlers;
 
-import org.jclouds.googlecomputeengine.config.GoogleComputeEngineParserModule;
-import org.jclouds.http.HttpRequest;
-import org.jclouds.rest.Binder;
-import org.jclouds.rest.binders.BindToJsonPayload;
+import static com.google.common.base.Preconditions.checkNotNull;
 
-import javax.inject.Inject;
 import java.util.Map;
 
-import static com.google.common.base.Preconditions.checkNotNull;
+import javax.inject.Inject;
+
+import org.jclouds.googlecomputeengine.domain.Metadata;
+import org.jclouds.http.HttpRequest;
+import org.jclouds.rest.MapBinder;
+import org.jclouds.rest.binders.BindToJsonPayload;
+
+import com.google.common.collect.ImmutableMap;
 
 /**
  * @author David Alves
  */
-public class MetadataBinder implements Binder {
+public class MetadataBinder implements MapBinder {
 
    @Inject
    private BindToJsonPayload jsonBinder;
 
+   /**
+    * {@inheritDoc}
+    */
+   @Override
+   public <R extends HttpRequest> R bindToRequest(R request, Map<String, Object> postParams) {
+      Map<String, String> items = ImmutableMap.copyOf((Map<String,String>)checkNotNull(postParams.get("items"), "item"));
+      String fingerprint = (String) checkNotNull(postParams.get("fingerprint"), "fingerprint");
+      Metadata metadata = Metadata.builder()
+              .fingerprint(fingerprint)
+              .items(items)
+              .build();
+      return bindToRequest(request, metadata);
+   }
+
+   /**
+    * {@inheritDoc}
+    */
    @Override
-   @SuppressWarnings("unchecked")
    public <R extends HttpRequest> R bindToRequest(R request, Object input) {
-      Map<String, String> metadataEntries = (Map<String, String>) checkNotNull(input, "input metadata");
-      return jsonBinder.bindToRequest(request, new GoogleComputeEngineParserModule.Metadata(metadataEntries));
+      return jsonBinder.bindToRequest(request, input);
    }
+
 }