/*
 * Copyright 2020 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!
// source: google/api/servicecontrol/v1/check_error.proto

package com.google.api.servicecontrol.v1;

/**
 *
 *
 * <pre>
 * Defines the errors to be returned in
 * [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors].
 * </pre>
 *
 * Protobuf type {@code google.api.servicecontrol.v1.CheckError}
 */
public final class CheckError extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.api.servicecontrol.v1.CheckError)
    CheckErrorOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use CheckError.newBuilder() to construct.
  private CheckError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private CheckError() {
    code_ = 0;
    subject_ = "";
    detail_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new CheckError();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.api.servicecontrol.v1.CheckErrorProto
        .internal_static_google_api_servicecontrol_v1_CheckError_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.api.servicecontrol.v1.CheckErrorProto
        .internal_static_google_api_servicecontrol_v1_CheckError_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.api.servicecontrol.v1.CheckError.class,
            com.google.api.servicecontrol.v1.CheckError.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * Error codes for Check responses.
   * </pre>
   *
   * Protobuf enum {@code google.api.servicecontrol.v1.CheckError.Code}
   */
  public enum Code implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * This is never used in `CheckResponse`.
     * </pre>
     *
     * <code>ERROR_CODE_UNSPECIFIED = 0;</code>
     */
    ERROR_CODE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The consumer's project id, network container, or resource container was
     * not found. Same as [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND].
     * </pre>
     *
     * <code>NOT_FOUND = 5;</code>
     */
    NOT_FOUND(5),
    /**
     *
     *
     * <pre>
     * The consumer doesn't have access to the specified resource.
     * Same as [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
     * </pre>
     *
     * <code>PERMISSION_DENIED = 7;</code>
     */
    PERMISSION_DENIED(7),
    /**
     *
     *
     * <pre>
     * Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED].
     * </pre>
     *
     * <code>RESOURCE_EXHAUSTED = 8;</code>
     */
    RESOURCE_EXHAUSTED(8),
    /**
     *
     *
     * <pre>
     * The consumer hasn't activated the service.
     * </pre>
     *
     * <code>SERVICE_NOT_ACTIVATED = 104;</code>
     */
    SERVICE_NOT_ACTIVATED(104),
    /**
     *
     *
     * <pre>
     * The consumer cannot access the service because billing is disabled.
     * </pre>
     *
     * <code>BILLING_DISABLED = 107;</code>
     */
    BILLING_DISABLED(107),
    /**
     *
     *
     * <pre>
     * The consumer's project has been marked as deleted (soft deletion).
     * </pre>
     *
     * <code>PROJECT_DELETED = 108;</code>
     */
    PROJECT_DELETED(108),
    /**
     *
     *
     * <pre>
     * The consumer's project number or id does not represent a valid project.
     * </pre>
     *
     * <code>PROJECT_INVALID = 114;</code>
     */
    PROJECT_INVALID(114),
    /**
     *
     *
     * <pre>
     * The input consumer info does not represent a valid consumer folder or
     * organization.
     * </pre>
     *
     * <code>CONSUMER_INVALID = 125;</code>
     */
    CONSUMER_INVALID(125),
    /**
     *
     *
     * <pre>
     * The IP address of the consumer is invalid for the specific consumer
     * project.
     * </pre>
     *
     * <code>IP_ADDRESS_BLOCKED = 109;</code>
     */
    IP_ADDRESS_BLOCKED(109),
    /**
     *
     *
     * <pre>
     * The referer address of the consumer request is invalid for the specific
     * consumer project.
     * </pre>
     *
     * <code>REFERER_BLOCKED = 110;</code>
     */
    REFERER_BLOCKED(110),
    /**
     *
     *
     * <pre>
     * The client application of the consumer request is invalid for the
     * specific consumer project.
     * </pre>
     *
     * <code>CLIENT_APP_BLOCKED = 111;</code>
     */
    CLIENT_APP_BLOCKED(111),
    /**
     *
     *
     * <pre>
     * The API targeted by this request is invalid for the specified consumer
     * project.
     * </pre>
     *
     * <code>API_TARGET_BLOCKED = 122;</code>
     */
    API_TARGET_BLOCKED(122),
    /**
     *
     *
     * <pre>
     * The consumer's API key is invalid.
     * </pre>
     *
     * <code>API_KEY_INVALID = 105;</code>
     */
    API_KEY_INVALID(105),
    /**
     *
     *
     * <pre>
     * The consumer's API Key has expired.
     * </pre>
     *
     * <code>API_KEY_EXPIRED = 112;</code>
     */
    API_KEY_EXPIRED(112),
    /**
     *
     *
     * <pre>
     * The consumer's API Key was not found in config record.
     * </pre>
     *
     * <code>API_KEY_NOT_FOUND = 113;</code>
     */
    API_KEY_NOT_FOUND(113),
    /**
     *
     *
     * <pre>
     * The credential in the request can not be verified.
     * </pre>
     *
     * <code>INVALID_CREDENTIAL = 123;</code>
     */
    INVALID_CREDENTIAL(123),
    /**
     *
     *
     * <pre>
     * The backend server for looking up project id/number is unavailable.
     * </pre>
     *
     * <code>NAMESPACE_LOOKUP_UNAVAILABLE = 300;</code>
     */
    NAMESPACE_LOOKUP_UNAVAILABLE(300),
    /**
     *
     *
     * <pre>
     * The backend server for checking service status is unavailable.
     * </pre>
     *
     * <code>SERVICE_STATUS_UNAVAILABLE = 301;</code>
     */
    SERVICE_STATUS_UNAVAILABLE(301),
    /**
     *
     *
     * <pre>
     * The backend server for checking billing status is unavailable.
     * </pre>
     *
     * <code>BILLING_STATUS_UNAVAILABLE = 302;</code>
     */
    BILLING_STATUS_UNAVAILABLE(302),
    /**
     *
     *
     * <pre>
     * Cloud Resource Manager backend server is unavailable.
     * </pre>
     *
     * <code>CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305;</code>
     */
    CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE(305),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * This is never used in `CheckResponse`.
     * </pre>
     *
     * <code>ERROR_CODE_UNSPECIFIED = 0;</code>
     */
    public static final int ERROR_CODE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The consumer's project id, network container, or resource container was
     * not found. Same as [google.rpc.Code.NOT_FOUND][google.rpc.Code.NOT_FOUND].
     * </pre>
     *
     * <code>NOT_FOUND = 5;</code>
     */
    public static final int NOT_FOUND_VALUE = 5;
    /**
     *
     *
     * <pre>
     * The consumer doesn't have access to the specified resource.
     * Same as [google.rpc.Code.PERMISSION_DENIED][google.rpc.Code.PERMISSION_DENIED].
     * </pre>
     *
     * <code>PERMISSION_DENIED = 7;</code>
     */
    public static final int PERMISSION_DENIED_VALUE = 7;
    /**
     *
     *
     * <pre>
     * Quota check failed. Same as [google.rpc.Code.RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED].
     * </pre>
     *
     * <code>RESOURCE_EXHAUSTED = 8;</code>
     */
    public static final int RESOURCE_EXHAUSTED_VALUE = 8;
    /**
     *
     *
     * <pre>
     * The consumer hasn't activated the service.
     * </pre>
     *
     * <code>SERVICE_NOT_ACTIVATED = 104;</code>
     */
    public static final int SERVICE_NOT_ACTIVATED_VALUE = 104;
    /**
     *
     *
     * <pre>
     * The consumer cannot access the service because billing is disabled.
     * </pre>
     *
     * <code>BILLING_DISABLED = 107;</code>
     */
    public static final int BILLING_DISABLED_VALUE = 107;
    /**
     *
     *
     * <pre>
     * The consumer's project has been marked as deleted (soft deletion).
     * </pre>
     *
     * <code>PROJECT_DELETED = 108;</code>
     */
    public static final int PROJECT_DELETED_VALUE = 108;
    /**
     *
     *
     * <pre>
     * The consumer's project number or id does not represent a valid project.
     * </pre>
     *
     * <code>PROJECT_INVALID = 114;</code>
     */
    public static final int PROJECT_INVALID_VALUE = 114;
    /**
     *
     *
     * <pre>
     * The input consumer info does not represent a valid consumer folder or
     * organization.
     * </pre>
     *
     * <code>CONSUMER_INVALID = 125;</code>
     */
    public static final int CONSUMER_INVALID_VALUE = 125;
    /**
     *
     *
     * <pre>
     * The IP address of the consumer is invalid for the specific consumer
     * project.
     * </pre>
     *
     * <code>IP_ADDRESS_BLOCKED = 109;</code>
     */
    public static final int IP_ADDRESS_BLOCKED_VALUE = 109;
    /**
     *
     *
     * <pre>
     * The referer address of the consumer request is invalid for the specific
     * consumer project.
     * </pre>
     *
     * <code>REFERER_BLOCKED = 110;</code>
     */
    public static final int REFERER_BLOCKED_VALUE = 110;
    /**
     *
     *
     * <pre>
     * The client application of the consumer request is invalid for the
     * specific consumer project.
     * </pre>
     *
     * <code>CLIENT_APP_BLOCKED = 111;</code>
     */
    public static final int CLIENT_APP_BLOCKED_VALUE = 111;
    /**
     *
     *
     * <pre>
     * The API targeted by this request is invalid for the specified consumer
     * project.
     * </pre>
     *
     * <code>API_TARGET_BLOCKED = 122;</code>
     */
    public static final int API_TARGET_BLOCKED_VALUE = 122;
    /**
     *
     *
     * <pre>
     * The consumer's API key is invalid.
     * </pre>
     *
     * <code>API_KEY_INVALID = 105;</code>
     */
    public static final int API_KEY_INVALID_VALUE = 105;
    /**
     *
     *
     * <pre>
     * The consumer's API Key has expired.
     * </pre>
     *
     * <code>API_KEY_EXPIRED = 112;</code>
     */
    public static final int API_KEY_EXPIRED_VALUE = 112;
    /**
     *
     *
     * <pre>
     * The consumer's API Key was not found in config record.
     * </pre>
     *
     * <code>API_KEY_NOT_FOUND = 113;</code>
     */
    public static final int API_KEY_NOT_FOUND_VALUE = 113;
    /**
     *
     *
     * <pre>
     * The credential in the request can not be verified.
     * </pre>
     *
     * <code>INVALID_CREDENTIAL = 123;</code>
     */
    public static final int INVALID_CREDENTIAL_VALUE = 123;
    /**
     *
     *
     * <pre>
     * The backend server for looking up project id/number is unavailable.
     * </pre>
     *
     * <code>NAMESPACE_LOOKUP_UNAVAILABLE = 300;</code>
     */
    public static final int NAMESPACE_LOOKUP_UNAVAILABLE_VALUE = 300;
    /**
     *
     *
     * <pre>
     * The backend server for checking service status is unavailable.
     * </pre>
     *
     * <code>SERVICE_STATUS_UNAVAILABLE = 301;</code>
     */
    public static final int SERVICE_STATUS_UNAVAILABLE_VALUE = 301;
    /**
     *
     *
     * <pre>
     * The backend server for checking billing status is unavailable.
     * </pre>
     *
     * <code>BILLING_STATUS_UNAVAILABLE = 302;</code>
     */
    public static final int BILLING_STATUS_UNAVAILABLE_VALUE = 302;
    /**
     *
     *
     * <pre>
     * Cloud Resource Manager backend server is unavailable.
     * </pre>
     *
     * <code>CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE = 305;</code>
     */
    public static final int CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE_VALUE = 305;

    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      return value;
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static Code valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Code forNumber(int value) {
      switch (value) {
        case 0:
          return ERROR_CODE_UNSPECIFIED;
        case 5:
          return NOT_FOUND;
        case 7:
          return PERMISSION_DENIED;
        case 8:
          return RESOURCE_EXHAUSTED;
        case 104:
          return SERVICE_NOT_ACTIVATED;
        case 107:
          return BILLING_DISABLED;
        case 108:
          return PROJECT_DELETED;
        case 114:
          return PROJECT_INVALID;
        case 125:
          return CONSUMER_INVALID;
        case 109:
          return IP_ADDRESS_BLOCKED;
        case 110:
          return REFERER_BLOCKED;
        case 111:
          return CLIENT_APP_BLOCKED;
        case 122:
          return API_TARGET_BLOCKED;
        case 105:
          return API_KEY_INVALID;
        case 112:
          return API_KEY_EXPIRED;
        case 113:
          return API_KEY_NOT_FOUND;
        case 123:
          return INVALID_CREDENTIAL;
        case 300:
          return NAMESPACE_LOOKUP_UNAVAILABLE;
        case 301:
          return SERVICE_STATUS_UNAVAILABLE;
        case 302:
          return BILLING_STATUS_UNAVAILABLE;
        case 305:
          return CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<Code> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<Code> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<Code>() {
          public Code findValueByNumber(int number) {
            return Code.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.api.servicecontrol.v1.CheckError.getDescriptor().getEnumTypes().get(0);
    }

    private static final Code[] VALUES = values();

    public static Code valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Code(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.api.servicecontrol.v1.CheckError.Code)
  }

  public static final int CODE_FIELD_NUMBER = 1;
  private int code_ = 0;
  /**
   *
   *
   * <pre>
   * The error code.
   * </pre>
   *
   * <code>.google.api.servicecontrol.v1.CheckError.Code code = 1;</code>
   *
   * @return The enum numeric value on the wire for code.
   */
  @java.lang.Override
  public int getCodeValue() {
    return code_;
  }
  /**
   *
   *
   * <pre>
   * The error code.
   * </pre>
   *
   * <code>.google.api.servicecontrol.v1.CheckError.Code code = 1;</code>
   *
   * @return The code.
   */
  @java.lang.Override
  public com.google.api.servicecontrol.v1.CheckError.Code getCode() {
    com.google.api.servicecontrol.v1.CheckError.Code result =
        com.google.api.servicecontrol.v1.CheckError.Code.forNumber(code_);
    return result == null ? com.google.api.servicecontrol.v1.CheckError.Code.UNRECOGNIZED : result;
  }

  public static final int SUBJECT_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private volatile java.lang.Object subject_ = "";
  /**
   *
   *
   * <pre>
   * Subject to whom this error applies. See the specific code enum for more
   * details on this field. For example:
   * - "project:&lt;project-id or project-number&gt;"
   * - "folder:&lt;folder-id&gt;"
   * - "organization:&lt;organization-id&gt;"
   * </pre>
   *
   * <code>string subject = 4;</code>
   *
   * @return The subject.
   */
  @java.lang.Override
  public java.lang.String getSubject() {
    java.lang.Object ref = subject_;
    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();
      subject_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Subject to whom this error applies. See the specific code enum for more
   * details on this field. For example:
   * - "project:&lt;project-id or project-number&gt;"
   * - "folder:&lt;folder-id&gt;"
   * - "organization:&lt;organization-id&gt;"
   * </pre>
   *
   * <code>string subject = 4;</code>
   *
   * @return The bytes for subject.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getSubjectBytes() {
    java.lang.Object ref = subject_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      subject_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DETAIL_FIELD_NUMBER = 2;

  @SuppressWarnings("serial")
  private volatile java.lang.Object detail_ = "";
  /**
   *
   *
   * <pre>
   * Free-form text providing details on the error cause of the error.
   * </pre>
   *
   * <code>string detail = 2;</code>
   *
   * @return The detail.
   */
  @java.lang.Override
  public java.lang.String getDetail() {
    java.lang.Object ref = detail_;
    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();
      detail_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * Free-form text providing details on the error cause of the error.
   * </pre>
   *
   * <code>string detail = 2;</code>
   *
   * @return The bytes for detail.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getDetailBytes() {
    java.lang.Object ref = detail_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      detail_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int STATUS_FIELD_NUMBER = 3;
  private com.google.rpc.Status status_;
  /**
   *
   *
   * <pre>
   * Contains public information about the check error. If available,
   * `status.code` will be non zero and client can propagate it out as public
   * error.
   * </pre>
   *
   * <code>.google.rpc.Status status = 3;</code>
   *
   * @return Whether the status field is set.
   */
  @java.lang.Override
  public boolean hasStatus() {
    return status_ != null;
  }
  /**
   *
   *
   * <pre>
   * Contains public information about the check error. If available,
   * `status.code` will be non zero and client can propagate it out as public
   * error.
   * </pre>
   *
   * <code>.google.rpc.Status status = 3;</code>
   *
   * @return The status.
   */
  @java.lang.Override
  public com.google.rpc.Status getStatus() {
    return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
  }
  /**
   *
   *
   * <pre>
   * Contains public information about the check error. If available,
   * `status.code` will be non zero and client can propagate it out as public
   * error.
   * </pre>
   *
   * <code>.google.rpc.Status status = 3;</code>
   */
  @java.lang.Override
  public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
    return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
  }

  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 (code_
        != com.google.api.servicecontrol.v1.CheckError.Code.ERROR_CODE_UNSPECIFIED.getNumber()) {
      output.writeEnum(1, code_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, detail_);
    }
    if (status_ != null) {
      output.writeMessage(3, getStatus());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subject_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (code_
        != com.google.api.servicecontrol.v1.CheckError.Code.ERROR_CODE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, code_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(detail_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, detail_);
    }
    if (status_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getStatus());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subject_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subject_);
    }
    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.api.servicecontrol.v1.CheckError)) {
      return super.equals(obj);
    }
    com.google.api.servicecontrol.v1.CheckError other =
        (com.google.api.servicecontrol.v1.CheckError) obj;

    if (code_ != other.code_) return false;
    if (!getSubject().equals(other.getSubject())) return false;
    if (!getDetail().equals(other.getDetail())) return false;
    if (hasStatus() != other.hasStatus()) return false;
    if (hasStatus()) {
      if (!getStatus().equals(other.getStatus())) 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) + CODE_FIELD_NUMBER;
    hash = (53 * hash) + code_;
    hash = (37 * hash) + SUBJECT_FIELD_NUMBER;
    hash = (53 * hash) + getSubject().hashCode();
    hash = (37 * hash) + DETAIL_FIELD_NUMBER;
    hash = (53 * hash) + getDetail().hashCode();
    if (hasStatus()) {
      hash = (37 * hash) + STATUS_FIELD_NUMBER;
      hash = (53 * hash) + getStatus().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.api.servicecontrol.v1.CheckError parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.api.servicecontrol.v1.CheckError parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.api.servicecontrol.v1.CheckError parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.api.servicecontrol.v1.CheckError 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.api.servicecontrol.v1.CheckError parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.api.servicecontrol.v1.CheckError parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.api.servicecontrol.v1.CheckError parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.api.servicecontrol.v1.CheckError parseFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.api.servicecontrol.v1.CheckError parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.api.servicecontrol.v1.CheckError parseDelimitedFrom(
      java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
        PARSER, input, extensionRegistry);
  }

  public static com.google.api.servicecontrol.v1.CheckError parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.api.servicecontrol.v1.CheckError parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.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.api.servicecontrol.v1.CheckError 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.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   *
   *
   * <pre>
   * Defines the errors to be returned in
   * [google.api.servicecontrol.v1.CheckResponse.check_errors][google.api.servicecontrol.v1.CheckResponse.check_errors].
   * </pre>
   *
   * Protobuf type {@code google.api.servicecontrol.v1.CheckError}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v1.CheckError)
      com.google.api.servicecontrol.v1.CheckErrorOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.api.servicecontrol.v1.CheckErrorProto
          .internal_static_google_api_servicecontrol_v1_CheckError_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.api.servicecontrol.v1.CheckErrorProto
          .internal_static_google_api_servicecontrol_v1_CheckError_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.api.servicecontrol.v1.CheckError.class,
              com.google.api.servicecontrol.v1.CheckError.Builder.class);
    }

    // Construct using com.google.api.servicecontrol.v1.CheckError.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      code_ = 0;
      subject_ = "";
      detail_ = "";
      status_ = null;
      if (statusBuilder_ != null) {
        statusBuilder_.dispose();
        statusBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.api.servicecontrol.v1.CheckErrorProto
          .internal_static_google_api_servicecontrol_v1_CheckError_descriptor;
    }

    @java.lang.Override
    public com.google.api.servicecontrol.v1.CheckError getDefaultInstanceForType() {
      return com.google.api.servicecontrol.v1.CheckError.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.api.servicecontrol.v1.CheckError build() {
      com.google.api.servicecontrol.v1.CheckError result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.api.servicecontrol.v1.CheckError buildPartial() {
      com.google.api.servicecontrol.v1.CheckError result =
          new com.google.api.servicecontrol.v1.CheckError(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.api.servicecontrol.v1.CheckError result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.code_ = code_;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.subject_ = subject_;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.detail_ = detail_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build();
      }
    }

    @java.lang.Override
    public Builder clone() {
      return super.clone();
    }

    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.setField(field, value);
    }

    @java.lang.Override
    public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }

    @java.lang.Override
    public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }

    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
      return super.setRepeatedField(field, index, value);
    }

    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
      return super.addRepeatedField(field, value);
    }

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

    public Builder mergeFrom(com.google.api.servicecontrol.v1.CheckError other) {
      if (other == com.google.api.servicecontrol.v1.CheckError.getDefaultInstance()) return this;
      if (other.code_ != 0) {
        setCodeValue(other.getCodeValue());
      }
      if (!other.getSubject().isEmpty()) {
        subject_ = other.subject_;
        bitField0_ |= 0x00000002;
        onChanged();
      }
      if (!other.getDetail().isEmpty()) {
        detail_ = other.detail_;
        bitField0_ |= 0x00000004;
        onChanged();
      }
      if (other.hasStatus()) {
        mergeStatus(other.getStatus());
      }
      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 8:
              {
                code_ = input.readEnum();
                bitField0_ |= 0x00000001;
                break;
              } // case 8
            case 18:
              {
                detail_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000004;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 26
            case 34:
              {
                subject_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 34
            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 int code_ = 0;
    /**
     *
     *
     * <pre>
     * The error code.
     * </pre>
     *
     * <code>.google.api.servicecontrol.v1.CheckError.Code code = 1;</code>
     *
     * @return The enum numeric value on the wire for code.
     */
    @java.lang.Override
    public int getCodeValue() {
      return code_;
    }
    /**
     *
     *
     * <pre>
     * The error code.
     * </pre>
     *
     * <code>.google.api.servicecontrol.v1.CheckError.Code code = 1;</code>
     *
     * @param value The enum numeric value on the wire for code to set.
     * @return This builder for chaining.
     */
    public Builder setCodeValue(int value) {
      code_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The error code.
     * </pre>
     *
     * <code>.google.api.servicecontrol.v1.CheckError.Code code = 1;</code>
     *
     * @return The code.
     */
    @java.lang.Override
    public com.google.api.servicecontrol.v1.CheckError.Code getCode() {
      com.google.api.servicecontrol.v1.CheckError.Code result =
          com.google.api.servicecontrol.v1.CheckError.Code.forNumber(code_);
      return result == null
          ? com.google.api.servicecontrol.v1.CheckError.Code.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * The error code.
     * </pre>
     *
     * <code>.google.api.servicecontrol.v1.CheckError.Code code = 1;</code>
     *
     * @param value The code to set.
     * @return This builder for chaining.
     */
    public Builder setCode(com.google.api.servicecontrol.v1.CheckError.Code value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000001;
      code_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The error code.
     * </pre>
     *
     * <code>.google.api.servicecontrol.v1.CheckError.Code code = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearCode() {
      bitField0_ = (bitField0_ & ~0x00000001);
      code_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object subject_ = "";
    /**
     *
     *
     * <pre>
     * Subject to whom this error applies. See the specific code enum for more
     * details on this field. For example:
     * - "project:&lt;project-id or project-number&gt;"
     * - "folder:&lt;folder-id&gt;"
     * - "organization:&lt;organization-id&gt;"
     * </pre>
     *
     * <code>string subject = 4;</code>
     *
     * @return The subject.
     */
    public java.lang.String getSubject() {
      java.lang.Object ref = subject_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        subject_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Subject to whom this error applies. See the specific code enum for more
     * details on this field. For example:
     * - "project:&lt;project-id or project-number&gt;"
     * - "folder:&lt;folder-id&gt;"
     * - "organization:&lt;organization-id&gt;"
     * </pre>
     *
     * <code>string subject = 4;</code>
     *
     * @return The bytes for subject.
     */
    public com.google.protobuf.ByteString getSubjectBytes() {
      java.lang.Object ref = subject_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        subject_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Subject to whom this error applies. See the specific code enum for more
     * details on this field. For example:
     * - "project:&lt;project-id or project-number&gt;"
     * - "folder:&lt;folder-id&gt;"
     * - "organization:&lt;organization-id&gt;"
     * </pre>
     *
     * <code>string subject = 4;</code>
     *
     * @param value The subject to set.
     * @return This builder for chaining.
     */
    public Builder setSubject(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      subject_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Subject to whom this error applies. See the specific code enum for more
     * details on this field. For example:
     * - "project:&lt;project-id or project-number&gt;"
     * - "folder:&lt;folder-id&gt;"
     * - "organization:&lt;organization-id&gt;"
     * </pre>
     *
     * <code>string subject = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearSubject() {
      subject_ = getDefaultInstance().getSubject();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Subject to whom this error applies. See the specific code enum for more
     * details on this field. For example:
     * - "project:&lt;project-id or project-number&gt;"
     * - "folder:&lt;folder-id&gt;"
     * - "organization:&lt;organization-id&gt;"
     * </pre>
     *
     * <code>string subject = 4;</code>
     *
     * @param value The bytes for subject to set.
     * @return This builder for chaining.
     */
    public Builder setSubjectBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      subject_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }

    private java.lang.Object detail_ = "";
    /**
     *
     *
     * <pre>
     * Free-form text providing details on the error cause of the error.
     * </pre>
     *
     * <code>string detail = 2;</code>
     *
     * @return The detail.
     */
    public java.lang.String getDetail() {
      java.lang.Object ref = detail_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        detail_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Free-form text providing details on the error cause of the error.
     * </pre>
     *
     * <code>string detail = 2;</code>
     *
     * @return The bytes for detail.
     */
    public com.google.protobuf.ByteString getDetailBytes() {
      java.lang.Object ref = detail_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        detail_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * Free-form text providing details on the error cause of the error.
     * </pre>
     *
     * <code>string detail = 2;</code>
     *
     * @param value The detail to set.
     * @return This builder for chaining.
     */
    public Builder setDetail(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      detail_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Free-form text providing details on the error cause of the error.
     * </pre>
     *
     * <code>string detail = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearDetail() {
      detail_ = getDefaultInstance().getDetail();
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Free-form text providing details on the error cause of the error.
     * </pre>
     *
     * <code>string detail = 2;</code>
     *
     * @param value The bytes for detail to set.
     * @return This builder for chaining.
     */
    public Builder setDetailBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      detail_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }

    private com.google.rpc.Status status_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
        statusBuilder_;
    /**
     *
     *
     * <pre>
     * Contains public information about the check error. If available,
     * `status.code` will be non zero and client can propagate it out as public
     * error.
     * </pre>
     *
     * <code>.google.rpc.Status status = 3;</code>
     *
     * @return Whether the status field is set.
     */
    public boolean hasStatus() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * Contains public information about the check error. If available,
     * `status.code` will be non zero and client can propagate it out as public
     * error.
     * </pre>
     *
     * <code>.google.rpc.Status status = 3;</code>
     *
     * @return The status.
     */
    public com.google.rpc.Status getStatus() {
      if (statusBuilder_ == null) {
        return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
      } else {
        return statusBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Contains public information about the check error. If available,
     * `status.code` will be non zero and client can propagate it out as public
     * error.
     * </pre>
     *
     * <code>.google.rpc.Status status = 3;</code>
     */
    public Builder setStatus(com.google.rpc.Status value) {
      if (statusBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        status_ = value;
      } else {
        statusBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Contains public information about the check error. If available,
     * `status.code` will be non zero and client can propagate it out as public
     * error.
     * </pre>
     *
     * <code>.google.rpc.Status status = 3;</code>
     */
    public Builder setStatus(com.google.rpc.Status.Builder builderForValue) {
      if (statusBuilder_ == null) {
        status_ = builderForValue.build();
      } else {
        statusBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Contains public information about the check error. If available,
     * `status.code` will be non zero and client can propagate it out as public
     * error.
     * </pre>
     *
     * <code>.google.rpc.Status status = 3;</code>
     */
    public Builder mergeStatus(com.google.rpc.Status value) {
      if (statusBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && status_ != null
            && status_ != com.google.rpc.Status.getDefaultInstance()) {
          getStatusBuilder().mergeFrom(value);
        } else {
          status_ = value;
        }
      } else {
        statusBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Contains public information about the check error. If available,
     * `status.code` will be non zero and client can propagate it out as public
     * error.
     * </pre>
     *
     * <code>.google.rpc.Status status = 3;</code>
     */
    public Builder clearStatus() {
      bitField0_ = (bitField0_ & ~0x00000008);
      status_ = null;
      if (statusBuilder_ != null) {
        statusBuilder_.dispose();
        statusBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Contains public information about the check error. If available,
     * `status.code` will be non zero and client can propagate it out as public
     * error.
     * </pre>
     *
     * <code>.google.rpc.Status status = 3;</code>
     */
    public com.google.rpc.Status.Builder getStatusBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getStatusFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Contains public information about the check error. If available,
     * `status.code` will be non zero and client can propagate it out as public
     * error.
     * </pre>
     *
     * <code>.google.rpc.Status status = 3;</code>
     */
    public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
      if (statusBuilder_ != null) {
        return statusBuilder_.getMessageOrBuilder();
      } else {
        return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
      }
    }
    /**
     *
     *
     * <pre>
     * Contains public information about the check error. If available,
     * `status.code` will be non zero and client can propagate it out as public
     * error.
     * </pre>
     *
     * <code>.google.rpc.Status status = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
        getStatusFieldBuilder() {
      if (statusBuilder_ == null) {
        statusBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.rpc.Status,
                com.google.rpc.Status.Builder,
                com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean());
        status_ = null;
      }
      return statusBuilder_;
    }

    @java.lang.Override
    public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }

    // @@protoc_insertion_point(builder_scope:google.api.servicecontrol.v1.CheckError)
  }

  // @@protoc_insertion_point(class_scope:google.api.servicecontrol.v1.CheckError)
  private static final com.google.api.servicecontrol.v1.CheckError DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.api.servicecontrol.v1.CheckError();
  }

  public static com.google.api.servicecontrol.v1.CheckError getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<CheckError> PARSER =
      new com.google.protobuf.AbstractParser<CheckError>() {
        @java.lang.Override
        public CheckError 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<CheckError> parser() {
    return PARSER;
  }

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

  @java.lang.Override
  public com.google.api.servicecontrol.v1.CheckError getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
