Copies values from {@code value}, appending to collections, and skipping empty optionals.

@return this {@code Builder} object
13093
public Datatype.Builder mergeFrom(Datatype value) {
    Datatype_Builder defaults = new Datatype.Builder();
    if (defaults._unsetProperties.contains(Property.TYPE)
        || !Objects.equals(value.getType(), defaults.getType())) {
      setType(value.getType());
    }
    if (defaults._unsetProperties.contains(Property.INTERFACE_TYPE)
        || value.isInterfaceType() != defaults.isInterfaceType()) {
      setInterfaceType(value.isInterfaceType());
    }
    if (defaults._unsetProperties.contains(Property.BUILDER)
        || !Objects.equals(value.getBuilder(), defaults.getBuilder())) {
      setBuilder(value.getBuilder());
    }
    if (defaults._unsetProperties.contains(Property.EXTENSIBLE)
        || value.isExtensible() != defaults.isExtensible()) {
      setExtensible(value.isExtensible());
    }
    value.getBuilderFactory().ifPresent(this::setBuilderFactory);
    if (defaults._unsetProperties.contains(Property.GENERATED_BUILDER)
        || !Objects.equals(value.getGeneratedBuilder(), defaults.getGeneratedBuilder())) {
      setGeneratedBuilder(value.getGeneratedBuilder());
    }
    if (defaults._unsetProperties.contains(Property.VALUE_TYPE)
        || !Objects.equals(value.getValueType(), defaults.getValueType())) {
      setValueType(value.getValueType());
    }
    if (defaults._unsetProperties.contains(Property.PARTIAL_TYPE)
        || !Objects.equals(value.getPartialType(), defaults.getPartialType())) {
      setPartialType(value.getPartialType());
    }
    value.getRebuildableType().ifPresent(this::setRebuildableType);
    if (defaults._unsetProperties.contains(Property.PROPERTY_ENUM)
        || !Objects.equals(value.getPropertyEnum(), defaults.getPropertyEnum())) {
      setPropertyEnum(value.getPropertyEnum());
    }
    putAllStandardMethodUnderrides(value.getStandardMethodUnderrides());
    if (defaults._unsetProperties.contains(Property.BUILDER_SERIALIZABLE)
        || value.isBuilderSerializable() != defaults.isBuilderSerializable()) {
      setBuilderSerializable(value.isBuilderSerializable());
    }
    if (defaults._unsetProperties.contains(Property.HAS_TO_BUILDER_METHOD)
        || value.getHasToBuilderMethod() != defaults.getHasToBuilderMethod()) {
      setHasToBuilderMethod(value.getHasToBuilderMethod());
    }
    if (value instanceof Value && generatedBuilderAnnotations == ImmutableList.<Excerpt>of()) {
      generatedBuilderAnnotations = ImmutableList.copyOf(value.getGeneratedBuilderAnnotations());
    } else {
      addAllGeneratedBuilderAnnotations(value.getGeneratedBuilderAnnotations());
    }
    if (value instanceof Value && valueTypeAnnotations == ImmutableList.<Excerpt>of()) {
      valueTypeAnnotations = ImmutableList.copyOf(value.getValueTypeAnnotations());
    } else {
      addAllValueTypeAnnotations(value.getValueTypeAnnotations());
    }
    if (defaults._unsetProperties.contains(Property.VALUE_TYPE_VISIBILITY)
        || !Objects.equals(value.getValueTypeVisibility(), defaults.getValueTypeVisibility())) {
      setValueTypeVisibility(value.getValueTypeVisibility());
    }
    if (value instanceof Value && nestedClasses == ImmutableList.<Excerpt>of()) {
      nestedClasses = ImmutableList.copyOf(value.getNestedClasses());
    } else {
      addAllNestedClasses(value.getNestedClasses());
    }
    return (Datatype.Builder) this;
  }
366847
private static void appendToBuilder(UriComponentsBuilder builder, TemplateVariable variable, @Nullable Object value) {

		if (value == null) {

			if (variable.isRequired()) {
				throw new IllegalArgumentException(
						String.format("Template variable %s is required but no value was given!", variable.getName()));
			}

			return;
		}

		switch (variable.getType()) {
			case COMPOSITE_PARAM:
				appendComposite(builder, variable.getName(), value);
				break;
			case REQUEST_PARAM:
			case REQUEST_PARAM_CONTINUED:
				builder.queryParam(variable.getName(), value);
				break;
			case PATH_VARIABLE:
			case SEGMENT:
				builder.pathSegment(value.toString());
				break;
			case FRAGMENT:
				builder.fragment(value.toString());
				break;
		}
	}
