package nano;

import com.google.protobuf.nano.CodedInputByteBufferNano;
import com.google.protobuf.nano.CodedOutputByteBufferNano;
import com.google.protobuf.nano.InternalNano;
import com.google.protobuf.nano.InvalidProtocolBufferNanoException;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;

/* compiled from: TbsSdkJava */
public interface CodeListExtensionUpdateResponse {

    /* compiled from: TbsSdkJava */
    public static final class CodeListExtensionUpdate_Response extends MessageNano {

        private static volatile CodeListExtensionUpdate_Response[] _emptyArray;

        private int bitField0_;

        private long finalVersion_;

        private int remainSize_;

        public CodeListExtension[] updateList;

        /* compiled from: TbsSdkJava */
        public static final class CodeListExtension extends MessageNano {

            private static volatile CodeListExtension[] _emptyArray;

            private int bitField0_;

            private int flag_;

            private String formerName_;

            private int stockCode_;

            private long version_;

            public CodeListExtension() {
                clear();
            }

            public static CodeListExtension[] emptyArray() {
                if (_emptyArray == null) {
                    synchronized (InternalNano.LAZY_INIT_LOCK) {
                        try {
                            if (_emptyArray == null) {
                                _emptyArray = new CodeListExtension[0];
                            }
                        } catch (Throwable th) {
                            throw th;
                        }
                    }
                }
                return _emptyArray;
            }

            public static CodeListExtension parseFrom(byte[] bArr) throws InvalidProtocolBufferNanoException {
                return (CodeListExtension) MessageNano.mergeFrom(new CodeListExtension(), bArr);
            }

