package ecologylab.bigsemantics.generated.library.creativeWork.collaborative;

/**
 * Automatically generated by MetaMetadataJavaTranslator
 *
 * DO NOT modify this code manually: All your changes may get lost!
 *
 * Copyright (2017) Interface Ecology Lab.
 */

import ecologylab.bigsemantics.generated.library.creativeWork.collaborative.Commit;
import ecologylab.bigsemantics.generated.library.creativeWork.collaborative.CommitsPage;
import ecologylab.bigsemantics.generated.library.creativeWork.collaborative.FileSourceItem;
import ecologylab.bigsemantics.generated.library.creativeWork.collaborative.RepoTabSection;
import ecologylab.bigsemantics.metadata.builtins.MetadataBuiltinsTypesScope;
import ecologylab.bigsemantics.metadata.builtins.RichDocument;
import ecologylab.bigsemantics.metadata.mm_name;
import ecologylab.bigsemantics.metadata.scalar.MetadataString;
import ecologylab.bigsemantics.metametadata.MetaMetadataCompositeField;
import ecologylab.bigsemantics.namesandnums.SemanticsNames;
import ecologylab.serialization.annotations.simpl_collection;
import ecologylab.serialization.annotations.simpl_composite;
import ecologylab.serialization.annotations.simpl_inherit;
import ecologylab.serialization.annotations.simpl_scalar;
import java.lang.String;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@simpl_inherit
public class Repository extends RichDocument
{
	@simpl_scalar
	private MetadataString numberOfCommits;

	@simpl_scalar
	private MetadataString numberOfBranches;

	@simpl_scalar
	private MetadataString numberOfReleases;

	@simpl_scalar
	private MetadataString numberOfContributors;

	@simpl_scalar
	private MetadataString numberOfIssues;

	@simpl_scalar
	private MetadataString numberOfPullRequests;

	@simpl_composite
	@mm_name("latest_commit")
	private Commit latestCommit;

	@simpl_composite
	@mm_name("commits_source")
	private CommitsPage commitsSource;

	@simpl_collection("file_source_item")
	@mm_name("files")
	private List<FileSourceItem> files;

	@simpl_collection("repo_tab_section")
	@mm_name("repo_tabs")
	private List<RepoTabSection> repoTabs;

	public Repository()
	{ super(); }

	public Repository(MetaMetadataCompositeField mmd) {
		super(mmd);
	}


	public MetadataString	numberOfCommits()
	{
		MetadataString	result = this.numberOfCommits;
		if (result == null)
		{
			result = new MetadataString();
			this.numberOfCommits = result;
		}
		return result;
	}

	public String getNumberOfCommits()
	{
		return this.numberOfCommits == null ? null : numberOfCommits().getValue();
	}

	public MetadataString getNumberOfCommitsMetadata()
	{
		return numberOfCommits;
	}

	public void setNumberOfCommits(String numberOfCommits)
	{
		if (numberOfCommits != null)
			this.numberOfCommits().setValue(numberOfCommits);
	}

	public void setNumberOfCommitsMetadata(MetadataString numberOfCommits)
	{
		this.numberOfCommits = numberOfCommits;
	}

	public MetadataString	numberOfBranches()
	{
		MetadataString	result = this.numberOfBranches;
		if (result == null)
		{
			result = new MetadataString();
			this.numberOfBranches = result;
		}
		return result;
	}

	public String getNumberOfBranches()
	{
		return this.numberOfBranches == null ? null : numberOfBranches().getValue();
	}

	public MetadataString getNumberOfBranchesMetadata()
	{
		return numberOfBranches;
	}

	public void setNumberOfBranches(String numberOfBranches)
	{
		if (numberOfBranches != null)
			this.numberOfBranches().setValue(numberOfBranches);
	}

	public void setNumberOfBranchesMetadata(MetadataString numberOfBranches)
	{
		this.numberOfBranches = numberOfBranches;
	}

	public MetadataString	numberOfReleases()
	{
		MetadataString	result = this.numberOfReleases;
		if (result == null)
		{
			result = new MetadataString();
			this.numberOfReleases = result;
		}
		return result;
	}

	public String getNumberOfReleases()
	{
		return this.numberOfReleases == null ? null : numberOfReleases().getValue();
	}

	public MetadataString getNumberOfReleasesMetadata()
	{
		return numberOfReleases;
	}

	public void setNumberOfReleases(String numberOfReleases)
	{
		if (numberOfReleases != null)
			this.numberOfReleases().setValue(numberOfReleases);
	}

	public void setNumberOfReleasesMetadata(MetadataString numberOfReleases)
	{
		this.numberOfReleases = numberOfReleases;
	}

	public MetadataString	numberOfContributors()
	{
		MetadataString	result = this.numberOfContributors;
		if (result == null)
		{
			result = new MetadataString();
			this.numberOfContributors = result;
		}
		return result;
	}

	public String getNumberOfContributors()
	{
		return this.numberOfContributors == null ? null : numberOfContributors().getValue();
	}

	public MetadataString getNumberOfContributorsMetadata()
	{
		return numberOfContributors;
	}

	public void setNumberOfContributors(String numberOfContributors)
	{
		if (numberOfContributors != null)
			this.numberOfContributors().setValue(numberOfContributors);
	}

	public void setNumberOfContributorsMetadata(MetadataString numberOfContributors)
	{
		this.numberOfContributors = numberOfContributors;
	}

	public MetadataString	numberOfIssues()
	{
		MetadataString	result = this.numberOfIssues;
		if (result == null)
		{
			result = new MetadataString();
			this.numberOfIssues = result;
		}
		return result;
	}

	public String getNumberOfIssues()
	{
		return this.numberOfIssues == null ? null : numberOfIssues().getValue();
	}

	public MetadataString getNumberOfIssuesMetadata()
	{
		return numberOfIssues;
	}

	public void setNumberOfIssues(String numberOfIssues)
	{
		if (numberOfIssues != null)
			this.numberOfIssues().setValue(numberOfIssues);
	}

	public void setNumberOfIssuesMetadata(MetadataString numberOfIssues)
	{
		this.numberOfIssues = numberOfIssues;
	}

	public MetadataString	numberOfPullRequests()
	{
		MetadataString	result = this.numberOfPullRequests;
		if (result == null)
		{
			result = new MetadataString();
			this.numberOfPullRequests = result;
		}
		return result;
	}

	public String getNumberOfPullRequests()
	{
		return this.numberOfPullRequests == null ? null : numberOfPullRequests().getValue();
	}

	public MetadataString getNumberOfPullRequestsMetadata()
	{
		return numberOfPullRequests;
	}

	public void setNumberOfPullRequests(String numberOfPullRequests)
	{
		if (numberOfPullRequests != null)
			this.numberOfPullRequests().setValue(numberOfPullRequests);
	}

	public void setNumberOfPullRequestsMetadata(MetadataString numberOfPullRequests)
	{
		this.numberOfPullRequests = numberOfPullRequests;
	}

	public Commit getLatestCommit()
	{
		return latestCommit;
	}

	public void setLatestCommit(Commit latestCommit)
	{
		this.latestCommit = latestCommit;
	}

	public CommitsPage getCommitsSource()
	{
		return commitsSource;
	}

	public void setCommitsSource(CommitsPage commitsSource)
	{
		this.commitsSource = commitsSource;
	}

	public List<FileSourceItem> getFiles()
	{
		return files;
	}

  // lazy evaluation:
  public List<FileSourceItem> files()
  {
    if (files == null)
      files = new ArrayList<FileSourceItem>();
    return files;
  }

  // addTo:
  public void addToFiles(FileSourceItem element)
  {
    files().add(element);
  }

  // size:
  public int filesSize()
  {
    return files == null ? 0 : files.size();
  }

	public void setFiles(List<FileSourceItem> files)
	{
		this.files = files;
	}

	public List<RepoTabSection> getRepoTabs()
	{
		return repoTabs;
	}

  // lazy evaluation:
  public List<RepoTabSection> repoTabs()
  {
    if (repoTabs == null)
      repoTabs = new ArrayList<RepoTabSection>();
    return repoTabs;
  }

  // addTo:
  public void addToRepoTabs(RepoTabSection element)
  {
    repoTabs().add(element);
  }

  // size:
  public int repoTabsSize()
  {
    return repoTabs == null ? 0 : repoTabs.size();
  }

	public void setRepoTabs(List<RepoTabSection> repoTabs)
	{
		this.repoTabs = repoTabs;
	}
}
