You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2015/06/26 15:00:56 UTC
[14/17] jclouds-labs-google git commit: Remove the graduated GCE
provided and updated Maven coordinates
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/NewInstance.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/NewInstance.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/NewInstance.java
deleted file mode 100644
index 2738646..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/NewInstance.java
+++ /dev/null
@@ -1,180 +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.domain;
-
-import static com.google.common.base.Preconditions.checkArgument;
-import static com.google.common.base.Preconditions.checkNotNull;
-
-import java.net.URI;
-import java.util.Arrays;
-import java.util.List;
-
-import org.jclouds.googlecomputeengine.domain.Instance.NetworkInterface.AccessConfig;
-import org.jclouds.googlecomputeengine.domain.Instance.NetworkInterface.AccessConfig.Type;
-import org.jclouds.googlecomputeengine.domain.Instance.Scheduling;
-import org.jclouds.googlecomputeengine.domain.Instance.ServiceAccount;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableList;
-
-/** Parameter to {@linkplain org.jclouds.googlecomputeengine.features.InstanceApi#create(NewInstance)}. */
-@AutoValue
-public abstract class NewInstance {
- @AutoValue
- abstract static class NetworkInterface {
- abstract URI network();
-
- abstract List<AccessConfig> accessConfigs();
-
- static NetworkInterface create(URI network) {
- return create(network, Arrays.asList(AccessConfig.create(null, Type.ONE_TO_ONE_NAT, null)));
- }
-
- @SerializedNames({ "network", "accessConfigs" })
- static NetworkInterface create(URI network, List<AccessConfig> accessConfigs) {
- return new AutoValue_NewInstance_NetworkInterface(network, accessConfigs);
- }
-
- NetworkInterface() {
- }
- }
-
- public abstract String name();
-
- public abstract URI machineType();
-
- @Nullable public abstract Boolean canIpForward();
-
- public abstract List<NetworkInterface> networkInterfaces();
-
- public abstract List<AttachDisk> disks();
-
- @Nullable public abstract String description();
-
- public abstract Tags tags();
-
- /** Add metadata via {@link Metadata#items()}. */
- public abstract Metadata metadata();
-
- @Nullable public abstract List<ServiceAccount> serviceAccounts();
-
- @Nullable public abstract Scheduling scheduling();
-
- /** Convenience for creating a new instance with only a boot disk and minimal parameters. */
- public static NewInstance create(String name, URI machineType, URI network, URI sourceImage) {
- return create(name, machineType, network, Arrays.asList(AttachDisk.newBootDisk(sourceImage)), null, null);
- }
-
- public static NewInstance create(String name, URI machineType, URI network, List<AttachDisk> disks,
- @Nullable String description, @Nullable Tags tags) {
- checkArgument(disks.get(0).boot(), "disk 0 must be a boot disk! %s", disks);
- boolean foundBoot = false;
- for (AttachDisk disk : disks) {
- if (disk.boot()) {
- checkArgument(!foundBoot, "There must be only one boot disk! %s", disks);
- foundBoot = true;
- }
- }
- return create(name, machineType, null, ImmutableList.of(NetworkInterface.create(network)), ImmutableList.copyOf(disks),
- description, tags != null ? tags : Tags.create(), Metadata.create(), null, null);
- }
-
- @SerializedNames({ "name", "machineType", "canIpForward", "networkInterfaces", "disks", "description",
- "tags", "metadata", "serviceAccounts", "scheduling" })
- static NewInstance create(String name, URI machineType, Boolean canIpForward,
- List<NetworkInterface> networkInterfaces, List<AttachDisk> disks, String description,
- Tags tags, Metadata metadata, List<ServiceAccount> serviceAccounts, Scheduling scheduling) {
- return new AutoValue_NewInstance(name, machineType, canIpForward, networkInterfaces, disks, description,
- tags, metadata, serviceAccounts, scheduling);
- }
-
- NewInstance() {
- }
-
- public static class Builder {
- private String name;
- private URI machineType;
- private Boolean canIpForward;
- private List<NetworkInterface> networkInterfaces;
- private List<AttachDisk> disks;
- private String description;
- private Tags tags;
- private Metadata metadata;
- private List<ServiceAccount> serviceAccounts;
- private Scheduling scheduling;
-
- public Builder(String name, URI machineType, URI network, List<AttachDisk> disks) {
- checkNotNull(name, "NewInstance name cannot be null");
- this.name = name;
- this.machineType = machineType;
- this.networkInterfaces = ImmutableList.of(NetworkInterface.create(network));
- this.disks = disks;
- }
-
- public Builder(String name, URI machineType, URI network, URI sourceImage) {
- checkNotNull(name, "NewInstance name cannot be null");
- this.name = name;
- this.machineType = machineType;
- this.networkInterfaces = ImmutableList.of(NetworkInterface.create(network));
- this.disks = Arrays.asList(AttachDisk.newBootDisk(sourceImage));
- }
-
- public Builder canIpForward(Boolean canIpForward){
- this.canIpForward = canIpForward;
- return this;
- }
-
- public Builder description(String description){
- this.description = description;
- return this;
- }
-
- public Builder tags(Tags tags){
- this.tags = tags;
- return this;
- }
-
- public Builder metadata(Metadata metadata){
- this.metadata = metadata;
- return this;
- }
-
- /**
- * A list of service accounts, with their specified scopes, authorized for this instance.
- * Service accounts generate access tokens that can be accessed through the metadata server
- * and used to authenticate applications on the instance.
- * Note: to add scopes to the default service account on the VM you can use 'default' as
- * a keyword for email.
- */
- public Builder serviceAccounts(List<ServiceAccount> serviceAccounts){
- this.serviceAccounts = serviceAccounts;
- return this;
- }
-
- public Builder scheduling(Scheduling scheduling){
- this.scheduling = scheduling;
- return this;
- }
-
- public NewInstance build() {
- return create(name, machineType, canIpForward, networkInterfaces, disks, description, tags != null ? tags : Tags.create(),
- metadata != null ? metadata : Metadata.create(), serviceAccounts, scheduling);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/NewTargetInstance.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/NewTargetInstance.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/NewTargetInstance.java
deleted file mode 100644
index 478bfce..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/NewTargetInstance.java
+++ /dev/null
@@ -1,72 +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.domain;
-
-import java.net.URI;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class NewTargetInstance {
-
- public abstract String name();
- @Nullable public abstract String description();
- @Nullable public abstract String natPolicy();
- @Nullable public abstract URI instance();
-
- @SerializedNames({"name", "description", "natPolicy", "instance"})
- static NewTargetInstance create(String name, String description, String natPolicy, URI instance){
- return new AutoValue_NewTargetInstance(name, description, natPolicy, instance);
- }
-
- NewTargetInstance() {
- }
-
- public static class Builder {
- private String name;
- private String description;
- private String natPolicy;
- private URI instance;
-
- public Builder name(String name) {
- this.name = name;
- return this;
- }
-
- public Builder description(String description) {
- this.description = description;
- return this;
- }
-
- public Builder natPolicy(String natPolicy) {
- this.natPolicy = natPolicy;
- return this;
- }
-
- public Builder instance(URI instance) {
- this.instance = instance;
- return this;
- }
-
- public NewTargetInstance build() {
- return NewTargetInstance.create(name, description, natPolicy, instance);
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Operation.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Operation.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Operation.java
deleted file mode 100644
index b36dc64..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Operation.java
+++ /dev/null
@@ -1,148 +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.domain;
-
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Operation {
-
- @AutoValue
- public abstract static class Error {
-
- @AutoValue
- public abstract static class Entry {
-
- /** The error type identifier for this error. */
- public abstract String code(); // TODO: enum?
-
- /** The field in the request which caused the error. */
- @Nullable public abstract String location();
-
- @Nullable public abstract String message();
-
- @SerializedNames({ "code", "location", "message" })
- public static Entry create(String code, String location, String message) {
- return new AutoValue_Operation_Error_Entry(code, location, message);
- }
-
- Entry() {
- }
- }
-
- public abstract List<Entry> errors();
-
- @SerializedNames({ "errors" })
- public static Error create(List<Entry> errors) {
- return new AutoValue_Operation_Error(errors != null ? errors : new ArrayList<Entry>());
- }
-
- public static Error empty(){
- return create(null);
- }
-
- Error(){
- }
- }
-
- public static enum Status {
- PENDING,
- RUNNING,
- DONE
- }
-
- public abstract String id();
-
- @Nullable public abstract Date creationTimestamp();
-
- public abstract URI selfLink();
-
- public abstract String name();
-
- @Nullable public abstract String description();
-
- /** URL of the resource the operation is mutating. */
- public abstract URI targetLink();
-
- /** Target id which identifies a particular incarnation of the target. */
- @Nullable public abstract String targetId();
-
- /**
- * Identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in
- * the project.
- */
- @Nullable public abstract String clientOperationId();
-
- public abstract Status status();
-
- /** Textual description of the current status of the operation. */
- @Nullable public abstract String statusMessage();
-
- /** User who requested the operation, for example {@code user@example.com}. */
- @Nullable public abstract String user();
-
- /**
- * A progress indicator that ranges from 0 to 100. This should not be used to guess at when the
- * operation will be complete. This number should be monotonically increasing as the operation progresses.
- */
- @Nullable public abstract Integer progress(); // TODO: check really nullable
-
- /** The time that this operation was requested. */
- public abstract Date insertTime();
-
- @Nullable public abstract Date startTime();
-
- @Nullable public abstract Date endTime();
-
- @Nullable public abstract Integer httpErrorStatusCode();
-
- @Nullable public abstract String httpErrorMessage();
-
- /** Examples include insert, update, and delete. */
- public abstract String operationType(); // TODO: enum
-
- public abstract Error error();
-
- @Nullable public abstract List<Warning> warnings();
-
- @Nullable public abstract URI region();
-
- @Nullable public abstract URI zone();
-
- @SerializedNames({ "id", "creationTimestamp", "selfLink", "name", "description", "targetLink", "targetId", "clientOperationId", "status",
- "statusMessage", "user", "progress", "insertTime", "startTime", "endTime", "httpErrorStatusCode",
- "httpErrorMessage", "operationType", "error", "warnings", "region", "zone" })
- public static Operation create(String id, Date creationTimestamp, URI selfLink, String name, String description, URI targetLink,
- String targetId, String clientOperationId, Status status, String statusMessage, String user, Integer progress,
- Date insertTime, Date startTime, Date endTime, Integer httpErrorStatusCode, String httpErrorMessage,
- String operationType, Error error, List<Warning> warnings, URI region, URI zone) {
- return new AutoValue_Operation(id, creationTimestamp, selfLink, name, description, targetLink, targetId, clientOperationId, status,
- statusMessage, user, progress, insertTime, startTime, endTime, httpErrorStatusCode, httpErrorMessage,
- operationType, error != null ? error : Error.empty(), warnings, region, zone);
- }
-
- Operation() {
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Project.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Project.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Project.java
deleted file mode 100644
index ecec9e4..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Project.java
+++ /dev/null
@@ -1,80 +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.domain;
-
-import static org.jclouds.googlecloud.internal.NullSafeCopies.copyOf;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-/** The root collection and settings resource for all Google Compute Engine resources. */
-@AutoValue
-public abstract class Project {
-
- @AutoValue
- public abstract static class UsageExportLocation {
-
- public abstract String bucketName();
-
- public abstract String reportNamePrefix();
-
- @SerializedNames({"bucketName", "reportNamePrefix"})
- public static UsageExportLocation create(String bucketName, String reporNamePrefix) {
- return new AutoValue_Project_UsageExportLocation(bucketName, reporNamePrefix);
- }
-
- UsageExportLocation () {
- }
- }
-
- public abstract String id();
-
- public abstract URI selfLink();
-
- public abstract String name();
-
- @Nullable public abstract String description();
-
- /** Key/value pairs available to all instances contained in this project. */
- public abstract Metadata commonInstanceMetadata();
-
- public abstract List<Quota> quotas();
-
- /** Available IP addresses available for use in this project. */
- public abstract List<String> externalIpAddresses();
-
- public abstract Date creationTimestamp();
-
- @Nullable public abstract UsageExportLocation usageExportLocation();
-
- @SerializedNames(
- { "id", "selfLink", "name", "description", "commonInstanceMetadata", "quotas", "externalIpAddresses", "creationTimestamp", "usageExportLocation"})
- public static Project create(String id, URI selfLink, String name, String description,
- Metadata commonInstanceMetadata, List<Quota> quotas, List<String> externalIpAddresses, Date creationTimestamp, UsageExportLocation usageExportLocation) {
- return new AutoValue_Project(id, selfLink, name, description, commonInstanceMetadata, copyOf(quotas),
- copyOf(externalIpAddresses), creationTimestamp, usageExportLocation);
- }
-
- Project() {
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Quota.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Quota.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Quota.java
deleted file mode 100644
index b1cbad5..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Quota.java
+++ /dev/null
@@ -1,41 +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.domain;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-/** Quotas assigned to a given project or region. */
-@AutoValue
-public abstract class Quota {
-
- @Nullable public abstract String metric(); // Nullable?! really?!
-
- public abstract double usage();
-
- public abstract double limit();
-
- @SerializedNames({ "metric", "usage", "limit" })
- public static Quota create(String metric, double usage, double limit) {
- return new AutoValue_Quota(metric, usage, limit);
- }
-
- Quota() {
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Region.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Region.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Region.java
deleted file mode 100644
index 91d4cf1..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Region.java
+++ /dev/null
@@ -1,62 +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.domain;
-
-import static org.jclouds.googlecloud.internal.NullSafeCopies.copyOf;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Region {
-
- public enum Status {
- UP,
- DOWN
- }
-
- public abstract String id();
-
- public abstract Date creationTimestamp();
-
- public abstract URI selfLink();
-
- public abstract String name();
-
- @Nullable public abstract String description();
-
- public abstract Status status();
-
- public abstract List<URI> zones();
-
- public abstract List<Quota> quotas();
-
- @SerializedNames({ "id", "creationTimestamp", "selfLink", "name", "description", "status", "zones", "quotas" })
- public static Region create(String id, Date creationTimestamp, URI selfLink, String name, String description, Status status, List<URI> zones,
- List<Quota> quotas) {
- return new AutoValue_Region(id, creationTimestamp, selfLink, name, description, status, copyOf(zones), copyOf(quotas));
- }
-
- Region() {
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Route.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Route.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Route.java
deleted file mode 100644
index a99d0fd..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Route.java
+++ /dev/null
@@ -1,88 +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.domain;
-
-import static org.jclouds.googlecloud.internal.NullSafeCopies.copyOf;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Route {
-
- public abstract String id();
-
- public abstract Date creationTimestamp();
-
- public abstract URI selfLink();
-
- public abstract String name();
-
- @Nullable public abstract String description();
-
- public abstract URI network();
-
- /** The set of instance items to which this route applies. */
- public abstract List<String> tags();
-
- /** The destination range of outgoing packets that this route applies to. */
- public abstract String destRange();
-
- /**
- * The priority of this route. Priority is used to break ties in the case
- * where there is more than one matching route of maximum length. A lower value
- * is higher priority; a priority of 100 is higher than 200.
- */
- public abstract int priority();
-
- /** The fully-qualified URL to an instance that should handle matching packets. */
- @Nullable public abstract URI nextHopInstance();
-
- /** The network IP address of an instance that should handle matching packets. */
- @Nullable public abstract String nextHopIp();
-
- /** The local network if it should handle matching packets. */
- @Nullable public abstract URI nextHopNetwork();
-
- /** The gateway that should handle matching packets. Currently, this is only the internet gateway. */
- @Nullable public abstract URI nextHopGateway();
-
- /** Potential misconfigurations are detected for this route. */
- public abstract List<Warning> warnings();
-
- /** The URL to a VpnTunnel that should handle matching packets. */
- @Nullable public abstract URI nextHopVpnTunnel();
-
- @SerializedNames(
- { "id", "creationTimestamp", "selfLink", "name", "description", "network", "tags", "destRange", "priority", "nextHopInstance",
- "nextHopIp", "nextHopNetwork", "nextHopGateway", "warnings", "nextHopVpnTunnel" })
- public static Route create(String id, Date creationTimestamp, URI selfLink, String name, String description, URI network, List<String> tags,
- String destRange, int priority, URI nextHopInstance, String nextHopIp, URI nextHopNetwork, URI nextHopGateway,
- List<Warning> warnings, URI nextHopVpnTunnel) {
- return new AutoValue_Route(id, creationTimestamp, selfLink, name, description, network, copyOf(tags), destRange, priority,
- nextHopInstance, nextHopIp, nextHopNetwork, nextHopGateway, copyOf(warnings), nextHopVpnTunnel);
- }
-
- Route() {
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Snapshot.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Snapshot.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Snapshot.java
deleted file mode 100644
index 50b7356..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Snapshot.java
+++ /dev/null
@@ -1,75 +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.domain;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Snapshot {
-
- public abstract String id();
-
- public abstract URI selfLink();
-
- public abstract Date creationTimestamp();
-
- public abstract String name();
-
- @Nullable public abstract String description();
-
- public abstract int diskSizeGb();
-
- public abstract String status();
-
- /**
- * The source disk used to insert this snapshot. Once the source disk
- * has been deleted from the system, this field will be cleared, and will
- * not be set even if a disk with the same name has been re-created (output only).
- */
- @Nullable public abstract URI sourceDisk();
-
- /**
- * The ID value of the disk used to insert this snapshot. This value
- * may be used to determine whether the snapshot was taken from the current
- * or a previous instance of a given disk name.
- */
- public abstract String sourceDiskId();
-
- @Nullable public abstract Long storageBytes();
-
- @Nullable public abstract String storageByteStatus();
-
- @Nullable public abstract List<String> licenses();
-
- @SerializedNames({ "id", "selfLink", "creationTimestamp", "name", "description", "diskSizeGb", "status",
- "sourceDisk", "sourceDiskId", "storageBytes", "storageByteStatus", "licenses" })
- public static Snapshot create(String id, URI selfLink, Date creationTimestamp, String name, String description,
- int diskSizeGb, String status, URI sourceDisk, String sourceDiskId, Long storageBytes, String storageByteStatus, List<String> licenses) {
- return new AutoValue_Snapshot(id, selfLink, creationTimestamp, name, description, diskSizeGb, status,
- sourceDisk, sourceDiskId, storageBytes, storageByteStatus, licenses);
- }
-
- Snapshot() {
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Tags.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Tags.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Tags.java
deleted file mode 100644
index 59f3071..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Tags.java
+++ /dev/null
@@ -1,55 +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.domain;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.collect.ImmutableList;
-
-/**
- * Tags for an instance or project, with their fingerprint. Each tag must be unique, must be 1-63 characters long, and
- * comply with RFC1035.
- * <p/>
- * This object is mutable and not thread-safe.
- */
-@AutoValue
-public abstract class Tags implements Cloneable {
- /** The fingerprint for the items - needed for updating them. */
- @Nullable public abstract String fingerprint();
-
- /** Immutable list of tags. */
- public abstract ImmutableList<String> items();
-
- public static Tags create() {
- return Tags.create(null, null);
- }
-
- @SerializedNames({ "fingerprint", "items" })
- public static Tags create(String fingerprint, ImmutableList<String> items) { // Dictates the type when created from json!
- ImmutableList<String> empty = ImmutableList.of();
- return new AutoValue_Tags(fingerprint, items != null ? items : empty);
- }
-
- Tags() {
- }
-
- @Override public Tags clone() {
- return Tags.create(fingerprint(), items());
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetHttpProxy.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetHttpProxy.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetHttpProxy.java
deleted file mode 100644
index 89014ab..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetHttpProxy.java
+++ /dev/null
@@ -1,47 +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.domain;
-
-import java.net.URI;
-import java.util.Date;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-import com.google.common.annotations.Beta;
-
-@AutoValue
-@Beta
-public abstract class TargetHttpProxy {
-
- public abstract String id();
- public abstract Date creationTimestamp();
- public abstract URI selfLink();
- public abstract String name();
- @Nullable public abstract String description();
- public abstract URI urlMap();
-
- @SerializedNames({"id", "creationTimestamp", "selfLink", "name", "description", "urlMap"})
- public static TargetHttpProxy create(String id, Date creationTimestamp, URI selfLink, String name,
- @Nullable String description, URI urlMap){
- return new AutoValue_TargetHttpProxy(id, creationTimestamp, selfLink, name, description, urlMap);
- }
-
- TargetHttpProxy(){
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetInstance.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetInstance.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetInstance.java
deleted file mode 100644
index f477572..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetInstance.java
+++ /dev/null
@@ -1,49 +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.domain;
-
-
-import java.net.URI;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class TargetInstance {
-
- public abstract String id();
- public abstract String creationTimestamp();
- public abstract String name();
- @Nullable public abstract String description();
- public abstract URI zone();
- public abstract String natPolicy();
- @Nullable public abstract URI instance();
- public abstract URI selfLink();
-
- @SerializedNames({"id", "creationTimestamp", "name", "description", "zone",
- "natPolicy", "instance", "selfLink"})
- public static TargetInstance create(String id, String creationTimestamp, String name,
- String description, URI zone, String natPolicy, URI instance, URI selfLink){
- return new AutoValue_TargetInstance(id, creationTimestamp, name, description, zone,
- natPolicy, instance, selfLink);
- }
-
- TargetInstance(){
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetPool.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetPool.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetPool.java
deleted file mode 100644
index 4fa447b..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/TargetPool.java
+++ /dev/null
@@ -1,100 +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.domain;
-
-import static org.jclouds.googlecloud.internal.NullSafeCopies.copyOf;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-import org.jclouds.googlecomputeengine.options.TargetPoolCreationOptions.SessionAffinityValue;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class TargetPool {
-
- public abstract String id();
-
- public abstract URI selfLink();
-
- public abstract Date creationTimestamp();
-
- public abstract String name();
-
- @Nullable public abstract String description();
-
- public abstract URI region();
-
- /**
- * URL to HttpHealthCheck resources. A member VM in this pool is considered healthy if and only if
- * the specified health checks pass. An empty list means all member virtual machines will be considered healthy at
- * all times but the health status of this target pool will be marked as unhealthy to indicate that no health checks
- * are being performed.
- */
- public abstract List<URI> healthChecks();
-
- /**
- * A list of resource URLs to the member VMs serving this pool. They must live in zones contained in the same
- * region as this pool.
- */
- public abstract List<URI> instances();
-
- /**
- * The session affinity option, determines the hash method that Google Compute Engine uses to
- * distribute traffic.
- */
- @Nullable public abstract SessionAffinityValue sessionAffinity();
-
- /**
- * This field is applicable only when the target pool is serving a forwarding rule as the primary pool.
- * The value of the a float between [0, 1]. If set, backupPool must also be set. Together,
- * they define the fallback behavior of the primary target pool. If the ratio of the healthy VMs in the primary
- * pool is at or below this number, traffic arriving at the load-balanced IP will be directed to the backup pool.
- * In case where failoverRatio is not set or all the VMs in the backup pool are unhealthy,
- * the traffic will be directed back to the primary pool in the force mode, where traffic will be spread to the
- * healthy VMs with the best effort, or to all VMs when no VM is healthy.
- */
- @Nullable public abstract Float failoverRatio();
-
- /**
- * This field is applicable only when the target pool is serving a forwarding rule as the primary pool.
- * Must be a fully-qualified URL to a target pool that is in the same region as the primary target pool.
- * If set, failoverRatio must also be set. Together, they define the fallback behavior of the primary target pool.
- * If the ratio of the healthy VMs in the primary pool is at or below this number,
- * traffic arriving at the load-balanced IP will be directed to the backup pool. In case where failoverRatio is
- * not set or all the VMs in the backup pool are unhealthy, the traffic will be directed back to the primary pool
- * in the force mode, where traffic will be spread to the healthy VMs with the best effort,
- * or to all VMs when no VM is healthy.
- */
- @Nullable public abstract URI backupPool();
-
- @SerializedNames({ "id", "selfLink", "creationTimestamp", "name", "description", "region", "healthChecks", "instances", "sessionAffinity",
- "failoverRatio", "backupPool" })
- public static TargetPool create(String id, URI selfLink, Date creationTimestamp, String name, String description, URI region,
- List<URI> healthChecks, List<URI> instances, SessionAffinityValue sessionAffinity, Float failoverRatio,
- URI backupPool) {
- return new AutoValue_TargetPool(id, selfLink, creationTimestamp, name, description, region, copyOf(healthChecks), copyOf(instances),
- sessionAffinity, failoverRatio, backupPool);
- }
-
- TargetPool() {
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/UrlMap.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/UrlMap.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/UrlMap.java
deleted file mode 100644
index 79a7993..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/UrlMap.java
+++ /dev/null
@@ -1,125 +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.domain;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class UrlMap {
-
- /**
- * An urlMap hostRule used to filter requests based on hostname. Controls what traffic is sent to
- * which path matcher.
- */
- @AutoValue
- public abstract static class HostRule {
- @Nullable public abstract String description();
- public abstract List<String> hosts();
- public abstract String pathMatcher();
-
- @SerializedNames({ "description", "hosts", "pathMatcher" })
- public static HostRule create(String description, List<String> hosts,
- String pathMatcher) {
- return new AutoValue_UrlMap_HostRule(description, hosts, pathMatcher);
- }
-
- HostRule(){
- }
- }
-
- @AutoValue
- public abstract static class PathMatcher {
-
- @AutoValue
- public abstract static class PathRule{
- public abstract List<String> paths();
- public abstract URI service();
-
- @SerializedNames({"paths", "service"})
- public static PathRule create(List<String> paths, URI service) {
- return new AutoValue_UrlMap_PathMatcher_PathRule(paths, service);
- }
-
- PathRule(){
- }
- }
-
- public abstract String name();
- @Nullable public abstract String description();
- public abstract URI defaultService();
- public abstract List<PathRule> pathRules();
-
- @SerializedNames({ "name", "description", "defaultService", "pathRules" })
- public static PathMatcher create(String name, @Nullable String description,
- URI defaultService, @Nullable List<PathRule> pathRules) {
- return new AutoValue_UrlMap_PathMatcher(name, description, defaultService, pathRules);
- }
-
- PathMatcher(){
- }
- }
-
- @AutoValue
- public abstract static class UrlMapTest{
-
- @Nullable public abstract String description();
- public abstract String host();
- public abstract String path();
- public abstract URI service();
-
- @SerializedNames({"description", "host", "path", "service"})
- public static UrlMapTest create(@Nullable String description, String host, String path, URI service) {
- return new AutoValue_UrlMap_UrlMapTest(description, host, path, service);
- }
- UrlMapTest(){
- }
- }
-
- public abstract String id();
- public abstract Date creationTimestamp();
- public abstract URI selfLink();
- public abstract String name();
- @Nullable public abstract String description();
- @Nullable public abstract List<HostRule> hostRules();
- @Nullable public abstract List<PathMatcher> pathMatchers();
- @Nullable public abstract List<UrlMapTest> urlMapTests();
- public abstract URI defaultService();
- public abstract String fingerprint();
-
-
- @SerializedNames({
- "id", "creationTimestamp", "selfLink", "name", "description", "hostRules", "pathMatchers",
- "tests", "defaultService", "fingerprint"})
- public static UrlMap create (String id, Date creationTimestamp, URI selfLink, String name,
- @Nullable String description, @Nullable List<HostRule> hostRules,
- @Nullable List<PathMatcher> pathMatchers,
- @Nullable List<UrlMapTest> urlMapTests, URI defaultService,
- @Nullable String fingerprint) {
- return new AutoValue_UrlMap(id, creationTimestamp, selfLink, name, description, hostRules, pathMatchers,
- urlMapTests, defaultService, fingerprint);
- }
-
- UrlMap(){
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/UrlMapValidateResult.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/UrlMapValidateResult.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/UrlMapValidateResult.java
deleted file mode 100644
index a33e7d0..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/UrlMapValidateResult.java
+++ /dev/null
@@ -1,84 +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.domain;
-
-import java.net.URI;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class UrlMapValidateResult {
-
- public abstract UrlMapValidateResultInternal result();
-
- @SerializedNames({"result"})
- public static UrlMapValidateResult create(UrlMapValidateResultInternal result){
- return new AutoValue_UrlMapValidateResult(result);
- }
-
- @SerializedNames({"loadSucceeded", "loadErrors", "testPassed", "testFailures"})
- public static UrlMapValidateResult create(Boolean loadSucceeded, List<String> loadErrors,
- Boolean testPassed, List<UrlMapValidateResultInternal.TestFailure> testFailures) {
- return create(UrlMapValidateResultInternal.create(loadSucceeded, loadErrors, testPassed, testFailures));
- }
-
- public static UrlMapValidateResult allPass(){
- return create(true, null, true, null);
- }
-
- @AutoValue
- public abstract static class UrlMapValidateResultInternal {
-
- public abstract Boolean loadSucceeded();
- @Nullable public abstract List<String> loadErrors();
- @Nullable public abstract Boolean testPassed();
- @Nullable public abstract List<TestFailure> testFailures();
-
- @SerializedNames({"loadSucceeded", "loadErrors", "testPassed", "testFailures"})
- public static UrlMapValidateResultInternal create(Boolean loadSucceeded, List<String> loadErrors,
- Boolean testPassed, List<TestFailure> testFailures) {
- return new AutoValue_UrlMapValidateResult_UrlMapValidateResultInternal(loadSucceeded, loadErrors, testPassed, testFailures);
- }
-
- UrlMapValidateResultInternal(){
- }
-
- @AutoValue
- public abstract static class TestFailure {
-
- public abstract String host();
- public abstract String path();
- public abstract URI expectedService();
- public abstract URI actualService();
-
- @SerializedNames({"host", "path", "expectedService", "actualService"})
- public static TestFailure create(String host, String path, URI expectedService, URI actualService){
- return new AutoValue_UrlMapValidateResult_UrlMapValidateResultInternal_TestFailure(host, path, expectedService, actualService);
- }
-
- TestFailure(){
- }
- }
- }
-
- UrlMapValidateResult(){
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Warning.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Warning.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Warning.java
deleted file mode 100644
index ec2f4b9..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Warning.java
+++ /dev/null
@@ -1,40 +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.domain;
-
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Warning {
-
- public abstract String code();
- @Nullable public abstract String message();
- public abstract List<KeyValuePair> data();
-
- @SerializedNames({"code", "message", "data"})
- public static Warning create(String code, String message, List<KeyValuePair> data){
- return new AutoValue_Warning(code, message, data);
- }
-
- Warning() {
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Zone.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Zone.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Zone.java
deleted file mode 100644
index 70f9fb6..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/domain/Zone.java
+++ /dev/null
@@ -1,97 +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.domain;
-
-import static org.jclouds.googlecloud.internal.NullSafeCopies.copyOf;
-
-import java.net.URI;
-import java.util.Date;
-import java.util.List;
-
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.json.SerializedNames;
-
-import com.google.auto.value.AutoValue;
-
-@AutoValue
-public abstract class Zone {
-
- /**
- * Scheduled maintenance windows for the zone. When the zone is in a maintenance window,
- * all resources which reside in the zone will be unavailable.
- */
- @AutoValue
- public abstract static class MaintenanceWindow {
-
- public abstract String name();
-
- @Nullable public abstract String description();
-
- public abstract Date beginTime();
-
- public abstract Date endTime();
-
- @SerializedNames({ "name", "description", "beginTime", "endTime" })
- public static MaintenanceWindow create(String name, String description, Date beginTime, Date endTime) {
- return new AutoValue_Zone_MaintenanceWindow(name, description, beginTime, endTime);
- }
-
- MaintenanceWindow() {
- }
- }
-
- public enum Status {
- UP,
- DOWN
- }
-
- public abstract String id();
-
- public abstract Date creationTimestamp();
-
- public abstract URI selfLink();
-
- public abstract String name();
-
- @Nullable public abstract String description();
-
- public abstract Status status();
-
- /**
- * Scheduled maintenance windows for the zone. When the zone is in a maintenance window,
- * all resources which reside in the zone will be unavailable.
- */
- public abstract List<MaintenanceWindow> maintenanceWindows();
-
- @Nullable public abstract Deprecated deprecated();
-
- public abstract String region();
-
- /** The machine types that can be used in this zone. */
- public abstract List<String> availableMachineTypes();
-
- @SerializedNames(
- { "id", "creationTimestamp", "selfLink", "name", "description", "status", "maintenanceWindows", "deprecated", "region", "availableMachineTypes" })
- public static Zone create(String id, Date creationTimestamp, URI selfLink, String name, String description, Status status,
- List<MaintenanceWindow> maintenanceWindows, Deprecated deprecated, String region, List<String> availableMachineTypes) {
- return new AutoValue_Zone(id, creationTimestamp, selfLink, name, description, status, copyOf(maintenanceWindows), deprecated, region,
- copyOf(availableMachineTypes));
- }
-
- Zone() {
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/AddressApi.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/AddressApi.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/AddressApi.java
deleted file mode 100644
index 801fb41..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/AddressApi.java
+++ /dev/null
@@ -1,138 +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.features;
-
-import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
-
-import java.util.Iterator;
-
-import javax.inject.Inject;
-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.QueryParam;
-
-import org.jclouds.Fallbacks.NullOnNotFoundOr404;
-import org.jclouds.googlecloud.domain.ListPage;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.Address;
-import org.jclouds.googlecomputeengine.domain.Operation;
-import org.jclouds.googlecomputeengine.internal.BaseCallerArg0ToIteratorOfListPage;
-import org.jclouds.googlecomputeengine.options.AddressCreationOptions;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.BinderParam;
-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.SkipEncoding;
-import org.jclouds.rest.annotations.Transform;
-import org.jclouds.rest.binders.BindToJsonPayload;
-
-import com.google.common.base.Function;
-
-@SkipEncoding({'/', '='})
-@RequestFilters(OAuthFilter.class)
-@Path("/addresses")
-@Consumes(APPLICATION_JSON)
-public interface AddressApi {
-
- /** Returns an address by name or null if not found. */
- @Named("Addresses:get")
- @GET
- @Path("/{address}")
- @Fallback(NullOnNotFoundOr404.class)
- @Nullable
- Address get(@PathParam("address") String address);
-
- /**
- * Creates an address resource in the specified project specifying the size of the address.
- *
- * @param address the name of address.
- * @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("Addresses:insert")
- @POST
- @Produces(APPLICATION_JSON)
- @MapBinder(BindToJsonPayload.class)
- Operation create(@PayloadParam("name") String address);
-
- /** @see #create(String) */
- @Named("Addresses:insert")
- @POST
- @Produces(APPLICATION_JSON)
- Operation create(@BinderParam(BindToJsonPayload.class) AddressCreationOptions options);
-
- /** Deletes an address by name and returns the operation in progress, or null if not found. */
- @Named("Addresses:delete")
- @DELETE
- @Path("/{address}")
- @Fallback(NullOnNotFoundOr404.class)
- @Nullable
- Operation delete(@PathParam("address") String address);
-
- /**
- * Retrieves the list of address 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 pageToken marks the beginning of the next list page
- * @param listOptions listing options
- * @return a page of the list
- */
- @Named("Addresses:list")
- @GET
- ListPage<Address> listPage(@Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions);
-
- /** @see #listPage(String, ListOptions) */
- @Named("Addresses:list")
- @GET
- @Transform(AddressPages.class)
- Iterator<ListPage<Address>> list();
-
- /** @see #listPage(String, ListOptions) */
- @Named("Addresses:list")
- @GET
- @Transform(AddressPages.class)
- Iterator<ListPage<Address>> list(ListOptions options);
-
- static final class AddressPages extends BaseCallerArg0ToIteratorOfListPage<Address, AddressPages> {
-
- private final GoogleComputeEngineApi api;
-
- @Inject AddressPages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<Address>> fetchNextPage(final String regionName, final ListOptions options) {
- return new Function<String, ListPage<Address>>() {
- @Override public ListPage<Address> apply(String pageToken) {
- return api.addressesInRegion(regionName).listPage(pageToken, options);
- }
- };
- }
- }
-}
http://git-wip-us.apache.org/repos/asf/jclouds-labs-google/blob/cf9af834/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/AggregatedListApi.java
----------------------------------------------------------------------
diff --git a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/AggregatedListApi.java b/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/AggregatedListApi.java
deleted file mode 100644
index a663e42..0000000
--- a/google-compute-engine/src/main/java/org/jclouds/googlecomputeengine/features/AggregatedListApi.java
+++ /dev/null
@@ -1,501 +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.features;
-
-import static javax.ws.rs.core.MediaType.APPLICATION_JSON;
-
-import java.util.Iterator;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.QueryParam;
-
-import org.jclouds.googlecloud.domain.ListPage;
-import org.jclouds.googlecomputeengine.GoogleComputeEngineApi;
-import org.jclouds.googlecomputeengine.domain.Address;
-import org.jclouds.googlecomputeengine.domain.Disk;
-import org.jclouds.googlecomputeengine.domain.DiskType;
-import org.jclouds.googlecomputeengine.domain.ForwardingRule;
-import org.jclouds.googlecomputeengine.domain.Instance;
-import org.jclouds.googlecomputeengine.domain.MachineType;
-import org.jclouds.googlecomputeengine.domain.Operation;
-import org.jclouds.googlecomputeengine.domain.TargetInstance;
-import org.jclouds.googlecomputeengine.domain.TargetPool;
-import org.jclouds.googlecomputeengine.internal.BaseToIteratorOfListPage;
-import org.jclouds.googlecomputeengine.options.ListOptions;
-import org.jclouds.javax.annotation.Nullable;
-import org.jclouds.oauth.v2.filters.OAuthFilter;
-import org.jclouds.rest.annotations.RequestFilters;
-import org.jclouds.rest.annotations.SkipEncoding;
-import org.jclouds.rest.annotations.Transform;
-
-import com.google.common.base.Function;
-
-@SkipEncoding({ '/', '=' })
-@RequestFilters(OAuthFilter.class)
-@Path("/aggregated")
-@Consumes(APPLICATION_JSON)
-public interface AggregatedListApi {
-
- /**
- * Retrieves the list of machine 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 pageToken
- * marks the beginning of the next list page
- * @param listOptions
- * listing options
- * @return a page of the list
- */
- @Named("MachineTypes:aggregatedList")
- @GET
- @Path("/machineTypes")
- ListPage<MachineType> pageOfMachineTypes(@Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions);
-
- /** @see #pageOfMachineTypes(String, ListOptions) */
- @Named("MachineTypes:aggregatedList")
- @GET
- @Path("/machineTypes")
- @Transform(MachineTypePages.class)
- Iterator<ListPage<MachineType>> machineTypes();
-
- /** @see #pageOfMachineTypes(String, ListOptions) */
- @Named("MachineTypes:aggregatedList")
- @GET
- @Path("/machineTypes")
- @Transform(MachineTypePages.class)
- Iterator<ListPage<MachineType>> machineTypes(ListOptions options);
-
- static final class MachineTypePages extends BaseToIteratorOfListPage<MachineType, MachineTypePages> {
- private final GoogleComputeEngineApi api;
-
- @Inject
- MachineTypePages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<MachineType>> fetchNextPage(final ListOptions options) {
- return new Function<String, ListPage<MachineType>>() {
- @Override
- public ListPage<MachineType> apply(String pageToken) {
- return api.aggregatedList().pageOfMachineTypes(pageToken, options);
- }
- };
- }
- }
-
- /**
- * Retrieves the list of instance 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 pageToken
- * marks the beginning of the next list page
- * @param listOptions
- * listing options
- * @return a page of the list
- */
- @Named("Instances:aggregatedList")
- @GET
- @Path("/instances")
- ListPage<Instance> pageOfInstances(@Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions);
-
- /** @see #pageOfInstances(String, ListOptions) */
- @Named("Instances:aggregatedList")
- @GET
- @Path("/instances")
- @Transform(InstancePages.class)
- Iterator<ListPage<Instance>> instances();
-
- /** @see #pageOfInstances(String, ListOptions) */
- @Named("Instances:aggregatedList")
- @GET
- @Path("/instances")
- @Transform(InstancePages.class)
- Iterator<ListPage<Instance>> instances(ListOptions options);
-
- static final class InstancePages extends BaseToIteratorOfListPage<Instance, InstancePages> {
- private final GoogleComputeEngineApi api;
-
- @Inject
- InstancePages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<Instance>> fetchNextPage(final ListOptions options) {
- return new Function<String, ListPage<Instance>>() {
- @Override
- public ListPage<Instance> apply(String pageToken) {
- return api.aggregatedList().pageOfInstances(pageToken, options);
- }
- };
- }
- }
-
- /**
- * Retrieves the list of address 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 pageToken
- * marks the beginning of the next list page
- * @param listOptions
- * listing options
- * @return a page of the list
- */
- @Named("Addresses:aggregatedList")
- @GET
- @Path("/addresses")
- ListPage<Address> pageOfAddresses(@Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions);
-
- /** @see #pageOfAddresses(String, ListOptions) */
- @Named("Addresses:aggregatedList")
- @GET
- @Path("/addresses")
- @Transform(AddressPages.class)
- Iterator<ListPage<Address>> addresses();
-
- /** @see #pageOfAddresses(String, ListOptions) */
- @Named("Addresses:aggregatedList")
- @GET
- @Path("/addresses")
- @Transform(AddressPages.class)
- Iterator<ListPage<Address>> addresses(ListOptions options);
-
- static final class AddressPages extends BaseToIteratorOfListPage<Address, AddressPages> {
- private final GoogleComputeEngineApi api;
-
- @Inject
- AddressPages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<Address>> fetchNextPage(final ListOptions options) {
- return new Function<String, ListPage<Address>>() {
- @Override
- public ListPage<Address> apply(String pageToken) {
- return api.aggregatedList().pageOfAddresses(pageToken, options);
- }
- };
- }
- }
-
- /**
- * Retrieves the list of disk 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 pageToken
- * marks the beginning of the next list page
- * @param listOptions
- * listing options
- * @return a page of the list
- */
- @Named("Disks:aggregatedList")
- @GET
- @Path("/disks")
- ListPage<Disk> pageOfDisks(@Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions);
-
- /** @see #pageOfDisks(String, ListOptions) */
- @Named("Disks:aggregatedList")
- @GET
- @Path("/disks")
- @Transform(DiskPages.class)
- Iterator<ListPage<Disk>> disks();
-
- /** @see #pageOfDisks(String, ListOptions) */
- @Named("Disks:aggregatedList")
- @GET
- @Path("/disks")
- @Transform(DiskPages.class)
- Iterator<ListPage<Disk>> disks(ListOptions options);
-
- static final class DiskPages extends BaseToIteratorOfListPage<Disk, DiskPages> {
- private final GoogleComputeEngineApi api;
-
- @Inject
- DiskPages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<Disk>> fetchNextPage(final ListOptions options) {
- return new Function<String, ListPage<Disk>>() {
- @Override
- public ListPage<Disk> apply(String pageToken) {
- return api.aggregatedList().pageOfDisks(pageToken, options);
- }
- };
- }
- }
-
- /**
- * 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 pageToken
- * marks the beginning of the next list page
- * @param listOptions
- * listing options
- * @return a page of the list
- */
- @Named("DiskTypes:aggregatedList")
- @GET
- @Path("/diskTypes")
- ListPage<DiskType> pageOfDiskTypes(@Nullable @QueryParam("pageToken") String pageToken, ListOptions listOptions);
-
- /** @see #pageOfDiskTypes(String, ListOptions) */
- @Named("DiskTypes:aggregatedList")
- @GET
- @Path("/diskTypes")
- @Transform(DiskTypePages.class)
- Iterator<ListPage<DiskType>> diskTypes();
-
- /** @see #pageOfDiskTypes(String, ListOptions) */
- @Named("DiskTypes:aggregatedList")
- @GET
- @Path("/diskTypes")
- @Transform(DiskTypePages.class)
- Iterator<ListPage<DiskType>> diskTypes(ListOptions options);
-
- static final class DiskTypePages extends BaseToIteratorOfListPage<DiskType, DiskTypePages> {
- private final GoogleComputeEngineApi api;
-
- @Inject
- DiskTypePages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<DiskType>> fetchNextPage(final ListOptions options) {
- return new Function<String, ListPage<DiskType>>() {
- @Override
- public ListPage<DiskType> apply(String pageToken) {
- return api.aggregatedList().pageOfDiskTypes(pageToken, options);
- }
- };
- }
- }
-
- /**
- * Retrieves the list of global operations 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 pageToken
- * marks the beginning of the next list page
- * @param listOptions
- * listing options
- * @return a page of the list
- */
- @Named("GlobalOperations:aggregatedList")
- @GET
- @Path("/operations")
- ListPage<Operation> pageOfGlobalOperations(@Nullable @QueryParam("pageToken") String pageToken,
- ListOptions listOptions);
-
- /** @see #pageOfGlobalOperations(String, ListOptions) */
- @Named("GlobalOperations:aggregatedList")
- @GET
- @Path("/operations")
- @Transform(OperationPages.class)
- Iterator<ListPage<Operation>> globalOperations();
-
- /** @see #pageOfGlobalOperations(String, ListOptions) */
- @Named("GlobalOperations:aggregatedList")
- @GET
- @Path("/operations")
- @Transform(OperationPages.class)
- Iterator<ListPage<Operation>> globalOperations(ListOptions options);
-
- static final class OperationPages extends BaseToIteratorOfListPage<Operation, OperationPages> {
- private final GoogleComputeEngineApi api;
-
- @Inject
- OperationPages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<Operation>> fetchNextPage(final ListOptions options) {
- return new Function<String, ListPage<Operation>>() {
- @Override
- public ListPage<Operation> apply(String pageToken) {
- return api.aggregatedList().pageOfGlobalOperations(pageToken, options);
- }
- };
- }
- }
-
- /**
- * Retrieves the list of forwarding rule 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 pageToken
- * marks the beginning of the next list page
- * @param listOptions
- * listing options
- * @return a page of the list
- */
- @Named("ForwardingRules:aggregatedList")
- @GET
- @Path("/forwardingRules")
- ListPage<ForwardingRule> pageOfForwardingRules(@Nullable @QueryParam("pageToken") String pageToken,
- ListOptions listOptions);
-
- /** @see #pageOfForwardingRules(String, ListOptions) */
- @Named("ForwardingRules:aggregatedList")
- @GET
- @Path("/forwardingRules")
- @Transform(ForwardingRulePages.class)
- Iterator<ListPage<ForwardingRule>> forwardingRules();
-
- /** @see #pageOfForwardingRules(String, ListOptions) */
- @Named("ForwardingRule:aggregatedList")
- @GET
- @Path("/forwardingRules")
- @Transform(ForwardingRulePages.class)
- Iterator<ListPage<ForwardingRule>> forwardingRules(ListOptions options);
-
- static final class ForwardingRulePages extends BaseToIteratorOfListPage<ForwardingRule, ForwardingRulePages> {
- private final GoogleComputeEngineApi api;
-
- @Inject
- ForwardingRulePages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<ForwardingRule>> fetchNextPage(final ListOptions options) {
- return new Function<String, ListPage<ForwardingRule>>() {
- @Override
- public ListPage<ForwardingRule> apply(String pageToken) {
- return api.aggregatedList().pageOfForwardingRules(pageToken, options);
- }
- };
- }
- }
-
- /**
- * Retrieves the list of TargetInstance 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 pageToken
- * marks the beginning of the next list page
- * @param listOptions
- * listing options
- * @return a page of the list
- */
- @Named("TargetInstances:aggregatedList")
- @GET
- @Path("/targetInstances")
- ListPage<TargetInstance> pageOfTargetInstances(@Nullable @QueryParam("pageToken") String pageToken,
- ListOptions listOptions);
-
- /** @see #pageOfTargetInstances(String, ListOptions) */
- @Named("TargetInstances:aggregatedList")
- @GET
- @Path("/targetInstances")
- @Transform(TargetInstancePages.class)
- Iterator<ListPage<TargetInstance>> targetInstances();
-
- /** @see #pageOfTargetInstances(String, ListOptions) */
- @Named("TargetInstances:aggregatedList")
- @GET
- @Path("/targetInstances")
- @Transform(TargetInstancePages.class)
- Iterator<ListPage<TargetInstance>> targetInstances(ListOptions options);
-
- static final class TargetInstancePages extends BaseToIteratorOfListPage<TargetInstance, TargetInstancePages> {
- private final GoogleComputeEngineApi api;
-
- @Inject
- TargetInstancePages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<TargetInstance>> fetchNextPage(final ListOptions options) {
- return new Function<String, ListPage<TargetInstance>>() {
- @Override
- public ListPage<TargetInstance> apply(String pageToken) {
- return api.aggregatedList().pageOfTargetInstances(pageToken, options);
- }
- };
- }
- }
-
- /**
- * Retrieves the list of TargetPool 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 pageToken
- * marks the beginning of the next list page
- * @param listOptions
- * listing options
- * @return a page of the list
- */
- @Named("TargetPool:aggregatedList")
- @GET
- @Path("/targetPools")
- ListPage<TargetPool> pageOfTargetPools(@Nullable @QueryParam("pageToken") String pageToken,
- ListOptions listOptions);
-
- /** @see #pageOfTargetPools(String, ListOptions) */
- @Named("TargetPool:aggregatedList")
- @GET
- @Path("/targetPools")
- @Transform(TargetPoolPages.class)
- Iterator<ListPage<TargetPool>> targetPools();
-
- /** @see #pageOfTargetPools(String, ListOptions) */
- @Named("TargetPool:aggregatedList")
- @GET
- @Path("/targetPools")
- @Transform(TargetPoolPages.class)
- Iterator<ListPage<TargetPool>> targetPools(ListOptions options);
-
- static final class TargetPoolPages extends BaseToIteratorOfListPage<TargetPool, TargetPoolPages> {
- private final GoogleComputeEngineApi api;
-
- @Inject
- TargetPoolPages(GoogleComputeEngineApi api) {
- this.api = api;
- }
-
- @Override
- protected Function<String, ListPage<TargetPool>> fetchNextPage(final ListOptions options) {
- return new Function<String, ListPage<TargetPool>>() {
- @Override
- public ListPage<TargetPool> apply(String pageToken) {
- return api.aggregatedList().pageOfTargetPools(pageToken, options);
- }
- };
- }
- }
-}