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

dev.cel.common.AutoValue_CelDescriptors Maven / Gradle / Ivy

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

import com.google.common.collect.ImmutableMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.protobuf.Descriptors;

// Generated by com.google.auto.value.processor.AutoValueProcessor
final class AutoValue_CelDescriptors extends CelDescriptors {

  private final ImmutableSet messageTypeDescriptors;

  private final ImmutableSet enumDescriptors;

  private final ImmutableMultimap extensionDescriptors;

  private final ImmutableSet fileDescriptors;

  private AutoValue_CelDescriptors(
      ImmutableSet messageTypeDescriptors,
      ImmutableSet enumDescriptors,
      ImmutableMultimap extensionDescriptors,
      ImmutableSet fileDescriptors) {
    this.messageTypeDescriptors = messageTypeDescriptors;
    this.enumDescriptors = enumDescriptors;
    this.extensionDescriptors = extensionDescriptors;
    this.fileDescriptors = fileDescriptors;
  }

  @Override
  public ImmutableSet messageTypeDescriptors() {
    return messageTypeDescriptors;
  }

  @Override
  public ImmutableSet enumDescriptors() {
    return enumDescriptors;
  }

  @Override
  public ImmutableMultimap extensionDescriptors() {
    return extensionDescriptors;
  }

  @Override
  public ImmutableSet fileDescriptors() {
    return fileDescriptors;
  }

  @Override
  public String toString() {
    return "CelDescriptors{"
        + "messageTypeDescriptors=" + messageTypeDescriptors + ", "
        + "enumDescriptors=" + enumDescriptors + ", "
        + "extensionDescriptors=" + extensionDescriptors + ", "
        + "fileDescriptors=" + fileDescriptors
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof CelDescriptors) {
      CelDescriptors that = (CelDescriptors) o;
      return this.messageTypeDescriptors.equals(that.messageTypeDescriptors())
          && this.enumDescriptors.equals(that.enumDescriptors())
          && this.extensionDescriptors.equals(that.extensionDescriptors())
          && this.fileDescriptors.equals(that.fileDescriptors());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= messageTypeDescriptors.hashCode();
    h$ *= 1000003;
    h$ ^= enumDescriptors.hashCode();
    h$ *= 1000003;
    h$ ^= extensionDescriptors.hashCode();
    h$ *= 1000003;
    h$ ^= fileDescriptors.hashCode();
    return h$;
  }

