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 MarginSecuritiesCommon {

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

        private static volatile MarginChartData[] _emptyArray;

        private int bitField0_;

        private int date_;

        private long value_;

        public MarginChartData() {
            clear();
        }

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

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

        public MarginChartData clear() {
            this.bitField0_ = 0;
            this.date_ = 0;
            this.value_ = 0;
            this.cachedSize = -1;
            return this;
        }

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

        public MarginChartData clearValue() {
            this.value_ = 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) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeInt64Size(2, this.value_);
            }
            return computeSerializedSize;
        }

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

        public long getValue() {
            return this.value_;
        }

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

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

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

        public MarginChartData setValue(long j10) {
            this.value_ = j10;
            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.writeInt64(2, this.value_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public MarginChartData 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.value_ = codedInputByteBufferNano.readInt64();
                    this.bitField0_ |= 2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }

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

        private static volatile MarginTrendChart[] _emptyArray;

        private int bitField0_;

        public MarginChartData[] chartData;

        private int dataType_;

        public MarginTrendChart() {
            clear();
        }

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

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

        public MarginTrendChart clear() {
            this.bitField0_ = 0;
            this.dataType_ = 0;
            this.chartData = MarginChartData.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        public MarginTrendChart clearDataType() {
            this.dataType_ = 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.dataType_);
            }
            MarginChartData[] marginChartDataArr = this.chartData;
            if (marginChartDataArr != null && marginChartDataArr.length > 0) {
                int i10 = 0;
                while (true) {
                    MarginChartData[] marginChartDataArr2 = this.chartData;
                    if (i10 >= marginChartDataArr2.length) {
                        break;
                    }
                    MarginChartData marginChartData = marginChartDataArr2[i10];
                    if (marginChartData != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, marginChartData);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public int getDataType() {
            return this.dataType_;
        }

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

        public MarginTrendChart setDataType(int i10) {
            this.dataType_ = i10;
            this.bitField0_ |= 1;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeUInt32(1, this.dataType_);
            }
            MarginChartData[] marginChartDataArr = this.chartData;
            if (marginChartDataArr != null && marginChartDataArr.length > 0) {
                int i10 = 0;
                while (true) {
                    MarginChartData[] marginChartDataArr2 = this.chartData;
                    if (i10 >= marginChartDataArr2.length) {
                        break;
                    }
                    MarginChartData marginChartData = marginChartDataArr2[i10];
                    if (marginChartData != null) {
                        codedOutputByteBufferNano.writeMessage(2, marginChartData);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public MarginTrendChart mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 8) {
                    this.dataType_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 1;
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    MarginChartData[] marginChartDataArr = this.chartData;
                    int length = marginChartDataArr == null ? 0 : marginChartDataArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    MarginChartData[] marginChartDataArr2 = new MarginChartData[i10];
                    if (length != 0) {
                        System.arraycopy(marginChartDataArr, 0, marginChartDataArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        MarginChartData marginChartData = new MarginChartData();
                        marginChartDataArr2[length] = marginChartData;
                        codedInputByteBufferNano.readMessage(marginChartData);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    MarginChartData marginChartData2 = new MarginChartData();
                    marginChartDataArr2[length] = marginChartData2;
                    codedInputByteBufferNano.readMessage(marginChartData2);
                    this.chartData = marginChartDataArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }

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

        private static volatile StockInfo[] _emptyArray;

        private int bitField0_;

        private long category_;

        private String code_;

        private int exchange_;

        private int id_;

        private String name_;

        private int session_;

        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.code_ = "";
            this.name_ = "";
            this.exchange_ = 0;
            this.category_ = 0;
            this.session_ = 0;
            this.cachedSize = -1;
            return this;
        }

        public StockInfo clearCategory() {
            this.category_ = 0;
            this.bitField0_ &= -17;
            return this;
        }

        public StockInfo clearCode() {
            this.code_ = "";
            this.bitField0_ &= -3;
            return this;
        }

        public StockInfo clearExchange() {
            this.exchange_ = 0;
            this.bitField0_ &= -9;
            return this;
        }

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

        public StockInfo clearName() {
            this.name_ = "";
            this.bitField0_ &= -5;
            return this;
        }

        public StockInfo clearSession() {
            this.session_ = 0;
            this.bitField0_ &= -33;
            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) {
                computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(2, this.code_);
            }
            if ((this.bitField0_ & 4) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(3, this.name_);
            }
            if ((this.bitField0_ & 8) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(4, this.exchange_);
            }
            if ((this.bitField0_ & 16) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt64Size(5, this.category_);
            }
            if ((this.bitField0_ & 32) != 0) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeUInt32Size(6, this.session_);
            }
            return computeSerializedSize;
        }

        public long getCategory() {
            return this.category_;
        }

        public String getCode() {
            return this.code_;
        }

        public int getExchange() {
            return this.exchange_;
        }

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

        public String getName() {
            return this.name_;
        }

        public int getSession() {
            return this.session_;
        }

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

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

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

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

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

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

        public StockInfo setCategory(long j10) {
            this.category_ = j10;
            this.bitField0_ |= 16;
            return this;
        }

        public StockInfo setCode(String str) {
            str.getClass();
            this.code_ = str;
            this.bitField0_ |= 2;
            return this;
        }

        public StockInfo setExchange(int i10) {
            this.exchange_ = i10;
            this.bitField0_ |= 8;
            return this;
        }

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

        public StockInfo setName(String str) {
            str.getClass();
            this.name_ = str;
            this.bitField0_ |= 4;
            return this;
        }

        public StockInfo setSession(int i10) {
            this.session_ = i10;
            this.bitField0_ |= 32;
            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.writeString(2, this.code_);
            }
            if ((this.bitField0_ & 4) != 0) {
                codedOutputByteBufferNano.writeString(3, this.name_);
            }
            if ((this.bitField0_ & 8) != 0) {
                codedOutputByteBufferNano.writeUInt32(4, this.exchange_);
            }
            if ((this.bitField0_ & 16) != 0) {
                codedOutputByteBufferNano.writeUInt64(5, this.category_);
            }
            if ((this.bitField0_ & 32) != 0) {
                codedOutputByteBufferNano.writeUInt32(6, this.session_);
            }
            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 == 18) {
                    this.code_ = codedInputByteBufferNano.readString();
                    this.bitField0_ |= 2;
                } else if (readTag == 26) {
                    this.name_ = codedInputByteBufferNano.readString();
                    this.bitField0_ |= 4;
                } else if (readTag == 32) {
                    this.exchange_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 8;
                } else if (readTag == 40) {
                    this.category_ = codedInputByteBufferNano.readUInt64();
                    this.bitField0_ |= 16;
                } else if (readTag == 48) {
                    this.session_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 32;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
