All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gerrit.server.patch.filediff.AutoValue_AllFileGitDiffs Maven / Gradle / Ivy

The newest version!
package com.google.gerrit.server.patch.filediff;

import java.util.Optional;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_AllFileGitDiffs extends AllFileGitDiffs {

  private final AugmentedFileDiffCacheKey augmentedKey;

  private final GitDiffEntity mainDiff;

  private final Optional oldVsParentDiff;

  private final Optional newVsParentDiff;

  private final Optional parentVsParentDiff;

  private AutoValue_AllFileGitDiffs(
      AugmentedFileDiffCacheKey augmentedKey,
      GitDiffEntity mainDiff,
      Optional oldVsParentDiff,
      Optional newVsParentDiff,
      Optional parentVsParentDiff) {
    this.augmentedKey = augmentedKey;
    this.mainDiff = mainDiff;
    this.oldVsParentDiff = oldVsParentDiff;
    this.newVsParentDiff = newVsParentDiff;
    this.parentVsParentDiff = parentVsParentDiff;
  }

  @Override
  AugmentedFileDiffCacheKey augmentedKey() {
    return augmentedKey;
  }

  @Override
  GitDiffEntity mainDiff() {
    return mainDiff;
  }

  @Override
  Optional oldVsParentDiff() {
    return oldVsParentDiff;
  }

  @Override
  Optional newVsParentDiff() {
    return newVsParentDiff;
  }

  @Override
  Optional parentVsParentDiff() {
    return parentVsParentDiff;
  }

  @Override
  public String toString() {
    return "AllFileGitDiffs{"
        + "augmentedKey=" + augmentedKey + ", "
        + "mainDiff=" + mainDiff + ", "
        + "oldVsParentDiff=" + oldVsParentDiff + ", "
        + "newVsParentDiff=" + newVsParentDiff + ", "
        + "parentVsParentDiff=" + parentVsParentDiff
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof AllFileGitDiffs) {
      AllFileGitDiffs that = (AllFileGitDiffs) o;
      return this.augmentedKey.equals(that.augmentedKey())
          && this.mainDiff.equals(that.mainDiff())
          && this.oldVsParentDiff.equals(that.oldVsParentDiff())
          && this.newVsParentDiff.equals(that.newVsParentDiff())
          && this.parentVsParentDiff.equals(that.parentVsParentDiff());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= augmentedKey.hashCode();
    h$ *= 1000003;
    h$ ^= mainDiff.hashCode();
    h$ *= 1000003;
    h$ ^= oldVsParentDiff.hashCode();
    h$ *= 1000003;
    h$ ^= newVsParentDiff.hashCode();
    h$ *= 1000003;
    h$ ^= parentVsParentDiff.hashCode();
    return h$;
  }

  static final class Builder extends AllFileGitDiffs.Builder {
    private AugmentedFileDiffCacheKey augmentedKey;
    private GitDiffEntity mainDiff;
    private Optional oldVsParentDiff = Optional.empty();
    private Optional newVsParentDiff = Optional.empty();
    private Optional parentVsParentDiff = Optional.empty();
    Builder() {
    }
    @Override
    public AllFileGitDiffs.Builder augmentedKey(AugmentedFileDiffCacheKey augmentedKey) {
      if (augmentedKey == null) {
        throw new NullPointerException("Null augmentedKey");
      }
      this.augmentedKey = augmentedKey;
      return this;
    }
    @Override
    public AllFileGitDiffs.Builder mainDiff(GitDiffEntity mainDiff) {
      if (mainDiff == null) {
        throw new NullPointerException("Null mainDiff");
      }
      this.mainDiff = mainDiff;
      return this;
    }
    @Override
    public AllFileGitDiffs.Builder oldVsParentDiff(Optional oldVsParentDiff) {
      if (oldVsParentDiff == null) {
        throw new NullPointerException("Null oldVsParentDiff");
      }
      this.oldVsParentDiff = oldVsParentDiff;
      return this;
    }
    @Override
    public AllFileGitDiffs.Builder newVsParentDiff(Optional newVsParentDiff) {
      if (newVsParentDiff == null) {
        throw new NullPointerException("Null newVsParentDiff");
      }
      this.newVsParentDiff = newVsParentDiff;
      return this;
    }
    @Override
    public AllFileGitDiffs.Builder parentVsParentDiff(Optional parentVsParentDiff) {
      if (parentVsParentDiff == null) {
        throw new NullPointerException("Null parentVsParentDiff");
      }
      this.parentVsParentDiff = parentVsParentDiff;
      return this;
    }
    @Override
    public AllFileGitDiffs build() {
      if (this.augmentedKey == null
          || this.mainDiff == null) {
        StringBuilder missing = new StringBuilder();
        if (this.augmentedKey == null) {
          missing.append(" augmentedKey");
        }
        if (this.mainDiff == null) {
          missing.append(" mainDiff");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_AllFileGitDiffs(
          this.augmentedKey,
          this.mainDiff,
          this.oldVsParentDiff,
          this.newVsParentDiff,
          this.parentVsParentDiff);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy