// Path: src/main/java/se/bjurr/gitchangelog/internal/util/Preconditions.java
// public static <T> T checkNotNull(final T it, final String string) {
//   if (it == null) {
//     throw new IllegalStateException(string);
//   }
//   return it;
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/internal/util/Preconditions.java
// public static void checkState(final boolean b, final String string) {
//   if (!b) {
//     throw new IllegalStateException(string);
//   }
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/internal/util/Preconditions.java
// public static boolean isNullOrEmpty(final String it) {
//   return it == null || it.isEmpty();
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/internal/util/Preconditions.java
// public static String nullToEmpty(final String it) {
//   if (it == null) {
//     return "";
//   }
//   return it;
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/api/model/interfaces/IAuthors.java
// public interface IAuthors {
//   List<Author> getAuthors();
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/api/model/interfaces/ICommits.java
// public interface ICommits {
//   List<Commit> getCommits();
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/internal/settings/SettingsIssueType.java
// public enum SettingsIssueType {
//   NOISSUE,
//   CUSTOM,
//   JIRA,
//   GITHUB,
//   GITLAB,
//   REDMINE
// }


import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.CUSTOM;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.GITHUB;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.GITLAB;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.JIRA;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.NOISSUE;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.REDMINE;
import static se.bjurr.gitchangelog.internal.util.Preconditions.checkNotNull;
import static se.bjurr.gitchangelog.internal.util.Preconditions.checkState;
import static se.bjurr.gitchangelog.internal.util.Preconditions.isNullOrEmpty;
import static se.bjurr.gitchangelog.internal.util.Preconditions.nullToEmpty;
import java.io.Serializable;
import java.util.List;
import se.bjurr.gitchangelog.api.model.interfaces.IAuthors;
import se.bjurr.gitchangelog.api.model.interfaces.ICommits;
import se.bjurr.gitchangelog.internal.settings.SettingsIssueType;
package se.bjurr.gitchangelog.api.model;



public class Issue implements ICommits, IAuthors, Serializable {

  private static final long serialVersionUID = -7571341639024417199L;
  private final List<Commit> commits;
  private final List<Author> authors;
  /** Like JIRA, or GitHub. */
  private final String name;

  /** Like the title of a Jira. */
  private final String title;

  private final boolean hasTitle;

  /** Like the actual Jira, JIR-ABC. */
  private final String issue;

  private final boolean hasIssue;

  /** A link to the issue, http://..... */
  private final String link;

  private final boolean hasLink;

  /** Type of issue, perhaps Story, Bug and etc */
  private final String type;

  private final boolean hasType;

  private final boolean hasDescription;
  private final String description;
  /** Labels on the issue, for GitHub it may be bug, enhancement, ... */
  private final List<String> labels;

  private final boolean hasLabels;
  private final boolean hasLinkedIssues;
  private final SettingsIssueType issueType;
  private final List<String> linkedIssues;

  public Issue(
      final List<Commit> commits,
      final List<Author> authors,
      final String name,
      final String title,
      final String issue,
      final SettingsIssueType issueType,
      final String description,
      final String link,
      final String type,
      final List<String> linkedIssues,
      final List<String> labels) {
// Path: src/main/java/se/bjurr/gitchangelog/internal/util/Preconditions.java
// public static <T> T checkNotNull(final T it, final String string) {
//   if (it == null) {
//     throw new IllegalStateException(string);
//   }
//   return it;
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/internal/util/Preconditions.java
// public static void checkState(final boolean b, final String string) {
//   if (!b) {
//     throw new IllegalStateException(string);
//   }
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/internal/util/Preconditions.java
// public static boolean isNullOrEmpty(final String it) {
//   return it == null || it.isEmpty();
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/internal/util/Preconditions.java
// public static String nullToEmpty(final String it) {
//   if (it == null) {
//     return "";
//   }
//   return it;
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/api/model/interfaces/IAuthors.java
// public interface IAuthors {
//   List<Author> getAuthors();
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/api/model/interfaces/ICommits.java
// public interface ICommits {
//   List<Commit> getCommits();
// }
// 
// Path: src/main/java/se/bjurr/gitchangelog/internal/settings/SettingsIssueType.java
// public enum SettingsIssueType {
//   NOISSUE,
//   CUSTOM,
//   JIRA,
//   GITHUB,
//   GITLAB,
//   REDMINE
// }


// Path: src/main/java/se/bjurr/gitchangelog/api/model/Issue.java
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.CUSTOM;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.GITHUB;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.GITLAB;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.JIRA;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.NOISSUE;
import static se.bjurr.gitchangelog.internal.settings.SettingsIssueType.REDMINE;
import static se.bjurr.gitchangelog.internal.util.Preconditions.checkNotNull;
import static se.bjurr.gitchangelog.internal.util.Preconditions.checkState;
import static se.bjurr.gitchangelog.internal.util.Preconditions.isNullOrEmpty;
import static se.bjurr.gitchangelog.internal.util.Preconditions.nullToEmpty;
import java.io.Serializable;
import java.util.List;
import se.bjurr.gitchangelog.api.model.interfaces.IAuthors;
import se.bjurr.gitchangelog.api.model.interfaces.ICommits;
import se.bjurr.gitchangelog.internal.settings.SettingsIssueType;

package se.bjurr.gitchangelog.api.model;



public class Issue implements ICommits, IAuthors, Serializable {

  private static final long serialVersionUID = -7571341639024417199L;
  private final List<Commit> commits;
  private final List<Author> authors;
  /** Like JIRA, or GitHub. */
  private final String name;

  /** Like the title of a Jira. */
  private final String title;

  private final boolean hasTitle;

  /** Like the actual Jira, JIR-ABC. */
  private final String issue;

  private final boolean hasIssue;

  /** A link to the issue, http://..... */
  private final String link;

  private final boolean hasLink;

  /** Type of issue, perhaps Story, Bug and etc */
  private final String type;

  private final boolean hasType;

  private final boolean hasDescription;
  private final String description;
  /** Labels on the issue, for GitHub it may be bug, enhancement, ... */
  private final List<String> labels;

  private final boolean hasLabels;
  private final boolean hasLinkedIssues;
  private final SettingsIssueType issueType;
  private final List<String> linkedIssues;

  public Issue(
      final List<Commit> commits,
      final List<Author> authors,
      final String name,
      final String title,
      final String issue,
      final SettingsIssueType issueType,
      final String description,
      final String link,
      final String type,
      final List<String> linkedIssues,
      final List<String> labels) {
    checkState(!commits.isEmpty(), "commits");