mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
fix: Fix namespaces for Artifacts models (#2862)
This commit is contained in:
@@ -2,82 +2,85 @@
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class Artifact
|
||||
namespace Octokit
|
||||
{
|
||||
public Artifact()
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class Artifact
|
||||
{
|
||||
public Artifact()
|
||||
{
|
||||
}
|
||||
|
||||
public Artifact(long id, string nodeId, string name, int sizeInBytes, string url, string archiveDownloadUrl, bool expired, DateTime createdAt, DateTime expiresAt, DateTime updatedAt, ArtifactWorkflowRun workflowRun)
|
||||
{
|
||||
Id = id;
|
||||
NodeId = nodeId;
|
||||
Name = name;
|
||||
SizeInBytes = sizeInBytes;
|
||||
Url = url;
|
||||
ArchiveDownloadUrl = archiveDownloadUrl;
|
||||
Expired = expired;
|
||||
CreatedAt = createdAt;
|
||||
ExpiresAt = expiresAt;
|
||||
UpdatedAt = updatedAt;
|
||||
WorkflowRun = workflowRun;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The artifact Id
|
||||
/// </summary>
|
||||
public long Id { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The artifact node Id
|
||||
/// </summary>
|
||||
public string NodeId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of the artifact
|
||||
/// </summary>
|
||||
public string Name { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The size of the artifact in bytes
|
||||
/// </summary>
|
||||
public int SizeInBytes { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The url for retrieving the artifact information
|
||||
/// </summary>
|
||||
public string Url { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The url for downloading the artifact contents
|
||||
/// </summary>
|
||||
public string ArchiveDownloadUrl { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// True if the artifact has expired
|
||||
/// </summary>
|
||||
public bool Expired { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The date and time when the artifact was created
|
||||
/// </summary>
|
||||
public DateTime CreatedAt { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The date and time when the artifact expires
|
||||
/// </summary>
|
||||
public DateTime ExpiresAt { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The date and time when the artifact was last updated
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The workflow from where the artifact was created
|
||||
/// </summary>
|
||||
public ArtifactWorkflowRun WorkflowRun { get; private set; }
|
||||
|
||||
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id);
|
||||
}
|
||||
|
||||
public Artifact(long id, string nodeId, string name, int sizeInBytes, string url, string archiveDownloadUrl, bool expired, DateTime createdAt, DateTime expiresAt, DateTime updatedAt, ArtifactWorkflowRun workflowRun)
|
||||
{
|
||||
Id = id;
|
||||
NodeId = nodeId;
|
||||
Name = name;
|
||||
SizeInBytes = sizeInBytes;
|
||||
Url = url;
|
||||
ArchiveDownloadUrl = archiveDownloadUrl;
|
||||
Expired = expired;
|
||||
CreatedAt = createdAt;
|
||||
ExpiresAt = expiresAt;
|
||||
UpdatedAt = updatedAt;
|
||||
WorkflowRun = workflowRun;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The artifact Id
|
||||
/// </summary>
|
||||
public long Id { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The artifact node Id
|
||||
/// </summary>
|
||||
public string NodeId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of the artifact
|
||||
/// </summary>
|
||||
public string Name { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The size of the artifact in bytes
|
||||
/// </summary>
|
||||
public int SizeInBytes { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The url for retrieving the artifact information
|
||||
/// </summary>
|
||||
public string Url { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The url for downloading the artifact contents
|
||||
/// </summary>
|
||||
public string ArchiveDownloadUrl { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// True if the artifact has expired
|
||||
/// </summary>
|
||||
public bool Expired { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The date and time when the artifact was created
|
||||
/// </summary>
|
||||
public DateTime CreatedAt { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The date and time when the artifact expires
|
||||
/// </summary>
|
||||
public DateTime ExpiresAt { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The date and time when the artifact was last updated
|
||||
/// </summary>
|
||||
public DateTime UpdatedAt { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The workflow from where the artifact was created
|
||||
/// </summary>
|
||||
public ArtifactWorkflowRun WorkflowRun { get; private set; }
|
||||
|
||||
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id);
|
||||
}
|
||||
@@ -1,46 +1,49 @@
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class ArtifactWorkflowRun
|
||||
namespace Octokit
|
||||
{
|
||||
public ArtifactWorkflowRun()
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class ArtifactWorkflowRun
|
||||
{
|
||||
}
|
||||
|
||||
public ArtifactWorkflowRun(long id, long repositoryId, long headRepositoryId, string headBranch, string headSha)
|
||||
{
|
||||
Id = id;
|
||||
RepositoryId = repositoryId;
|
||||
HeadRepositoryId = headRepositoryId;
|
||||
HeadBranch = headBranch;
|
||||
HeadSha = headSha;
|
||||
}
|
||||
public ArtifactWorkflowRun()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The workflow run Id
|
||||
/// </summary>
|
||||
public long Id { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The repository Id
|
||||
/// </summary>
|
||||
public long RepositoryId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The head repository Id
|
||||
/// </summary>
|
||||
public long HeadRepositoryId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The head branch
|
||||
/// </summary>
|
||||
public string HeadBranch { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The head Sha
|
||||
/// </summary>
|
||||
public string HeadSha { get; private set; }
|
||||
|
||||
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id);
|
||||
}
|
||||
public ArtifactWorkflowRun(long id, long repositoryId, long headRepositoryId, string headBranch, string headSha)
|
||||
{
|
||||
Id = id;
|
||||
RepositoryId = repositoryId;
|
||||
HeadRepositoryId = headRepositoryId;
|
||||
HeadBranch = headBranch;
|
||||
HeadSha = headSha;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The workflow run Id
|
||||
/// </summary>
|
||||
public long Id { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The repository Id
|
||||
/// </summary>
|
||||
public long RepositoryId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The head repository Id
|
||||
/// </summary>
|
||||
public long HeadRepositoryId { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The head branch
|
||||
/// </summary>
|
||||
public string HeadBranch { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The head Sha
|
||||
/// </summary>
|
||||
public string HeadSha { get; private set; }
|
||||
|
||||
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Id: {0}", Id);
|
||||
}
|
||||
}
|
||||
@@ -2,28 +2,31 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class ListArtifactsResponse
|
||||
namespace Octokit
|
||||
{
|
||||
public ListArtifactsResponse()
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class ListArtifactsResponse
|
||||
{
|
||||
}
|
||||
|
||||
public ListArtifactsResponse(int totalCount, IReadOnlyList<Artifact> artifacts)
|
||||
{
|
||||
TotalCount = totalCount;
|
||||
Artifacts = artifacts;
|
||||
}
|
||||
public ListArtifactsResponse()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The number of artifacts found
|
||||
/// </summary>
|
||||
public int TotalCount { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The list of found artifacts
|
||||
/// </summary>
|
||||
public IReadOnlyList<Artifact> Artifacts { get; private set; } = new List<Artifact>();
|
||||
|
||||
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Artifacts: {0}", TotalCount);
|
||||
public ListArtifactsResponse(int totalCount, IReadOnlyList<Artifact> artifacts)
|
||||
{
|
||||
TotalCount = totalCount;
|
||||
Artifacts = artifacts;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The number of artifacts found
|
||||
/// </summary>
|
||||
public int TotalCount { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// The list of found artifacts
|
||||
/// </summary>
|
||||
public IReadOnlyList<Artifact> Artifacts { get; private set; } = new List<Artifact>();
|
||||
|
||||
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Artifacts: {0}", TotalCount);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user