  static final class Builder extends CelDescriptors.Builder {
    private ImmutableSet.Builder messageTypeDescriptorsBuilder$;
    private ImmutableSet messageTypeDescriptors;
    private ImmutableSet.Builder enumDescriptorsBuilder$;
    private ImmutableSet enumDescriptors;
    private ImmutableMultimap.Builder extensionDescriptorsBuilder$;
    private ImmutableMultimap extensionDescriptors;
    private ImmutableSet.Builder fileDescriptorsBuilder$;
    private ImmutableSet fileDescriptors;
    Builder() {
    }
    @Override
    CelDescriptors.Builder setMessageTypeDescriptors(ImmutableSet messageTypeDescriptors) {
      if (messageTypeDescriptors == null) {
        throw new NullPointerException("Null messageTypeDescriptors");
      }
      if (messageTypeDescriptorsBuilder$ != null) {
        throw new IllegalStateException("Cannot set messageTypeDescriptors after calling messageTypeDescriptorsBuilder()");
      }
      this.messageTypeDescriptors = messageTypeDescriptors;
      return this;
    }
    @Override
    protected ImmutableSet.Builder messageTypeDescriptorsBuilder() {
      if (messageTypeDescriptorsBuilder$ == null) {
        if (messageTypeDescriptors == null) {
          messageTypeDescriptorsBuilder$ = ImmutableSet.builder();
        } else {
          messageTypeDescriptorsBuilder$ = ImmutableSet.builder();
          messageTypeDescriptorsBuilder$.addAll(messageTypeDescriptors);
          messageTypeDescriptors = null;
        }
      }
      return messageTypeDescriptorsBuilder$;
    }
    @Override
    CelDescriptors.Builder setEnumDescriptors(ImmutableSet enumDescriptors) {
      if (enumDescriptors == null) {
        throw new NullPointerException("Null enumDescriptors");
      }
      if (enumDescriptorsBuilder$ != null) {
        throw new IllegalStateException("Cannot set enumDescriptors after calling enumDescriptorsBuilder()");
      }
      this.enumDescriptors = enumDescriptors;
      return this;
    }
    @Override
    protected ImmutableSet.Builder enumDescriptorsBuilder() {
      if (enumDescriptorsBuilder$ == null) {
        if (enumDescriptors == null) {
          enumDescriptorsBuilder$ = ImmutableSet.builder();
        } else {
          enumDescriptorsBuilder$ = ImmutableSet.builder();
          enumDescriptorsBuilder$.addAll(enumDescriptors);
          enumDescriptors = null;
        }
      }
      return enumDescriptorsBuilder$;
    }
    @Override
    CelDescriptors.Builder setExtensionDescriptors(ImmutableMultimap extensionDescriptors) {
      if (extensionDescriptors == null) {
        throw new NullPointerException("Null extensionDescriptors");
      }
      if (extensionDescriptorsBuilder$ != null) {
        throw new IllegalStateException("Cannot set extensionDescriptors after calling extensionDescriptorsBuilder()");
      }
      this.extensionDescriptors = extensionDescriptors;
      return this;
    }
    @Override
    protected ImmutableMultimap.Builder extensionDescriptorsBuilder() {
      if (extensionDescriptorsBuilder$ == null) {
        if (extensionDescriptors == null) {
          extensionDescriptorsBuilder$ = ImmutableMultimap.builder();
        } else {
          extensionDescriptorsBuilder$ = ImmutableMultimap.builder();
          extensionDescriptorsBuilder$.putAll(extensionDescriptors);
          extensionDescriptors = null;
        }
      }
      return extensionDescriptorsBuilder$;
    }
    @Override
    CelDescriptors.Builder setFileDescriptors(ImmutableSet fileDescriptors) {
      if (fileDescriptors == null) {
        throw new NullPointerException("Null fileDescriptors");
      }
      if (fileDescriptorsBuilder$ != null) {
        throw new IllegalStateException("Cannot set fileDescriptors after calling fileDescriptorsBuilder()");
      }
      this.fileDescriptors = fileDescriptors;
      return this;
    }
    @Override
    protected ImmutableSet.Builder fileDescriptorsBuilder() {
      if (fileDescriptorsBuilder$ == null) {
        if (fileDescriptors == null) {
          fileDescriptorsBuilder$ = ImmutableSet.builder();
        } else {
          fileDescriptorsBuilder$ = ImmutableSet.builder();
          fileDescriptorsBuilder$.addAll(fileDescriptors);
          fileDescriptors = null;
        }
      }
      return fileDescriptorsBuilder$;
    }
    @Override
    public CelDescriptors build() {
      if (messageTypeDescriptorsBuilder$ != null) {
        this.messageTypeDescriptors = messageTypeDescriptorsBuilder$.build();
      } else if (this.messageTypeDescriptors == null) {
        this.messageTypeDescriptors = ImmutableSet.of();
      }
      if (enumDescriptorsBuilder$ != null) {
        this.enumDescriptors = enumDescriptorsBuilder$.build();
      } else if (this.enumDescriptors == null) {
        this.enumDescriptors = ImmutableSet.of();
      }
      if (extensionDescriptorsBuilder$ != null) {
        this.extensionDescriptors = extensionDescriptorsBuilder$.build();
      } else if (this.extensionDescriptors == null) {
        this.extensionDescriptors = ImmutableMultimap.of();
      }
      if (fileDescriptorsBuilder$ != null) {
        this.fileDescriptors = fileDescriptorsBuilder$.build();
      } else if (this.fileDescriptors == null) {
        this.fileDescriptors = ImmutableSet.of();
      }
      return new AutoValue_CelDescriptors(
          this.messageTypeDescriptors,
          this.enumDescriptors,
          this.extensionDescriptors,
          this.fileDescriptors);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy