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

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

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

        private static volatile BlockStockDesc_Response[] _emptyArray;

        public BlockStockDescRequest.BlockStockDesc_Request requestParams;

        public StockDesc[] stockDesc;

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

            private static volatile StockDesc[] _emptyArray;

            private int bitField0_;

            private String desc_;

            private int goodsId_;

            public StockDesc() {
                clear();
            }

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

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

            public StockDesc clear() {
                this.bitField0_ = 0;
                this.goodsId_ = 0;
                this.desc_ = "";
                this.cachedSize = -1;
                return this;
            }

            public StockDesc clearDesc() {
                this.desc_ = "";
                this.bitField0_ &= -3;
                return this;
            }

            public StockDesc clearGoodsId() {
                this.goodsId_ = 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.goodsId_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    return computeSerializedSize + CodedOutputByteBufferNano.computeStringSize(2, this.desc_);
                }
                return computeSerializedSize;
            }

            public String getDesc() {
                return this.desc_;
            }

            public int getGoodsId() {
                return this.goodsId_;
            }

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

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

            public StockDesc setDesc(String str) {
                str.getClass();
                this.desc_ = str;
                this.bitField0_ |= 2;
                return this;
            }

            public StockDesc setGoodsId(int i10) {
                this.goodsId_ = i10;
                this.bitField0_ |= 1;
                return this;
            }

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

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

            public StockDesc mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.goodsId_ = codedInputByteBufferNano.readUInt32();
                        this.bitField0_ |= 1;
                    } else if (readTag == 18) {
                        this.desc_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 2;
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public BlockStockDesc_Response() {
            clear();
        }

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

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

        public BlockStockDesc_Response clear() {
            this.requestParams = null;
            this.stockDesc = StockDesc.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            BlockStockDescRequest.BlockStockDesc_Request blockStockDesc_Request = this.requestParams;
            if (blockStockDesc_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, blockStockDesc_Request);
            }
            StockDesc[] stockDescArr = this.stockDesc;
            if (stockDescArr != null && stockDescArr.length > 0) {
                int i10 = 0;
                while (true) {
                    StockDesc[] stockDescArr2 = this.stockDesc;
                    if (i10 >= stockDescArr2.length) {
                        break;
                    }
                    StockDesc stockDesc2 = stockDescArr2[i10];
                    if (stockDesc2 != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, stockDesc2);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            BlockStockDescRequest.BlockStockDesc_Request blockStockDesc_Request = this.requestParams;
            if (blockStockDesc_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, blockStockDesc_Request);
            }
            StockDesc[] stockDescArr = this.stockDesc;
            if (stockDescArr != null && stockDescArr.length > 0) {
                int i10 = 0;
                while (true) {
                    StockDesc[] stockDescArr2 = this.stockDesc;
                    if (i10 >= stockDescArr2.length) {
                        break;
                    }
                    StockDesc stockDesc2 = stockDescArr2[i10];
                    if (stockDesc2 != null) {
                        codedOutputByteBufferNano.writeMessage(2, stockDesc2);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public BlockStockDesc_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.requestParams == null) {
                        this.requestParams = new BlockStockDescRequest.BlockStockDesc_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.requestParams);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    StockDesc[] stockDescArr = this.stockDesc;
                    int length = stockDescArr == null ? 0 : stockDescArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    StockDesc[] stockDescArr2 = new StockDesc[i10];
                    if (length != 0) {
                        System.arraycopy(stockDescArr, 0, stockDescArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        StockDesc stockDesc2 = new StockDesc();
                        stockDescArr2[length] = stockDesc2;
                        codedInputByteBufferNano.readMessage(stockDesc2);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    StockDesc stockDesc3 = new StockDesc();
                    stockDescArr2[length] = stockDesc3;
                    codedInputByteBufferNano.readMessage(stockDesc3);
                    this.stockDesc = stockDescArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