            public CodeListExtension clear() {
                this.bitField0_ = 0;
                this.stockCode_ = 0;
                this.formerName_ = "";
                this.flag_ = 0;
                this.version_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public CodeListExtension clearFlag() {
                this.flag_ = 0;
                this.bitField0_ &= -5;
                return this;
            }

            public CodeListExtension clearFormerName() {
                this.formerName_ = "";
                this.bitField0_ &= -3;
                return this;
            }

            public CodeListExtension clearStockCode() {
                this.stockCode_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            public CodeListExtension clearVersion() {
                this.version_ = 0;
                this.bitField0_ &= -9;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.stockCode_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(2, this.formerName_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeSInt32Size(3, this.flag_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt64Size(4, this.version_);
                }
                return computeSerializedSize;
            }

            public int getFlag() {
                return this.flag_;
            }

            public String getFormerName() {
                return this.formerName_;
            }

            public int getStockCode() {
                return this.stockCode_;
            }

            public long getVersion() {
                return this.version_;
            }

            public boolean hasFlag() {
                if ((this.bitField0_ & 4) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasFormerName() {
                if ((this.bitField0_ & 2) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasStockCode() {
                if ((this.bitField0_ & 1) != 0) {
                    return true;
                }
                return false;
            }

            public boolean hasVersion() {
                if ((this.bitField0_ & 8) != 0) {
                    return true;
                }
                return false;
            }

            public CodeListExtension setFlag(int i10) {
                this.flag_ = i10;
                this.bitField0_ |= 4;
                return this;
            }

            public CodeListExtension setFormerName(String str) {
                str.getClass();
                this.formerName_ = str;
                this.bitField0_ |= 2;
                return this;
            }

            public CodeListExtension setStockCode(int i10) {
                this.stockCode_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public CodeListExtension setVersion(long j10) {
                this.version_ = j10;
                this.bitField0_ |= 8;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.stockCode_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeString(2, this.formerName_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeSInt32(3, this.flag_);
                }
                if ((this.bitField0_ & 8) != 0) {
                    codedOutputByteBufferNano.writeUInt64(4, this.version_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

            public static CodeListExtension parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                return new CodeListExtension().mergeFrom(codedInputByteBufferNano);
            }

            public CodeListExtension mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.stockCode_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 18) {
                        this.formerName_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        this.flag_ = codedInputByteBufferNano.readSInt32();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        this.version_ = codedInputByteBufferNano.readUInt64();
                        this.bitField0_ |= 8;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public CodeListExtensionUpdate_Response() {
            clear();
        }

        public static CodeListExtensionUpdate_Response[] emptyArray() {
            if (_emptyArray == null) {
                synchronized (InternalNano.LAZY_INIT_LOCK) {
                    try {
                        if (_emptyArray == null) {
                            _emptyArray = new CodeListExtensionUpdate_Response[0];
                        }
                    } catch (Throwable th) {
                        throw th;
                    }
                }
            }
            return _emptyArray;
        }

        public static CodeListExtensionUpdate_Response parseFrom(byte[] bArr) throws InvalidProtocolBufferNanoException {
            return (CodeListExtensionUpdate_Response) MessageNano.mergeFrom(new CodeListExtensionUpdate_Response(), bArr);
        }

        public CodeListExtensionUpdate_Response clear() {
            this.bitField0_ = 0;
            this.updateList = CodeListExtension.emptyArray();
            this.finalVersion_ = 0;
            this.remainSize_ = 0;
            this.cachedSize = -1;
            return this;
        }

        public CodeListExtensionUpdate_Response clearFinalVersion() {
            this.finalVersion_ = 0;
            this.bitField0_ &= -2;
            return this;
        }

        public CodeListExtensionUpdate_Response clearRemainSize() {
            this.remainSize_ = 0;
            this.bitField0_ &= -3;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            CodeListExtension[] codeListExtensionArr = this.updateList;
            if (codeListExtensionArr != null && codeListExtensionArr.length > 0) {
                int i10 = 0;
                while (true) {
                    CodeListExtension[] codeListExtensionArr2 = this.updateList;
                    if (i10 >= codeListExtensionArr2.length) {
                        break;
                    }
                    CodeListExtension codeListExtension = codeListExtensionArr2[i10];
                    if (codeListExtension != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, codeListExtension);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(2, this.finalVersion_);
            }
            if ((this.bitField0_ & 2) != 0) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(3, this.remainSize_);
            }
            return computeSerializedSize;
        }

        public long getFinalVersion() {
            return this.finalVersion_;
        }

        public int getRemainSize() {
            return this.remainSize_;
        }

        public boolean hasFinalVersion() {
            if ((this.bitField0_ & 1) != 0) {
                return true;
            }
            return false;
        }

        public boolean hasRemainSize() {
            if ((this.bitField0_ & 2) != 0) {
                return true;
            }
            return false;
        }

        public CodeListExtensionUpdate_Response setFinalVersion(long j10) {
            this.finalVersion_ = j10;
            this.bitField0_ |= 1;
            return this;
        }

        public CodeListExtensionUpdate_Response setRemainSize(int i10) {
            this.remainSize_ = i10;
            this.bitField0_ |= 2;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            CodeListExtension[] codeListExtensionArr = this.updateList;
            if (codeListExtensionArr != null && codeListExtensionArr.length > 0) {
                int i10 = 0;
                while (true) {
                    CodeListExtension[] codeListExtensionArr2 = this.updateList;
                    if (i10 >= codeListExtensionArr2.length) {
                        break;
                    }
                    CodeListExtension codeListExtension = codeListExtensionArr2[i10];
                    if (codeListExtension != null) {
                        codedOutputByteBufferNano.writeMessage(1, codeListExtension);
                    }
                    i10++;
                }
            }
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeUInt64(2, this.finalVersion_);
            }
            if ((this.bitField0_ & 2) != 0) {
                codedOutputByteBufferNano.writeUInt32(3, this.remainSize_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

        public static CodeListExtensionUpdate_Response parseFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            return new CodeListExtensionUpdate_Response().mergeFrom(codedInputByteBufferNano);
        }

        public CodeListExtensionUpdate_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 10);
                    CodeListExtension[] codeListExtensionArr = this.updateList;
                    int length = codeListExtensionArr == null ? 0 : codeListExtensionArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    CodeListExtension[] codeListExtensionArr2 = new CodeListExtension[i10];
                    if (length != 0) {
                        System.arraycopy(codeListExtensionArr, 0, codeListExtensionArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        CodeListExtension codeListExtension = new CodeListExtension();
                        codeListExtensionArr2[length] = codeListExtension;
                        codedInputByteBufferNano.readMessage(codeListExtension);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    CodeListExtension codeListExtension2 = new CodeListExtension();
                    codeListExtensionArr2[length] = codeListExtension2;
                    codedInputByteBufferNano.readMessage(codeListExtension2);
                    this.updateList = codeListExtensionArr2;
                } else if (readTag == 16) {
                    this.finalVersion_ = codedInputByteBufferNano.readUInt64();
                    this.bitField0_ |= 1;
                } else if (readTag == 24) {
                    this.remainSize_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
