{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments/55631573","id":55631573,"diff_hunk":"@@ -0,0 +1,800 @@\n+/*\n+ * Copyright 2016 Google Inc. All Rights Reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *       http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+package com.google.gcloud.compute;\n+\n+import static com.google.common.base.Preconditions.checkNotNull;\n+\n+import com.google.common.base.Function;\n+import com.google.common.base.MoreObjects;\n+import com.google.common.collect.ImmutableList;\n+import com.google.common.collect.ImmutableMap;\n+import com.google.common.collect.Lists;\n+import com.google.common.collect.Maps;\n+\n+import org.joda.time.format.DateTimeFormatter;\n+import org.joda.time.format.ISODateTimeFormat;\n+\n+import java.io.IOException;\n+import java.io.ObjectInputStream;\n+import java.io.Serializable;\n+import java.math.BigInteger;\n+import java.util.List;\n+import java.util.Map;\n+import java.util.Objects;\n+\n+/**\n+ * Google Compute Engine operations. Operation identity can be obtained via {@link #operationId()}.\n+ * For global operations {@link #operationId()} returns an {@link GlobalOperationId}, for region\n+ * operations {@link #operationId()} returns a {@link RegionOperationId}, for zone operations\n+ * {@link #operationId()} returns a {@link ZoneOperationId}. To get an {@code Operation} object with\n+ * the most recent information use {@link #reload(Compute.OperationOption...)}.\n+ */\n+public final class Operation implements Serializable {\n+\n+  private static final long serialVersionUID = -8979001444590023899L;\n+  private static final DateTimeFormatter TIMESTAMP_FORMATTER = ISODateTimeFormat.dateTime();\n+\n+  private transient Compute compute;\n+  private final ComputeOptions options;\n+  private final String id;\n+  private final OperationId operationId;\n+  private final Long creationTimestamp;\n+  private final String clientOperationId;\n+  private final String operationType;\n+  private final String targetLink;\n+  private final String targetId;\n+  private final Status status;\n+  private final String statusMessage;\n+  private final String user;\n+  private final Integer progress;\n+  private final Long insertTime;\n+  private final Long startTime;\n+  private final Long endTime;\n+  private final List<OperationError> errors;\n+  private final List<OperationWarning> warnings;\n+  private final Integer httpErrorStatusCode;\n+  private final String httpErrorMessage;\n+  private final String description;\n+\n+  /**\n+   * Types of operations.\n+   */\n+  public enum Status {\n+    PENDING,\n+    RUNNING,\n+    DONE\n+  }\n+\n+  /**\n+   * An error that can occur during the processing of a Google Compute Engine operation.\n+   */\n+  public static final class OperationError implements Serializable {\n+\n+    static final Function<com.google.api.services.compute.model.Operation.Error.Errors,\n+        OperationError> FROM_PB_FUNCTION = new Function<\n+            com.google.api.services.compute.model.Operation.Error.Errors, OperationError>() {\n+          @Override\n+          public OperationError apply(\n+              com.google.api.services.compute.model.Operation.Error.Errors pb) {\n+            return OperationError.fromPb(pb);\n+          }\n+        };\n+    static final Function<OperationError,\n+        com.google.api.services.compute.model.Operation.Error.Errors> TO_PB_FUNCTION =\n+        new Function<OperationError,\n+            com.google.api.services.compute.model.Operation.Error.Errors>() {\n+          @Override\n+          public com.google.api.services.compute.model.Operation.Error.Errors apply(\n+              OperationError operation) {\n+            return operation.toPb();\n+          }\n+        };\n+\n+    private static final long serialVersionUID = -1155314394806515873L;\n+\n+    private final String code;\n+    private final String location;\n+    private final String message;\n+\n+    OperationError(String code, String location, String message) {\n+      this.code = code;\n+      this.location = location;\n+      this.message = message;\n+    }\n+\n+    /**\n+     * Returns an error type identifier for this error.\n+     */\n+    public String code() {\n+      return code;\n+    }\n+\n+    /**\n+     * Returns the field in the request which caused the error. Might be {@code null}.\n+     */\n+    public String location() {\n+      return location;\n+    }\n+\n+    /**\n+     * Returns an optional, human-readable error message.\n+     */\n+    public String message() {\n+      return message;\n+    }\n+\n+    com.google.api.services.compute.model.Operation.Error.Errors toPb() {\n+      return new com.google.api.services.compute.model.Operation.Error.Errors()\n+          .setCode(code)\n+          .setLocation(location)\n+          .setMessage(message);\n+    }\n+\n+    static OperationError fromPb(\n+        com.google.api.services.compute.model.Operation.Error.Errors errorPb) {\n+      return new OperationError(errorPb.getCode(), errorPb.getLocation(), errorPb.getMessage());\n+    }\n+\n+    @Override\n+    public boolean equals(Object obj) {\n+      return obj instanceof OperationError\n+          && Objects.equals(code, ((OperationError) obj).code)\n+          && Objects.equals(message, ((OperationError) obj).message)\n+          && Objects.equals(location, ((OperationError) obj).location);\n+    }\n+\n+    @Override\n+    public String toString() {\n+      return MoreObjects.toStringHelper(this)\n+          .add(\"code\", code)\n+          .add(\"location\", location)\n+          .add(\"message\", message)\n+          .toString();\n+    }\n+\n+    @Override\n+    public int hashCode() {\n+      return Objects.hash(code, location, message);\n+    }\n+  }\n+\n+  /**\n+   * A warning message that is generated during the processing of a Google Compute Engine operation.\n+   */\n+  public static final class OperationWarning implements Serializable {\n+\n+    static final\n+        Function<com.google.api.services.compute.model.Operation.Warnings, OperationWarning>\n+        FROM_PB_FUNCTION =\n+        new Function<com.google.api.services.compute.model.Operation.Warnings,\n+            OperationWarning>() {\n+          @Override\n+          public OperationWarning apply(\n+              com.google.api.services.compute.model.Operation.Warnings pb) {\n+            return OperationWarning.fromPb(pb);\n+          }\n+        };\n+    static final\n+        Function<OperationWarning, com.google.api.services.compute.model.Operation.Warnings>\n+        TO_PB_FUNCTION =\n+        new Function<OperationWarning,\n+            com.google.api.services.compute.model.Operation.Warnings>() {\n+          @Override\n+          public com.google.api.services.compute.model.Operation.Warnings apply(\n+              OperationWarning operation) {\n+            return operation.toPb();\n+          }\n+        };\n+\n+    private static final long serialVersionUID = 4917326627380228928L;\n+\n+    private final String code;\n+    private final String message;\n+    private final Map<String, String> metadata;\n+\n+    OperationWarning(String code, String message, Map<String, String> metadata) {\n+      this.code = code;\n+      this.metadata = metadata != null ? ImmutableMap.copyOf(metadata) : null;\n+      this.message = message;\n+    }\n+\n+    /**\n+     * Returns a warning identifier for this warning.\n+     */\n+    public String code() {\n+      return code;\n+    }\n+\n+    /**\n+     * Returns a human-readable error message.\n+     */\n+    public String message() {\n+      return message;\n+    }\n+\n+    /**\n+     * Returns metadata about this warning.\n+     */\n+    public Map<String, String> metadata() {\n+      return metadata;\n+    }\n+\n+    com.google.api.services.compute.model.Operation.Warnings toPb() {\n+      com.google.api.services.compute.model.Operation.Warnings warningPb =\n+          new com.google.api.services.compute.model.Operation.Warnings()\n+              .setCode(code)\n+              .setMessage(message);\n+      if (this.metadata != null) {\n+        List<com.google.api.services.compute.model.Operation.Warnings.Data> metadataPb =\n+            Lists.newArrayListWithCapacity(metadata.size());\n+        for (Map.Entry<String, String> entry : metadata.entrySet()) {\n+          metadataPb.add(new com.google.api.services.compute.model.Operation.Warnings.Data()\n+              .setKey(entry.getKey()).setValue(entry.getValue()));\n+        }\n+        warningPb.setData(metadataPb);\n+      }\n+      return warningPb;\n+    }\n+\n+    static OperationWarning fromPb(\n+        com.google.api.services.compute.model.Operation.Warnings warningPb) {\n+      Map<String, String> metadata = null;\n+      if (warningPb.getData() != null) {\n+        metadata = Maps.newHashMapWithExpectedSize(warningPb.getData().size());\n+        for (com.google.api.services.compute.model.Operation.Warnings.Data data\n+            : warningPb.getData()) {\n+          metadata.put(data.getKey(), data.getValue());\n+        }\n+      }\n+      return new OperationWarning(warningPb.getCode(), warningPb.getMessage(), metadata);\n+    }\n+\n+    @Override\n+    public boolean equals(Object obj) {\n+      return obj instanceof OperationWarning\n+          && Objects.equals(code, ((OperationWarning) obj).code)\n+          && Objects.equals(message, ((OperationWarning) obj).message)\n+          && Objects.equals(metadata, ((OperationWarning) obj).metadata);\n+    }\n+\n+    @Override\n+    public String toString() {\n+      return MoreObjects.toStringHelper(this)\n+          .add(\"code\", code)\n+          .add(\"message\", message)\n+          .add(\"metadata\", metadata)\n+          .toString();\n+    }\n+\n+    @Override\n+    public int hashCode() {\n+      return Objects.hash(code, message, metadata);\n+    }\n+  }\n+\n+  /**\n+   * Builder for Compute Engine operations.\n+   */\n+  static final class Builder {\n+\n+    private Compute compute;\n+    private String id;\n+    private Long creationTimestamp;\n+    private OperationId operationId;\n+    private String clientOperationId;\n+    private String operationType;\n+    private String targetLink;\n+    private String targetId;\n+    private Status status;\n+    private String statusMessage;\n+    private String user;\n+    private Integer progress;\n+    private Long insertTime;\n+    private Long startTime;\n+    private Long endTime;\n+    private List<OperationError> errors;\n+    private List<OperationWarning> warnings;\n+    private Integer httpErrorStatusCode;\n+    private String httpErrorMessage;\n+\n+    private String description;\n+\n+    Builder(Compute compute) {\n+      this.compute = compute;\n+    }\n+\n+    Builder(Compute compute, com.google.api.services.compute.model.Operation operationPb) {\n+      this.compute = compute;\n+      if (operationPb.getId() != null) {\n+        id = operationPb.getId().toString();\n+      }\n+      if (operationPb.getCreationTimestamp() != null) {\n+        creationTimestamp = TIMESTAMP_FORMATTER.parseMillis(operationPb.getCreationTimestamp());\n+      }\n+      if (RegionOperationId.matchesUrl(operationPb.getSelfLink())) {\n+        operationId = RegionOperationId.fromUrl(operationPb.getSelfLink());\n+      } else if (ZoneOperationId.matchesUrl(operationPb.getSelfLink())) {\n+        operationId = ZoneOperationId.fromUrl(operationPb.getSelfLink());\n+      } else {\n+        operationId = GlobalOperationId.fromUrl(operationPb.getSelfLink());\n+      }\n+      clientOperationId = operationPb.getClientOperationId();\n+      operationType = operationPb.getOperationType();\n+      targetLink = operationPb.getTargetLink();\n+      if (operationPb.getTargetId() != null) {\n+        targetId = operationPb.getTargetId().toString();\n+      }\n+      if (operationPb.getStatus() != null) {\n+        status = Status.valueOf(operationPb.getStatus());\n+      }\n+      statusMessage = operationPb.getStatusMessage();\n+      user = operationPb.getUser();\n+      progress = operationPb.getProgress();\n+      if (operationPb.getInsertTime() != null) {\n+        insertTime = TIMESTAMP_FORMATTER.parseMillis(operationPb.getInsertTime());\n+      }\n+      if (operationPb.getStartTime() != null) {\n+        startTime = TIMESTAMP_FORMATTER.parseMillis(operationPb.getStartTime());\n+      }\n+      if (operationPb.getEndTime() != null) {\n+        endTime = TIMESTAMP_FORMATTER.parseMillis(operationPb.getEndTime());\n+      }\n+      if (operationPb.getError() != null && operationPb.getError().getErrors() != null) {\n+        errors =\n+            Lists.transform(operationPb.getError().getErrors(), OperationError.FROM_PB_FUNCTION);\n+      }\n+      if (operationPb.getWarnings() != null) {\n+        warnings = Lists.transform(operationPb.getWarnings(), OperationWarning.FROM_PB_FUNCTION);\n+      }\n+      httpErrorStatusCode = operationPb.getHttpErrorStatusCode();\n+      httpErrorMessage = operationPb.getHttpErrorMessage();\n+      description = operationPb.getDescription();\n+    }\n+\n+    Builder id(String id) {\n+      this.id = id;\n+      return this;\n+    }\n+\n+    Builder creationTimestamp(Long creationTimestamp) {\n+      this.creationTimestamp = creationTimestamp;\n+      return this;\n+    }\n+\n+    Builder operationId(OperationId operationId) {\n+      this.operationId = checkNotNull(operationId);\n+      return this;\n+    }\n+\n+    Builder clientOperationId(String clientOperationId) {\n+      this.clientOperationId = clientOperationId;\n+      return this;\n+    }\n+\n+    Builder operationType(String operationType) {\n+      this.operationType = operationType;\n+      return this;\n+    }\n+\n+    Builder targetLink(String targetLink) {\n+      this.targetLink = targetLink;\n+      return this;\n+    }\n+\n+    Builder targetId(String targetId) {\n+      this.targetId = targetId;\n+      return this;\n+    }\n+\n+    Builder status(Status status) {\n+      this.status = status;\n+      return this;\n+    }\n+\n+    Builder statusMessage(String statusMessage) {\n+      this.statusMessage = statusMessage;\n+      return this;\n+    }\n+\n+    Builder user(String user) {\n+      this.user = user;\n+      return this;\n+    }\n+\n+    Builder progress(Integer progress) {\n+      this.progress = progress;\n+      return this;\n+    }\n+\n+    Builder insertTime(Long insertTime) {\n+      this.insertTime = insertTime;\n+      return this;\n+    }\n+\n+    Builder startTime(Long startTime) {\n+      this.startTime = startTime;\n+      return this;\n+    }\n+\n+    Builder endTime(Long endTime) {\n+      this.endTime = endTime;\n+      return this;\n+    }\n+\n+    Builder errors(List<OperationError> errors) {\n+      this.errors = ImmutableList.copyOf(checkNotNull(errors));\n+      return this;\n+    }\n+\n+    Builder warnings(List<OperationWarning> warnings) {\n+      this.warnings = ImmutableList.copyOf(checkNotNull(warnings));\n+      return this;\n+    }\n+\n+    Builder httpErrorStatusCode(Integer httpErrorStatusCode) {\n+      this.httpErrorStatusCode = httpErrorStatusCode;\n+      return this;\n+    }\n+\n+    Builder httpErrorMessage(String httpErrorMessage) {\n+      this.httpErrorMessage = httpErrorMessage;\n+      return this;\n+    }\n+\n+    Builder description(String description) {\n+      this.description = description;\n+      return this;\n+    }\n+\n+    /**\n+     * Creates an object.\n+     */\n+    public Operation build() {\n+      return new Operation(this);\n+    }\n+  }\n+\n+  private Operation(Builder builder) {\n+    this.compute = checkNotNull(builder.compute);\n+    this.options = compute.options();\n+    this.id = builder.id;\n+    this.creationTimestamp = builder.creationTimestamp;\n+    this.operationId = checkNotNull(builder.operationId);\n+    this.clientOperationId = builder.clientOperationId;\n+    this.operationType = builder.operationType;\n+    this.targetLink = builder.targetLink;\n+    this.targetId = builder.targetId;\n+    this.status = builder.status;\n+    this.statusMessage = builder.statusMessage;\n+    this.user = builder.user;\n+    this.progress = builder.progress;\n+    this.insertTime = builder.insertTime;\n+    this.startTime = builder.startTime;\n+    this.endTime = builder.endTime;\n+    this.errors = builder.errors != null ? ImmutableList.copyOf(builder.errors) : null;\n+    this.warnings = builder.warnings != null ? ImmutableList.copyOf(builder.warnings) : null;\n+    this.httpErrorStatusCode = builder.httpErrorStatusCode;\n+    this.httpErrorMessage = builder.httpErrorMessage;\n+    this.description = builder.description;\n+  }\n+\n+  /**\n+   * Returns the operation's {@code Compute} object used to issue requests.\n+   */\n+  public Compute compute() {\n+    return compute;\n+  }\n+\n+  /**\n+   * Returns the service-defined unique identifier for the operation.\n+   */\n+  public String id() {\n+    return id;\n+  }\n+\n+  /**\n+   * Returns the creation timestamp in milliseconds since epoch.\n+   */\n+  public Long creationTimestamp() {\n+    return creationTimestamp;\n+  }\n+\n+  /**\n+   * Returns the operation's identity. This method returns an {@link GlobalOperationId} for global\n+   * operations, returns a {@link RegionOperationId} for region operations and returns a\n+   * {@link ZoneOperationId} for zone operations.\n+   *\n+   * @see <a href=\"https://www.ietf.org/rfc/rfc1035.txt\">RFC1035</a>\n+   */\n+  @SuppressWarnings(\"unchecked\")\n+  public <T extends OperationId> T operationId() {\n+    return (T) operationId;\n+  }\n+\n+  /**\n+   * Reserved for future use.\n+   */\n+  String clientOperationId() {\n+    return clientOperationId;\n+  }\n+\n+  /**\n+   * Returns the type of operation.\n+   */\n+  public String operationType() {\n+    return operationType;\n+  }\n+\n+  /**\n+   * Returns the URL of the resource that the operation is modifying.\n+   */\n+  public String targetLink() {\n+    return targetLink;\n+  }\n+\n+  /**\n+   * Returns the unique service-defined target ID, which identifies the resource that the operation\n+   * is modifying.\n+   */\n+  public String targetId() {\n+    return targetId;\n+  }\n+\n+  /**\n+   * Returns the status of the operation.\n+   */\n+  public Status status() {\n+    return status;\n+  }\n+\n+  /**\n+   * Returns an optional textual description of the current status of the operation.\n+   */\n+  public String statusMessage() {\n+    return statusMessage;\n+  }\n+\n+  /**\n+   * Returns the user who requested the operation, for example: {@code user@example.com}.\n+   */\n+  public String user() {\n+    return user;\n+  }\n+\n+  /**\n+   * Returns an optional progress indicator that ranges from 0 to 100. There is no requirement that\n+   * this be linear or support any granularity of operations. This should not be used to guess when\n+   * the operation will be complete. This number should monotonically increase as the operation\n+   * progresses.\n+   */\n+  public Integer progress() {\n+    return progress;\n+  }\n+\n+  /**\n+   * Returns the time that this operation was requested. In milliseconds since epoch.\n+   */\n+  public Long insertTime() {\n+    return insertTime;\n+  }\n+\n+  /**\n+   * Returns the time that this operation was started by the service. In milliseconds since epoch.\n+   */\n+  public Long startTime() {\n+    return startTime;\n+  }\n+\n+  /**\n+   * Returns the time that this operation was completed. In milliseconds since epoch.\n+   */\n+  public Long endTime() {\n+    return endTime;\n+  }\n+\n+  /**\n+   * Returns the errors encountered while processing this operation, if any. Returns {@code null} if\n+   * no error occurred.\n+   */\n+  public List<OperationError> errors() {\n+    return errors;\n+  }\n+\n+  /**\n+   * Returns the warnings encountered while processing this operation, if any. Returns {@code null}\n+   * if no warning occurred.\n+   */\n+  public List<OperationWarning> warnings() {\n+    return warnings;\n+  }\n+\n+  /**\n+   * Returns the HTTP error status code that was returned, if the operation failed. For example, a\n+   * {@code 404} means the resource was not found.\n+   */\n+  public Integer httpErrorStatusCode() {\n+    return httpErrorStatusCode;\n+  }\n+\n+  /**\n+   * Returns the the HTTP error message that was returned, if the operation failed. For example, a\n+   * {@code NOT FOUND} message is returned if the resource was not found.\n+   */\n+  public String httpErrorMessage() {\n+    return httpErrorMessage;\n+  }\n+\n+  /**\n+   * Returns an optional textual description of the operation.\n+   */\n+  public String description() {\n+    return description;\n+  }\n+\n+  /**\n+   * Checks if this operation exists.\n+   *\n+   * @return {@code true} if this operation exists, {@code false} otherwise\n+   * @throws ComputeException upon failure\n+   */\n+  public boolean exists() throws ComputeException {\n+    return reload(Compute.OperationOption.fields()) != null;\n+  }\n+\n+  /**\n+   * Checks if this operation has completed its execution, either failing or succeeding. If the\n+   * operation does not exist this method returns {@code false}. To correctly wait for operation's\n+   * completion check that the operation exists first, using {@link #exists()}:","path":"gcloud-java-compute/src/main/java/com/google/gcloud/compute/Operation.java","position":661,"original_position":661,"commit_id":"231fe428d6fb614a612fc70c40ad30ac678a09e9","original_commit_id":"231fe428d6fb614a612fc70c40ad30ac678a09e9","user":{"login":"ajkannan","id":5316886,"avatar_url":"https://avatars.githubusercontent.com/u/5316886?v=3","gravatar_id":"","url":"https://api.github.com/users/ajkannan","html_url":"https://github.com/ajkannan","followers_url":"https://api.github.com/users/ajkannan/followers","following_url":"https://api.github.com/users/ajkannan/following{/other_user}","gists_url":"https://api.github.com/users/ajkannan/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkannan/subscriptions","organizations_url":"https://api.github.com/users/ajkannan/orgs","repos_url":"https://api.github.com/users/ajkannan/repos","events_url":"https://api.github.com/users/ajkannan/events{/privacy}","received_events_url":"https://api.github.com/users/ajkannan/received_events","type":"User","site_admin":false},"body":"Nit: add comma between completion and check and remove comma before using","created_at":"2016-03-10T04:04:34Z","updated_at":"2016-03-10T04:04:34Z","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/728#discussion_r55631573","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/728","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments/55631573"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/728#discussion_r55631573"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/728"}}},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/728","id":62083409,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/728","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/728.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/728.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/728","number":728,"state":"open","locked":false,"title":"Add support for Compute's operations","user":{"login":"mziccard","id":450933,"avatar_url":"https://avatars.githubusercontent.com/u/450933?v=3","gravatar_id":"","url":"https://api.github.com/users/mziccard","html_url":"https://github.com/mziccard","followers_url":"https://api.github.com/users/mziccard/followers","following_url":"https://api.github.com/users/mziccard/following{/other_user}","gists_url":"https://api.github.com/users/mziccard/gists{/gist_id}","starred_url":"https://api.github.com/users/mziccard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mziccard/subscriptions","organizations_url":"https://api.github.com/users/mziccard/orgs","repos_url":"https://api.github.com/users/mziccard/repos","events_url":"https://api.github.com/users/mziccard/events{/privacy}","received_events_url":"https://api.github.com/users/mziccard/received_events","type":"User","site_admin":false},"body":"This PR adds support to `gcloud-java-compute` for operations:\r\n- Add `RegionOperationId`, `ZoneOperationId`, `GlobalOperationId` classes\r\n- Add functional methods for operations to `Compute`'s service and rpc classes\r\n- Add `Operation` class (with functional methods)\r\n- Add unit and integration tests","created_at":"2016-03-08T15:06:16Z","updated_at":"2016-03-10T04:04:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e02fc8e36dc3457d893ac27bb6ae7c7e7fd9f6d2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/728/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/728/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/728/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/231fe428d6fb614a612fc70c40ad30ac678a09e9","head":{"label":"mziccard:compute","ref":"compute","sha":"231fe428d6fb614a612fc70c40ad30ac678a09e9","user":{"login":"mziccard","id":450933,"avatar_url":"https://avatars.githubusercontent.com/u/450933?v=3","gravatar_id":"","url":"https://api.github.com/users/mziccard","html_url":"https://github.com/mziccard","followers_url":"https://api.github.com/users/mziccard/followers","following_url":"https://api.github.com/users/mziccard/following{/other_user}","gists_url":"https://api.github.com/users/mziccard/gists{/gist_id}","starred_url":"https://api.github.com/users/mziccard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mziccard/subscriptions","organizations_url":"https://api.github.com/users/mziccard/orgs","repos_url":"https://api.github.com/users/mziccard/repos","events_url":"https://api.github.com/users/mziccard/events{/privacy}","received_events_url":"https://api.github.com/users/mziccard/received_events","type":"User","site_admin":false},"repo":{"id":40965279,"name":"gcloud-java","full_name":"mziccard/gcloud-java","owner":{"login":"mziccard","id":450933,"avatar_url":"https://avatars.githubusercontent.com/u/450933?v=3","gravatar_id":"","url":"https://api.github.com/users/mziccard","html_url":"https://github.com/mziccard","followers_url":"https://api.github.com/users/mziccard/followers","following_url":"https://api.github.com/users/mziccard/following{/other_user}","gists_url":"https://api.github.com/users/mziccard/gists{/gist_id}","starred_url":"https://api.github.com/users/mziccard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mziccard/subscriptions","organizations_url":"https://api.github.com/users/mziccard/orgs","repos_url":"https://api.github.com/users/mziccard/repos","events_url":"https://api.github.com/users/mziccard/events{/privacy}","received_events_url":"https://api.github.com/users/mziccard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mziccard/gcloud-java","description":"Google Cloud Client Library for Java","fork":true,"url":"https://api.github.com/repos/mziccard/gcloud-java","forks_url":"https://api.github.com/repos/mziccard/gcloud-java/forks","keys_url":"https://api.github.com/repos/mziccard/gcloud-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mziccard/gcloud-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mziccard/gcloud-java/teams","hooks_url":"https://api.github.com/repos/mziccard/gcloud-java/hooks","issue_events_url":"https://api.github.com/repos/mziccard/gcloud-java/issues/events{/number}","events_url":"https://api.github.com/repos/mziccard/gcloud-java/events","assignees_url":"https://api.github.com/repos/mziccard/gcloud-java/assignees{/user}","branches_url":"https://api.github.com/repos/mziccard/gcloud-java/branches{/branch}","tags_url":"https://api.github.com/repos/mziccard/gcloud-java/tags","blobs_url":"https://api.github.com/repos/mziccard/gcloud-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mziccard/gcloud-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mziccard/gcloud-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/mziccard/gcloud-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mziccard/gcloud-java/statuses/{sha}","languages_url":"https://api.github.com/repos/mziccard/gcloud-java/languages","stargazers_url":"https://api.github.com/repos/mziccard/gcloud-java/stargazers","contributors_url":"https://api.github.com/repos/mziccard/gcloud-java/contributors","subscribers_url":"https://api.github.com/repos/mziccard/gcloud-java/subscribers","subscription_url":"https://api.github.com/repos/mziccard/gcloud-java/subscription","commits_url":"https://api.github.com/repos/mziccard/gcloud-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/mziccard/gcloud-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/mziccard/gcloud-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/mziccard/gcloud-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/mziccard/gcloud-java/contents/{+path}","compare_url":"https://api.github.com/repos/mziccard/gcloud-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mziccard/gcloud-java/merges","archive_url":"https://api.github.com/repos/mziccard/gcloud-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mziccard/gcloud-java/downloads","issues_url":"https://api.github.com/repos/mziccard/gcloud-java/issues{/number}","pulls_url":"https://api.github.com/repos/mziccard/gcloud-java/pulls{/number}","milestones_url":"https://api.github.com/repos/mziccard/gcloud-java/milestones{/number}","notifications_url":"https://api.github.com/repos/mziccard/gcloud-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mziccard/gcloud-java/labels{/name}","releases_url":"https://api.github.com/repos/mziccard/gcloud-java/releases{/id}","deployments_url":"https://api.github.com/repos/mziccard/gcloud-java/deployments","created_at":"2015-08-18T10:16:17Z","updated_at":"2016-01-12T12:42:25Z","pushed_at":"2016-03-09T16:39:25Z","git_url":"git://github.com/mziccard/gcloud-java.git","ssh_url":"git@github.com:mziccard/gcloud-java.git","clone_url":"https://github.com/mziccard/gcloud-java.git","svn_url":"https://github.com/mziccard/gcloud-java","homepage":"http://googlecloudplatform.github.io/gcloud-java/site/0.0.6/","size":17568,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"GoogleCloudPlatform:compute-alpha","ref":"compute-alpha","sha":"4e16b5404607fe37ac856c1cf2ac29e321dfe61d","user":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":26181278,"name":"gcloud-java","full_name":"GoogleCloudPlatform/gcloud-java","owner":{"login":"GoogleCloudPlatform","id":2810941,"avatar_url":"https://avatars.githubusercontent.com/u/2810941?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GoogleCloudPlatform/gcloud-java","description":"Google Cloud Client Library for Java","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/deployments","created_at":"2014-11-04T17:57:16Z","updated_at":"2016-03-08T18:46:20Z","pushed_at":"2016-03-10T02:16:13Z","git_url":"git://github.com/GoogleCloudPlatform/gcloud-java.git","ssh_url":"git@github.com:GoogleCloudPlatform/gcloud-java.git","clone_url":"https://github.com/GoogleCloudPlatform/gcloud-java.git","svn_url":"https://github.com/GoogleCloudPlatform/gcloud-java","homepage":"http://googlecloudplatform.github.io/gcloud-java/","size":217602,"stargazers_count":72,"watchers_count":72,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":37,"mirror_url":null,"open_issues_count":133,"forks":37,"open_issues":133,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/728"},"html":{"href":"https://github.com/GoogleCloudPlatform/gcloud-java/pull/728"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/728"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/728/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/728/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/pulls/728/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/statuses/231fe428d6fb614a612fc70c40ad30ac678a09e9"}}}}