// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: compiler/ir/serialization.common/src/KotlinIr.proto

package org.jetbrains.kotlin.backend.common.serialization.proto;

/**
 * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature}
 */
public final class FileWrappedIdSignature extends
    org.jetbrains.kotlin.protobuf.GeneratedMessageLite implements
    // @@protoc_insertion_point(message_implements:org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature)
    FileWrappedIdSignatureOrBuilder {
  public static final int DELEGATE_FIELD_NUMBER = 1;
  public static final int FILE_FIELD_NUMBER = 2;
  private static final FileWrappedIdSignature defaultInstance;
  private static final long serialVersionUID = 0L;
  public static org.jetbrains.kotlin.protobuf.Parser<FileWrappedIdSignature> PARSER =
      new org.jetbrains.kotlin.protobuf.AbstractParser<FileWrappedIdSignature>() {
    public FileWrappedIdSignature parsePartialFrom(
        org.jetbrains.kotlin.protobuf.CodedInputStream input,
        org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
        throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
      return new FileWrappedIdSignature(input, extensionRegistry);
    }
  };

  static {
    defaultInstance = new FileWrappedIdSignature(true);
    defaultInstance.initFields();
  }

  private final org.jetbrains.kotlin.protobuf.ByteString unknownFields;
  private int bitField0_;
  private org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate_;
  private int file_;
  private byte memoizedIsInitialized = -1;
  private int memoizedSerializedSize = -1;
  // Use FileWrappedIdSignature.newBuilder() to construct.
  private FileWrappedIdSignature(org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder builder) {
    super(builder);
    this.unknownFields = builder.getUnknownFields();
  }
  private FileWrappedIdSignature(boolean noInit) { this.unknownFields = org.jetbrains.kotlin.protobuf.ByteString.EMPTY;}

  private FileWrappedIdSignature(
      org.jetbrains.kotlin.protobuf.CodedInputStream input,
      org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
      throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
    initFields();
    int mutable_bitField0_ = 0;
    org.jetbrains.kotlin.protobuf.ByteString.Output unknownFieldsOutput =
        org.jetbrains.kotlin.protobuf.ByteString.newOutput();
    org.jetbrains.kotlin.protobuf.CodedOutputStream unknownFieldsCodedOutput =
        org.jetbrains.kotlin.protobuf.CodedOutputStream.newInstance(
            unknownFieldsOutput, 1);
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!parseUnknownField(input, unknownFieldsCodedOutput,
                                   extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.Builder subBuilder = null;
            if (((bitField0_ & 0x00000001) == 0x00000001)) {
              subBuilder = delegate_.toBuilder();
            }
            delegate_ = input.readMessage(org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.PARSER, extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(delegate_);
              delegate_ = subBuilder.buildPartial();
            }
            bitField0_ |= 0x00000001;
            break;
          }
          case 16: {
            bitField0_ |= 0x00000002;
            file_ = input.readInt32();
            break;
          }
        }
      }
    } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException(
          e.getMessage()).setUnfinishedMessage(this);
    } finally {
      try {
        unknownFieldsCodedOutput.flush();
      } catch (java.io.IOException e) {
      // Should not happen
      } finally {
        unknownFields = unknownFieldsOutput.toByteString();
      }
      makeExtensionsImmutable();
    }
  }

  public static FileWrappedIdSignature getDefaultInstance() {
    return defaultInstance;
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseFrom(
      org.jetbrains.kotlin.protobuf.ByteString data)
      throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseFrom(
      org.jetbrains.kotlin.protobuf.ByteString data,
      org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
      throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseFrom(byte[] data)
      throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseFrom(
      byte[] data,
      org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
      throws org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return PARSER.parseFrom(input);
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseFrom(
      java.io.InputStream input,
      org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return PARSER.parseFrom(input, extensionRegistry);
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return PARSER.parseDelimitedFrom(input);
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseDelimitedFrom(
      java.io.InputStream input,
      org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return PARSER.parseDelimitedFrom(input, extensionRegistry);
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseFrom(
      org.jetbrains.kotlin.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return PARSER.parseFrom(input);
  }

  public static org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parseFrom(
      org.jetbrains.kotlin.protobuf.CodedInputStream input,
      org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return PARSER.parseFrom(input, extensionRegistry);
  }

  public static Builder newBuilder() { return Builder.create(); }

  public static Builder newBuilder(org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature prototype) {
    return newBuilder().mergeFrom(prototype);
  }

  public FileWrappedIdSignature getDefaultInstanceForType() {
    return defaultInstance;
  }

  @java.lang.Override
  public org.jetbrains.kotlin.protobuf.Parser<FileWrappedIdSignature> getParserForType() {
    return PARSER;
  }

  /**
   * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate = 1;</code>
   */
  public boolean hasDelegate() {
    return ((bitField0_ & 0x00000001) == 0x00000001);
  }

  /**
   * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate = 1;</code>
   */
  public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getDelegate() {
    return delegate_;
  }

  /**
   * <code>required int32 file = 2;</code>
   */
  public boolean hasFile() {
    return ((bitField0_ & 0x00000002) == 0x00000002);
  }

  /**
   * <code>required int32 file = 2;</code>
   */
  public int getFile() {
    return file_;
  }

  private void initFields() {
    delegate_ = org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.getDefaultInstance();
    file_ = 0;
  }

  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    if (!hasDelegate()) {
      memoizedIsInitialized = 0;
      return false;
    }
    if (!hasFile()) {
      memoizedIsInitialized = 0;
      return false;
    }
    if (!getDelegate().isInitialized()) {
      memoizedIsInitialized = 0;
      return false;
    }
    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(org.jetbrains.kotlin.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    getSerializedSize();
    if (((bitField0_ & 0x00000001) == 0x00000001)) {
      output.writeMessage(1, delegate_);
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      output.writeInt32(2, file_);
    }
    output.writeRawBytes(unknownFields);
  }

  public int getSerializedSize() {
    int size = memoizedSerializedSize;
    if (size != -1) return size;

    size = 0;
    if (((bitField0_ & 0x00000001) == 0x00000001)) {
      size += org.jetbrains.kotlin.protobuf.CodedOutputStream
        .computeMessageSize(1, delegate_);
    }
    if (((bitField0_ & 0x00000002) == 0x00000002)) {
      size += org.jetbrains.kotlin.protobuf.CodedOutputStream
        .computeInt32Size(2, file_);
    }
    size += unknownFields.size();
    memoizedSerializedSize = size;
    return size;
  }

  @java.lang.Override
  protected java.lang.Object writeReplace()
      throws java.io.ObjectStreamException {
    return super.writeReplace();
  }

  public Builder newBuilderForType() { return newBuilder(); }

  public Builder toBuilder() { return newBuilder(this); }

  /**
   * Protobuf type {@code org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature}
   */
  public static final class Builder extends
      org.jetbrains.kotlin.protobuf.GeneratedMessageLite.Builder<
        org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature, Builder>
      implements
      // @@protoc_insertion_point(builder_implements:org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature)
      org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignatureOrBuilder {
    private int bitField0_;
    private org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate_ = org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.getDefaultInstance();
    private int file_ ;

    // Construct using org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private static Builder create() {
      return new Builder();
    }

    private void maybeForceBuilderInitialization() {
    }

    public Builder clear() {
      super.clear();
      delegate_ = org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.getDefaultInstance();
      bitField0_ = (bitField0_ & ~0x00000001);
      file_ = 0;
      bitField0_ = (bitField0_ & ~0x00000002);
      return this;
    }

    public Builder clone() {
      return create().mergeFrom(buildPartial());
    }

    public org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature getDefaultInstanceForType() {
      return org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature.getDefaultInstance();
    }

    public org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature build() {
      org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature buildPartial() {
      org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature result = new org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
        to_bitField0_ |= 0x00000001;
      }
      result.delegate_ = delegate_;
      if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
        to_bitField0_ |= 0x00000002;
      }
      result.file_ = file_;
      result.bitField0_ = to_bitField0_;
      return result;
    }

    public Builder mergeFrom(org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature other) {
      if (other == org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature.getDefaultInstance()) return this;
      if (other.hasDelegate()) {
        mergeDelegate(other.getDelegate());
      }
      if (other.hasFile()) {
        setFile(other.getFile());
      }
      setUnknownFields(
          getUnknownFields().concat(other.unknownFields));
      return this;
    }

    public final boolean isInitialized() {
      if (!hasDelegate()) {

        return false;
      }
      if (!hasFile()) {

        return false;
      }
      if (!getDelegate().isInitialized()) {

        return false;
      }
      return true;
    }

    public Builder mergeFrom(
        org.jetbrains.kotlin.protobuf.CodedInputStream input,
        org.jetbrains.kotlin.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (org.jetbrains.kotlin.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature) e.getUnfinishedMessage();
        throw e;
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    /**
     * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate = 1;</code>
     */
    public boolean hasDelegate() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }

    /**
     * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate = 1;</code>
     */
    public org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature getDelegate() {
      return delegate_;
    }

    /**
     * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate = 1;</code>
     */
    public Builder setDelegate(org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature value) {
      if (value == null) {
        throw new NullPointerException();
      }
      delegate_ = value;

      bitField0_ |= 0x00000001;
      return this;
    }

    /**
     * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate = 1;</code>
     */
    public Builder setDelegate(
        org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.Builder builderForValue) {
      delegate_ = builderForValue.build();

      bitField0_ |= 0x00000001;
      return this;
    }

    /**
     * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate = 1;</code>
     */
    public Builder mergeDelegate(org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature value) {
      if (((bitField0_ & 0x00000001) == 0x00000001) &&
          delegate_ != org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.getDefaultInstance()) {
        delegate_ =
          org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.newBuilder(delegate_).mergeFrom(value).buildPartial();
      } else {
        delegate_ = value;
      }

      bitField0_ |= 0x00000001;
      return this;
    }

    /**
     * <code>required .org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature delegate = 1;</code>
     */
    public Builder clearDelegate() {
      delegate_ = org.jetbrains.kotlin.backend.common.serialization.proto.IdSignature.getDefaultInstance();

      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }

    /**
     * <code>required int32 file = 2;</code>
     */
    public boolean hasFile() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    /**
     * <code>required int32 file = 2;</code>
     */
    public int getFile() {
      return file_;
    }
    /**
     * <code>required int32 file = 2;</code>
     */
    public Builder setFile(int value) {
      bitField0_ |= 0x00000002;
      file_ = value;

      return this;
    }
    /**
     * <code>required int32 file = 2;</code>
     */
    public Builder clearFile() {
      bitField0_ = (bitField0_ & ~0x00000002);
      file_ = 0;

      return this;
    }

    // @@protoc_insertion_point(builder_scope:org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature)
  }

  // @@protoc_insertion_point(class_scope:org.jetbrains.kotlin.backend.common.serialization.proto.FileWrappedIdSignature)
}