The field is in the given set of values

@param field  The field to compare
@param values The value to compare to
@return the query
350186
public static Query in(String field, Collection<?> values) {
        return new Query().in(field, values);
    }
989507
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case INPUTS:
      return is_set_inputs();
    case STREAMS:
      return is_set_streams();
    case PARALLELISM_HINT:
      return is_set_parallelism_hint();
    case JSON_CONF:
      return is_set_json_conf();
    }
    throw new IllegalStateException();
  }
347282
public static Query is(String field, Object value) {
        return new Query().is(field, value);
    }
11480
public function whereIn($field, $values)
    {
        foreach ($this->queries as $query) {
            $query->whereIn($field, $values);
        }

        return $this;
    }
334773
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case COLUMN:
      return isSetColumn();
    case SUPER_COLUMN:
      return isSetSuper_column();
    case COUNTER_COLUMN:
      return isSetCounter_column();
    case COUNTER_SUPER_COLUMN:
      return isSetCounter_super_column();
    }
    throw new IllegalStateException();
  }
510364
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case TYPE:
      return isSetType();
    case ROWS:
      return isSetRows();
    case NUM:
      return isSetNum();
    case SCHEMA:
      return isSetSchema();
    }
    throw new IllegalStateException();
  }
1230634
public R setFields(String... fields) {
        if (fields.length == 1 && fields[0] == null){
            mQueryMap.remove(QUERY_FIELDS);
            return (R) this;
        }
        if (fields.length > 0) {
            StringBuilder sb = new StringBuilder();
            sb.append(fields[0]);
            for (int i = 1; i < fields.length; ++i) {
                sb.append(String.format(Locale.ENGLISH, ",%s", fields[i]));
            }
            mQueryMap.put(QUERY_FIELDS, sb.toString());
        }

        return (R) this;
    }
1032538
public static Query notIn(String field, Object... values) {
        return new Query().notIn(field, values);
    }
346553
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case QUALIFIERS:
      return isSetQualifiers();
    }
    throw new IllegalStateException();
  }
915035
public static Query withStrings(String field, String[] values, boolean caseInsensitive) {
        if (caseInsensitive) {
            List<Query> regexList = new ArrayList<Query>();
            for (String value : values) {
                regexList.add(withString(field, value, true));
            }
            return Query.or(regexList);
        } else {
            return Query.withValues(field, Query.in, Literal.values(values));
        }
    }
725876
public Page<FieldValueList> list(Schema schema, String field) {
    // [START ]
    Page<FieldValueList> page = table.list(schema);
    for (FieldValueList row : page.iterateAll()) {
      row.get(field);
    }
    // [END ]
    return page;
  }
