using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
namespace Octokit
{
///
/// A tree item that would be included as part of a when creating a tree.
///
[DebuggerDisplay("{DebuggerDisplay,nq}")]
public class NewTreeItem
{
///
/// The file referenced in the tree.
///
public string Path { get; set; }
///
/// String of the file mode - one of 100644 for file (blob),
/// 100755 for executable (blob), 040000 for subdirectory (tree),
/// 160000 for submodule (commit) or
/// 120000 for a blob that specifies the path of a symlink
///
public string Mode { get; set; }
///
/// The type of tree item this is.
///
[SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
public TreeType Type { get; set; }
///
/// The SHA for this Tree item.
///
public string Sha { get; set; }
///
/// Gets or sets the The content you want this file to have. GitHub will write this blob out and use that SHA
/// for this entry. Use either this, or tree.sha.
///
///
/// The content.
///
public string Content { get; set; }
internal string DebuggerDisplay
{
get { return string.Format(CultureInfo.InvariantCulture, "SHA: {0}, Path: {1}, Type: {2}", Sha, Path, Type); }
}
}
}