/*
 * Copyright 2026 Google LLC
 *
 * Licensed 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
 *
 *     https://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.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: google/rpc/error_details.proto
// Protobuf Java Version: 4.33.2

package com.google.rpc;

/**
 *
 *
 * <pre>
 * Provides links to documentation or for performing an out of band action.
 *
 * For example, if a quota check failed with an error indicating the calling
 * project hasn't enabled the accessed service, this can contain a URL pointing
 * directly to the right place in the developer console to flip the bit.
 * </pre>
 *
 * Protobuf type {@code google.rpc.Help}
 */
@com.google.protobuf.Generated
public final class Help extends com.google.protobuf.GeneratedMessage
    implements
    // @@protoc_insertion_point(message_implements:google.rpc.Help)
    HelpOrBuilder {
  private static final long serialVersionUID = 0L;

  static {
    com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
        /* major= */ 4,
        /* minor= */ 33,
        /* patch= */ 2,
        /* suffix= */ "",
        "Help");
  }

  // Use Help.newBuilder() to construct.
  private Help(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    super(builder);
  }

  private Help() {
    links_ = java.util.Collections.emptyList();
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.rpc.Help.class, com.google.rpc.Help.Builder.class);
  }

  public interface LinkOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.rpc.Help.Link)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Describes what the link offers.
     * </pre>
     *
     * <code>string description = 1;</code>
     *
     * @return The description.
     */
    java.lang.String getDescription();

    /**
     *
     *
     * <pre>
     * Describes what the link offers.
     * </pre>
     *
     * <code>string description = 1;</code>
     *
     * @return The bytes for description.
     */
    com.google.protobuf.ByteString getDescriptionBytes();

    /**
     *
     *
     * <pre>
     * The URL of the link.
     * </pre>
     *
     * <code>string url = 2;</code>
     *
     * @return The url.
     */
    java.lang.String getUrl();

    /**
     *
     *
     * <pre>
     * The URL of the link.
     * </pre>
     *
     * <code>string url = 2;</code>
     *
     * @return The bytes for url.
     */
    com.google.protobuf.ByteString getUrlBytes();
  }

  /**
   *
   *
   * <pre>
   * Describes a URL link.
   * </pre>
   *
   * Protobuf type {@code google.rpc.Help.Link}
   */
  public static final class Link extends com.google.protobuf.GeneratedMessage
      implements
      // @@protoc_insertion_point(message_implements:google.rpc.Help.Link)
      LinkOrBuilder {
    private static final long serialVersionUID = 0L;

    static {
      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
          com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
          /* major= */ 4,
          /* minor= */ 33,
          /* patch= */ 2,
          /* suffix= */ "",
          "Link");
    }

    // Use Link.newBuilder() to construct.
    private Link(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }

    private Link() {
      description_ = "";
      url_ = "";
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.rpc.ErrorDetailsProto
          .internal_static_google_rpc_Help_Link_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.rpc.Help.Link.class, com.google.rpc.Help.Link.Builder.class);
    }

    public static final int DESCRIPTION_FIELD_NUMBER = 1;

    @SuppressWarnings("serial")
    private volatile java.lang.Object description_ = "";

    /**
     *
     *
     * <pre>
     * Describes what the link offers.
     * </pre>
     *
     * <code>string description = 1;</code>
     *
     * @return The description.
     */
    @java.lang.Override
    public java.lang.String getDescription() {
      java.lang.Object ref = description_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        description_ = s;
        return s;
      }
    }

    /**
     *
     *
     * <pre>
     * Describes what the link offers.
     * </pre>
     *
     * <code>string description = 1;</code>
     *
     * @return The bytes for description.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getDescriptionBytes() {
      java.lang.Object ref = description_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int URL_FIELD_NUMBER = 2;

    @SuppressWarnings("serial")
    private volatile java.lang.Object url_ = "";

    /**
     *
     *
     * <pre>
     * The URL of the link.
     * </pre>
     *
     * <code>string url = 2;</code>
     *
     * @return The url.
     */
    @java.lang.Override
    public java.lang.String getUrl() {
      java.lang.Object ref = url_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        url_ = s;
        return s;
      }
    }

    /**
     *
     *
     * <pre>
     * The URL of the link.
     * </pre>
     *
     * <code>string url = 2;</code>
     *
     * @return The bytes for url.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString getUrlBytes() {
      java.lang.Object ref = url_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        url_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    private byte memoizedIsInitialized = -1;

    @java.lang.Override
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized == 1) return true;
      if (isInitialized == 0) return false;

      memoizedIsInitialized = 1;
      return true;
    }

    @java.lang.Override
    public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
        com.google.protobuf.GeneratedMessage.writeString(output, 1, description_);
      }
      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
        com.google.protobuf.GeneratedMessage.writeString(output, 2, url_);
      }
      getUnknownFields().writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(description_)) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, description_);
      }
      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(url_)) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, url_);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
        return true;
      }
      if (!(obj instanceof com.google.rpc.Help.Link)) {
        return super.equals(obj);
      }
      com.google.rpc.Help.Link other = (com.google.rpc.Help.Link) obj;

      if (!getDescription().equals(other.getDescription())) return false;
      if (!getUrl().equals(other.getUrl())) return false;
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
      hash = (53 * hash) + getDescription().hashCode();
      hash = (37 * hash) + URL_FIELD_NUMBER;
      hash = (53 * hash) + getUrl().hashCode();
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.rpc.Help.Link parseFrom(java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.rpc.Help.Link parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.rpc.Help.Link parseFrom(com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.rpc.Help.Link parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.rpc.Help.Link parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.rpc.Help.Link parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.rpc.Help.Link parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
    }

    public static com.google.rpc.Help.Link parseFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.rpc.Help.Link parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.rpc.Help.Link parseDelimitedFrom(
        java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
          PARSER, input, extensionRegistry);
    }

    public static com.google.rpc.Help.Link parseFrom(com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
    }

    public static com.google.rpc.Help.Link parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage.parseWithIOException(
          PARSER, input, extensionRegistry);
    }

    @java.lang.Override
    public Builder newBuilderForType() {
      return newBuilder();
    }

    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }

    public static Builder newBuilder(com.google.rpc.Help.Link prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }

    @java.lang.Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
    }

    @java.lang.Override
    protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }

    /**
     *
     *
     * <pre>
     * Describes a URL link.
     * </pre>
     *
     * Protobuf type {@code google.rpc.Help.Link}
     */
    public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.rpc.Help.Link)
        com.google.rpc.Help.LinkOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.rpc.ErrorDetailsProto
            .internal_static_google_rpc_Help_Link_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.rpc.Help.Link.class, com.google.rpc.Help.Link.Builder.class);
      }

      // Construct using com.google.rpc.Help.Link.newBuilder()
      private Builder() {}

      private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        description_ = "";
        url_ = "";
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_Link_descriptor;
      }

      @java.lang.Override
      public com.google.rpc.Help.Link getDefaultInstanceForType() {
        return com.google.rpc.Help.Link.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.rpc.Help.Link build() {
        com.google.rpc.Help.Link result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.rpc.Help.Link buildPartial() {
        com.google.rpc.Help.Link result = new com.google.rpc.Help.Link(this);
        if (bitField0_ != 0) {
          buildPartial0(result);
        }
        onBuilt();
        return result;
      }

      private void buildPartial0(com.google.rpc.Help.Link result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.description_ = description_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.url_ = url_;
        }
      }

      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.rpc.Help.Link) {
          return mergeFrom((com.google.rpc.Help.Link) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.rpc.Help.Link other) {
        if (other == com.google.rpc.Help.Link.getDefaultInstance()) return this;
        if (!other.getDescription().isEmpty()) {
          description_ = other.description_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (!other.getUrl().isEmpty()) {
          url_ = other.url_;
          bitField0_ |= 0x00000002;
          onChanged();
        }
        this.mergeUnknownFields(other.getUnknownFields());
        onChanged();
        return this;
      }

      @java.lang.Override
      public final boolean isInitialized() {
        return true;
      }

      @java.lang.Override
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10:
                {
                  description_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000001;
                  break;
                } // case 10
              case 18:
                {
                  url_ = input.readStringRequireUtf8();
                  bitField0_ |= 0x00000002;
                  break;
                } // case 18
              default:
                {
                  if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                    done = true; // was an endgroup tag
                  }
                  break;
                } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }

      private int bitField0_;

      private java.lang.Object description_ = "";

      /**
       *
       *
       * <pre>
       * Describes what the link offers.
       * </pre>
       *
       * <code>string description = 1;</code>
       *
       * @return The description.
       */
      public java.lang.String getDescription() {
        java.lang.Object ref = description_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          description_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }

      /**
       *
       *
       * <pre>
       * Describes what the link offers.
       * </pre>
       *
       * <code>string description = 1;</code>
       *
       * @return The bytes for description.
       */
      public com.google.protobuf.ByteString getDescriptionBytes() {
        java.lang.Object ref = description_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          description_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      /**
       *
       *
       * <pre>
       * Describes what the link offers.
       * </pre>
       *
       * <code>string description = 1;</code>
       *
       * @param value The description to set.
       * @return This builder for chaining.
       */
      public Builder setDescription(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        description_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Describes what the link offers.
       * </pre>
       *
       * <code>string description = 1;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearDescription() {
        description_ = getDefaultInstance().getDescription();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * Describes what the link offers.
       * </pre>
       *
       * <code>string description = 1;</code>
       *
       * @param value The bytes for description to set.
       * @return This builder for chaining.
       */
      public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        description_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }

      private java.lang.Object url_ = "";

      /**
       *
       *
       * <pre>
       * The URL of the link.
       * </pre>
       *
       * <code>string url = 2;</code>
       *
       * @return The url.
       */
      public java.lang.String getUrl() {
        java.lang.Object ref = url_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          url_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }

      /**
       *
       *
       * <pre>
       * The URL of the link.
       * </pre>
       *
       * <code>string url = 2;</code>
       *
       * @return The bytes for url.
       */
      public com.google.protobuf.ByteString getUrlBytes() {
        java.lang.Object ref = url_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          url_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }

      /**
       *
       *
       * <pre>
       * The URL of the link.
       * </pre>
       *
       * <code>string url = 2;</code>
       *
       * @param value The url to set.
       * @return This builder for chaining.
       */
      public Builder setUrl(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }
        url_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * The URL of the link.
       * </pre>
       *
       * <code>string url = 2;</code>
       *
       * @return This builder for chaining.
       */
      public Builder clearUrl() {
        url_ = getDefaultInstance().getUrl();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }

      /**
       *
       *
       * <pre>
       * The URL of the link.
       * </pre>
       *
       * <code>string url = 2;</code>
       *
       * @param value The bytes for url to set.
       * @return This builder for chaining.
       */
      public Builder setUrlBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);
        url_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }

      // @@protoc_insertion_point(builder_scope:google.rpc.Help.Link)
    }

    // @@protoc_insertion_point(class_scope:google.rpc.Help.Link)
    private static final com.google.rpc.Help.Link DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.rpc.Help.Link();
    }

    public static com.google.rpc.Help.Link getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<Link> PARSER =
        new com.google.protobuf.AbstractParser<Link>() {
          @java.lang.Override
          public Link parsePartialFrom(
              com.google.protobuf.CodedInputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
            Builder builder = newBuilder();
            try {
              builder.mergeFrom(input, extensionRegistry);
            } catch (com.google.protobuf.InvalidProtocolBufferException e) {
              throw e.setUnfinishedMessage(builder.buildPartial());
            } catch (com.google.protobuf.UninitializedMessageException e) {
              throw e.asInvalidProtocolBufferException()
                  .setUnfinishedMessage(builder.buildPartial());
            } catch (java.io.IOException e) {
              throw new com.google.protobuf.InvalidProtocolBufferException(e)
                  .setUnfinishedMessage(builder.buildPartial());
            }
            return builder.buildPartial();
          }
        };

    public static com.google.protobuf.Parser<Link> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<Link> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.rpc.Help.Link getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public static final int LINKS_FIELD_NUMBER = 1;

  @SuppressWarnings("serial")
  private java.util.List<com.google.rpc.Help.Link> links_;

  /**
   *
   *
   * <pre>
   * URL(s) pointing to additional information on handling the current error.
   * </pre>
   *
   * <code>repeated .google.rpc.Help.Link links = 1;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.rpc.Help.Link> getLinksList() {
    return links_;
  }

  /**
   *
   *
   * <pre>
   * URL(s) pointing to additional information on handling the current error.
   * </pre>
   *
   * <code>repeated .google.rpc.Help.Link links = 1;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.rpc.Help.LinkOrBuilder> getLinksOrBuilderList() {
    return links_;
  }

  /**
   *
   *
   * <pre>
   * URL(s) pointing to additional information on handling the current error.
   * </pre>
   *
   * <code>repeated .google.rpc.Help.Link links = 1;</code>
   */
  @java.lang.Override
  public int getLinksCount() {
    return links_.size();
  }

  /**
   *
   *
   * <pre>
   * URL(s) pointing to additional information on handling the current error.
   * </pre>
   *
   * <code>repeated .google.rpc.Help.Link links = 1;</code>
   */
  @java.lang.Override
  public com.google.rpc.Help.Link getLinks(int index) {
    return links_.get(index);
  }

  /**
   *
   *
   * <pre>
   * URL(s) pointing to additional information on handling the current error.
   * </pre>
   *
   * <code>repeated .google.rpc.Help.Link links = 1;</code>
   */
  @java.lang.Override
  public com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder(int index) {
    return links_.get(index);
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    for (int i = 0; i < links_.size(); i++) {
      output.writeMessage(1, links_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    for (int i = 0; i < links_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, links_.get(i));
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.rpc.Help)) {
      return super.equals(obj);
    }
    com.google.rpc.Help other = (com.google.rpc.Help) obj;

    if (!getLinksList().equals(other.getLinksList())) return false;
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getLinksCount() > 0) {
      hash = (37 * hash) + LINKS_FIELD_NUMBER;
      hash = (53 * hash) + getLinksList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.rpc.Help parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.rpc.Help parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.rpc.Help parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.rpc.Help parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.rpc.Help parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.rpc.Help parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.rpc.Help parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
  }

  public static com.google.rpc.Help parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.rpc.Help parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.rpc.Help parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.rpc.Help parseFrom(com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(PARSER, input);
  }

  public static com.google.rpc.Help parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessage.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() {
    return newBuilder();
  }

  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }

  public static Builder newBuilder(com.google.rpc.Help prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }

  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }

  /**
   *
   *
   * <pre>
   * Provides links to documentation or for performing an out of band action.
   *
   * For example, if a quota check failed with an error indicating the calling
   * project hasn't enabled the accessed service, this can contain a URL pointing
   * directly to the right place in the developer console to flip the bit.
   * </pre>
   *
   * Protobuf type {@code google.rpc.Help}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.rpc.Help)
      com.google.rpc.HelpOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.rpc.Help.class, com.google.rpc.Help.Builder.class);
    }

    // Construct using com.google.rpc.Help.newBuilder()
    private Builder() {}

    private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
      super(parent);
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (linksBuilder_ == null) {
        links_ = java.util.Collections.emptyList();
      } else {
        links_ = null;
        linksBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.rpc.ErrorDetailsProto.internal_static_google_rpc_Help_descriptor;
    }

    @java.lang.Override
    public com.google.rpc.Help getDefaultInstanceForType() {
      return com.google.rpc.Help.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.rpc.Help build() {
      com.google.rpc.Help result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.rpc.Help buildPartial() {
      com.google.rpc.Help result = new com.google.rpc.Help(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(com.google.rpc.Help result) {
      if (linksBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          links_ = java.util.Collections.unmodifiableList(links_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.links_ = links_;
      } else {
        result.links_ = linksBuilder_.build();
      }
    }

    private void buildPartial0(com.google.rpc.Help result) {
      int from_bitField0_ = bitField0_;
    }

    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.rpc.Help) {
        return mergeFrom((com.google.rpc.Help) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.rpc.Help other) {
      if (other == com.google.rpc.Help.getDefaultInstance()) return this;
      if (linksBuilder_ == null) {
        if (!other.links_.isEmpty()) {
          if (links_.isEmpty()) {
            links_ = other.links_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureLinksIsMutable();
            links_.addAll(other.links_);
          }
          onChanged();
        }
      } else {
        if (!other.links_.isEmpty()) {
          if (linksBuilder_.isEmpty()) {
            linksBuilder_.dispose();
            linksBuilder_ = null;
            links_ = other.links_;
            bitField0_ = (bitField0_ & ~0x00000001);
            linksBuilder_ =
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders
                    ? internalGetLinksFieldBuilder()
                    : null;
          } else {
            linksBuilder_.addAllMessages(other.links_);
          }
        }
      }
      this.mergeUnknownFields(other.getUnknownFields());
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                com.google.rpc.Help.Link m =
                    input.readMessage(com.google.rpc.Help.Link.parser(), extensionRegistry);
                if (linksBuilder_ == null) {
                  ensureLinksIsMutable();
                  links_.add(m);
                } else {
                  linksBuilder_.addMessage(m);
                }
                break;
              } // case 10
            default:
              {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }

    private int bitField0_;

    private java.util.List<com.google.rpc.Help.Link> links_ = java.util.Collections.emptyList();

    private void ensureLinksIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        links_ = new java.util.ArrayList<com.google.rpc.Help.Link>(links_);
        bitField0_ |= 0x00000001;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilder<
            com.google.rpc.Help.Link,
            com.google.rpc.Help.Link.Builder,
            com.google.rpc.Help.LinkOrBuilder>
        linksBuilder_;

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public java.util.List<com.google.rpc.Help.Link> getLinksList() {
      if (linksBuilder_ == null) {
        return java.util.Collections.unmodifiableList(links_);
      } else {
        return linksBuilder_.getMessageList();
      }
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public int getLinksCount() {
      if (linksBuilder_ == null) {
        return links_.size();
      } else {
        return linksBuilder_.getCount();
      }
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public com.google.rpc.Help.Link getLinks(int index) {
      if (linksBuilder_ == null) {
        return links_.get(index);
      } else {
        return linksBuilder_.getMessage(index);
      }
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public Builder setLinks(int index, com.google.rpc.Help.Link value) {
      if (linksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureLinksIsMutable();
        links_.set(index, value);
        onChanged();
      } else {
        linksBuilder_.setMessage(index, value);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public Builder setLinks(int index, com.google.rpc.Help.Link.Builder builderForValue) {
      if (linksBuilder_ == null) {
        ensureLinksIsMutable();
        links_.set(index, builderForValue.build());
        onChanged();
      } else {
        linksBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public Builder addLinks(com.google.rpc.Help.Link value) {
      if (linksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureLinksIsMutable();
        links_.add(value);
        onChanged();
      } else {
        linksBuilder_.addMessage(value);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public Builder addLinks(int index, com.google.rpc.Help.Link value) {
      if (linksBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureLinksIsMutable();
        links_.add(index, value);
        onChanged();
      } else {
        linksBuilder_.addMessage(index, value);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public Builder addLinks(com.google.rpc.Help.Link.Builder builderForValue) {
      if (linksBuilder_ == null) {
        ensureLinksIsMutable();
        links_.add(builderForValue.build());
        onChanged();
      } else {
        linksBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public Builder addLinks(int index, com.google.rpc.Help.Link.Builder builderForValue) {
      if (linksBuilder_ == null) {
        ensureLinksIsMutable();
        links_.add(index, builderForValue.build());
        onChanged();
      } else {
        linksBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public Builder addAllLinks(java.lang.Iterable<? extends com.google.rpc.Help.Link> values) {
      if (linksBuilder_ == null) {
        ensureLinksIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, links_);
        onChanged();
      } else {
        linksBuilder_.addAllMessages(values);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public Builder clearLinks() {
      if (linksBuilder_ == null) {
        links_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        linksBuilder_.clear();
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public Builder removeLinks(int index) {
      if (linksBuilder_ == null) {
        ensureLinksIsMutable();
        links_.remove(index);
        onChanged();
      } else {
        linksBuilder_.remove(index);
      }
      return this;
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public com.google.rpc.Help.Link.Builder getLinksBuilder(int index) {
      return internalGetLinksFieldBuilder().getBuilder(index);
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public com.google.rpc.Help.LinkOrBuilder getLinksOrBuilder(int index) {
      if (linksBuilder_ == null) {
        return links_.get(index);
      } else {
        return linksBuilder_.getMessageOrBuilder(index);
      }
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public java.util.List<? extends com.google.rpc.Help.LinkOrBuilder> getLinksOrBuilderList() {
      if (linksBuilder_ != null) {
        return linksBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(links_);
      }
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public com.google.rpc.Help.Link.Builder addLinksBuilder() {
      return internalGetLinksFieldBuilder()
          .addBuilder(com.google.rpc.Help.Link.getDefaultInstance());
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public com.google.rpc.Help.Link.Builder addLinksBuilder(int index) {
      return internalGetLinksFieldBuilder()
          .addBuilder(index, com.google.rpc.Help.Link.getDefaultInstance());
    }

    /**
     *
     *
     * <pre>
     * URL(s) pointing to additional information on handling the current error.
     * </pre>
     *
     * <code>repeated .google.rpc.Help.Link links = 1;</code>
     */
    public java.util.List<com.google.rpc.Help.Link.Builder> getLinksBuilderList() {
      return internalGetLinksFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilder<
            com.google.rpc.Help.Link,
            com.google.rpc.Help.Link.Builder,
            com.google.rpc.Help.LinkOrBuilder>
        internalGetLinksFieldBuilder() {
      if (linksBuilder_ == null) {
        linksBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilder<
                com.google.rpc.Help.Link,
                com.google.rpc.Help.Link.Builder,
                com.google.rpc.Help.LinkOrBuilder>(
                links_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
        links_ = null;
      }
      return linksBuilder_;
    }

    // @@protoc_insertion_point(builder_scope:google.rpc.Help)
  }

  // @@protoc_insertion_point(class_scope:google.rpc.Help)
  private static final com.google.rpc.Help DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.rpc.Help();
  }

  public static com.google.rpc.Help getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Help> PARSER =
      new com.google.protobuf.AbstractParser<Help>() {
        @java.lang.Override
        public Help parsePartialFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws com.google.protobuf.InvalidProtocolBufferException {
          Builder builder = newBuilder();
          try {
            builder.mergeFrom(input, extensionRegistry);
          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
            throw e.setUnfinishedMessage(builder.buildPartial());
          } catch (com.google.protobuf.UninitializedMessageException e) {
            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
          } catch (java.io.IOException e) {
            throw new com.google.protobuf.InvalidProtocolBufferException(e)
                .setUnfinishedMessage(builder.buildPartial());
          }
          return builder.buildPartial();
        }
      };

  public static com.google.protobuf.Parser<Help> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<Help> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.rpc.Help getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
