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.MapFactories;
import com.google.protobuf.nano.MessageNano;
import com.google.protobuf.nano.WireFormatNano;
import java.io.IOException;
import java.util.Map;
import nano.CandleStickRequest;

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

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

        private static volatile IndexCalc_Request[] _emptyArray;

        private int bitField0_;

        private String indexName_;

        public Map<String, String> indexParam;

        public CandleStickRequest.CandleStick_Request indexSource;

        public IndexCalc_Request() {
            clear();
        }

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

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

        public IndexCalc_Request clear() {
            this.bitField0_ = 0;
            this.indexName_ = "";
            this.indexParam = null;
            this.indexSource = null;
            this.cachedSize = -1;
            return this;
        }

        public IndexCalc_Request clearIndexName() {
            this.indexName_ = "";
            this.bitField0_ &= -2;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            if ((this.bitField0_ & 1) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(1, this.indexName_);
            }
            Map<String, String> map = this.indexParam;
            if (map != null) {
                computeSerializedSize += InternalNano.computeMapFieldSize(map, 2, 9, 9);
            }
            CandleStickRequest.CandleStick_Request candleStick_Request = this.indexSource;
            if (candleStick_Request != null) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeMessageSize(3, candleStick_Request);
            }
            return computeSerializedSize;
        }

        public String getIndexName() {
            return this.indexName_;
        }

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

        public IndexCalc_Request setIndexName(String str) {
            str.getClass();
            this.indexName_ = str;
            this.bitField0_ |= 1;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeString(1, this.indexName_);
            }
            Map<String, String> map = this.indexParam;
            if (map != null) {
                InternalNano.serializeMapField(codedOutputByteBufferNano, map, 2, 9, 9);
            }
            CandleStickRequest.CandleStick_Request candleStick_Request = this.indexSource;
            if (candleStick_Request != null) {
                codedOutputByteBufferNano.writeMessage(3, candleStick_Request);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public IndexCalc_Request mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            MapFactories.MapFactory mapFactory = MapFactories.getMapFactory();
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    this.indexName_ = codedInputByteBufferNano.readString();
                    this.bitField0_ |= 1;
                } else if (readTag == 18) {
                    this.indexParam = InternalNano.mergeMapEntry(codedInputByteBufferNano, this.indexParam, mapFactory, 9, 9, null, 10, 18);
                } else if (readTag == 26) {
                    if (this.indexSource == null) {
                        this.indexSource = new CandleStickRequest.CandleStick_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.indexSource);
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
