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

com.google.gerrit.server.notedb.AutoValue_ChangeNoteUtil_ParsedPatchSetApproval Maven / Gradle / Ivy

There is a newer version: 3.11.0-rc3
Show newest version
package com.google.gerrit.server.notedb;

import java.util.Optional;
import javax.annotation.processing.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ChangeNoteUtil_ParsedPatchSetApproval extends ChangeNoteUtil.ParsedPatchSetApproval {

  private final String footerLine;

  private final boolean isRemoval;

  private final String labelVote;

  private final Optional uuid;

  private final Optional accountIdent;

  private final Optional realAccountIdent;

  private final Optional tag;

  private AutoValue_ChangeNoteUtil_ParsedPatchSetApproval(
      String footerLine,
      boolean isRemoval,
      String labelVote,
      Optional uuid,
      Optional accountIdent,
      Optional realAccountIdent,
      Optional tag) {
    this.footerLine = footerLine;
    this.isRemoval = isRemoval;
    this.labelVote = labelVote;
    this.uuid = uuid;
    this.accountIdent = accountIdent;
    this.realAccountIdent = realAccountIdent;
    this.tag = tag;
  }

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

  @Override
  public boolean isRemoval() {
    return isRemoval;
  }

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

  @Override
  public Optional uuid() {
    return uuid;
  }

  @Override
  public Optional accountIdent() {
    return accountIdent;
  }

  @Override
  public Optional realAccountIdent() {
    return realAccountIdent;
  }

  @Override
  public Optional tag() {
    return tag;
  }

  @Override
  public String toString() {
    return "ParsedPatchSetApproval{"
        + "footerLine=" + footerLine + ", "
        + "isRemoval=" + isRemoval + ", "
        + "labelVote=" + labelVote + ", "
        + "uuid=" + uuid + ", "
        + "accountIdent=" + accountIdent + ", "
        + "realAccountIdent=" + realAccountIdent + ", "
        + "tag=" + tag
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ChangeNoteUtil.ParsedPatchSetApproval) {
      ChangeNoteUtil.ParsedPatchSetApproval that = (ChangeNoteUtil.ParsedPatchSetApproval) o;
      return this.footerLine.equals(that.footerLine())
          && this.isRemoval == that.isRemoval()
          && this.labelVote.equals(that.labelVote())
          && this.uuid.equals(that.uuid())
          && this.accountIdent.equals(that.accountIdent())
          && this.realAccountIdent.equals(that.realAccountIdent())
          && this.tag.equals(that.tag());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= footerLine.hashCode();
    h$ *= 1000003;
    h$ ^= isRemoval ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= labelVote.hashCode();
    h$ *= 1000003;
    h$ ^= uuid.hashCode();
    h$ *= 1000003;
    h$ ^= accountIdent.hashCode();
    h$ *= 1000003;
    h$ ^= realAccountIdent.hashCode();
    h$ *= 1000003;
    h$ ^= tag.hashCode();
    return h$;
  }

  static final class Builder extends ChangeNoteUtil.ParsedPatchSetApproval.Builder {
    private String footerLine;
    private Boolean isRemoval;
    private String labelVote;
    private Optional uuid = Optional.empty();
    private Optional accountIdent = Optional.empty();
    private Optional realAccountIdent = Optional.empty();
    private Optional tag = Optional.empty();
    Builder() {
    }
    @Override
    ChangeNoteUtil.ParsedPatchSetApproval.Builder footerLine(String footerLine) {
      if (footerLine == null) {
        throw new NullPointerException("Null footerLine");
      }
      this.footerLine = footerLine;
      return this;
    }
    @Override
    ChangeNoteUtil.ParsedPatchSetApproval.Builder isRemoval(boolean isRemoval) {
      this.isRemoval = isRemoval;
      return this;
    }
    @Override
    ChangeNoteUtil.ParsedPatchSetApproval.Builder labelVote(String labelVote) {
      if (labelVote == null) {
        throw new NullPointerException("Null labelVote");
      }
      this.labelVote = labelVote;
      return this;
    }
    @Override
    ChangeNoteUtil.ParsedPatchSetApproval.Builder uuid(Optional uuid) {
      if (uuid == null) {
        throw new NullPointerException("Null uuid");
      }
      this.uuid = uuid;
      return this;
    }
    @Override
    ChangeNoteUtil.ParsedPatchSetApproval.Builder accountIdent(Optional accountIdent) {
      if (accountIdent == null) {
        throw new NullPointerException("Null accountIdent");
      }
      this.accountIdent = accountIdent;
      return this;
    }
    @Override
    ChangeNoteUtil.ParsedPatchSetApproval.Builder realAccountIdent(Optional realAccountIdent) {
      if (realAccountIdent == null) {
        throw new NullPointerException("Null realAccountIdent");
      }
      this.realAccountIdent = realAccountIdent;
      return this;
    }
    @Override
    ChangeNoteUtil.ParsedPatchSetApproval.Builder tag(Optional tag) {
      if (tag == null) {
        throw new NullPointerException("Null tag");
      }
      this.tag = tag;
      return this;
    }
    @Override
    ChangeNoteUtil.ParsedPatchSetApproval build() {
      String missing = "";
      if (this.footerLine == null) {
        missing += " footerLine";
      }
      if (this.isRemoval == null) {
        missing += " isRemoval";
      }
      if (this.labelVote == null) {
        missing += " labelVote";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_ChangeNoteUtil_ParsedPatchSetApproval(
          this.footerLine,
          this.isRemoval,
          this.labelVote,
          this.uuid,
          this.accountIdent,
          this.realAccountIdent,
          this.tag);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy