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;
import nano.GetAllRecordRequest;

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

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

        private static volatile GetAllRecord_Response[] _emptyArray;

        public GetAllRecordRequest.GetAllRecord_Request input;

        public RecordPreview[] output;

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

            private static volatile RecordPreview[] _emptyArray;

            private int bitField0_;

            private long id_;

            private int stock_;

            private long time_;

            public RecordPreview() {
                clear();
            }

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

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

            public RecordPreview clear() {
                this.bitField0_ = 0;
                this.id_ = 0;
                this.stock_ = 0;
                this.time_ = 0;
                this.cachedSize = -1;
                return this;
            }

            public RecordPreview clearId() {
                this.id_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            public RecordPreview clearStock() {
                this.stock_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public RecordPreview clearTime() {
                this.time_ = 0;
                this.bitField0_ &= -5;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(1, this.id_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.stock_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeUInt64Size(3, this.time_);
                }
                return computeSerializedSize;
            }

            public long getId() {
                return this.id_;
            }

            public int getStock() {
                return this.stock_;
            }

            public long getTime() {
                return this.time_;
            }

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

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

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

            public RecordPreview setId(long j10) {
                this.id_ = j10;
                this.bitField0_ |= 1;
                return this;
            }

            public RecordPreview setStock(int i10) {
                this.stock_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public RecordPreview setTime(long j10) {
                this.time_ = j10;
                this.bitField0_ |= 4;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt64(1, this.id_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.stock_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeUInt64(3, this.time_);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public RecordPreview mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.id_ = codedInputByteBufferNano.readUInt64();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.stock_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        this.time_ = codedInputByteBufferNano.readUInt64();
                        this.bitField0_ |= 4;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public GetAllRecord_Response() {
            clear();
        }

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

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

        public GetAllRecord_Response clear() {
            this.input = null;
            this.output = RecordPreview.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            GetAllRecordRequest.GetAllRecord_Request getAllRecord_Request = this.input;
            if (getAllRecord_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, getAllRecord_Request);
            }
            RecordPreview[] recordPreviewArr = this.output;
            if (recordPreviewArr != null && recordPreviewArr.length > 0) {
                int i10 = 0;
                while (true) {
                    RecordPreview[] recordPreviewArr2 = this.output;
                    if (i10 >= recordPreviewArr2.length) {
                        break;
                    }
                    RecordPreview recordPreview = recordPreviewArr2[i10];
                    if (recordPreview != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, recordPreview);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            GetAllRecordRequest.GetAllRecord_Request getAllRecord_Request = this.input;
            if (getAllRecord_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, getAllRecord_Request);
            }
            RecordPreview[] recordPreviewArr = this.output;
            if (recordPreviewArr != null && recordPreviewArr.length > 0) {
                int i10 = 0;
                while (true) {
                    RecordPreview[] recordPreviewArr2 = this.output;
                    if (i10 >= recordPreviewArr2.length) {
                        break;
                    }
                    RecordPreview recordPreview = recordPreviewArr2[i10];
                    if (recordPreview != null) {
                        codedOutputByteBufferNano.writeMessage(2, recordPreview);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public GetAllRecord_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.input == null) {
                        this.input = new GetAllRecordRequest.GetAllRecord_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.input);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    RecordPreview[] recordPreviewArr = this.output;
                    int length = recordPreviewArr == null ? 0 : recordPreviewArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    RecordPreview[] recordPreviewArr2 = new RecordPreview[i10];
                    if (length != 0) {
                        System.arraycopy(recordPreviewArr, 0, recordPreviewArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        RecordPreview recordPreview = new RecordPreview();
                        recordPreviewArr2[length] = recordPreview;
                        codedInputByteBufferNano.readMessage(recordPreview);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    RecordPreview recordPreview2 = new RecordPreview();
                    recordPreviewArr2[length] = recordPreview2;
                    codedInputByteBufferNano.readMessage(recordPreview2);
                    this.output = recordPreviewArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
