package androidx.work; import androidx.work.WorkInfo; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.UUID; /* loaded from: classes2.dex */ public final class WorkQuery { private final List mIds; private final List mStates; private final List mTags; private final List mUniqueWorkNames; public List getIds() { return this.mIds; } public List getStates() { return this.mStates; } public List getTags() { return this.mTags; } public List getUniqueWorkNames() { return this.mUniqueWorkNames; } WorkQuery(Builder builder) { this.mIds = builder.mIds; this.mUniqueWorkNames = builder.mUniqueWorkNames; this.mTags = builder.mTags; this.mStates = builder.mStates; } public static WorkQuery fromIds(List ids) { return Builder.fromIds(ids).build(); } public static WorkQuery fromIds(UUID... ids) { return fromIds((List) Arrays.asList(ids)); } public static WorkQuery fromTags(List tags) { return Builder.fromTags(tags).build(); } public static WorkQuery fromTags(String... tags) { return fromTags((List) Arrays.asList(tags)); } public static WorkQuery fromUniqueWorkNames(String... uniqueWorkNames) { return Builder.fromUniqueWorkNames(Arrays.asList(uniqueWorkNames)).build(); } public static WorkQuery fromUniqueWorkNames(List uniqueWorkNames) { return Builder.fromUniqueWorkNames(uniqueWorkNames).build(); } public static WorkQuery fromStates(List states) { return Builder.fromStates(states).build(); } public static WorkQuery fromStates(WorkInfo.State... states) { return Builder.fromStates(Arrays.asList(states)).build(); } /* loaded from: classes2.dex */ public static final class Builder { List mIds = new ArrayList(); List mUniqueWorkNames = new ArrayList(); List mTags = new ArrayList(); List mStates = new ArrayList(); private Builder() { } public static Builder fromIds(List ids) { Builder builder = new Builder(); builder.addIds(ids); return builder; } public static Builder fromUniqueWorkNames(List uniqueWorkNames) { Builder builder = new Builder(); builder.addUniqueWorkNames(uniqueWorkNames); return builder; } public static Builder fromTags(List tags) { Builder builder = new Builder(); builder.addTags(tags); return builder; } public static Builder fromStates(List states) { Builder builder = new Builder(); builder.addStates(states); return builder; } public Builder addIds(List ids) { this.mIds.addAll(ids); return this; } public Builder addUniqueWorkNames(List uniqueWorkNames) { this.mUniqueWorkNames.addAll(uniqueWorkNames); return this; } public Builder addTags(List tags) { this.mTags.addAll(tags); return this; } public Builder addStates(List states) { this.mStates.addAll(states); return this; } public WorkQuery build() { if (this.mIds.isEmpty() && this.mUniqueWorkNames.isEmpty() && this.mTags.isEmpty() && this.mStates.isEmpty()) { throw new IllegalArgumentException("Must specify ids, uniqueNames, tags or states when building a WorkQuery"); } return new WorkQuery(this); } } }