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

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

        private static volatile CandleStickWithIndex_Request[] _emptyArray;

        public CandleStickRequest.CandleStick_Request candleRequest;

        public IndexInfo[] indexRequest;

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

            private static volatile IndexInfo[] _emptyArray;

            private int bitField0_;

            private String indexName_;

            public Map<String, String> indexParam;

            public IndexInfo() {
                clear();
            }

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

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

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

            public IndexInfo 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) {
                    return computeSerializedSize + InternalNano.computeMapFieldSize(map, 2, 9, 9);
                }
                return computeSerializedSize;
            }

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

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

            public IndexInfo 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);
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public IndexInfo 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 (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public CandleStickWithIndex_Request() {
            clear();
        }

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

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

        public CandleStickWithIndex_Request clear() {
            this.candleRequest = null;
            this.indexRequest = IndexInfo.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            CandleStickRequest.CandleStick_Request candleStick_Request = this.candleRequest;
            if (candleStick_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, candleStick_Request);
            }
            IndexInfo[] indexInfoArr = this.indexRequest;
            if (indexInfoArr != null && indexInfoArr.length > 0) {
                int i10 = 0;
                while (true) {
                    IndexInfo[] indexInfoArr2 = this.indexRequest;
                    if (i10 >= indexInfoArr2.length) {
                        break;
                    }
                    IndexInfo indexInfo = indexInfoArr2[i10];
                    if (indexInfo != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, indexInfo);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            CandleStickRequest.CandleStick_Request candleStick_Request = this.candleRequest;
            if (candleStick_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, candleStick_Request);
            }
            IndexInfo[] indexInfoArr = this.indexRequest;
            if (indexInfoArr != null && indexInfoArr.length > 0) {
                int i10 = 0;
                while (true) {
                    IndexInfo[] indexInfoArr2 = this.indexRequest;
                    if (i10 >= indexInfoArr2.length) {
                        break;
                    }
                    IndexInfo indexInfo = indexInfoArr2[i10];
                    if (indexInfo != null) {
                        codedOutputByteBufferNano.writeMessage(2, indexInfo);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public CandleStickWithIndex_Request mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.candleRequest == null) {
                        this.candleRequest = new CandleStickRequest.CandleStick_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.candleRequest);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    IndexInfo[] indexInfoArr = this.indexRequest;
                    int length = indexInfoArr == null ? 0 : indexInfoArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    IndexInfo[] indexInfoArr2 = new IndexInfo[i10];
                    if (length != 0) {
                        System.arraycopy(indexInfoArr, 0, indexInfoArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        IndexInfo indexInfo = new IndexInfo();
                        indexInfoArr2[length] = indexInfo;
                        codedInputByteBufferNano.readMessage(indexInfo);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    IndexInfo indexInfo2 = new IndexInfo();
                    indexInfoArr2[length] = indexInfo2;
                    codedInputByteBufferNano.readMessage(indexInfo2);
                    this.indexRequest = indexInfoArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