563043
@Override
    @SuppressWarnings("unchecked")
    public ImmutableCollection<V> values() {
        Object[] array = new Object[size];
        int index = 0;
        for (Object object : values) {
            if (object != null) {
                array[index++] = object;
            }
        }
        return ImmutableList.copyOf((V[]) array);
    }
835877
public static Builder pullAll(String field, Object... values) {
        return new Builder().pullAll(field, values);
    }
1206571
public static Builder pushAll(String field, Object... values) {
        return new Builder().pushAll(field, values);
    }
48265
@Override
    public <T extends Composite<S>> T copy() {
        try {
            String fullJSON = fullMapper.writeValueAsString(this);
            @SuppressWarnings("unchecked")
            T copy = (T) fullMapper.readValue(fullJSON, getClass());
            return copy;
        } catch (IOException e) {
            throw new RuntimeException("The attempted copy of an object failed.", e);
        }
    }
675882
@SuppressWarnings("unchecked")
	private static void appendComposite(UriComponentsBuilder builder, String name, Object value) {

		if (value instanceof Iterable) {

			((Iterable<?>) value).forEach(it -> builder.queryParam(name, it));

		} else if (value instanceof Map) {

			((Map<Object, Object>) value).entrySet() //
					.forEach(it -> builder.queryParam(it.getKey().toString(), it.getValue()));

		} else {

			builder.queryParam(name, value);
		}
	}
143829
public B set(Object value) {
        data.put(value.getClass().getName(), Objects.requireNonNull(value));
        return (B) this;
    }
556293
public Builder copyBuilder() {
        return GetJobArgs.builder().noHang(noHang).timeout(timeout).withCounters(withCounters);
    }
551229
public BuilderType assign(LuaLocal local, String value) {
        add(assignment(local(local.getName()), stringValue(value)));
        return thisBuilder();
    }
988946
@Override
    public ImmutableCollection<V> values() {
        Builder<V> builder = ImmutableList.builder();
        for (Cell<V> cell : cells()) {
            builder.add(cell.getValue());
        }
        return builder.build();
    }
311257
Builder toBuilder() {
    Builder builder =
        builder()
            .setId(getId())
            .setIsHidden(isHidden())
            .setParts(getParts())
            .addAllSourceLocations(getSourceLocations())
            .setIsPlrselMsg(isPlrselMsg());
    if (getLocaleString() != null) {
      builder.setLocaleString(getLocaleString());
    }
    if (getMeaning() != null) {
      builder.setMeaning(getMeaning());
    }
    if (getDesc() != null) {
      builder.setDesc(getDesc());
    }
    if (getAltId() != -1) {
      builder.setAltId(getAltId());
    }
    if (getContentType() != null) {
      builder.setContentType(getContentType());
    }
    return builder;
  }
820306
public AnnotationValueBuilder<T> values(@Nullable Enum<?>... enumObjs) {
        return member(AnnotationMetadata.VALUE_MEMBER, enumObjs);
    }
731944
public static Object toObject(VectorTile.Tile.Value value) {
        Object result = null;

        if(value.hasDoubleValue()) {
            result = value.getDoubleValue();

        } else if(value.hasFloatValue()) {
            result = value.getFloatValue();

        } else if(value.hasIntValue()) {
            result = value.getIntValue();

        } else if(value.hasBoolValue()) {
            result = value.getBoolValue();

        } else if(value.hasStringValue()) {
            result = value.getStringValue();

        } else if(value.hasSintValue()) {
            result = value.getSintValue();

        } else if(value.hasUintValue()) {
            result = value.getUintValue();
        }

        return result;
    }
1317064
private Optional<Builder> builderFrom(TypeElement builderTypeElement) {

    // We require the builder to have the same type parameters as the @AutoValue class, meaning the
    // same names and bounds. In principle the type parameters could have different names, but that
    // would be confusing, and our code would reject it anyway because it wouldn't consider that
    // the return type of Foo<U> build() was really the same as the declaration of Foo<T>. This
    // check produces a better error message in that case and similar ones.

    if (!sameTypeParameters(autoValueClass, builderTypeElement)) {
      errorReporter.reportError(
          "Type parameters of "
              + builderTypeElement
              + " must have same names and bounds as "
              + "type parameters of "
              + autoValueClass,
          builderTypeElement);
      return Optional.empty();
    }
    return Optional.of(new Builder(builderTypeElement));
  }
808003
public static Builder pushAll(String field, List<?> values) {
        return new Builder().pushAll(field, values);
    }
533516
public IsEmptyBuilder append(final String value, final boolean trim) {
        if(isNotEmpty()) {
            return this;
        }

        if(trim) {
            if(value != null && !value.trim().isEmpty()) {
                setNotEmpty();
            }
        } else {
            if(value != null && !value.isEmpty()) {
                setNotEmpty();
            }
        }

        return this;
    }