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

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

        public static final int NAME_CODE_FIELD_NUMBER = 5;

        public static final int WITH_CODE_FIELD_NUMBER = 3;

        private static volatile UpdownStatistic_Request[] _emptyArray;

        private int bitField0_;

        private int codeTypeCase_ = 0;

        private Object codeType_;

        public String[] detailName;

        private String templateName_;

        private int tradeDate_;

        public UpdownStatistic_Request() {
            clear();
        }

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

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

        public UpdownStatistic_Request clear() {
            this.bitField0_ = 0;
            this.templateName_ = "";
            this.tradeDate_ = 0;
            this.detailName = WireFormatNano.EMPTY_STRING_ARRAY;
            clearCodeType();
            this.cachedSize = -1;
            return this;
        }

        public UpdownStatistic_Request clearCodeType() {
            this.codeTypeCase_ = 0;
            this.codeType_ = null;
            return this;
        }

        public UpdownStatistic_Request clearTemplateName() {
            this.templateName_ = "";
            this.bitField0_ &= -2;
            return this;
        }

        public UpdownStatistic_Request clearTradeDate() {
            this.tradeDate_ = 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.computeStringSize(1, this.templateName_);
            }
            if ((this.bitField0_ & 2) != 0) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(2, this.tradeDate_);
            }
            if (this.codeTypeCase_ == 3) {
                computeSerializedSize += CodedOutputByteBufferNano.computeUInt32Size(3, ((Integer) this.codeType_).intValue());
            }
            String[] strArr = this.detailName;
            if (strArr != null && strArr.length > 0) {
                int i10 = 0;
                int i11 = 0;
                int i12 = 0;
                while (true) {
                    String[] strArr2 = this.detailName;
                    if (i10 >= strArr2.length) {
                        break;
                    }
                    String str = strArr2[i10];
                    if (str != null) {
                        i12++;
                        i11 += CodedOutputByteBufferNano.computeStringSizeNoTag(str);
                    }
                    i10++;
                }
                computeSerializedSize = computeSerializedSize + i11 + i12;
            }
            if (this.codeTypeCase_ == 5) {
                return computeSerializedSize + CodedOutputByteBufferNano.computeStringSize(5, (String) this.codeType_);
            }
            return computeSerializedSize;
        }

        public int getCodeTypeCase() {
            return this.codeTypeCase_;
        }

        public String getNameCode() {
            if (this.codeTypeCase_ == 5) {
                return (String) this.codeType_;
            }
            return "";
        }

        public String getTemplateName() {
            return this.templateName_;
        }

        public int getTradeDate() {
            return this.tradeDate_;
        }

        public int getWithCode() {
            if (this.codeTypeCase_ == 3) {
                return ((Integer) this.codeType_).intValue();
            }
            return 0;
        }

        public boolean hasNameCode() {
            if (this.codeTypeCase_ == 5) {
                return true;
            }
            return false;
        }

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

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

        public boolean hasWithCode() {
            if (this.codeTypeCase_ == 3) {
                return true;
            }
            return false;
        }

        public UpdownStatistic_Request setNameCode(String str) {
            this.codeTypeCase_ = 5;
            this.codeType_ = str;
            return this;
        }

        public UpdownStatistic_Request setTemplateName(String str) {
            str.getClass();
            this.templateName_ = str;
            this.bitField0_ |= 1;
            return this;
        }

        public UpdownStatistic_Request setTradeDate(int i10) {
            this.tradeDate_ = i10;
            this.bitField0_ |= 2;
            return this;
        }

        public UpdownStatistic_Request setWithCode(int i10) {
            this.codeTypeCase_ = 3;
            this.codeType_ = Integer.valueOf(i10);
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            if ((this.bitField0_ & 1) != 0) {
                codedOutputByteBufferNano.writeString(1, this.templateName_);
            }
            if ((this.bitField0_ & 2) != 0) {
                codedOutputByteBufferNano.writeUInt32(2, this.tradeDate_);
            }
            if (this.codeTypeCase_ == 3) {
                codedOutputByteBufferNano.writeUInt32(3, ((Integer) this.codeType_).intValue());
            }
            String[] strArr = this.detailName;
            if (strArr != null && strArr.length > 0) {
                int i10 = 0;
                while (true) {
                    String[] strArr2 = this.detailName;
                    if (i10 >= strArr2.length) {
                        break;
                    }
                    String str = strArr2[i10];
                    if (str != null) {
                        codedOutputByteBufferNano.writeString(4, str);
                    }
                    i10++;
                }
            }
            if (this.codeTypeCase_ == 5) {
                codedOutputByteBufferNano.writeString(5, (String) this.codeType_);
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public UpdownStatistic_Request mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    this.templateName_ = codedInputByteBufferNano.readString();
                    this.bitField0_ |= 1;
                } else if (readTag == 16) {
                    this.tradeDate_ = codedInputByteBufferNano.readUInt32();
                    this.bitField0_ |= 2;
                } else if (readTag == 24) {
                    this.codeType_ = Integer.valueOf(codedInputByteBufferNano.readUInt32());
                    this.codeTypeCase_ = 3;
                } else if (readTag == 34) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 34);
                    String[] strArr = this.detailName;
                    int length = strArr == null ? 0 : strArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    String[] strArr2 = new String[i10];
                    if (length != 0) {
                        System.arraycopy(strArr, 0, strArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        strArr2[length] = codedInputByteBufferNano.readString();
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    strArr2[length] = codedInputByteBufferNano.readString();
                    this.detailName = strArr2;
                } else if (readTag == 42) {
                    this.codeType_ = codedInputByteBufferNano.readString();
                    this.codeTypeCase_ = 5;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
