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

dev.cel.common.values.AutoValue_ProtoMessageValue Maven / Gradle / Ivy

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

import com.google.protobuf.Message;
import dev.cel.common.internal.CelDescriptorPool;
import dev.cel.common.types.CelType;
import org.jspecify.nullness.Nullable;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_ProtoMessageValue extends ProtoMessageValue {

  private final Message value;

  private final CelType celType;

  private final CelDescriptorPool celDescriptorPool;

  private final ProtoCelValueConverter protoCelValueConverter;

  AutoValue_ProtoMessageValue(
      Message value,
      CelType celType,
      CelDescriptorPool celDescriptorPool,
      ProtoCelValueConverter protoCelValueConverter) {
    if (value == null) {
      throw new NullPointerException("Null value");
    }
    this.value = value;
    if (celType == null) {
      throw new NullPointerException("Null celType");
    }
    this.celType = celType;
    if (celDescriptorPool == null) {
      throw new NullPointerException("Null celDescriptorPool");
    }
    this.celDescriptorPool = celDescriptorPool;
    if (protoCelValueConverter == null) {
      throw new NullPointerException("Null protoCelValueConverter");
    }
    this.protoCelValueConverter = protoCelValueConverter;
  }

  @Override
  public Message value() {
    return value;
  }

  @Override
  public CelType celType() {
    return celType;
  }

  @Override
  CelDescriptorPool celDescriptorPool() {
    return celDescriptorPool;
  }

  @Override
  ProtoCelValueConverter protoCelValueConverter() {
    return protoCelValueConverter;
  }

  @Override
  public String toString() {
    return "ProtoMessageValue{"
        + "value=" + value + ", "
        + "celType=" + celType + ", "
        + "celDescriptorPool=" + celDescriptorPool + ", "
        + "protoCelValueConverter=" + protoCelValueConverter
        + "}";
  }

  @Override
  public boolean equals(@Nullable Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ProtoMessageValue) {
      ProtoMessageValue that = (ProtoMessageValue) o;
      return this.value.equals(that.value())
          && this.celType.equals(that.celType())
          && this.celDescriptorPool.equals(that.celDescriptorPool())
          && this.protoCelValueConverter.equals(that.protoCelValueConverter());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= value.hashCode();
    h$ *= 1000003;
    h$ ^= celType.hashCode();
    h$ *= 1000003;
    h$ ^= celDescriptorPool.hashCode();
    h$ *= 1000003;
    h$ ^= protoCelValueConverter.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy