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

com.google.gerrit.entities.$$AutoValue_SubmitRequirementResult Maven / Gradle / Ivy

There is a newer version: 3.11.0-rc3
Show newest version
package com.google.gerrit.entities;

import java.util.Optional;
import javax.annotation.processing.Generated;
import org.eclipse.jgit.lib.ObjectId;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
abstract class $$AutoValue_SubmitRequirementResult extends SubmitRequirementResult {

  private final SubmitRequirement submitRequirement;

  private final Optional applicabilityExpressionResult;

  private final SubmitRequirementExpressionResult submittabilityExpressionResult;

  private final Optional overrideExpressionResult;

  private final ObjectId patchSetCommitId;

  private final Optional legacy;

  $$AutoValue_SubmitRequirementResult(
      SubmitRequirement submitRequirement,
      Optional applicabilityExpressionResult,
      SubmitRequirementExpressionResult submittabilityExpressionResult,
      Optional overrideExpressionResult,
      ObjectId patchSetCommitId,
      Optional legacy) {
    if (submitRequirement == null) {
      throw new NullPointerException("Null submitRequirement");
    }
    this.submitRequirement = submitRequirement;
    if (applicabilityExpressionResult == null) {
      throw new NullPointerException("Null applicabilityExpressionResult");
    }
    this.applicabilityExpressionResult = applicabilityExpressionResult;
    if (submittabilityExpressionResult == null) {
      throw new NullPointerException("Null submittabilityExpressionResult");
    }
    this.submittabilityExpressionResult = submittabilityExpressionResult;
    if (overrideExpressionResult == null) {
      throw new NullPointerException("Null overrideExpressionResult");
    }
    this.overrideExpressionResult = overrideExpressionResult;
    if (patchSetCommitId == null) {
      throw new NullPointerException("Null patchSetCommitId");
    }
    this.patchSetCommitId = patchSetCommitId;
    if (legacy == null) {
      throw new NullPointerException("Null legacy");
    }
    this.legacy = legacy;
  }

  @Override
  public SubmitRequirement submitRequirement() {
    return submitRequirement;
  }

  @Override
  public Optional applicabilityExpressionResult() {
    return applicabilityExpressionResult;
  }

  @Override
  public SubmitRequirementExpressionResult submittabilityExpressionResult() {
    return submittabilityExpressionResult;
  }

  @Override
  public Optional overrideExpressionResult() {
    return overrideExpressionResult;
  }

  @Override
  public ObjectId patchSetCommitId() {
    return patchSetCommitId;
  }

  @Override
  public Optional legacy() {
    return legacy;
  }

  @Override
  public String toString() {
    return "SubmitRequirementResult{"
        + "submitRequirement=" + submitRequirement + ", "
        + "applicabilityExpressionResult=" + applicabilityExpressionResult + ", "
        + "submittabilityExpressionResult=" + submittabilityExpressionResult + ", "
        + "overrideExpressionResult=" + overrideExpressionResult + ", "
        + "patchSetCommitId=" + patchSetCommitId + ", "
        + "legacy=" + legacy
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof SubmitRequirementResult) {
      SubmitRequirementResult that = (SubmitRequirementResult) o;
      return this.submitRequirement.equals(that.submitRequirement())
          && this.applicabilityExpressionResult.equals(that.applicabilityExpressionResult())
          && this.submittabilityExpressionResult.equals(that.submittabilityExpressionResult())
          && this.overrideExpressionResult.equals(that.overrideExpressionResult())
          && this.patchSetCommitId.equals(that.patchSetCommitId())
          && this.legacy.equals(that.legacy());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= submitRequirement.hashCode();
    h$ *= 1000003;
    h$ ^= applicabilityExpressionResult.hashCode();
    h$ *= 1000003;
    h$ ^= submittabilityExpressionResult.hashCode();
    h$ *= 1000003;
    h$ ^= overrideExpressionResult.hashCode();
    h$ *= 1000003;
    h$ ^= patchSetCommitId.hashCode();
    h$ *= 1000003;
    h$ ^= legacy.hashCode();
    return h$;
  }

  static class Builder extends SubmitRequirementResult.Builder {
    private SubmitRequirement submitRequirement;
    private Optional applicabilityExpressionResult = Optional.empty();
    private SubmitRequirementExpressionResult submittabilityExpressionResult;
    private Optional overrideExpressionResult = Optional.empty();
    private ObjectId patchSetCommitId;
    private Optional legacy = Optional.empty();
    Builder() {
    }
    @Override
    public SubmitRequirementResult.Builder submitRequirement(SubmitRequirement submitRequirement) {
      if (submitRequirement == null) {
        throw new NullPointerException("Null submitRequirement");
      }
      this.submitRequirement = submitRequirement;
      return this;
    }
    @Override
    public SubmitRequirementResult.Builder applicabilityExpressionResult(Optional applicabilityExpressionResult) {
      if (applicabilityExpressionResult == null) {
        throw new NullPointerException("Null applicabilityExpressionResult");
      }
      this.applicabilityExpressionResult = applicabilityExpressionResult;
      return this;
    }
    @Override
    public SubmitRequirementResult.Builder submittabilityExpressionResult(SubmitRequirementExpressionResult submittabilityExpressionResult) {
      if (submittabilityExpressionResult == null) {
        throw new NullPointerException("Null submittabilityExpressionResult");
      }
      this.submittabilityExpressionResult = submittabilityExpressionResult;
      return this;
    }
    @Override
    public SubmitRequirementResult.Builder overrideExpressionResult(Optional overrideExpressionResult) {
      if (overrideExpressionResult == null) {
        throw new NullPointerException("Null overrideExpressionResult");
      }
      this.overrideExpressionResult = overrideExpressionResult;
      return this;
    }
    @Override
    public SubmitRequirementResult.Builder patchSetCommitId(ObjectId patchSetCommitId) {
      if (patchSetCommitId == null) {
        throw new NullPointerException("Null patchSetCommitId");
      }
      this.patchSetCommitId = patchSetCommitId;
      return this;
    }
    @Override
    public SubmitRequirementResult.Builder legacy(Optional legacy) {
      if (legacy == null) {
        throw new NullPointerException("Null legacy");
      }
      this.legacy = legacy;
      return this;
    }
    @Override
    public SubmitRequirementResult build() {
      String missing = "";
      if (this.submitRequirement == null) {
        missing += " submitRequirement";
      }
      if (this.submittabilityExpressionResult == null) {
        missing += " submittabilityExpressionResult";
      }
      if (this.patchSetCommitId == null) {
        missing += " patchSetCommitId";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_SubmitRequirementResult(
          this.submitRequirement,
          this.applicabilityExpressionResult,
          this.submittabilityExpressionResult,
          this.overrideExpressionResult,
          this.patchSetCommitId,
          this.legacy);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy