// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1beta1/avro.proto

package com.google.cloud.bigquery.storage.v1beta1;

public final class AvroProto {
  private AvroProto() {}

  public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}

  public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
  }

  public interface AvroSchemaOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.AvroSchema)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Json serialized schema, as described at
     * https://avro.apache.org/docs/1.8.1/spec.html
     * </pre>
     *
     * <code>string schema = 1;</code>
     */
    java.lang.String getSchema();
    /**
     *
     *
     * <pre>
     * Json serialized schema, as described at
     * https://avro.apache.org/docs/1.8.1/spec.html
     * </pre>
     *
     * <code>string schema = 1;</code>
     */
    com.google.protobuf.ByteString getSchemaBytes();
  }
  /**
   *
   *
   * <pre>
   * Avro schema.
   * </pre>
   *
   * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.AvroSchema}
   */
  public static final class AvroSchema extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.AvroSchema)
      AvroSchemaOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use AvroSchema.newBuilder() to construct.
    private AvroSchema(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private AvroSchema() {
      schema_ = "";
    }

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

    private AvroSchema(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                java.lang.String s = input.readStringRequireUtf8();

                schema_ = s;
                break;
              }
            default:
              {
                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.bigquery.storage.v1beta1.AvroProto
          .internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.bigquery.storage.v1beta1.AvroProto
          .internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.class,
              com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.Builder.class);
    }

    public static final int SCHEMA_FIELD_NUMBER = 1;
    private volatile java.lang.Object schema_;
    /**
     *
     *
     * <pre>
     * Json serialized schema, as described at
     * https://avro.apache.org/docs/1.8.1/spec.html
     * </pre>
     *
     * <code>string schema = 1;</code>
     */
    public java.lang.String getSchema() {
      java.lang.Object ref = schema_;
      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();
        schema_ = s;
        return s;
      }
    }
    /**
     *
     *
     * <pre>
     * Json serialized schema, as described at
     * https://avro.apache.org/docs/1.8.1/spec.html
     * </pre>
     *
     * <code>string schema = 1;</code>
     */
    public com.google.protobuf.ByteString getSchemaBytes() {
      java.lang.Object ref = schema_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        schema_ = 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 (!getSchemaBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, schema_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!getSchemaBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, schema_);
      }
      size += unknownFields.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.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema)) {
        return super.equals(obj);
      }
      com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema other =
          (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) obj;

      if (!getSchema().equals(other.getSchema())) return false;
      if (!unknownFields.equals(other.unknownFields)) 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) + SCHEMA_FIELD_NUMBER;
      hash = (53 * hash) + getSchema().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema 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.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema 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.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema 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.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema 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.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema 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>
     * Avro schema.
     * </pre>
     *
     * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.AvroSchema}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.AvroSchema)
        com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchemaOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.bigquery.storage.v1beta1.AvroProto
            .internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.bigquery.storage.v1beta1.AvroProto
            .internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.class,
                com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.Builder.class);
      }

      // Construct using com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        schema_ = "";

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.bigquery.storage.v1beta1.AvroProto
            .internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema
          getDefaultInstanceForType() {
        return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema build() {
        com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema buildPartial() {
        com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema result =
            new com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema(this);
        result.schema_ = schema_;
        onBuilt();
        return result;
      }

      @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.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) {
          return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(
          com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema other) {
        if (other
            == com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema.getDefaultInstance())
          return this;
        if (!other.getSchema().isEmpty()) {
          schema_ = other.schema_;
          onChanged();
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage =
              (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema)
                  e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object schema_ = "";
      /**
       *
       *
       * <pre>
       * Json serialized schema, as described at
       * https://avro.apache.org/docs/1.8.1/spec.html
       * </pre>
       *
       * <code>string schema = 1;</code>
       */
      public java.lang.String getSchema() {
        java.lang.Object ref = schema_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          schema_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Json serialized schema, as described at
       * https://avro.apache.org/docs/1.8.1/spec.html
       * </pre>
       *
       * <code>string schema = 1;</code>
       */
      public com.google.protobuf.ByteString getSchemaBytes() {
        java.lang.Object ref = schema_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b =
              com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
          schema_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       *
       *
       * <pre>
       * Json serialized schema, as described at
       * https://avro.apache.org/docs/1.8.1/spec.html
       * </pre>
       *
       * <code>string schema = 1;</code>
       */
      public Builder setSchema(java.lang.String value) {
        if (value == null) {
          throw new NullPointerException();
        }

        schema_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Json serialized schema, as described at
       * https://avro.apache.org/docs/1.8.1/spec.html
       * </pre>
       *
       * <code>string schema = 1;</code>
       */
      public Builder clearSchema() {

        schema_ = getDefaultInstance().getSchema();
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Json serialized schema, as described at
       * https://avro.apache.org/docs/1.8.1/spec.html
       * </pre>
       *
       * <code>string schema = 1;</code>
       */
      public Builder setSchemaBytes(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }
        checkByteStringIsUtf8(value);

        schema_ = value;
        onChanged();
        return this;
      }

      @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.cloud.bigquery.storage.v1beta1.AvroSchema)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.AvroSchema)
    private static final com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema();
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<AvroSchema> PARSER =
        new com.google.protobuf.AbstractParser<AvroSchema>() {
          @java.lang.Override
          public AvroSchema parsePartialFrom(
              com.google.protobuf.CodedInputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
            return new AvroSchema(input, extensionRegistry);
          }
        };

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

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

    @java.lang.Override
    public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroSchema
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  public interface AvroRowsOrBuilder
      extends
      // @@protoc_insertion_point(interface_extends:google.cloud.bigquery.storage.v1beta1.AvroRows)
      com.google.protobuf.MessageOrBuilder {

    /**
     *
     *
     * <pre>
     * Binary serialized rows in a block.
     * </pre>
     *
     * <code>bytes serialized_binary_rows = 1;</code>
     */
    com.google.protobuf.ByteString getSerializedBinaryRows();

    /**
     *
     *
     * <pre>
     * The count of rows in the returning block.
     * </pre>
     *
     * <code>int64 row_count = 2;</code>
     */
    long getRowCount();
  }
  /**
   *
   *
   * <pre>
   * Avro rows.
   * </pre>
   *
   * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.AvroRows}
   */
  public static final class AvroRows extends com.google.protobuf.GeneratedMessageV3
      implements
      // @@protoc_insertion_point(message_implements:google.cloud.bigquery.storage.v1beta1.AvroRows)
      AvroRowsOrBuilder {
    private static final long serialVersionUID = 0L;
    // Use AvroRows.newBuilder() to construct.
    private AvroRows(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }

    private AvroRows() {
      serializedBinaryRows_ = com.google.protobuf.ByteString.EMPTY;
    }

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

    private AvroRows(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      int mutable_bitField0_ = 0;
      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10:
              {
                serializedBinaryRows_ = input.readBytes();
                break;
              }
            case 16:
              {
                rowCount_ = input.readInt64();
                break;
              }
            default:
              {
                if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                  done = true;
                }
                break;
              }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
      } finally {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }

    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.bigquery.storage.v1beta1.AvroProto
          .internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.bigquery.storage.v1beta1.AvroProto
          .internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.class,
              com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.Builder.class);
    }

    public static final int SERIALIZED_BINARY_ROWS_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString serializedBinaryRows_;
    /**
     *
     *
     * <pre>
     * Binary serialized rows in a block.
     * </pre>
     *
     * <code>bytes serialized_binary_rows = 1;</code>
     */
    public com.google.protobuf.ByteString getSerializedBinaryRows() {
      return serializedBinaryRows_;
    }

    public static final int ROW_COUNT_FIELD_NUMBER = 2;
    private long rowCount_;
    /**
     *
     *
     * <pre>
     * The count of rows in the returning block.
     * </pre>
     *
     * <code>int64 row_count = 2;</code>
     */
    public long getRowCount() {
      return rowCount_;
    }

    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 (!serializedBinaryRows_.isEmpty()) {
        output.writeBytes(1, serializedBinaryRows_);
      }
      if (rowCount_ != 0L) {
        output.writeInt64(2, rowCount_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!serializedBinaryRows_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, serializedBinaryRows_);
      }
      if (rowCount_ != 0L) {
        size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, rowCount_);
      }
      size += unknownFields.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.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows)) {
        return super.equals(obj);
      }
      com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows other =
          (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) obj;

      if (!getSerializedBinaryRows().equals(other.getSerializedBinaryRows())) return false;
      if (getRowCount() != other.getRowCount()) return false;
      if (!unknownFields.equals(other.unknownFields)) 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) + SERIALIZED_BINARY_ROWS_FIELD_NUMBER;
      hash = (53 * hash) + getSerializedBinaryRows().hashCode();
      hash = (37 * hash) + ROW_COUNT_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRowCount());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parseFrom(
        java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parseFrom(
        java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows 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.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parseFrom(
        byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parseFrom(
        byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parseFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows 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.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parseDelimitedFrom(
        java.io.InputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows 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.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parseFrom(
        com.google.protobuf.CodedInputStream input) throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows 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.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows 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>
     * Avro rows.
     * </pre>
     *
     * Protobuf type {@code google.cloud.bigquery.storage.v1beta1.AvroRows}
     */
    public static final class Builder
        extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
        implements
        // @@protoc_insertion_point(builder_implements:google.cloud.bigquery.storage.v1beta1.AvroRows)
        com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRowsOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
        return com.google.cloud.bigquery.storage.v1beta1.AvroProto
            .internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.cloud.bigquery.storage.v1beta1.AvroProto
            .internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.class,
                com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.Builder.class);
      }

      // Construct using com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }

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

      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
      }

      @java.lang.Override
      public Builder clear() {
        super.clear();
        serializedBinaryRows_ = com.google.protobuf.ByteString.EMPTY;

        rowCount_ = 0L;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
        return com.google.cloud.bigquery.storage.v1beta1.AvroProto
            .internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor;
      }

      @java.lang.Override
      public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows
          getDefaultInstanceForType() {
        return com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance();
      }

      @java.lang.Override
      public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows build() {
        com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows buildPartial() {
        com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows result =
            new com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows(this);
        result.serializedBinaryRows_ = serializedBinaryRows_;
        result.rowCount_ = rowCount_;
        onBuilt();
        return result;
      }

      @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.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) {
          return mergeFrom((com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows) other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows other) {
        if (other
            == com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows.getDefaultInstance())
          return this;
        if (other.getSerializedBinaryRows() != com.google.protobuf.ByteString.EMPTY) {
          setSerializedBinaryRows(other.getSerializedBinaryRows());
        }
        if (other.getRowCount() != 0L) {
          setRowCount(other.getRowCount());
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage =
              (com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows)
                  e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private com.google.protobuf.ByteString serializedBinaryRows_ =
          com.google.protobuf.ByteString.EMPTY;
      /**
       *
       *
       * <pre>
       * Binary serialized rows in a block.
       * </pre>
       *
       * <code>bytes serialized_binary_rows = 1;</code>
       */
      public com.google.protobuf.ByteString getSerializedBinaryRows() {
        return serializedBinaryRows_;
      }
      /**
       *
       *
       * <pre>
       * Binary serialized rows in a block.
       * </pre>
       *
       * <code>bytes serialized_binary_rows = 1;</code>
       */
      public Builder setSerializedBinaryRows(com.google.protobuf.ByteString value) {
        if (value == null) {
          throw new NullPointerException();
        }

        serializedBinaryRows_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * Binary serialized rows in a block.
       * </pre>
       *
       * <code>bytes serialized_binary_rows = 1;</code>
       */
      public Builder clearSerializedBinaryRows() {

        serializedBinaryRows_ = getDefaultInstance().getSerializedBinaryRows();
        onChanged();
        return this;
      }

      private long rowCount_;
      /**
       *
       *
       * <pre>
       * The count of rows in the returning block.
       * </pre>
       *
       * <code>int64 row_count = 2;</code>
       */
      public long getRowCount() {
        return rowCount_;
      }
      /**
       *
       *
       * <pre>
       * The count of rows in the returning block.
       * </pre>
       *
       * <code>int64 row_count = 2;</code>
       */
      public Builder setRowCount(long value) {

        rowCount_ = value;
        onChanged();
        return this;
      }
      /**
       *
       *
       * <pre>
       * The count of rows in the returning block.
       * </pre>
       *
       * <code>int64 row_count = 2;</code>
       */
      public Builder clearRowCount() {

        rowCount_ = 0L;
        onChanged();
        return this;
      }

      @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.cloud.bigquery.storage.v1beta1.AvroRows)
    }

    // @@protoc_insertion_point(class_scope:google.cloud.bigquery.storage.v1beta1.AvroRows)
    private static final com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows
        DEFAULT_INSTANCE;

    static {
      DEFAULT_INSTANCE = new com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows();
    }

    public static com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows
        getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<AvroRows> PARSER =
        new com.google.protobuf.AbstractParser<AvroRows>() {
          @java.lang.Override
          public AvroRows parsePartialFrom(
              com.google.protobuf.CodedInputStream input,
              com.google.protobuf.ExtensionRegistryLite extensionRegistry)
              throws com.google.protobuf.InvalidProtocolBufferException {
            return new AvroRows(input, extensionRegistry);
          }
        };

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

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

    @java.lang.Override
    public com.google.cloud.bigquery.storage.v1beta1.AvroProto.AvroRows
        getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  }

  private static final com.google.protobuf.Descriptors.Descriptor
      internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor;
  private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_fieldAccessorTable;
  private static final com.google.protobuf.Descriptors.Descriptor
      internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor;
  private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
    return descriptor;
  }

  private static com.google.protobuf.Descriptors.FileDescriptor descriptor;

  static {
    java.lang.String[] descriptorData = {
      "\n0google/cloud/bigquery/storage/v1beta1/"
          + "avro.proto\022%google.cloud.bigquery.storag"
          + "e.v1beta1\"\034\n\nAvroSchema\022\016\n\006schema\030\001 \001(\t\""
          + "=\n\010AvroRows\022\036\n\026serialized_binary_rows\030\001 "
          + "\001(\014\022\021\n\trow_count\030\002 \001(\003B\204\001\n)com.google.cl"
          + "oud.bigquery.storage.v1beta1B\tAvroProtoZ"
          + "Lgoogle.golang.org/genproto/googleapis/c"
          + "loud/bigquery/storage/v1beta1;storageb\006p"
          + "roto3"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
        new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
              com.google.protobuf.Descriptors.FileDescriptor root) {
            descriptor = root;
            return null;
          }
        };
    com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
        descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] {}, assigner);
    internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor =
        getDescriptor().getMessageTypes().get(0);
    internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_fieldAccessorTable =
        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
            internal_static_google_cloud_bigquery_storage_v1beta1_AvroSchema_descriptor,
            new java.lang.String[] {
              "Schema",
            });
    internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor =
        getDescriptor().getMessageTypes().get(1);
    internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_fieldAccessorTable =
        new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
            internal_static_google_cloud_bigquery_storage_v1beta1_AvroRows_descriptor,
            new java.lang.String[] {
              "SerializedBinaryRows", "RowCount",
            });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
