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

dev.cel.common.ast.AutoValue_CelExpr_CelIdent Maven / Gradle / Ivy

There is a newer version: 0.7.1
Show newest version
package dev.cel.common.ast;

import org.jspecify.nullness.Nullable;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_CelExpr_CelIdent extends CelExpr.CelIdent {

  private final String name;

  private AutoValue_CelExpr_CelIdent(
      String name) {
    this.name = name;
  }

  @Override
  public String name() {
    return name;
  }

  @Override
  public String toString() {
    return "CelIdent{"
        + "name=" + name
        + "}";
  }

  @Override
  public boolean equals(@Nullable Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof CelExpr.CelIdent) {
      CelExpr.CelIdent that = (CelExpr.CelIdent) o;
      return this.name.equals(that.name());
    }
    return false;
  }

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

  @Override
  public CelExpr.CelIdent.Builder toBuilder() {
    return new Builder(this);
  }

  static final class Builder extends CelExpr.CelIdent.Builder {
    private @Nullable String name;
    Builder() {
    }
    private Builder(CelExpr.CelIdent source) {
      this.name = source.name();
    }
    @Override
    public CelExpr.CelIdent.Builder setName(String name) {
      if (name == null) {
        throw new NullPointerException("Null name");
      }
      this.name = name;
      return this;
    }
    @Override
    public CelExpr.CelIdent build() {
      if (this.name == null) {
        String missing = " name";
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_CelExpr_CelIdent(
          this.name);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy