diff --git a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApi.java b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApi.java
index 6440d91ca0..ab184a782a 100644
--- a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApi.java
+++ b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/GoogleComputeEngineApi.java
@@ -23,6 +23,7 @@ import javax.ws.rs.PathParam;
import org.jclouds.googlecomputeengine.features.AddressApi;
import org.jclouds.googlecomputeengine.features.DiskApi;
+import org.jclouds.googlecomputeengine.features.DiskTypeApi;
import org.jclouds.googlecomputeengine.features.FirewallApi;
import org.jclouds.googlecomputeengine.features.GlobalOperationApi;
import org.jclouds.googlecomputeengine.features.ImageApi;
@@ -68,6 +69,15 @@ public interface GoogleComputeEngineApi extends Closeable {
@Path("/projects/{project}")
DiskApi getDiskApiForProject(@PathParam("project") String projectName);
+ /**
+ * Provides access to DiskType features
+ *
+ * @param projectName the name of the project
+ */
+ @Delegate
+ @Path("/projects/{project}")
+ DiskTypeApi getDiskTypeApiForProject(@PathParam("project") String projectName);
+
/**
* Provides access to Firewall features
*
diff --git a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/DiskType.java b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/DiskType.java
new file mode 100644
index 0000000000..8919518799
--- /dev/null
+++ b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/DiskType.java
@@ -0,0 +1,165 @@
+/*
+ * 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.domain;
+
+import static com.google.common.base.Optional.fromNullable;
+import static com.google.common.base.Preconditions.checkNotNull;
+
+import java.beans.ConstructorProperties;
+import java.net.URI;
+import java.util.Date;
+
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Optional;
+
+/**
+ * Represents a DiskType resource.
+ *
+ * @see
+ */
+public final class DiskType extends Resource {
+
+ private final String zone;
+ private final Long defaultDiskSizeGb;
+ private final Optional validDiskSize;
+ private final Optional deprecated;
+
+ @ConstructorProperties({
+ "id", "creationTimestamp", "selfLink", "name", "description", "validDiskSize",
+ "deprecated", "zone", "defaultDiskSizeGb"
+ })
+ private DiskType(String id, Date creationTimestamp, URI selfLink, String name, String description,
+ String validDiskSize, Deprecated deprecated, String zone, long defaultDiskSizeGb){
+ super(Kind.DISK_TYPE, id == null ? "" : id, creationTimestamp, selfLink, name, description);
+ this.validDiskSize = fromNullable(validDiskSize);
+ this.deprecated = fromNullable(deprecated);
+ this.zone = checkNotNull(zone, "zone of %s", name);
+ this.defaultDiskSizeGb = defaultDiskSizeGb;
+ }
+
+ /**
+ * @return An optional textual description of the valid disk size. For example, "10GB-10TB."
+ */
+ public Optional getValidDiskSize(){
+ return validDiskSize;
+ }
+
+ /**
+ * @return If applicable, the deprecation status associated with this disk type.
+ */
+ public Optional getDeprecated(){
+ return deprecated;
+ }
+
+ /**
+ * @return The fully-qualified URL for the zone where the disk type resource resides.
+ */
+ public String getZone(){
+ return zone;
+ }
+
+ /**
+ * @return Server defined default disk size in GB.
+ */
+ public long getDefaultDiskSizeGb(){
+ return defaultDiskSizeGb;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected MoreObjects.ToStringHelper string() {
+ return super.string()
+ .add("validDiskSize", validDiskSize.orNull())
+ .add("defaultDiskSizeGb", defaultDiskSizeGb)
+ .add("zone", zone)
+ .add("deprecated", deprecated.orNull());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String toString() {
+ return string().toString();
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ public Builder toBuilder(){
+ return new Builder().fromDiskType(this);
+ }
+
+ public static final class Builder extends Resource.Builder {
+
+ private String zone;
+ private Long defaultDiskSizeGb;
+ private String validDiskSize;
+ private Deprecated deprecated;
+
+ /**
+ * @see DiskType#getZone()
+ */
+ public Builder zone(String zone){
+ this.zone = zone;
+ return this;
+ }
+
+ /**
+ * @see DiskType#getDefaultDiskSizeGb()
+ */
+ public Builder defaultDiskSizeGb(long defaultDiskSizeGb){
+ this.defaultDiskSizeGb = defaultDiskSizeGb;
+ return this;
+ }
+
+ /**
+ * @see DiskType#getValidDiskSize()
+ */
+ public Builder validDiskSize(String validDiskSize){
+ this.validDiskSize = validDiskSize;
+ return this;
+ }
+
+ /**
+ * @see DiskType#getDeprecated()
+ */
+ public Builder deprecated(Deprecated deprecated){
+ this.deprecated = deprecated;
+ return this;
+ }
+
+ @Override
+ protected Builder self() {
+ return this;
+ }
+
+ public DiskType build() {
+ return new DiskType(id, creationTimestamp, selfLink, name, description,
+ validDiskSize, deprecated, zone, defaultDiskSizeGb);
+ }
+
+ public Builder fromDiskType(DiskType in) {
+ return super.fromResource(in).zone(in.getZone()).defaultDiskSizeGb(in
+ .getDefaultDiskSizeGb()).validDiskSize(in.getValidDiskSize().orNull())
+ .deprecated(in.getDeprecated().orNull());
+ }
+ }
+}
diff --git a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Resource.java b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Resource.java
index 66717018b9..cec989c9ec 100644
--- a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Resource.java
+++ b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Resource.java
@@ -47,6 +47,8 @@ public class Resource {
ADDRESS_LIST,
DISK,
DISK_LIST,
+ DISK_TYPE,
+ DISK_TYPE_LIST,
FIREWALL,
FIREWALL_LIST,
IMAGE,
diff --git a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/DiskTypeApi.java b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/DiskTypeApi.java
new file mode 100644
index 0000000000..b8dc906221
--- /dev/null
+++ b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/DiskTypeApi.java
@@ -0,0 +1,142 @@
+/*
+ * 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 javax.inject.Named;
+import javax.ws.rs.Consumes;
+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.DiskType;
+import org.jclouds.googlecomputeengine.domain.ListPage;
+import org.jclouds.googlecomputeengine.functions.internal.ParseDiskTypes;
+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.OAuthAuthenticationFilter;
+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 DiskTypes via their REST API.
+ *
+ * @see
+ */
+@SkipEncoding({'/', '='})
+@RequestFilters(OAuthAuthenticationFilter.class)
+@Consumes(MediaType.APPLICATION_JSON)
+public interface DiskTypeApi {
+
+ /**
+ * Returns the specified disk type resource.
+ *
+ * @param zone the name of the zone the disk type is in
+ * @param diskType name of the disk type resource to return.
+ * @return If successful, this method returns a DiskType resource
+ */
+ @Named("DiskTypes:get")
+ @GET
+ @Path("/zones/{zone}/diskTypes/{diskType}")
+ @OAuthScopes(COMPUTE_READONLY_SCOPE)
+ @Fallback(NullOnNotFoundOr404.class)
+ DiskType getInZone(@PathParam("zone") String zone, @PathParam("diskType") String diskTypeName);
+
+ /**
+ * @see DiskTypeApi#listAtMarkerInZone(String, String, org.jclouds.googlecomputeengine.options.ListOptions)
+ */
+ @Named("DiskTypes:list")
+ @GET
+ @Path("/zones/{zone}/diskTypes")
+ @OAuthScopes(COMPUTE_READONLY_SCOPE)
+ @ResponseParser(ParseDiskTypes.class)
+ @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+ ListPage listFirstPageInZone(@PathParam("zone") String zone);
+
+ /**
+ * @see DiskTypeApi#listAtMarkerInZone(String, String, org.jclouds.googlecomputeengine.options.ListOptions)
+ */
+ @Named("DiskTypes:list")
+ @GET
+ @Path("/zones/{zone}/diskType")
+ @OAuthScopes(COMPUTE_READONLY_SCOPE)
+ @ResponseParser(ParseDiskTypes.class)
+ @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+ ListPage listAtMarkerInZone(@PathParam("zone") String zone, @QueryParam("pageToken") @Nullable String marker);
+
+ /**
+ * Retrieves the list of disk type resources available to the specified project.
+ * By default the list as a maximum size of 100, if no options are provided or ListOptions#getMaxResults() has not
+ * been set.
+ *
+ * @param zone The name of 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
+ * @see ListOptions
+ * @see org.jclouds.googlecomputeengine.domain.ListPage
+ */
+ @Named("DiskTypes:list")
+ @GET
+ @Path("/zones/{zone}/diskTypes")
+ @OAuthScopes(COMPUTE_READONLY_SCOPE)
+ @ResponseParser(ParseDiskTypes.class)
+ @Fallback(EmptyIterableWithMarkerOnNotFoundOr404.class)
+ ListPage listAtMarkerInZone(@PathParam("zone") String zone,
+ @QueryParam("pageToken") @Nullable String marker,
+ ListOptions listOptions);
+
+ /**
+ * @see DiskTypeApi#listInZone(String, org.jclouds.googlecomputeengine.options.ListOptions)
+ */
+ @Named("DiskTypes:list")
+ @GET
+ @Path("/zones/{zone}/diskTypes")
+ @OAuthScopes(COMPUTE_READONLY_SCOPE)
+ @ResponseParser(ParseDiskTypes.class)
+ @Transform(ParseDiskTypes.ToPagedIterable.class)
+ @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+ PagedIterable listInZone(@PathParam("zone") String zone);
+
+ /**
+ * @see DiskTypeApi#listAtMarkerInZone(String, String, org.jclouds.googlecomputeengine.options.ListOptions)
+ *
+ * @param zone the zone to list in
+ * @return a Paged, Fluent Iterable that is able to fetch additional pages when required
+ * @see PagedIterable
+ */
+ @Named("DiskTypes:list")
+ @GET
+ @Path("/zones/{zone}/diskTypes")
+ @OAuthScopes(COMPUTE_READONLY_SCOPE)
+ @ResponseParser(ParseDiskTypes.class)
+ @Transform(ParseDiskTypes.ToPagedIterable.class)
+ @Fallback(EmptyPagedIterableOnNotFoundOr404.class)
+ PagedIterable listInZone(@PathParam("zone") String zone, ListOptions listOptions);
+
+}
diff --git a/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDiskTypes.java b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDiskTypes.java
new file mode 100644
index 0000000000..e697399a86
--- /dev/null
+++ b/providers/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/functions/internal/ParseDiskTypes.java
@@ -0,0 +1,64 @@
+/*
+ * 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.DiskType;
+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;
+
+public class ParseDiskTypes extends ParseJson> {
+
+ @Inject
+ public ParseDiskTypes(Json json) {
+ super(json, new TypeLiteral>() {});
+ }
+
+ public static class ToPagedIterable extends BaseWithZoneToPagedIterable {
+
+ private final GoogleComputeEngineApi api;
+
+ @Inject
+ protected ToPagedIterable(GoogleComputeEngineApi api) {
+ this.api = checkNotNull(api, "api");
+ }
+
+ @Override
+ protected Function