1002757
public WebQuery eq(final String field, final Object... values)
	{
		if (values == null)
		{
			add(WQConstraint.eq(field, null));
		}
		else if (values.length == 1)
		{
			add(WQConstraint.eq(field, values[0]));
		}
		else if (values.length > 1)
		{
			final WQGroup or = or();

			for (Object value : values)
				or.eq(field, value);
		}

		return this;
	}


	/**
	 * Assert that a field equals one of the provided values. Implicitly creates a new OR group if multiple values are supplied.
	 * At least one value must be supplied.
	 *
	 * @param field
	 * @param values
	 *
	 * @return
	 */
	public WebQuery eq(final String field, final Collection<?> values)
	{
		if (values == null)
			throw new IllegalArgumentException("Must supply at least one value to .eq when passing a Collection");
		else if (values.size() == 0)
			return eq(field, values.stream().findFirst().get());
		else
		{
			final WQGroup or = or();

			for (Object value : values)
				or.eq(field, value);

			return this;
		}
	}


	public WebQuery neq(final String field, final Object value)
	{
		return add(WQConstraint.neq(field, value));
	}


	public WebQuery isNull(final String field)
	{
		return add(WQConstraint.isNull(field));
	}


	public WebQuery isNotNull(final String field)
	{
		return add(WQConstraint.isNotNull(field));
	}


	public WebQuery lt(final String field, final Object value)
	{
		return add(WQConstraint.lt(field, value));
	}


	public WebQuery le(final String field, final Object value)
	{
		return add(WQConstraint.le(field, value));
	}


	public WebQuery gt(final String field, final Object value)
	{
		return add(WQConstraint.gt(field, value));
	}


	public WebQuery ge(final String field, final Object value)
	{
		return add(WQConstraint.ge(field, value));
	}


	public WebQuery contains(final String field, final Object value)
	{
		return add(WQConstraint.contains(field, value));
	}


	public WebQuery startsWith(final String field, final Object value)
	{
		return add(WQConstraint.startsWith(field, value));
	}


	public WebQuery range(final String field, final Object from, final Object to)
	{
		return add(WQConstraint.range(field, from, to));
	}


	public WebQuery eqRef(final String field, final String field2)
	{
		return add(WQConstraint.eqRef(field, field2));
	}


	public WebQuery neqRef(final String field, final String field2)
	{
		return add(WQConstraint.neqRef(field, field2));
	}


	public WebQuery leRef(final String field, final String field2)
	{
		return add(WQConstraint.leRef(field, field2));
	}


	public WebQuery ltRef(final String field, final String field2)
	{
		return add(WQConstraint.ltRef(field, field2));
	}


	public WebQuery geRef(final String field, final String field2)
	{
		return add(WQConstraint.geRef(field, field2));
	}


	public WebQuery gtRef(final String field, final String field2)
	{
		return add(WQConstraint.gtRef(field, field2));
	}


	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Sub-groups
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


	/**
	 * Construct a new AND group and return it for method chaining
	 *
	 * @return
	 */
	public WQGroup and()
	{
		final WQGroup and = WQGroup.newAnd();

		add(and);

		return and;
	}


	/**
	 * Construct a new OR group and return it for method chaining
	 *
	 * @return
	 */
	public WQGroup or()
	{
		final WQGroup or = WQGroup.newOr();

		add(or);

		return or;
	}


	/**
	 * Construct a new AND group, using the supplier to add the constraints to the group. Returns the original {@link WebQuery}
	 * for method chaining
	 *
	 * @param consumer
	 *
	 * @return
	 */
	public WebQuery and(Consumer<WQGroup> consumer)
	{
		final WQGroup and = and();

		// Let the consumer build their sub-constraints
		if (consumer != null)
			consumer.accept(and);

		return this;
	}


	/**
	 * Construct a new OR group, using the supplier to add the constraints to the group. Returns the original {@link WebQuery}
	 * for
	 * method chaining
	 *
	 * @param consumer
	 *
	 * @return
	 */
	public WebQuery or(Consumer<WQGroup> consumer)
	{
		final WQGroup or = or();


		// Let the consumer build their sub-constraints
		if (consumer != null)
			consumer.accept(or);

		return this;
	}

	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Decoding URI Query
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


	/**
	 * Overwrite any fields in this WebQuery using the query defined in the Query String of the provided UriInfo
	 *
	 * @param qs
	 * 		the UriInfo to extract the QueryParameters from
	 *
	 * @return this WebQuery for chaining
	 */
	public WebQuery decode(UriInfo qs)
	{
		return decode(qs.getQueryParameters());
	}


	/**
	 * Overwrite any fields in this WebQuery using the query defined in the provided map
	 *
	 * @param map
	 * 		a map of fields (or control fields) to encoded constraints
	 *
	 * @return this WebQuery for chaining
	 */
	public WebQuery decode(Map<String, List<String>> map)
	{
		WebQuery def = new WebQuery();

		// incoming queries from a map get a default limit set
		def.limit(QUERY_STRING_DEFAULT_LIMIT);

		boolean hasConstraints = false;

		for (Map.Entry<String, List<String>> entry : map.entrySet())
		{
			if (entry.getKey().charAt(0) == '_')
			{
				final WQUriControlField specialField = WQUriControlField.getByName(entry.getKey());

				switch (specialField)
				{
					case OFFSET:
						def.offset(Integer.valueOf(entry.getValue().get(0)));
						break;
					case LIMIT:
						def.limit(Integer.valueOf(entry.getValue().get(0)));
						break;
					case CLASS:
						def.subclass(entry.getValue().toArray(new String[entry.getValue().size()]));
						break;
					case COMPUTE_SIZE:
						def.computeSize(parseBoolean(entry.getValue().get(0)));
						break;
					case LOG_SQL:
						def.logSQL(parseBoolean(entry.getValue().get(0)));
						break;
					case LOG_PERFORMANCE:
						def.logPerformance(parseBoolean(entry.getValue().get(0)));
						break;
					case EXPAND:
						def.expand(entry.getValue().toArray(new String[entry.getValue().size()]));
						break;
					case ORDER:
						def.orderings = entry.getValue().stream().map(WQOrder:: parseLegacy).collect(Collectors.toList());
						break;
					case FETCH:
						// Ordinarily we'd expect a single value here, but allow for multiple values to be provided as a comma-separated list
						def.fetch = entry.getValue().stream().collect(Collectors.joining(","));
						break;
					case DBFETCH:
						def.dbfetch = entry.getValue().stream().collect(Collectors.joining(","));
						break;
					case NAME:
						def.name(entry.getValue().get(0));
						break;
					default:
						throw new IllegalArgumentException("Unknown query field: " +
						                                   specialField +
						                                   " expected one of " +
						                                   WQUriControlField.getAllNames());
				}
			}
			else
			{
				// If this is the first constraint, clear any pre-defined default constraints
				if (!hasConstraints)
				{
					def.constraints.constraints = new ArrayList<>();

					hasConstraints = true;
				}

				if (entry.getValue().size() == 1)
				{
					def.constraints.constraints.add(WQConstraint.decode(entry.getKey(), entry.getValue().get(0)));
				}
				else if (entry.getValue().size() > 0)
				{
					WQGroup group = new WQGroup();

					group.operator = WQGroupType.OR;

					group.constraints = entry
							                    .getValue()
							                    .stream()
							                    .map(value -> WQConstraint.decode(entry.getKey(), value))
							                    .collect(Collectors.toList());

					def.constraints.constraints.add(group);
				}
			}
		}


		return def;
	}


	private static boolean parseBoolean(String value)
	{
		if (StringUtils.equalsIgnoreCase(value, "true") ||
		    StringUtils.equalsIgnoreCase(value, "yes") ||
		    StringUtils.equalsIgnoreCase(value, "on"))
			return true;
		else if (StringUtils.equalsIgnoreCase(value, "false") ||
		         StringUtils.equalsIgnoreCase(value, "no") ||
		         StringUtils.equalsIgnoreCase(value, "off"))
			return false;
		else
			throw new IllegalArgumentException("Cannot parse boolean: " + value);
	}


	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	// Decoding URI Query
	//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


	/**
	 * Encode this query to the equivalent (where possible) URI web query
	 *
	 * @return
	 */
	public Map<String, List<String>> encode()
	{
		return WebQueryToQueryStringConverter.convert(this);
	}
}
35858
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case NAME:
      return isSetName();
    case VALIDATION_CLASS:
      return isSetValidation_class();
    case INDEX_TYPE:
      return isSetIndex_type();
    case INDEX_NAME:
      return isSetIndex_name();
    case INDEX_OPTIONS:
      return isSetIndex_options();
    }
    throw new IllegalStateException();
  }
297799
public Set<Machine> list(String field, String value) {
        return this.list(null, field, value);
    }
1206571
public static Builder pushAll(String field, Object... values) {
        return new Builder().pushAll(field, values);
    }
1246521
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case COL_VALS:
      return isSetColVals();
    }
    throw new IllegalStateException();
  }
1191805
public boolean isSet(_Fields field) {
    if (field == null) {
      throw new IllegalArgumentException();
    }

    switch (field) {
    case CREDS:
      return is_set_creds();
    }
    throw new IllegalStateException();
  }