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

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

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

import com.google.common.collect.ImmutableList;
import org.jspecify.nullness.Nullable;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_CelExpr_CelStruct extends CelExpr.CelStruct {

  private final String messageName;

  private final ImmutableList entries;

  private AutoValue_CelExpr_CelStruct(
      String messageName,
      ImmutableList entries) {
    this.messageName = messageName;
    this.entries = entries;
  }

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

  @Override
  public ImmutableList entries() {
    return entries;
  }

  @Override
  public String toString() {
    return "CelStruct{"
        + "messageName=" + messageName + ", "
        + "entries=" + entries
        + "}";
  }

  @Override
  public boolean equals(@Nullable Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof CelExpr.CelStruct) {
      CelExpr.CelStruct that = (CelExpr.CelStruct) o;
      return this.messageName.equals(that.messageName())
          && this.entries.equals(that.entries());
    }
    return false;
  }

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

  @Override
  CelExpr.CelStruct.Builder autoToBuilder() {
    return new Builder(this);
  }

  static final class Builder extends CelExpr.CelStruct.Builder {
    private @Nullable String messageName;
    private @Nullable ImmutableList entries;
    Builder() {
    }
    private Builder(CelExpr.CelStruct source) {
      this.messageName = source.messageName();
      this.entries = source.entries();
    }
    @Override
    public CelExpr.CelStruct.Builder setMessageName(String messageName) {
      if (messageName == null) {
        throw new NullPointerException("Null messageName");
      }
      this.messageName = messageName;
      return this;
    }
    @Override
    CelExpr.CelStruct.Builder setEntries(ImmutableList entries) {
      if (entries == null) {
        throw new NullPointerException("Null entries");
      }
      this.entries = entries;
      return this;
    }
    @Override
    ImmutableList entries() {
      if (this.entries == null) {
        throw new IllegalStateException("Property \"entries\" has not been set");
      }
      return entries;
    }
    @Override
    CelExpr.CelStruct autoBuild() {
      if (this.messageName == null
          || this.entries == null) {
        StringBuilder missing = new StringBuilder();
        if (this.messageName == null) {
          missing.append(" messageName");
        }
        if (this.entries == null) {
          missing.append(" entries");
        }
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_CelExpr_CelStruct(
          this.messageName,
          this.entries);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy