/*
 * Copyright 2019 Google LLC
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google LLC nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
package com.google.api.gax.httpjson;

import java.util.List;
import javax.annotation.Nullable;

/**
 * A generic empty message that can be re-used to avoid defining duplicated empty messages in your
 * APIs. A typical example is to use it as the response type of an API method.
 */
public class EmptyMessage implements ApiMessage {

  @Nullable
  @Override
  /* Overriden method. Will always return null, because there are no fields in this message type. */
  public Object getFieldValue(String fieldName) {
    return null;
  }

  @Nullable
  @Override
  /* Overriden method. Will always return null, because there are no fields in this message type. */
  public List<String> getFieldMask() {
    return null;
  }

  @Nullable
  @Override
  /* Overriden method. Will always return null, because there are no fields in this message type. */
  public ApiMessage getApiMessageRequestBody() {
    return null;
  }
}

@@ -1590,16 +1590,42 @@
 l.List;%0A
+import java.util.Objects;%0A
 import j
@@ -2465,11 +2465,1138 @@
 ull;%0A  %7D
+%0A%0A  @Override%0A  public boolean equals(Object other) %7B%0A    return other instanceof EmptyMessage;%0A  %7D%0A%0A  // This is a singleton class.%0A  private static final EmptyMessage DEFAULT_INSTANCE = new EmptyMessage();%0A%0A  public static EmptyMessage getDefaultInstance() %7B%0A    return DEFAULT_INSTANCE;%0A  %7D%0A%0A  private EmptyMessage() %7B%7D%0A%0A  public static Builder newBuilder() %7B%0A    return DEFAULT_INSTANCE.toBuilder();%0A  %7D%0A%0A  public static Builder newBuilder(EmptyMessage prototype) %7B%0A    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);%0A  %7D%0A%0A  public Builder toBuilder() %7B%0A    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);%0A  %7D%0A%0A  public static class Builder %7B%0A    Builder() %7B%7D%0A%0A    public Builder mergeFrom(EmptyMessage other) %7B%0A      return this;%0A    %7D%0A%0A    public Builder(EmptyMessage other) %7B%7D%0A%0A    public EmptyMessage build() %7B%0A      return DEFAULT_INSTANCE;%0A    %7D%0A%0A    public Builder clone() %7B%0A      return new Builder();%0A    %7D%0A  %7D%0A%0A  @Override%0A  public String toString() %7B%0A    return %22EmptyMessage%7B%7D%22;%0A  %7D%0A%0A  @Override%0A  public int hashCode() %7B%0A    return Objects.hash(DEFAULT_INSTANCE);%0A  %7D
 %0A%7D%0A

Add builder methods to EmptyMessage (#685)