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.DownloadReferalGoodsInfoRequest;

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

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

        private static volatile DownloadReferalGoodsInfo_Response[] _emptyArray;

        public DownloadReferalGoodsInfoRequest.DownloadReferalGoodsInfo_Request input;

        public GoodsInfo output;

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

            private static volatile GoodsInfo[] _emptyArray;

            private int bitField0_;

            private int date_;

            public StockInfo[] stockdata;

            private int time_;

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

                private static volatile StockInfo[] _emptyArray;

                private int bitField0_;

                private int flag_;

                private int id_;

                public StockInfo() {
                    clear();
                }

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

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

                public StockInfo clear() {
                    this.bitField0_ = 0;
                    this.id_ = 0;
                    this.flag_ = 0;
                    this.cachedSize = -1;
                    return this;
                }

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

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

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

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

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

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

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

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

                public StockInfo setId(int i10) {
                    this.id_ = i10;
                    this.bitField0_ |= 1;
                    return this;
                }

                public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                    if ((this.bitField0_ & 1) != 0) {
                        codedOutputByteBufferNano.writeUInt32(1, this.id_);
                    }
                    if ((this.bitField0_ & 2) != 0) {
                        codedOutputByteBufferNano.writeInt32(2, this.flag_);
                    }
                    super.writeTo(codedOutputByteBufferNano);
                }

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

                public StockInfo mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                    while (true) {
                        int readTag = codedInputByteBufferNano.readTag();
                        if (readTag == 0) {
                            return this;
                        }
                        if (readTag == 8) {
                            this.id_ = codedInputByteBufferNano.readUInt32();
                            this.bitField0_ |= 1;
                        } else if (readTag == 16) {
                            this.flag_ = codedInputByteBufferNano.readInt32();
                            this.bitField0_ |= 2;
                        } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                            return this;
                        }
                    }
                }
            }

            public GoodsInfo() {
                clear();
            }

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

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

            public GoodsInfo clear() {
                this.bitField0_ = 0;
                this.date_ = 0;
                this.time_ = 0;
                this.stockdata = StockInfo.emptyArray();
                this.cachedSize = -1;
                return this;
            }

            public GoodsInfo clearDate() {
                this.date_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

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

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(1, this.date_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.time_);
                }
                StockInfo[] stockInfoArr = this.stockdata;
                if (stockInfoArr != null && stockInfoArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        StockInfo[] stockInfoArr2 = this.stockdata;
                        if (i10 >= stockInfoArr2.length) {
                            break;
                        }
                        StockInfo stockInfo = stockInfoArr2[i10];
                        if (stockInfo != null) {
                            computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(3, stockInfo);
                        }
                        i10++;
                    }
                }
                return computeSerializedSize;
            }

            public int getDate() {
                return this.date_;
            }

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

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

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

            public GoodsInfo setDate(int i10) {
                this.date_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

            public GoodsInfo setTime(int i10) {
                this.time_ = i10;
                this.bitField0_ |= 2;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeUInt32(1, this.date_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeUInt32(2, this.time_);
                }
                StockInfo[] stockInfoArr = this.stockdata;
                if (stockInfoArr != null && stockInfoArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        StockInfo[] stockInfoArr2 = this.stockdata;
                        if (i10 >= stockInfoArr2.length) {
                            break;
                        }
                        StockInfo stockInfo = stockInfoArr2[i10];
                        if (stockInfo != null) {
                            codedOutputByteBufferNano.writeMessage(3, stockInfo);
                        }
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public GoodsInfo mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.date_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 16) {
                        this.time_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 2;
                    } else if (readTag == 26) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 26);
                        StockInfo[] stockInfoArr = this.stockdata;
                        int length = stockInfoArr == null ? 0 : stockInfoArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        StockInfo[] stockInfoArr2 = new StockInfo[i10];
                        if (length != 0) {
                            System.arraycopy(stockInfoArr, 0, stockInfoArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            StockInfo stockInfo = new StockInfo();
                            stockInfoArr2[length] = stockInfo;
                            codedInputByteBufferNano.readMessage(stockInfo);
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        StockInfo stockInfo2 = new StockInfo();
                        stockInfoArr2[length] = stockInfo2;
                        codedInputByteBufferNano.readMessage(stockInfo2);
                        this.stockdata = stockInfoArr2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public DownloadReferalGoodsInfo_Response() {
            clear();
        }

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

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

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

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            DownloadReferalGoodsInfoRequest.DownloadReferalGoodsInfo_Request downloadReferalGoodsInfo_Request = this.input;
            if (downloadReferalGoodsInfo_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, downloadReferalGoodsInfo_Request);
            }
            GoodsInfo goodsInfo = this.output;
            if (goodsInfo != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(2, goodsInfo);
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            DownloadReferalGoodsInfoRequest.DownloadReferalGoodsInfo_Request downloadReferalGoodsInfo_Request = this.input;
            if (downloadReferalGoodsInfo_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, downloadReferalGoodsInfo_Request);
            }
            GoodsInfo goodsInfo = this.output;
            if (goodsInfo != null) {
                codedOutputByteBufferNano.writeMessage(2, goodsInfo);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public DownloadReferalGoodsInfo_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 DownloadReferalGoodsInfoRequest.DownloadReferalGoodsInfo_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.input);
                } else if (readTag == 18) {
                    if (this.output == null) {
                        this.output = new GoodsInfo();
                    }
                    codedInputByteBufferNano.readMessage(this.output);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
