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

org.flyte.api.v1.AutoValue_ComparisonExpression Maven / Gradle / Ivy

There is a newer version: 0.4.60
Show newest version
package org.flyte.api.v1;

import javax.annotation.processing.Generated;

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

  private final ComparisonExpression.Operator operator;

  private final Operand leftValue;

  private final Operand rightValue;

  private AutoValue_ComparisonExpression(
      ComparisonExpression.Operator operator,
      Operand leftValue,
      Operand rightValue) {
    this.operator = operator;
    this.leftValue = leftValue;
    this.rightValue = rightValue;
  }

  @Override
  public ComparisonExpression.Operator operator() {
    return operator;
  }

  @Override
  public Operand leftValue() {
    return leftValue;
  }

  @Override
  public Operand rightValue() {
    return rightValue;
  }

  @Override
  public String toString() {
    return "ComparisonExpression{"
        + "operator=" + operator + ", "
        + "leftValue=" + leftValue + ", "
        + "rightValue=" + rightValue
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ComparisonExpression) {
      ComparisonExpression that = (ComparisonExpression) o;
      return this.operator.equals(that.operator())
          && this.leftValue.equals(that.leftValue())
          && this.rightValue.equals(that.rightValue());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= operator.hashCode();
    h$ *= 1000003;
    h$ ^= leftValue.hashCode();
    h$ *= 1000003;
    h$ ^= rightValue.hashCode();
    return h$;
  }

  static final class Builder extends ComparisonExpression.Builder {
    private ComparisonExpression.Operator operator;
    private Operand leftValue;
    private Operand rightValue;
    Builder() {
    }
    @Override
    public ComparisonExpression.Builder operator(ComparisonExpression.Operator operator) {
      if (operator == null) {
        throw new NullPointerException("Null operator");
      }
      this.operator = operator;
      return this;
    }
    @Override
    public ComparisonExpression.Builder leftValue(Operand leftValue) {
      if (leftValue == null) {
        throw new NullPointerException("Null leftValue");
      }
      this.leftValue = leftValue;
      return this;
    }
    @Override
    public ComparisonExpression.Builder rightValue(Operand rightValue) {
      if (rightValue == null) {
        throw new NullPointerException("Null rightValue");
      }
      this.rightValue = rightValue;
      return this;
    }
    @Override
    public ComparisonExpression build() {
      if (this.operator == null
          || this.leftValue == null
          || this.rightValue == null) {
        StringBuilder missing = new StringBuilder();
        if (this.operator == null) {
          missing.append(" operator");
        }
        if (this.leftValue == null) {
          missing.append(" leftValue");
        }
        if (this.rightValue == null) {
          missing.append(" rightValue");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ComparisonExpression(
          this.operator,
          this.leftValue,
          this.rightValue);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy