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

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

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

        private static volatile GetGroupGoods_Response[] _emptyArray;

        public GetGroupGoodsRequest.GetGroupGoods_Request input;

        public GroupGoods[] output;

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

            private static volatile GroupGoods[] _emptyArray;

            private int bitField0_;

            public int[] codes;

            private long gid_;

            private String md5_;

            private int update_;

            public GroupGoods() {
                clear();
            }

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

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

            public GroupGoods clear() {
                this.bitField0_ = 0;
                this.gid_ = 0;
                this.md5_ = "";
                this.update_ = 0;
                this.codes = WireFormatNano.EMPTY_INT_ARRAY;
                this.cachedSize = -1;
                return this;
            }

            public GroupGoods clearGid() {
                this.gid_ = 0;
                this.bitField0_ &= -2;
                return this;
            }

            public GroupGoods clearMd5() {
                this.md5_ = "";
                this.bitField0_ &= -3;
                return this;
            }

            public GroupGoods clearUpdate() {
                this.update_ = 0;
                this.bitField0_ &= -5;
                return this;
            }

            /* access modifiers changed from: protected */
            public int computeSerializedSize() {
                int computeSerializedSize = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt64Size(1, this.gid_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeStringSize(2, this.md5_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    computeSerializedSize += CodedOutputByteBufferNano.computeInt32Size(3, this.update_);
                }
                int[] iArr = this.codes;
                if (iArr == null || iArr.length <= 0) {
                    return computeSerializedSize;
                }
                int i10 = 0;
                int i11 = 0;
                while (true) {
                    int[] iArr2 = this.codes;
                    if (i10 >= iArr2.length) {
                        return computeSerializedSize + i11 + iArr2.length;
                    }
                    i11 += CodedOutputByteBufferNano.computeUInt32SizeNoTag(iArr2[i10]);
                    i10++;
                }
            }

            public long getGid() {
                return this.gid_;
            }

            public String getMd5() {
                return this.md5_;
            }

            public int getUpdate() {
                return this.update_;
            }

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

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

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

            public GroupGoods setGid(long j10) {
                this.gid_ = j10;
                this.bitField0_ |= 1;
                return this;
            }

            public GroupGoods setMd5(String str) {
                str.getClass();
                this.md5_ = str;
                this.bitField0_ |= 2;
                return this;
            }

            public GroupGoods setUpdate(int i10) {
                this.update_ = i10;
                this.bitField0_ |= 4;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    codedOutputByteBufferNano.writeInt64(1, this.gid_);
                }
                if ((this.bitField0_ & 2) != 0) {
                    codedOutputByteBufferNano.writeString(2, this.md5_);
                }
                if ((this.bitField0_ & 4) != 0) {
                    codedOutputByteBufferNano.writeInt32(3, this.update_);
                }
                int[] iArr = this.codes;
                if (iArr != null && iArr.length > 0) {
                    int i10 = 0;
                    while (true) {
                        int[] iArr2 = this.codes;
                        if (i10 >= iArr2.length) {
                            break;
                        }
                        codedOutputByteBufferNano.writeUInt32(4, iArr2[i10]);
                        i10++;
                    }
                }
                super.writeTo(codedOutputByteBufferNano);
            }

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

            public GroupGoods mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
                while (true) {
                    int readTag = codedInputByteBufferNano.readTag();
                    if (readTag == 0) {
                        return this;
                    }
                    if (readTag == 8) {
                        this.gid_ = codedInputByteBufferNano.readInt64();
                        this.bitField0_ |= 1;
                    } else if (readTag == 18) {
                        this.md5_ = codedInputByteBufferNano.readString();
                        this.bitField0_ |= 2;
                    } else if (readTag == 24) {
                        this.update_ = codedInputByteBufferNano.readInt32();
                        this.bitField0_ |= 4;
                    } else if (readTag == 32) {
                        int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 32);
                        int[] iArr = this.codes;
                        int length = iArr == null ? 0 : iArr.length;
                        int i10 = repeatedFieldArrayLength + length;
                        int[] iArr2 = new int[i10];
                        if (length != 0) {
                            System.arraycopy(iArr, 0, iArr2, 0, length);
                        }
                        while (length < i10 - 1) {
                            iArr2[length] = codedInputByteBufferNano.readUInt32();
                            codedInputByteBufferNano.readTag();
                            length++;
                        }
                        iArr2[length] = codedInputByteBufferNano.readUInt32();
                        this.codes = iArr2;
                    } else if (readTag == 34) {
                        int pushLimit = codedInputByteBufferNano.pushLimit(codedInputByteBufferNano.readRawVarint32());
                        int position = codedInputByteBufferNano.getPosition();
                        int i11 = 0;
                        while (codedInputByteBufferNano.getBytesUntilLimit() > 0) {
                            codedInputByteBufferNano.readUInt32();
                            i11++;
                        }
                        codedInputByteBufferNano.rewindToPosition(position);
                        int[] iArr3 = this.codes;
                        int length2 = iArr3 == null ? 0 : iArr3.length;
                        int i12 = i11 + length2;
                        int[] iArr4 = new int[i12];
                        if (length2 != 0) {
                            System.arraycopy(iArr3, 0, iArr4, 0, length2);
                        }
                        while (length2 < i12) {
                            iArr4[length2] = codedInputByteBufferNano.readUInt32();
                            length2++;
                        }
                        this.codes = iArr4;
                        codedInputByteBufferNano.popLimit(pushLimit);
                    } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                        return this;
                    }
                }
            }
        }

        public GetGroupGoods_Response() {
            clear();
        }

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

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

        public GetGroupGoods_Response clear() {
            this.input = null;
            this.output = GroupGoods.emptyArray();
            this.cachedSize = -1;
            return this;
        }

        /* access modifiers changed from: protected */
        public int computeSerializedSize() {
            int computeSerializedSize = super.computeSerializedSize();
            GetGroupGoodsRequest.GetGroupGoods_Request getGroupGoods_Request = this.input;
            if (getGroupGoods_Request != null) {
                computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(1, getGroupGoods_Request);
            }
            GroupGoods[] groupGoodsArr = this.output;
            if (groupGoodsArr != null && groupGoodsArr.length > 0) {
                int i10 = 0;
                while (true) {
                    GroupGoods[] groupGoodsArr2 = this.output;
                    if (i10 >= groupGoodsArr2.length) {
                        break;
                    }
                    GroupGoods groupGoods = groupGoodsArr2[i10];
                    if (groupGoods != null) {
                        computeSerializedSize += CodedOutputByteBufferNano.computeMessageSize(2, groupGoods);
                    }
                    i10++;
                }
            }
            return computeSerializedSize;
        }

        public void writeTo(CodedOutputByteBufferNano codedOutputByteBufferNano) throws IOException {
            GetGroupGoodsRequest.GetGroupGoods_Request getGroupGoods_Request = this.input;
            if (getGroupGoods_Request != null) {
                codedOutputByteBufferNano.writeMessage(1, getGroupGoods_Request);
            }
            GroupGoods[] groupGoodsArr = this.output;
            if (groupGoodsArr != null && groupGoodsArr.length > 0) {
                int i10 = 0;
                while (true) {
                    GroupGoods[] groupGoodsArr2 = this.output;
                    if (i10 >= groupGoodsArr2.length) {
                        break;
                    }
                    GroupGoods groupGoods = groupGoodsArr2[i10];
                    if (groupGoods != null) {
                        codedOutputByteBufferNano.writeMessage(2, groupGoods);
                    }
                    i10++;
                }
            }
            super.writeTo(codedOutputByteBufferNano);
        }

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

        public GetGroupGoods_Response mergeFrom(CodedInputByteBufferNano codedInputByteBufferNano) throws IOException {
            while (true) {
                int readTag = codedInputByteBufferNano.readTag();
                if (readTag == 0) {
                    return this;
                }
                if (readTag == 10) {
                    if (this.input == null) {
                        this.input = new GetGroupGoodsRequest.GetGroupGoods_Request();
                    }
                    codedInputByteBufferNano.readMessage(this.input);
                } else if (readTag == 18) {
                    int repeatedFieldArrayLength = WireFormatNano.getRepeatedFieldArrayLength(codedInputByteBufferNano, 18);
                    GroupGoods[] groupGoodsArr = this.output;
                    int length = groupGoodsArr == null ? 0 : groupGoodsArr.length;
                    int i10 = repeatedFieldArrayLength + length;
                    GroupGoods[] groupGoodsArr2 = new GroupGoods[i10];
                    if (length != 0) {
                        System.arraycopy(groupGoodsArr, 0, groupGoodsArr2, 0, length);
                    }
                    while (length < i10 - 1) {
                        GroupGoods groupGoods = new GroupGoods();
                        groupGoodsArr2[length] = groupGoods;
                        codedInputByteBufferNano.readMessage(groupGoods);
                        codedInputByteBufferNano.readTag();
                        length++;
                    }
                    GroupGoods groupGoods2 = new GroupGoods();
                    groupGoodsArr2[length] = groupGoods2;
                    codedInputByteBufferNano.readMessage(groupGoods2);
                    this.output = groupGoodsArr2;
                } else if (!WireFormatNano.parseUnknownField(codedInputByteBufferNano, readTag)) {
                    return this;
                }
            }
        }
    }
}
