package zeenea.connector.zdf.model;

import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
import javax.annotation.ParametersAreNonnullByDefault;
import javax.annotation.concurrent.Immutable;
import javax.annotation.concurrent.NotThreadSafe;
import org.immutables.value.Generated;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 * Immutable implementation of {@link ZdfVisualization}.
 * <p>
 * Use the builder to create immutable instances:
 * {@code ImmutableZdfVisualization.builder()}.
 */
@Generated(from = "ZdfVisualization", generator = "Immutables")
@SuppressWarnings({"all"})
@SuppressFBWarnings
@ParametersAreNonnullByDefault
@javax.annotation.processing.Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableZdfVisualization implements ZdfVisualization {
  private final @Nullable String path;
  @NotNull
  private final String name;
  private final @Nullable String description;
  private final @Nullable ZdfOwner owner;
  private final List<ZdfDataset> datasets;
  private final @Nullable String type;
  private final @Nullable String label;
  private final @Nullable String format;
  private final @Nullable String diskUsage;
  private final @Nullable String location;
  private final @Nullable String project;
  private final @Nullable String tags;
  private final @Nullable String sourceSystem;
  private final @Nullable String origin;
  private final @Nullable String creationDate;
  private final @Nullable String updateDate;
  private final @Nullable String createdBy;
  private final @Nullable String updatedBy;
  private final @Nullable String comments;

  private ImmutableZdfVisualization(ImmutableZdfVisualization.Builder builder) {
    this.path = builder.path;
    this.name = builder.name;
    this.description = builder.description;
    this.owner = builder.owner;
    this.type = builder.type;
    this.label = builder.label;
    this.format = builder.format;
    this.diskUsage = builder.diskUsage;
    this.location = builder.location;
    this.project = builder.project;
    this.tags = builder.tags;
    this.sourceSystem = builder.sourceSystem;
    this.origin = builder.origin;
    this.creationDate = builder.creationDate;
    this.updateDate = builder.updateDate;
    this.createdBy = builder.createdBy;
    this.updatedBy = builder.updatedBy;
    this.comments = builder.comments;
    this.datasets = builder.datasetsIsSet()
        ? List.copyOf(builder.datasets)
        : ZdfVisualization.super.datasets() instanceof Collection<?>
       ? List.copyOf((Collection<? extends ZdfDataset>) ZdfVisualization.super.datasets())
       : StreamSupport.stream(ZdfVisualization.super.datasets().spliterator(), false)
             .collect(Collectors.toUnmodifiableList());
  }

  private ImmutableZdfVisualization(
      @Nullable String path,
      String name,
      @Nullable String description,
      @Nullable ZdfOwner owner,
      List<ZdfDataset> datasets,
      @Nullable String type,
      @Nullable String label,
      @Nullable String format,
      @Nullable String diskUsage,
      @Nullable String location,
      @Nullable String project,
      @Nullable String tags,
      @Nullable String sourceSystem,
      @Nullable String origin,
      @Nullable String creationDate,
      @Nullable String updateDate,
      @Nullable String createdBy,
      @Nullable String updatedBy,
      @Nullable String comments) {
    this.path = path;
    this.name = name;
    this.description = description;
    this.owner = owner;
    this.datasets = datasets;
    this.type = type;
    this.label = label;
    this.format = format;
    this.diskUsage = diskUsage;
    this.location = location;
    this.project = project;
    this.tags = tags;
    this.sourceSystem = sourceSystem;
    this.origin = origin;
    this.creationDate = creationDate;
    this.updateDate = updateDate;
    this.createdBy = createdBy;
    this.updatedBy = updatedBy;
    this.comments = comments;
  }

  /**
   * @return The value of the {@code path} attribute
   */
  @JsonProperty("path")
  @Override
  public @Nullable String path() {
    return path;
  }

  /**
   * @return The value of the {@code name} attribute
   */
  @JsonProperty("name")
  @NotNull
  @Override
  public String name() {
    return name;
  }

  /**
   * @return The value of the {@code description} attribute
   */
  @JsonProperty("description")
  @Override
  public @Nullable String description() {
    return description;
  }

  /**
   * @return The value of the {@code owner} attribute
   */
  @JsonProperty("owner")
  @Override
  public @Nullable ZdfOwner owner() {
    return owner;
  }

  /**
   * @return The value of the {@code datasets} attribute
   */
  @JsonProperty("datasets")
  @Override
  public List<ZdfDataset> datasets() {
    return datasets;
  }

  /**
   * @return The value of the {@code type} attribute
   */
  @JsonProperty("type")
  @Override
  public @Nullable String type() {
    return type;
  }

  /**
   * @return The value of the {@code label} attribute
   */
  @JsonProperty("label")
  @Override
  public @Nullable String label() {
    return label;
  }

  /**
   * @return The value of the {@code format} attribute
   */
  @JsonProperty("format")
  @Override
  public @Nullable String format() {
    return format;
  }

  /**
   * @return The value of the {@code diskUsage} attribute
   */
  @JsonProperty("diskUsage")
  @Override
  public @Nullable String diskUsage() {
    return diskUsage;
  }

  /**
   * @return The value of the {@code location} attribute
   */
  @JsonProperty("location")
  @Override
  public @Nullable String location() {
    return location;
  }

  /**
   * @return The value of the {@code project} attribute
   */
  @JsonProperty("project")
  @Override
  public @Nullable String project() {
    return project;
  }

  /**
   * @return The value of the {@code tags} attribute
   */
  @JsonProperty("tags")
  @Override
  public @Nullable String tags() {
    return tags;
  }

  /**
   * @return The value of the {@code sourceSystem} attribute
   */
  @JsonProperty("sourceSystem")
  @Override
  public @Nullable String sourceSystem() {
    return sourceSystem;
  }

  /**
   * @return The value of the {@code origin} attribute
   */
  @JsonProperty("origin")
  @Override
  public @Nullable String origin() {
    return origin;
  }

  /**
   * @return The value of the {@code creationDate} attribute
   */
  @JsonProperty("creationDate")
  @Override
  public @Nullable String creationDate() {
    return creationDate;
  }

  /**
   * @return The value of the {@code updateDate} attribute
   */
  @JsonProperty("updateDate")
  @Override
  public @Nullable String updateDate() {
    return updateDate;
  }

  /**
   * @return The value of the {@code createdBy} attribute
   */
  @JsonProperty("createdBy")
  @Override
  public @Nullable String createdBy() {
    return createdBy;
  }

  /**
   * @return The value of the {@code updatedBy} attribute
   */
  @JsonProperty("updatedBy")
  @Override
  public @Nullable String updatedBy() {
    return updatedBy;
  }

  /**
   * @return The value of the {@code comments} attribute
   */
  @JsonProperty("comments")
  @Override
  public @Nullable String comments() {
    return comments;
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#path() path} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for path (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withPath(@Nullable String value) {
    if (Objects.equals(this.path, value)) return this;
    return new ImmutableZdfVisualization(
        value,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#name() name} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for name
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withName(String value) {
    String newValue = Objects.requireNonNull(value, "name");
    if (this.name.equals(newValue)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        newValue,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#description() description} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for description (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withDescription(@Nullable String value) {
    if (Objects.equals(this.description, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        value,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#owner() owner} attribute.
   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for owner (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withOwner(@Nullable ZdfOwner value) {
    if (this.owner == value) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        value,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object with elements that replace the content of {@link ZdfVisualization#datasets() datasets}.
   * @param elements The elements to set
   * @return A modified copy of {@code this} object
   */
  public final ImmutableZdfVisualization withDatasets(ZdfDataset... elements) {
    List<ZdfDataset> newValue = List.of(elements);
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        newValue,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object with elements that replace the content of {@link ZdfVisualization#datasets() datasets}.
   * A shallow reference equality check is used to prevent copying of the same value by returning {@code this}.
   * @param elements An iterable of datasets elements to set
   * @return A modified copy of {@code this} object
   */
  public final ImmutableZdfVisualization withDatasets(Iterable<? extends ZdfDataset> elements) {
    if (this.datasets == elements) return this;
    List<ZdfDataset> newValue = elements instanceof Collection<?>
        ? List.copyOf((Collection<? extends ZdfDataset>) elements)
        : StreamSupport.stream(elements.spliterator(), false)
            .collect(Collectors.toUnmodifiableList());
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        newValue,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#type() type} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for type (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withType(@Nullable String value) {
    if (Objects.equals(this.type, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        value,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#label() label} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for label (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withLabel(@Nullable String value) {
    if (Objects.equals(this.label, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        value,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#format() format} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for format (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withFormat(@Nullable String value) {
    if (Objects.equals(this.format, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        value,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#diskUsage() diskUsage} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for diskUsage (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withDiskUsage(@Nullable String value) {
    if (Objects.equals(this.diskUsage, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        value,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#location() location} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for location (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withLocation(@Nullable String value) {
    if (Objects.equals(this.location, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        value,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#project() project} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for project (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withProject(@Nullable String value) {
    if (Objects.equals(this.project, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        value,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#tags() tags} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for tags (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withTags(@Nullable String value) {
    if (Objects.equals(this.tags, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        value,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#sourceSystem() sourceSystem} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for sourceSystem (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withSourceSystem(@Nullable String value) {
    if (Objects.equals(this.sourceSystem, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        value,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#origin() origin} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for origin (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withOrigin(@Nullable String value) {
    if (Objects.equals(this.origin, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        value,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#creationDate() creationDate} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for creationDate (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withCreationDate(@Nullable String value) {
    if (Objects.equals(this.creationDate, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        value,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#updateDate() updateDate} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for updateDate (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withUpdateDate(@Nullable String value) {
    if (Objects.equals(this.updateDate, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        value,
        this.createdBy,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#createdBy() createdBy} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for createdBy (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withCreatedBy(@Nullable String value) {
    if (Objects.equals(this.createdBy, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        value,
        this.updatedBy,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#updatedBy() updatedBy} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for updatedBy (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withUpdatedBy(@Nullable String value) {
    if (Objects.equals(this.updatedBy, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        value,
        this.comments);
  }

  /**
   * Copy the current immutable object by setting a value for the {@link ZdfVisualization#comments() comments} attribute.
   * An equals check used to prevent copying of the same value by returning {@code this}.
   * @param value A new value for comments (can be {@code null})
   * @return A modified copy of the {@code this} object
   */
  public final ImmutableZdfVisualization withComments(@Nullable String value) {
    if (Objects.equals(this.comments, value)) return this;
    return new ImmutableZdfVisualization(
        this.path,
        this.name,
        this.description,
        this.owner,
        this.datasets,
        this.type,
        this.label,
        this.format,
        this.diskUsage,
        this.location,
        this.project,
        this.tags,
        this.sourceSystem,
        this.origin,
        this.creationDate,
        this.updateDate,
        this.createdBy,
        this.updatedBy,
        value);
  }

  /**
   * This instance is equal to all instances of {@code ImmutableZdfVisualization} that have equal attribute values.
   * @return {@code true} if {@code this} is equal to {@code another} instance
   */
  @Override
  public boolean equals(@javax.annotation.Nullable Object another) {
    if (this == another) return true;
    return another instanceof ImmutableZdfVisualization
        && equalTo(0, (ImmutableZdfVisualization) another);
  }

  private boolean equalTo(int synthetic, ImmutableZdfVisualization another) {
    return Objects.equals(path, another.path)
        && name.equals(another.name)
        && Objects.equals(description, another.description)
        && Objects.equals(owner, another.owner)
        && datasets.equals(another.datasets)
        && Objects.equals(type, another.type)
        && Objects.equals(label, another.label)
        && Objects.equals(format, another.format)
        && Objects.equals(diskUsage, another.diskUsage)
        && Objects.equals(location, another.location)
        && Objects.equals(project, another.project)
        && Objects.equals(tags, another.tags)
        && Objects.equals(sourceSystem, another.sourceSystem)
        && Objects.equals(origin, another.origin)
        && Objects.equals(creationDate, another.creationDate)
        && Objects.equals(updateDate, another.updateDate)
        && Objects.equals(createdBy, another.createdBy)
        && Objects.equals(updatedBy, another.updatedBy)
        && Objects.equals(comments, another.comments);
  }

  /**
   * Computes a hash code from attributes: {@code path}, {@code name}, {@code description}, {@code owner}, {@code datasets}, {@code type}, {@code label}, {@code format}, {@code diskUsage}, {@code location}, {@code project}, {@code tags}, {@code sourceSystem}, {@code origin}, {@code creationDate}, {@code updateDate}, {@code createdBy}, {@code updatedBy}, {@code comments}.
   * @return hashCode value
   */
  @Override
  public int hashCode() {
    int h = 5381;
    h += (h << 5) + Objects.hashCode(path);
    h += (h << 5) + name.hashCode();
    h += (h << 5) + Objects.hashCode(description);
    h += (h << 5) + Objects.hashCode(owner);
    h += (h << 5) + datasets.hashCode();
    h += (h << 5) + Objects.hashCode(type);
    h += (h << 5) + Objects.hashCode(label);
    h += (h << 5) + Objects.hashCode(format);
    h += (h << 5) + Objects.hashCode(diskUsage);
    h += (h << 5) + Objects.hashCode(location);
    h += (h << 5) + Objects.hashCode(project);
    h += (h << 5) + Objects.hashCode(tags);
    h += (h << 5) + Objects.hashCode(sourceSystem);
    h += (h << 5) + Objects.hashCode(origin);
    h += (h << 5) + Objects.hashCode(creationDate);
    h += (h << 5) + Objects.hashCode(updateDate);
    h += (h << 5) + Objects.hashCode(createdBy);
    h += (h << 5) + Objects.hashCode(updatedBy);
    h += (h << 5) + Objects.hashCode(comments);
    return h;
  }

  /**
   * Prints the immutable value {@code ZdfVisualization} with attribute values.
   * @return A string representation of the value
   */
  @Override
  public String toString() {
    return "ZdfVisualization{"
        + "path=" + path
        + ", name=" + name
        + ", description=" + description
        + ", owner=" + owner
        + ", datasets=" + datasets
        + ", type=" + type
        + ", label=" + label
        + ", format=" + format
        + ", diskUsage=" + diskUsage
        + ", location=" + location
        + ", project=" + project
        + ", tags=" + tags
        + ", sourceSystem=" + sourceSystem
        + ", origin=" + origin
        + ", creationDate=" + creationDate
        + ", updateDate=" + updateDate
        + ", createdBy=" + createdBy
        + ", updatedBy=" + updatedBy
        + ", comments=" + comments
        + "}";
  }

  /**
   * Utility type used to correctly read immutable object from JSON representation.
   * @deprecated Do not use this type directly, it exists only for the <em>Jackson</em>-binding infrastructure
   */
  @Generated(from = "ZdfVisualization", generator = "Immutables")
  @Deprecated
  @JsonDeserialize
  @JsonAutoDetect(fieldVisibility = JsonAutoDetect.Visibility.NONE)
  static final class Json implements ZdfVisualization {
    @javax.annotation.Nullable String path;
    @javax.annotation.Nullable String name;
    @javax.annotation.Nullable String description;
    @javax.annotation.Nullable ZdfOwner owner;
    @javax.annotation.Nullable List<ZdfDataset> datasets = List.of();
    boolean datasetsIsSet;
    @javax.annotation.Nullable String type;
    @javax.annotation.Nullable String label;
    @javax.annotation.Nullable String format;
    @javax.annotation.Nullable String diskUsage;
    @javax.annotation.Nullable String location;
    @javax.annotation.Nullable String project;
    @javax.annotation.Nullable String tags;
    @javax.annotation.Nullable String sourceSystem;
    @javax.annotation.Nullable String origin;
    @javax.annotation.Nullable String creationDate;
    @javax.annotation.Nullable String updateDate;
    @javax.annotation.Nullable String createdBy;
    @javax.annotation.Nullable String updatedBy;
    @javax.annotation.Nullable String comments;
    @JsonProperty("path")
    public void setPath(@Nullable String path) {
      this.path = path;
    }
    @JsonProperty("name")
    public void setName(String name) {
      this.name = name;
    }
    @JsonProperty("description")
    public void setDescription(@Nullable String description) {
      this.description = description;
    }
    @JsonProperty("owner")
    public void setOwner(@Nullable ZdfOwner owner) {
      this.owner = owner;
    }
    @JsonProperty("datasets")
    public void setDatasets(List<ZdfDataset> datasets) {
      this.datasets = datasets;
      this.datasetsIsSet = null != datasets;
    }
    @JsonProperty("type")
    public void setType(@Nullable String type) {
      this.type = type;
    }
    @JsonProperty("label")
    public void setLabel(@Nullable String label) {
      this.label = label;
    }
    @JsonProperty("format")
    public void setFormat(@Nullable String format) {
      this.format = format;
    }
    @JsonProperty("diskUsage")
    public void setDiskUsage(@Nullable String diskUsage) {
      this.diskUsage = diskUsage;
    }
    @JsonProperty("location")
    public void setLocation(@Nullable String location) {
      this.location = location;
    }
    @JsonProperty("project")
    public void setProject(@Nullable String project) {
      this.project = project;
    }
    @JsonProperty("tags")
    public void setTags(@Nullable String tags) {
      this.tags = tags;
    }
    @JsonProperty("sourceSystem")
    public void setSourceSystem(@Nullable String sourceSystem) {
      this.sourceSystem = sourceSystem;
    }
    @JsonProperty("origin")
    public void setOrigin(@Nullable String origin) {
      this.origin = origin;
    }
    @JsonProperty("creationDate")
    public void setCreationDate(@Nullable String creationDate) {
      this.creationDate = creationDate;
    }
    @JsonProperty("updateDate")
    public void setUpdateDate(@Nullable String updateDate) {
      this.updateDate = updateDate;
    }
    @JsonProperty("createdBy")
    public void setCreatedBy(@Nullable String createdBy) {
      this.createdBy = createdBy;
    }
    @JsonProperty("updatedBy")
    public void setUpdatedBy(@Nullable String updatedBy) {
      this.updatedBy = updatedBy;
    }
    @JsonProperty("comments")
    public void setComments(@Nullable String comments) {
      this.comments = comments;
    }
    @Override
    public String path() { throw new UnsupportedOperationException(); }
    @Override
    public String name() { throw new UnsupportedOperationException(); }
    @Override
    public String description() { throw new UnsupportedOperationException(); }
    @Override
    public ZdfOwner owner() { throw new UnsupportedOperationException(); }
    @Override
    public List<ZdfDataset> datasets() { throw new UnsupportedOperationException(); }
    @Override
    public String type() { throw new UnsupportedOperationException(); }
    @Override
    public String label() { throw new UnsupportedOperationException(); }
    @Override
    public String format() { throw new UnsupportedOperationException(); }
    @Override
    public String diskUsage() { throw new UnsupportedOperationException(); }
    @Override
    public String location() { throw new UnsupportedOperationException(); }
    @Override
    public String project() { throw new UnsupportedOperationException(); }
    @Override
    public String tags() { throw new UnsupportedOperationException(); }
    @Override
    public String sourceSystem() { throw new UnsupportedOperationException(); }
    @Override
    public String origin() { throw new UnsupportedOperationException(); }
    @Override
    public String creationDate() { throw new UnsupportedOperationException(); }
    @Override
    public String updateDate() { throw new UnsupportedOperationException(); }
    @Override
    public String createdBy() { throw new UnsupportedOperationException(); }
    @Override
    public String updatedBy() { throw new UnsupportedOperationException(); }
    @Override
    public String comments() { throw new UnsupportedOperationException(); }
  }

  /**
   * @param json A JSON-bindable data structure
   * @return An immutable value type
   * @deprecated Do not use this method directly, it exists only for the <em>Jackson</em>-binding infrastructure
   */
  @Deprecated
  @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
  static ImmutableZdfVisualization fromJson(Json json) {
    ImmutableZdfVisualization.Builder builder = ImmutableZdfVisualization.builder();
    if (json.path != null) {
      builder.path(json.path);
    }
    if (json.name != null) {
      builder.name(json.name);
    }
    if (json.description != null) {
      builder.description(json.description);
    }
    if (json.owner != null) {
      builder.owner(json.owner);
    }
    if (json.datasetsIsSet) {
      builder.addAllDatasets(json.datasets);
    }
    if (json.type != null) {
      builder.type(json.type);
    }
    if (json.label != null) {
      builder.label(json.label);
    }
    if (json.format != null) {
      builder.format(json.format);
    }
    if (json.diskUsage != null) {
      builder.diskUsage(json.diskUsage);
    }
    if (json.location != null) {
      builder.location(json.location);
    }
    if (json.project != null) {
      builder.project(json.project);
    }
    if (json.tags != null) {
      builder.tags(json.tags);
    }
    if (json.sourceSystem != null) {
      builder.sourceSystem(json.sourceSystem);
    }
    if (json.origin != null) {
      builder.origin(json.origin);
    }
    if (json.creationDate != null) {
      builder.creationDate(json.creationDate);
    }
    if (json.updateDate != null) {
      builder.updateDate(json.updateDate);
    }
    if (json.createdBy != null) {
      builder.createdBy(json.createdBy);
    }
    if (json.updatedBy != null) {
      builder.updatedBy(json.updatedBy);
    }
    if (json.comments != null) {
      builder.comments(json.comments);
    }
    return builder.build();
  }

  /**
   * Creates an immutable copy of a {@link ZdfVisualization} value.
   * Uses accessors to get values to initialize the new immutable instance.
   * If an instance is already immutable, it is returned as is.
   * @param instance The instance to copy
   * @return A copied immutable ZdfVisualization instance
   */
  public static ImmutableZdfVisualization copyOf(ZdfVisualization instance) {
    if (instance instanceof ImmutableZdfVisualization) {
      return (ImmutableZdfVisualization) instance;
    }
    return ImmutableZdfVisualization.builder()
        .from(instance)
        .build();
  }

  /**
   * Creates a builder for {@link ImmutableZdfVisualization ImmutableZdfVisualization}.
   * <pre>
   * ImmutableZdfVisualization.builder()
   *    .path(String | null) // nullable {@link ZdfVisualization#path() path}
   *    .name(String) // required {@link ZdfVisualization#name() name}
   *    .description(String | null) // nullable {@link ZdfVisualization#description() description}
   *    .owner(zeenea.connector.zdf.model.ZdfOwner | null) // nullable {@link ZdfVisualization#owner() owner}
   *    .addDatasets|addAllDatasets(zeenea.connector.zdf.model.ZdfDataset) // {@link ZdfVisualization#datasets() datasets} elements
   *    .type(String | null) // nullable {@link ZdfVisualization#type() type}
   *    .label(String | null) // nullable {@link ZdfVisualization#label() label}
   *    .format(String | null) // nullable {@link ZdfVisualization#format() format}
   *    .diskUsage(String | null) // nullable {@link ZdfVisualization#diskUsage() diskUsage}
   *    .location(String | null) // nullable {@link ZdfVisualization#location() location}
   *    .project(String | null) // nullable {@link ZdfVisualization#project() project}
   *    .tags(String | null) // nullable {@link ZdfVisualization#tags() tags}
   *    .sourceSystem(String | null) // nullable {@link ZdfVisualization#sourceSystem() sourceSystem}
   *    .origin(String | null) // nullable {@link ZdfVisualization#origin() origin}
   *    .creationDate(String | null) // nullable {@link ZdfVisualization#creationDate() creationDate}
   *    .updateDate(String | null) // nullable {@link ZdfVisualization#updateDate() updateDate}
   *    .createdBy(String | null) // nullable {@link ZdfVisualization#createdBy() createdBy}
   *    .updatedBy(String | null) // nullable {@link ZdfVisualization#updatedBy() updatedBy}
   *    .comments(String | null) // nullable {@link ZdfVisualization#comments() comments}
   *    .build();
   * </pre>
   * @return A new ImmutableZdfVisualization builder
   */
  public static ImmutableZdfVisualization.Builder builder() {
    return new ImmutableZdfVisualization.Builder();
  }

  /**
   * Builds instances of type {@link ImmutableZdfVisualization ImmutableZdfVisualization}.
   * Initialize attributes and then invoke the {@link #build()} method to create an
   * immutable instance.
   * <p><em>{@code Builder} is not thread-safe and generally should not be stored in a field or collection,
   * but instead used immediately to create instances.</em>
   */
  @Generated(from = "ZdfVisualization", generator = "Immutables")
  @NotThreadSafe
  public static final class Builder {
    private static final long INIT_BIT_NAME = 0x1L;
    private static final long OPT_BIT_DATASETS = 0x1L;
    private long initBits = 0x1L;
    private long optBits;

    private @javax.annotation.Nullable String path;
    private @javax.annotation.Nullable String name;
    private @javax.annotation.Nullable String description;
    private @javax.annotation.Nullable ZdfOwner owner;
    private List<ZdfDataset> datasets = new ArrayList<ZdfDataset>();
    private @javax.annotation.Nullable String type;
    private @javax.annotation.Nullable String label;
    private @javax.annotation.Nullable String format;
    private @javax.annotation.Nullable String diskUsage;
    private @javax.annotation.Nullable String location;
    private @javax.annotation.Nullable String project;
    private @javax.annotation.Nullable String tags;
    private @javax.annotation.Nullable String sourceSystem;
    private @javax.annotation.Nullable String origin;
    private @javax.annotation.Nullable String creationDate;
    private @javax.annotation.Nullable String updateDate;
    private @javax.annotation.Nullable String createdBy;
    private @javax.annotation.Nullable String updatedBy;
    private @javax.annotation.Nullable String comments;

    private Builder() {
    }

    /**
     * Fill a builder with attribute values from the provided {@code zeenea.connector.zdf.model.ZdfVisualization} instance.
     * @param instance The instance from which to copy values
     * @return {@code this} builder for use in a chained invocation
     */
    public final Builder from(ZdfVisualization instance) {
      Objects.requireNonNull(instance, "instance");
      from((short) 0, (Object) instance);
      return this;
    }

    /**
     * Fill a builder with attribute values from the provided {@code zeenea.connector.zdf.model.ZdfItem} instance.
     * @param instance The instance from which to copy values
     * @return {@code this} builder for use in a chained invocation
     */
    public final Builder from(ZdfItem instance) {
      Objects.requireNonNull(instance, "instance");
      from((short) 0, (Object) instance);
      return this;
    }

    private void from(short _unused, Object object) {
      long bits = 0;
      if (object instanceof ZdfVisualization) {
        ZdfVisualization instance = (ZdfVisualization) object;
        if ((bits & 0x1L) == 0) {
          @Nullable ZdfOwner ownerValue = instance.owner();
          if (ownerValue != null) {
            owner(ownerValue);
          }
          bits |= 0x1L;
        }
        @Nullable String updateDateValue = instance.updateDate();
        if (updateDateValue != null) {
          updateDate(updateDateValue);
        }
        @Nullable String updatedByValue = instance.updatedBy();
        if (updatedByValue != null) {
          updatedBy(updatedByValue);
        }
        @Nullable String commentsValue = instance.comments();
        if (commentsValue != null) {
          comments(commentsValue);
        }
        @Nullable String sourceSystemValue = instance.sourceSystem();
        if (sourceSystemValue != null) {
          sourceSystem(sourceSystemValue);
        }
        @Nullable String originValue = instance.origin();
        if (originValue != null) {
          origin(originValue);
        }
        @Nullable String formatValue = instance.format();
        if (formatValue != null) {
          format(formatValue);
        }
        if ((bits & 0x2L) == 0) {
          @Nullable String descriptionValue = instance.description();
          if (descriptionValue != null) {
            description(descriptionValue);
          }
          bits |= 0x2L;
        }
        @Nullable String projectValue = instance.project();
        if (projectValue != null) {
          project(projectValue);
        }
        addAllDatasets(instance.datasets());
        @Nullable String labelValue = instance.label();
        if (labelValue != null) {
          label(labelValue);
        }
        @Nullable String typeValue = instance.type();
        if (typeValue != null) {
          type(typeValue);
        }
        @Nullable String creationDateValue = instance.creationDate();
        if (creationDateValue != null) {
          creationDate(creationDateValue);
        }
        @Nullable String tagsValue = instance.tags();
        if (tagsValue != null) {
          tags(tagsValue);
        }
        if ((bits & 0x4L) == 0) {
          @Nullable String pathValue = instance.path();
          if (pathValue != null) {
            path(pathValue);
          }
          bits |= 0x4L;
        }
        @Nullable String createdByValue = instance.createdBy();
        if (createdByValue != null) {
          createdBy(createdByValue);
        }
        if ((bits & 0x8L) == 0) {
          this.name(instance.name());
          bits |= 0x8L;
        }
        @Nullable String diskUsageValue = instance.diskUsage();
        if (diskUsageValue != null) {
          diskUsage(diskUsageValue);
        }
        @Nullable String locationValue = instance.location();
        if (locationValue != null) {
          location(locationValue);
        }
      }
      if (object instanceof ZdfItem) {
        ZdfItem instance = (ZdfItem) object;
        if ((bits & 0x1L) == 0) {
          @Nullable ZdfOwner ownerValue = instance.owner();
          if (ownerValue != null) {
            owner(ownerValue);
          }
          bits |= 0x1L;
        }
        if ((bits & 0x8L) == 0) {
          this.name(instance.name());
          bits |= 0x8L;
        }
        if ((bits & 0x2L) == 0) {
          @Nullable String descriptionValue = instance.description();
          if (descriptionValue != null) {
            description(descriptionValue);
          }
          bits |= 0x2L;
        }
        if ((bits & 0x4L) == 0) {
          @Nullable String pathValue = instance.path();
          if (pathValue != null) {
            path(pathValue);
          }
          bits |= 0x4L;
        }
      }
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#path() path} attribute.
     * @param path The value for path (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("path")
    public final Builder path(@Nullable String path) {
      this.path = path;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#name() name} attribute.
     * @param name The value for name 
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("name")
    public final Builder name(String name) {
      this.name = Objects.requireNonNull(name, "name");
      initBits &= ~INIT_BIT_NAME;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#description() description} attribute.
     * @param description The value for description (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("description")
    public final Builder description(@Nullable String description) {
      this.description = description;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#owner() owner} attribute.
     * @param owner The value for owner (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("owner")
    public final Builder owner(@Nullable ZdfOwner owner) {
      this.owner = owner;
      return this;
    }

    /**
     * Adds one element to {@link ZdfVisualization#datasets() datasets} list.
     * @param element A datasets element
     * @return {@code this} builder for use in a chained invocation
     */
    public final Builder addDatasets(ZdfDataset element) {
      this.datasets.add(Objects.requireNonNull(element, "datasets element"));
      optBits |= OPT_BIT_DATASETS;
      return this;
    }

    /**
     * Adds elements to {@link ZdfVisualization#datasets() datasets} list.
     * @param elements An array of datasets elements
     * @return {@code this} builder for use in a chained invocation
     */
    public final Builder addDatasets(ZdfDataset... elements) {
      for (ZdfDataset element : elements) {
        this.datasets.add(Objects.requireNonNull(element, "datasets element"));
      }
      optBits |= OPT_BIT_DATASETS;
      return this;
    }


    /**
     * Sets or replaces all elements for {@link ZdfVisualization#datasets() datasets} list.
     * @param elements An iterable of datasets elements
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("datasets")
    public final Builder datasets(Iterable<? extends ZdfDataset> elements) {
      this.datasets.clear();
      return addAllDatasets(elements);
    }

    /**
     * Adds elements to {@link ZdfVisualization#datasets() datasets} list.
     * @param elements An iterable of datasets elements
     * @return {@code this} builder for use in a chained invocation
     */
    public final Builder addAllDatasets(Iterable<? extends ZdfDataset> elements) {
      for (ZdfDataset element : elements) {
        this.datasets.add(Objects.requireNonNull(element, "datasets element"));
      }
      optBits |= OPT_BIT_DATASETS;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#type() type} attribute.
     * @param type The value for type (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("type")
    public final Builder type(@Nullable String type) {
      this.type = type;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#label() label} attribute.
     * @param label The value for label (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("label")
    public final Builder label(@Nullable String label) {
      this.label = label;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#format() format} attribute.
     * @param format The value for format (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("format")
    public final Builder format(@Nullable String format) {
      this.format = format;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#diskUsage() diskUsage} attribute.
     * @param diskUsage The value for diskUsage (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("diskUsage")
    public final Builder diskUsage(@Nullable String diskUsage) {
      this.diskUsage = diskUsage;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#location() location} attribute.
     * @param location The value for location (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("location")
    public final Builder location(@Nullable String location) {
      this.location = location;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#project() project} attribute.
     * @param project The value for project (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("project")
    public final Builder project(@Nullable String project) {
      this.project = project;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#tags() tags} attribute.
     * @param tags The value for tags (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("tags")
    public final Builder tags(@Nullable String tags) {
      this.tags = tags;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#sourceSystem() sourceSystem} attribute.
     * @param sourceSystem The value for sourceSystem (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("sourceSystem")
    public final Builder sourceSystem(@Nullable String sourceSystem) {
      this.sourceSystem = sourceSystem;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#origin() origin} attribute.
     * @param origin The value for origin (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("origin")
    public final Builder origin(@Nullable String origin) {
      this.origin = origin;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#creationDate() creationDate} attribute.
     * @param creationDate The value for creationDate (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("creationDate")
    public final Builder creationDate(@Nullable String creationDate) {
      this.creationDate = creationDate;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#updateDate() updateDate} attribute.
     * @param updateDate The value for updateDate (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("updateDate")
    public final Builder updateDate(@Nullable String updateDate) {
      this.updateDate = updateDate;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#createdBy() createdBy} attribute.
     * @param createdBy The value for createdBy (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("createdBy")
    public final Builder createdBy(@Nullable String createdBy) {
      this.createdBy = createdBy;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#updatedBy() updatedBy} attribute.
     * @param updatedBy The value for updatedBy (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("updatedBy")
    public final Builder updatedBy(@Nullable String updatedBy) {
      this.updatedBy = updatedBy;
      return this;
    }

    /**
     * Initializes the value for the {@link ZdfVisualization#comments() comments} attribute.
     * @param comments The value for comments (can be {@code null})
     * @return {@code this} builder for use in a chained invocation
     */
    @JsonProperty("comments")
    public final Builder comments(@Nullable String comments) {
      this.comments = comments;
      return this;
    }

    /**
     * Builds a new {@link ImmutableZdfVisualization ImmutableZdfVisualization}.
     * @return An immutable instance of ZdfVisualization
     * @throws java.lang.IllegalStateException if any required attributes are missing
     */
    public ImmutableZdfVisualization build() {
      if (initBits != 0) {
        throw new IllegalStateException(formatRequiredAttributesMessage());
      }
      return new ImmutableZdfVisualization(this);
    }

    private boolean datasetsIsSet() {
      return (optBits & OPT_BIT_DATASETS) != 0;
    }

    private String formatRequiredAttributesMessage() {
      List<String> attributes = new ArrayList<>();
      if ((initBits & INIT_BIT_NAME) != 0) attributes.add("name");
      return "Cannot build ZdfVisualization, some of required attributes are not set " + attributes;
    }
  }
}
