diff --git a/Octokit.GraphQL.IntegrationTests/Queries/RepositoryTests.cs b/Octokit.GraphQL.IntegrationTests/Queries/RepositoryTests.cs index 9a14a0dc..d447ee61 100644 --- a/Octokit.GraphQL.IntegrationTests/Queries/RepositoryTests.cs +++ b/Octokit.GraphQL.IntegrationTests/Queries/RepositoryTests.cs @@ -280,7 +280,7 @@ public async Task Query_Organization_Repositories_Select_Multiple_Object_Fragmen .Select(fragment).ToList().OrderBy(o => o.StringField1).First(), MentionableUser = organization.Repository("octokit.net") - .MentionableUsers(10, null, null, null).Nodes + .MentionableUsers(10, null, null, null, null).Nodes .Select(fragment).ToList().OrderBy(o => o.StringField1).First() }); diff --git a/Octokit.GraphQL/Model/AcceptEnterpriseAdministratorInvitationInput.cs b/Octokit.GraphQL/Model/AcceptEnterpriseAdministratorInvitationInput.cs new file mode 100644 index 00000000..d22f3576 --- /dev/null +++ b/Octokit.GraphQL/Model/AcceptEnterpriseAdministratorInvitationInput.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of AcceptEnterpriseAdministratorInvitation + /// + public class AcceptEnterpriseAdministratorInvitationInput + { + /// + /// The id of the invitation being accepted + /// + public ID InvitationId { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/AcceptEnterpriseAdministratorInvitationPayload.cs b/Octokit.GraphQL/Model/AcceptEnterpriseAdministratorInvitationPayload.cs new file mode 100644 index 00000000..c2727874 --- /dev/null +++ b/Octokit.GraphQL/Model/AcceptEnterpriseAdministratorInvitationPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of AcceptEnterpriseAdministratorInvitation + /// + public class AcceptEnterpriseAdministratorInvitationPayload : QueryableValue + { + internal AcceptEnterpriseAdministratorInvitationPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The invitation that was accepted. + /// + public EnterpriseAdministratorInvitation Invitation => this.CreateProperty(x => x.Invitation, Octokit.GraphQL.Model.EnterpriseAdministratorInvitation.Create); + + /// + /// A message confirming the result of accepting an administrator invitation. + /// + public string Message { get; } + + internal static AcceptEnterpriseAdministratorInvitationPayload Create(Expression expression) + { + return new AcceptEnterpriseAdministratorInvitationPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ActionExecutionCapabilitySetting.cs b/Octokit.GraphQL/Model/ActionExecutionCapabilitySetting.cs new file mode 100644 index 00000000..86333312 --- /dev/null +++ b/Octokit.GraphQL/Model/ActionExecutionCapabilitySetting.cs @@ -0,0 +1,38 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible capabilities for action executions setting. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ActionExecutionCapabilitySetting + { + /// + /// All action executions are disabled. + /// + [EnumMember(Value = "DISABLED")] + Disabled, + + /// + /// All action executions are enabled. + /// + [EnumMember(Value = "ALL_ACTIONS")] + AllActions, + + /// + /// Only actions defined within the repo are allowed. + /// + [EnumMember(Value = "LOCAL_ACTIONS_ONLY")] + LocalActionsOnly, + + /// + /// Organization administrators action execution capabilities. + /// + [EnumMember(Value = "NO_POLICY")] + NoPolicy, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ActorLocation.cs b/Octokit.GraphQL/Model/ActorLocation.cs new file mode 100644 index 00000000..1a95f551 --- /dev/null +++ b/Octokit.GraphQL/Model/ActorLocation.cs @@ -0,0 +1,48 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Location information for an actor + /// + public class ActorLocation : QueryableValue + { + internal ActorLocation(Expression expression) : base(expression) + { + } + + /// + /// City + /// + public string City { get; } + + /// + /// Country name + /// + public string Country { get; } + + /// + /// Country code + /// + public string CountryCode { get; } + + /// + /// Region name + /// + public string Region { get; } + + /// + /// Region or state code + /// + public string RegionCode { get; } + + internal static ActorLocation Create(Expression expression) + { + return new ActorLocation(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/AddPullRequestReviewCommentInput.cs b/Octokit.GraphQL/Model/AddPullRequestReviewCommentInput.cs index 1c7c9409..d43bdb3f 100644 --- a/Octokit.GraphQL/Model/AddPullRequestReviewCommentInput.cs +++ b/Octokit.GraphQL/Model/AddPullRequestReviewCommentInput.cs @@ -8,10 +8,15 @@ namespace Octokit.GraphQL.Model /// public class AddPullRequestReviewCommentInput { + /// + /// The node ID of the pull request reviewing + /// + public ID? PullRequestId { get; set; } + /// /// The Node ID of the review to modify. /// - public ID PullRequestReviewId { get; set; } + public ID? PullRequestReviewId { get; set; } /// /// The SHA of the commit to comment on. diff --git a/Octokit.GraphQL/Model/ArchiveRepositoryInput.cs b/Octokit.GraphQL/Model/ArchiveRepositoryInput.cs new file mode 100644 index 00000000..b4758b2b --- /dev/null +++ b/Octokit.GraphQL/Model/ArchiveRepositoryInput.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of ArchiveRepository + /// + public class ArchiveRepositoryInput + { + /// + /// The ID of the repository to mark as archived. + /// + public ID RepositoryId { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ArchiveRepositoryPayload.cs b/Octokit.GraphQL/Model/ArchiveRepositoryPayload.cs new file mode 100644 index 00000000..0e317578 --- /dev/null +++ b/Octokit.GraphQL/Model/ArchiveRepositoryPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of ArchiveRepository + /// + public class ArchiveRepositoryPayload : QueryableValue + { + internal ArchiveRepositoryPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The repository that was marked as archived. + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + internal static ArchiveRepositoryPayload Create(Expression expression) + { + return new ArchiveRepositoryPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/AssignedEvent.cs b/Octokit.GraphQL/Model/AssignedEvent.cs index 54d2e511..af019f3d 100644 --- a/Octokit.GraphQL/Model/AssignedEvent.cs +++ b/Octokit.GraphQL/Model/AssignedEvent.cs @@ -25,6 +25,11 @@ internal AssignedEvent(Expression expression) : base(expression) /// public IAssignable Assignable => this.CreateProperty(x => x.Assignable, Octokit.GraphQL.Model.Internal.StubIAssignable.Create); + /// + /// Identifies the user or mannequin that was assigned. + /// + public Assignee Assignee => this.CreateProperty(x => x.Assignee, Octokit.GraphQL.Model.Assignee.Create); + /// /// Identifies the date and time when the object was created. /// @@ -35,6 +40,7 @@ internal AssignedEvent(Expression expression) : base(expression) /// /// Identifies the user who was assigned. /// + [Obsolete(@"Assignees can now be mannequins. Use the `assignee` field instead. Removal on 2020-01-01 UTC.")] public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); internal static AssignedEvent Create(Expression expression) diff --git a/Octokit.GraphQL/Model/Assignee.cs b/Octokit.GraphQL/Model/Assignee.cs new file mode 100644 index 00000000..f86958d9 --- /dev/null +++ b/Octokit.GraphQL/Model/Assignee.cs @@ -0,0 +1,48 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Types that can be assigned to issues. + /// + public class Assignee : QueryableValue, IUnion + { + internal Assignee(Expression expression) : base(expression) + { + } + + public TResult Switch(Expression, Selector>> select) => default; + + public class Selector + { + /// + /// A special type of user which takes actions on behalf of GitHub Apps. + /// + public Selector Bot(Func selector) => default; + + /// + /// A placeholder user for attribution of imported data on GitHub. + /// + public Selector Mannequin(Func selector) => default; + + /// + /// An account on GitHub, with one or more owners, that has repositories, members and teams. + /// + public Selector Organization(Func selector) => default; + + /// + /// A user is an individual's account on GitHub that owns repositories and can make new content. + /// + public Selector User(Func selector) => default; + } + + internal static Assignee Create(Expression expression) + { + return new Assignee(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/AuditEntry.cs b/Octokit.GraphQL/Model/AuditEntry.cs new file mode 100644 index 00000000..3ad8f627 --- /dev/null +++ b/Octokit.GraphQL/Model/AuditEntry.cs @@ -0,0 +1,128 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Model; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An entry in the audit log. + /// + public interface IAuditEntry : IQueryableValue, IQueryableInterface + { + /// + /// The action name + /// + string Action { get; } + + /// + /// The user who initiated the action + /// + IQueryableList Actor { get; } + + /// + /// The IP address of the actor + /// + string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + ActorLocation ActorLocation { get; } + + /// + /// The username of the user who initiated the action + /// + string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + string CreatedAt { get; } + + /// + /// The corresponding operation type for the action + /// + OperationType? OperationType { get; } + + /// + /// The user affected by the action + /// + User User { get; } + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + string UserUrl { get; } + } +} + +namespace Octokit.GraphQL.Model.Internal +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + internal class StubIAuditEntry : QueryableValue, IAuditEntry + { + internal StubIAuditEntry(Expression expression) : base(expression) + { + } + + public string Action { get; } + + public IQueryableList Actor => this.CreateProperty(x => x.Actor); + + public string ActorIp { get; } + + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + public string ActorLogin { get; } + + public string ActorResourcePath { get; } + + public string ActorUrl { get; } + + public string CreatedAt { get; } + + public OperationType? OperationType { get; } + + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + public string UserLogin { get; } + + public string UserResourcePath { get; } + + public string UserUrl { get; } + + internal static StubIAuditEntry Create(Expression expression) + { + return new StubIAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CollectionItemContent.cs b/Octokit.GraphQL/Model/AuditEntryActor.cs similarity index 66% rename from Octokit.GraphQL/Model/CollectionItemContent.cs rename to Octokit.GraphQL/Model/AuditEntryActor.cs index 9e7ab1ae..7e32b1e9 100644 --- a/Octokit.GraphQL/Model/CollectionItemContent.cs +++ b/Octokit.GraphQL/Model/AuditEntryActor.cs @@ -7,11 +7,11 @@ namespace Octokit.GraphQL.Model using Octokit.GraphQL.Core.Builders; /// - /// Types that can be inside Collection Items. + /// Types that can initiate an audit log event. /// - public class CollectionItemContent : QueryableValue, IUnion + public class AuditEntryActor : QueryableValue, IUnion { - internal CollectionItemContent(Expression expression) : base(expression) + internal AuditEntryActor(Expression expression) : base(expression) { } @@ -20,9 +20,9 @@ internal CollectionItemContent(Expression expression) : base(expression) public class Selector { /// - /// A repository contains the content for a project. + /// A special type of user which takes actions on behalf of GitHub Apps. /// - public Selector Repository(Func selector) => default; + public Selector Bot(Func selector) => default; /// /// An account on GitHub, with one or more owners, that has repositories, members and teams. @@ -35,9 +35,9 @@ public class Selector public Selector User(Func selector) => default; } - internal static CollectionItemContent Create(Expression expression) + internal static AuditEntryActor Create(Expression expression) { - return new CollectionItemContent(expression); + return new AuditEntryActor(expression); } } } \ No newline at end of file diff --git a/Octokit.GraphQL/Model/AuditLogOrder.cs b/Octokit.GraphQL/Model/AuditLogOrder.cs new file mode 100644 index 00000000..eade5707 --- /dev/null +++ b/Octokit.GraphQL/Model/AuditLogOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for Audit Log connections. + /// + public class AuditLogOrder + { + /// + /// The field to order Audit Logs by. + /// + public AuditLogOrderField? Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection? Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/AuditLogOrderField.cs b/Octokit.GraphQL/Model/AuditLogOrderField.cs new file mode 100644 index 00000000..7edd1732 --- /dev/null +++ b/Octokit.GraphQL/Model/AuditLogOrderField.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which Audit Log connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum AuditLogOrderField + { + /// + /// Order audit log entries by timestamp + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CancelEnterpriseAdminInvitationInput.cs b/Octokit.GraphQL/Model/CancelEnterpriseAdminInvitationInput.cs new file mode 100644 index 00000000..229c4482 --- /dev/null +++ b/Octokit.GraphQL/Model/CancelEnterpriseAdminInvitationInput.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of CancelEnterpriseAdminInvitation + /// + public class CancelEnterpriseAdminInvitationInput + { + /// + /// The Node ID of the pending enterprise administrator invitation. + /// + public ID InvitationId { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CancelEnterpriseAdminInvitationPayload.cs b/Octokit.GraphQL/Model/CancelEnterpriseAdminInvitationPayload.cs new file mode 100644 index 00000000..3c8e0b40 --- /dev/null +++ b/Octokit.GraphQL/Model/CancelEnterpriseAdminInvitationPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of CancelEnterpriseAdminInvitation + /// + public class CancelEnterpriseAdminInvitationPayload : QueryableValue + { + internal CancelEnterpriseAdminInvitationPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The invitation that was canceled. + /// + public EnterpriseAdministratorInvitation Invitation => this.CreateProperty(x => x.Invitation, Octokit.GraphQL.Model.EnterpriseAdministratorInvitation.Create); + + /// + /// A message confirming the result of canceling an administrator invitation. + /// + public string Message { get; } + + internal static CancelEnterpriseAdminInvitationPayload Create(Expression expression) + { + return new CancelEnterpriseAdminInvitationPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CheckConclusionState.cs b/Octokit.GraphQL/Model/CheckConclusionState.cs index 1555cb1c..62c46149 100644 --- a/Octokit.GraphQL/Model/CheckConclusionState.cs +++ b/Octokit.GraphQL/Model/CheckConclusionState.cs @@ -46,5 +46,17 @@ public enum CheckConclusionState /// [EnumMember(Value = "NEUTRAL")] Neutral, + + /// + /// The check suite or run was skipped. For internal use only. + /// + [EnumMember(Value = "SKIPPED")] + Skipped, + + /// + /// The check suite or run was marked stale. For internal use only. + /// + [EnumMember(Value = "STALE")] + Stale, } } \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CheckSuite.cs b/Octokit.GraphQL/Model/CheckSuite.cs index 3bc2d9f1..a02e2488 100644 --- a/Octokit.GraphQL/Model/CheckSuite.cs +++ b/Octokit.GraphQL/Model/CheckSuite.cs @@ -81,6 +81,11 @@ internal CheckSuite(Expression expression) : base(expression) /// public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + /// + /// The HTTP path for this check suite + /// + public string ResourcePath { get; } + /// /// The status of this check suite. /// @@ -91,6 +96,11 @@ internal CheckSuite(Expression expression) : base(expression) /// public DateTimeOffset UpdatedAt { get; } + /// + /// The HTTP URL for this check suite + /// + public string Url { get; } + internal static CheckSuite Create(Expression expression) { return new CheckSuite(expression); diff --git a/Octokit.GraphQL/Model/CommentCannotUpdateReason.cs b/Octokit.GraphQL/Model/CommentCannotUpdateReason.cs index 251b9162..40d57587 100644 --- a/Octokit.GraphQL/Model/CommentCannotUpdateReason.cs +++ b/Octokit.GraphQL/Model/CommentCannotUpdateReason.cs @@ -11,6 +11,12 @@ namespace Octokit.GraphQL.Model [JsonConverter(typeof(StringEnumConverter))] public enum CommentCannotUpdateReason { + /// + /// Unable to create comment because repository is archived. + /// + [EnumMember(Value = "ARCHIVED")] + Archived, + /// /// You must be the author or have write access to this repository to update this comment. /// diff --git a/Octokit.GraphQL/Model/CommitComment.cs b/Octokit.GraphQL/Model/CommitComment.cs index 48a5d029..037ef27e 100644 --- a/Octokit.GraphQL/Model/CommitComment.cs +++ b/Octokit.GraphQL/Model/CommitComment.cs @@ -31,7 +31,7 @@ internal CommitComment(Expression expression) : base(expression) public string Body { get; } /// - /// Identifies the comment body rendered to HTML. + /// The body rendered to HTML. /// public string BodyHTML { get; } diff --git a/Octokit.GraphQL/Model/ConnectedEvent.cs b/Octokit.GraphQL/Model/ConnectedEvent.cs new file mode 100644 index 00000000..118647e4 --- /dev/null +++ b/Octokit.GraphQL/Model/ConnectedEvent.cs @@ -0,0 +1,50 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Represents a 'connected' event on a given issue or pull request. + /// + public class ConnectedEvent : QueryableValue + { + internal ConnectedEvent(Expression expression) : base(expression) + { + } + + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + public ID Id { get; } + + /// + /// Reference originated in a different repository. + /// + public bool IsCrossRepository { get; } + + /// + /// Issue or pull request that made the reference. + /// + public ReferencedSubject Source => this.CreateProperty(x => x.Source, Octokit.GraphQL.Model.ReferencedSubject.Create); + + /// + /// Issue or pull request which was connected. + /// + public ReferencedSubject Subject => this.CreateProperty(x => x.Subject, Octokit.GraphQL.Model.ReferencedSubject.Create); + + internal static ConnectedEvent Create(Expression expression) + { + return new ConnectedEvent(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ContentAttachment.cs b/Octokit.GraphQL/Model/ContentAttachment.cs deleted file mode 100644 index 5259ee70..00000000 --- a/Octokit.GraphQL/Model/ContentAttachment.cs +++ /dev/null @@ -1,45 +0,0 @@ -namespace Octokit.GraphQL.Model -{ - using System; - using System.Collections.Generic; - using System.Linq.Expressions; - using Octokit.GraphQL.Core; - using Octokit.GraphQL.Core.Builders; - - /// - /// A content attachment - /// - public class ContentAttachment : QueryableValue - { - internal ContentAttachment(Expression expression) : base(expression) - { - } - - /// - /// The body text of the content attachment. This parameter supports markdown. - /// - public string Body { get; } - - /// - /// The content reference that the content attachment is attached to. - /// - public ContentReference ContentReference => this.CreateProperty(x => x.ContentReference, Octokit.GraphQL.Model.ContentReference.Create); - - /// - /// Identifies the primary key from the database. - /// - public int DatabaseId { get; } - - public ID Id { get; } - - /// - /// The title of the content attachment. - /// - public string Title { get; } - - internal static ContentAttachment Create(Expression expression) - { - return new ContentAttachment(expression); - } - } -} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ContentReference.cs b/Octokit.GraphQL/Model/ContentReference.cs deleted file mode 100644 index 882bf28d..00000000 --- a/Octokit.GraphQL/Model/ContentReference.cs +++ /dev/null @@ -1,35 +0,0 @@ -namespace Octokit.GraphQL.Model -{ - using System; - using System.Collections.Generic; - using System.Linq.Expressions; - using Octokit.GraphQL.Core; - using Octokit.GraphQL.Core.Builders; - - /// - /// A content reference - /// - public class ContentReference : QueryableValue - { - internal ContentReference(Expression expression) : base(expression) - { - } - - /// - /// Identifies the primary key from the database. - /// - public int DatabaseId { get; } - - public ID Id { get; } - - /// - /// The reference of the content reference. - /// - public string Reference { get; } - - internal static ContentReference Create(Expression expression) - { - return new ContentReference(expression); - } - } -} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ContributionsCollection.cs b/Octokit.GraphQL/Model/ContributionsCollection.cs index c0bb9e2b..d6883880 100644 --- a/Octokit.GraphQL/Model/ContributionsCollection.cs +++ b/Octokit.GraphQL/Model/ContributionsCollection.cs @@ -49,20 +49,17 @@ internal ContributionsCollection(Expression expression) : base(expression) /// /// The first issue the user opened on GitHub. This will be null if that issue was opened outside the collection's time range and ignoreTimeRange is false. If the issue is not visible but the user has opted to show private contributions, a RestrictedContribution will be returned. /// - /// If true, the first issue will be returned even if it was opened outside of the collection's time range. **Upcoming Change on 2019-07-01 UTC** **Description:** `ignoreTimeRange` will be removed. Use a `ContributionsCollection` starting sufficiently far back **Reason:** ignore_time_range will be removed - public CreatedIssueOrRestrictedContribution FirstIssueContribution(Arg? ignoreTimeRange = null) => this.CreateMethodCall(x => x.FirstIssueContribution(ignoreTimeRange), Octokit.GraphQL.Model.CreatedIssueOrRestrictedContribution.Create); + public CreatedIssueOrRestrictedContribution FirstIssueContribution => this.CreateProperty(x => x.FirstIssueContribution, Octokit.GraphQL.Model.CreatedIssueOrRestrictedContribution.Create); /// /// The first pull request the user opened on GitHub. This will be null if that pull request was opened outside the collection's time range and ignoreTimeRange is not true. If the pull request is not visible but the user has opted to show private contributions, a RestrictedContribution will be returned. /// - /// If true, the first pull request will be returned even if it was opened outside of the collection's time range. **Upcoming Change on 2019-07-01 UTC** **Description:** `ignoreTimeRange` will be removed. Use a `ContributionsCollection` starting sufficiently far back **Reason:** ignore_time_range will be removed - public CreatedPullRequestOrRestrictedContribution FirstPullRequestContribution(Arg? ignoreTimeRange = null) => this.CreateMethodCall(x => x.FirstPullRequestContribution(ignoreTimeRange), Octokit.GraphQL.Model.CreatedPullRequestOrRestrictedContribution.Create); + public CreatedPullRequestOrRestrictedContribution FirstPullRequestContribution => this.CreateProperty(x => x.FirstPullRequestContribution, Octokit.GraphQL.Model.CreatedPullRequestOrRestrictedContribution.Create); /// /// The first repository the user created on GitHub. This will be null if that first repository was created outside the collection's time range and ignoreTimeRange is false. If the repository is not visible, then a RestrictedContribution is returned. /// - /// If true, the first repository will be returned even if it was opened outside of the collection's time range. **Upcoming Change on 2019-07-01 UTC** **Description:** `ignoreTimeRange` will be removed. Use a `ContributionsCollection` starting sufficiently far back **Reason:** ignore_time_range will be removed - public CreatedRepositoryOrRestrictedContribution FirstRepositoryContribution(Arg? ignoreTimeRange = null) => this.CreateMethodCall(x => x.FirstRepositoryContribution(ignoreTimeRange), Octokit.GraphQL.Model.CreatedRepositoryOrRestrictedContribution.Create); + public CreatedRepositoryOrRestrictedContribution FirstRepositoryContribution => this.CreateProperty(x => x.FirstRepositoryContribution, Octokit.GraphQL.Model.CreatedRepositoryOrRestrictedContribution.Create); /// /// Does the user have any more activity in the timeline that occurred prior to the collection's time range? @@ -107,8 +104,7 @@ internal ContributionsCollection(Expression expression) : base(expression) /// /// When the user signed up for GitHub. This will be null if that sign up date falls outside the collection's time range and ignoreTimeRange is false. /// - /// If true, the contribution will be returned even if the user signed up outside of the collection's time range. **Upcoming Change on 2019-07-01 UTC** **Description:** `ignoreTimeRange` will be removed. Use a `ContributionsCollection` starting sufficiently far back **Reason:** ignore_time_range will be removed - public JoinedGitHubContribution JoinedGitHubContribution(Arg? ignoreTimeRange = null) => this.CreateMethodCall(x => x.JoinedGitHubContribution(ignoreTimeRange), Octokit.GraphQL.Model.JoinedGitHubContribution.Create); + public JoinedGitHubContribution JoinedGitHubContribution => this.CreateProperty(x => x.JoinedGitHubContribution, Octokit.GraphQL.Model.JoinedGitHubContribution.Create); /// /// The date of the most recent restricted contribution the user made in this time period. Can only be non-null when the user has enabled private contribution counts. diff --git a/Octokit.GraphQL/Model/CreateBranchProtectionRuleInput.cs b/Octokit.GraphQL/Model/CreateBranchProtectionRuleInput.cs index fbade6e4..4c8cb1de 100644 --- a/Octokit.GraphQL/Model/CreateBranchProtectionRuleInput.cs +++ b/Octokit.GraphQL/Model/CreateBranchProtectionRuleInput.cs @@ -74,7 +74,7 @@ public class CreateBranchProtectionRuleInput public bool? RestrictsPushes { get; set; } /// - /// A list of User or Team IDs allowed to push to matching branches. + /// A list of User, Team or App IDs allowed to push to matching branches. /// public IEnumerable PushActorIds { get; set; } diff --git a/Octokit.GraphQL/Model/CreateEnterpriseOrganizationInput.cs b/Octokit.GraphQL/Model/CreateEnterpriseOrganizationInput.cs new file mode 100644 index 00000000..e766bc96 --- /dev/null +++ b/Octokit.GraphQL/Model/CreateEnterpriseOrganizationInput.cs @@ -0,0 +1,41 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of CreateEnterpriseOrganization + /// + public class CreateEnterpriseOrganizationInput + { + /// + /// The ID of the enterprise owning the new organization. + /// + public ID EnterpriseId { get; set; } + + /// + /// The login of the new organization. + /// + public string Login { get; set; } + + /// + /// The profile name of the new organization. + /// + public string ProfileName { get; set; } + + /// + /// The email used for sending billing receipts. + /// + public string BillingEmail { get; set; } + + /// + /// The logins for the administrators of the new organization. + /// + public IEnumerable AdminLogins { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CreateEnterpriseOrganizationPayload.cs b/Octokit.GraphQL/Model/CreateEnterpriseOrganizationPayload.cs new file mode 100644 index 00000000..c7c3cf27 --- /dev/null +++ b/Octokit.GraphQL/Model/CreateEnterpriseOrganizationPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of CreateEnterpriseOrganization + /// + public class CreateEnterpriseOrganizationPayload : QueryableValue + { + internal CreateEnterpriseOrganizationPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise that owns the created organization. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// The organization that was created. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + internal static CreateEnterpriseOrganizationPayload Create(Expression expression) + { + return new CreateEnterpriseOrganizationPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CreateProjectInput.cs b/Octokit.GraphQL/Model/CreateProjectInput.cs index b5a54380..282b8df5 100644 --- a/Octokit.GraphQL/Model/CreateProjectInput.cs +++ b/Octokit.GraphQL/Model/CreateProjectInput.cs @@ -23,6 +23,16 @@ public class CreateProjectInput /// public string Body { get; set; } + /// + /// The name of the GitHub-provided template. + /// + public ProjectTemplate? Template { get; set; } + + /// + /// A list of repository IDs to create as linked repositories for the project + /// + public IEnumerable RepositoryIds { get; set; } + /// /// A unique identifier for the client performing the mutation. /// diff --git a/Octokit.GraphQL/Model/CreateRefInput.cs b/Octokit.GraphQL/Model/CreateRefInput.cs new file mode 100644 index 00000000..cdbf780d --- /dev/null +++ b/Octokit.GraphQL/Model/CreateRefInput.cs @@ -0,0 +1,31 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of CreateRef + /// + public class CreateRefInput + { + /// + /// The Node ID of the Repository to create the Ref in. + /// + public ID RepositoryId { get; set; } + + /// + /// The fully qualified name of the new Ref (ie: `refs/heads/my_new_branch`). + /// + public string Name { get; set; } + + /// + /// The GitObjectID that the new Ref shall target. Must point to a commit. + /// + public string Oid { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CreateRefPayload.cs b/Octokit.GraphQL/Model/CreateRefPayload.cs new file mode 100644 index 00000000..1363b29b --- /dev/null +++ b/Octokit.GraphQL/Model/CreateRefPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of CreateRef + /// + public class CreateRefPayload : QueryableValue + { + internal CreateRefPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The newly created ref. + /// + public Ref Ref => this.CreateProperty(x => x.Ref, Octokit.GraphQL.Model.Ref.Create); + + internal static CreateRefPayload Create(Expression expression) + { + return new CreateRefPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CreateTeamDiscussionCommentInput.cs b/Octokit.GraphQL/Model/CreateTeamDiscussionCommentInput.cs new file mode 100644 index 00000000..f6c07393 --- /dev/null +++ b/Octokit.GraphQL/Model/CreateTeamDiscussionCommentInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of CreateTeamDiscussionComment + /// + public class CreateTeamDiscussionCommentInput + { + /// + /// The ID of the discussion to which the comment belongs. + /// + public ID DiscussionId { get; set; } + + /// + /// The content of the comment. + /// + public string Body { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CreateTeamDiscussionCommentPayload.cs b/Octokit.GraphQL/Model/CreateTeamDiscussionCommentPayload.cs new file mode 100644 index 00000000..c0a54ca9 --- /dev/null +++ b/Octokit.GraphQL/Model/CreateTeamDiscussionCommentPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of CreateTeamDiscussionComment + /// + public class CreateTeamDiscussionCommentPayload : QueryableValue + { + internal CreateTeamDiscussionCommentPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The new comment. + /// + public TeamDiscussionComment TeamDiscussionComment => this.CreateProperty(x => x.TeamDiscussionComment, Octokit.GraphQL.Model.TeamDiscussionComment.Create); + + internal static CreateTeamDiscussionCommentPayload Create(Expression expression) + { + return new CreateTeamDiscussionCommentPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CreateTeamDiscussionInput.cs b/Octokit.GraphQL/Model/CreateTeamDiscussionInput.cs new file mode 100644 index 00000000..4c1931de --- /dev/null +++ b/Octokit.GraphQL/Model/CreateTeamDiscussionInput.cs @@ -0,0 +1,36 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of CreateTeamDiscussion + /// + public class CreateTeamDiscussionInput + { + /// + /// The ID of the team to which the discussion belongs. + /// + public ID TeamId { get; set; } + + /// + /// The title of the discussion. + /// + public string Title { get; set; } + + /// + /// The content of the discussion. + /// + public string Body { get; set; } + + /// + /// If true, restricts the visiblity of this discussion to team members and organization admins. If false or not specified, allows any organization member to view this discussion. + /// + public bool? Private { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CreateTeamDiscussionPayload.cs b/Octokit.GraphQL/Model/CreateTeamDiscussionPayload.cs new file mode 100644 index 00000000..44612e73 --- /dev/null +++ b/Octokit.GraphQL/Model/CreateTeamDiscussionPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of CreateTeamDiscussion + /// + public class CreateTeamDiscussionPayload : QueryableValue + { + internal CreateTeamDiscussionPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The new discussion. + /// + public TeamDiscussion TeamDiscussion => this.CreateProperty(x => x.TeamDiscussion, Octokit.GraphQL.Model.TeamDiscussion.Create); + + internal static CreateTeamDiscussionPayload Create(Expression expression) + { + return new CreateTeamDiscussionPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UnpinIssueInput.cs b/Octokit.GraphQL/Model/DeleteRefInput.cs similarity index 68% rename from Octokit.GraphQL/Model/UnpinIssueInput.cs rename to Octokit.GraphQL/Model/DeleteRefInput.cs index 3d94cc5c..a7bcef1f 100644 --- a/Octokit.GraphQL/Model/UnpinIssueInput.cs +++ b/Octokit.GraphQL/Model/DeleteRefInput.cs @@ -4,14 +4,14 @@ namespace Octokit.GraphQL.Model using System.Collections.Generic; /// - /// Autogenerated input type of UnpinIssue + /// Autogenerated input type of DeleteRef /// - public class UnpinIssueInput + public class DeleteRefInput { /// - /// The ID of the issue to be unpinned + /// The Node ID of the Ref to be deleted. /// - public ID IssueId { get; set; } + public ID RefId { get; set; } /// /// A unique identifier for the client performing the mutation. diff --git a/Octokit.GraphQL/Model/DeleteRefPayload.cs b/Octokit.GraphQL/Model/DeleteRefPayload.cs new file mode 100644 index 00000000..76cf0987 --- /dev/null +++ b/Octokit.GraphQL/Model/DeleteRefPayload.cs @@ -0,0 +1,28 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of DeleteRef + /// + public class DeleteRefPayload : QueryableValue + { + internal DeleteRefPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + internal static DeleteRefPayload Create(Expression expression) + { + return new DeleteRefPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/DeleteTeamDiscussionCommentInput.cs b/Octokit.GraphQL/Model/DeleteTeamDiscussionCommentInput.cs new file mode 100644 index 00000000..09507e49 --- /dev/null +++ b/Octokit.GraphQL/Model/DeleteTeamDiscussionCommentInput.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of DeleteTeamDiscussionComment + /// + public class DeleteTeamDiscussionCommentInput + { + /// + /// The ID of the comment to delete. + /// + public ID Id { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/DeleteTeamDiscussionCommentPayload.cs b/Octokit.GraphQL/Model/DeleteTeamDiscussionCommentPayload.cs new file mode 100644 index 00000000..b3fd0f34 --- /dev/null +++ b/Octokit.GraphQL/Model/DeleteTeamDiscussionCommentPayload.cs @@ -0,0 +1,28 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of DeleteTeamDiscussionComment + /// + public class DeleteTeamDiscussionCommentPayload : QueryableValue + { + internal DeleteTeamDiscussionCommentPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + internal static DeleteTeamDiscussionCommentPayload Create(Expression expression) + { + return new DeleteTeamDiscussionCommentPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UnminimizeCommentInput.cs b/Octokit.GraphQL/Model/DeleteTeamDiscussionInput.cs similarity index 65% rename from Octokit.GraphQL/Model/UnminimizeCommentInput.cs rename to Octokit.GraphQL/Model/DeleteTeamDiscussionInput.cs index 7f659bd6..16f7fcae 100644 --- a/Octokit.GraphQL/Model/UnminimizeCommentInput.cs +++ b/Octokit.GraphQL/Model/DeleteTeamDiscussionInput.cs @@ -4,14 +4,14 @@ namespace Octokit.GraphQL.Model using System.Collections.Generic; /// - /// Autogenerated input type of UnminimizeComment + /// Autogenerated input type of DeleteTeamDiscussion /// - public class UnminimizeCommentInput + public class DeleteTeamDiscussionInput { /// - /// The Node ID of the subject to modify. + /// The discussion ID to delete. /// - public ID SubjectId { get; set; } + public ID Id { get; set; } /// /// A unique identifier for the client performing the mutation. diff --git a/Octokit.GraphQL/Model/DeleteTeamDiscussionPayload.cs b/Octokit.GraphQL/Model/DeleteTeamDiscussionPayload.cs new file mode 100644 index 00000000..e303bdb4 --- /dev/null +++ b/Octokit.GraphQL/Model/DeleteTeamDiscussionPayload.cs @@ -0,0 +1,28 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of DeleteTeamDiscussion + /// + public class DeleteTeamDiscussionPayload : QueryableValue + { + internal DeleteTeamDiscussionPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + internal static DeleteTeamDiscussionPayload Create(Expression expression) + { + return new DeleteTeamDiscussionPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/DisconnectedEvent.cs b/Octokit.GraphQL/Model/DisconnectedEvent.cs new file mode 100644 index 00000000..16ba955b --- /dev/null +++ b/Octokit.GraphQL/Model/DisconnectedEvent.cs @@ -0,0 +1,50 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Represents a 'disconnected' event on a given issue or pull request. + /// + public class DisconnectedEvent : QueryableValue + { + internal DisconnectedEvent(Expression expression) : base(expression) + { + } + + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + public ID Id { get; } + + /// + /// Reference originated in a different repository. + /// + public bool IsCrossRepository { get; } + + /// + /// Issue or pull request from which the issue was disconnected. + /// + public ReferencedSubject Source => this.CreateProperty(x => x.Source, Octokit.GraphQL.Model.ReferencedSubject.Create); + + /// + /// Issue or pull request which was disconnected. + /// + public ReferencedSubject Subject => this.CreateProperty(x => x.Subject, Octokit.GraphQL.Model.ReferencedSubject.Create); + + internal static DisconnectedEvent Create(Expression expression) + { + return new DisconnectedEvent(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/Enterprise.cs b/Octokit.GraphQL/Model/Enterprise.cs new file mode 100644 index 00000000..5ad84d65 --- /dev/null +++ b/Octokit.GraphQL/Model/Enterprise.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An account to manage multiple organizations with consolidated policy and billing. + /// + public class Enterprise : QueryableValue + { + internal Enterprise(Expression expression) : base(expression) + { + } + + /// + /// A URL pointing to the enterprise's public avatar. + /// + /// The size of the resulting square image. + public string AvatarUrl(Arg? size = null) => default; + + /// + /// Enterprise billing information visible to enterprise billing managers. + /// + public EnterpriseBillingInfo BillingInfo => this.CreateProperty(x => x.BillingInfo, Octokit.GraphQL.Model.EnterpriseBillingInfo.Create); + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// Identifies the primary key from the database. + /// + public int? DatabaseId { get; } + + /// + /// The description of the enterprise. + /// + public string Description { get; } + + /// + /// The description of the enterprise as HTML. + /// + public string DescriptionHTML { get; } + + public ID Id { get; } + + /// + /// The location of the enterprise. + /// + public string Location { get; } + + /// + /// A list of users who are members of this enterprise. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Only return members within the selected GitHub Enterprise deployment + /// Ordering options for members returned from the connection. + /// Only return members within the organizations with these logins + /// The search string to look for. + /// The role of the user in the enterprise organization or server. + public EnterpriseMemberConnection Members(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? deployment = null, Arg? orderBy = null, Arg>? organizationLogins = null, Arg? query = null, Arg? role = null) => this.CreateMethodCall(x => x.Members(first, after, last, before, deployment, orderBy, organizationLogins, query, role), Octokit.GraphQL.Model.EnterpriseMemberConnection.Create); + + /// + /// The name of the enterprise. + /// + public string Name { get; } + + /// + /// A list of organizations that belong to this enterprise. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations returned from the connection. + /// The search string to look for. + public OrganizationConnection Organizations(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null, Arg? query = null) => this.CreateMethodCall(x => x.Organizations(first, after, last, before, orderBy, query), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// Enterprise information only visible to enterprise owners. + /// + public EnterpriseOwnerInfo OwnerInfo => this.CreateProperty(x => x.OwnerInfo, Octokit.GraphQL.Model.EnterpriseOwnerInfo.Create); + + /// + /// The HTTP path for this enterprise. + /// + public string ResourcePath { get; } + + /// + /// The HTTP URL for this enterprise. + /// + public string Url { get; } + + /// + /// A list of user accounts on this enterprise. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public EnterpriseUserAccountConnection UserAccounts(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.UserAccounts(first, after, last, before), Octokit.GraphQL.Model.EnterpriseUserAccountConnection.Create); + + /// + /// Is the current viewer an admin of this enterprise? + /// + public bool ViewerIsAdmin { get; } + + /// + /// The URL of the enterprise website. + /// + public string WebsiteUrl { get; } + + internal static Enterprise Create(Expression expression) + { + return new Enterprise(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseAdministratorConnection.cs b/Octokit.GraphQL/Model/EnterpriseAdministratorConnection.cs new file mode 100644 index 00000000..00a718d5 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseAdministratorConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for User. + /// + public class EnterpriseAdministratorConnection : QueryableValue, IPagingConnection + { + internal EnterpriseAdministratorConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseAdministratorConnection Create(Expression expression) + { + return new EnterpriseAdministratorConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseAdministratorEdge.cs b/Octokit.GraphQL/Model/EnterpriseAdministratorEdge.cs new file mode 100644 index 00000000..ab510972 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseAdministratorEdge.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A User who is an administrator of an enterprise. + /// + public class EnterpriseAdministratorEdge : QueryableValue + { + internal EnterpriseAdministratorEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public User Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.User.Create); + + /// + /// The role of the administrator. + /// + public EnterpriseAdministratorRole Role { get; } + + internal static EnterpriseAdministratorEdge Create(Expression expression) + { + return new EnterpriseAdministratorEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseAdministratorInvitation.cs b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitation.cs new file mode 100644 index 00000000..c75a33fb --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitation.cs @@ -0,0 +1,55 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An invitation for a user to become an owner or billing manager of an enterprise. + /// + public class EnterpriseAdministratorInvitation : QueryableValue + { + internal EnterpriseAdministratorInvitation(Expression expression) : base(expression) + { + } + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// The email of the person who was invited to the enterprise. + /// + public string Email { get; } + + /// + /// The enterprise the invitation is for. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + public ID Id { get; } + + /// + /// The user who was invited to the enterprise. + /// + public User Invitee => this.CreateProperty(x => x.Invitee, Octokit.GraphQL.Model.User.Create); + + /// + /// The user who created the invitation. + /// + public User Inviter => this.CreateProperty(x => x.Inviter, Octokit.GraphQL.Model.User.Create); + + /// + /// The invitee's pending role in the enterprise (owner or billing_manager). + /// + public EnterpriseAdministratorRole Role { get; } + + internal static EnterpriseAdministratorInvitation Create(Expression expression) + { + return new EnterpriseAdministratorInvitation(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationConnection.cs b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationConnection.cs new file mode 100644 index 00000000..b74fee4d --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for EnterpriseAdministratorInvitation. + /// + public class EnterpriseAdministratorInvitationConnection : QueryableValue, IPagingConnection + { + internal EnterpriseAdministratorInvitationConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseAdministratorInvitationConnection Create(Expression expression) + { + return new EnterpriseAdministratorInvitationConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationEdge.cs b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationEdge.cs new file mode 100644 index 00000000..46f403c9 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class EnterpriseAdministratorInvitationEdge : QueryableValue + { + internal EnterpriseAdministratorInvitationEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public EnterpriseAdministratorInvitation Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.EnterpriseAdministratorInvitation.Create); + + internal static EnterpriseAdministratorInvitationEdge Create(Expression expression) + { + return new EnterpriseAdministratorInvitationEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationOrder.cs b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationOrder.cs new file mode 100644 index 00000000..b7ae5162 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for enterprise administrator invitation connections + /// + public class EnterpriseAdministratorInvitationOrder + { + /// + /// The field to order enterprise administrator invitations by. + /// + public EnterpriseAdministratorInvitationOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationOrderField.cs b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationOrderField.cs new file mode 100644 index 00000000..d007769c --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseAdministratorInvitationOrderField.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which enterprise administrator invitation connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseAdministratorInvitationOrderField + { + /// + /// Order enterprise administrator member invitations by creation time + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseAdministratorRole.cs b/Octokit.GraphQL/Model/EnterpriseAdministratorRole.cs new file mode 100644 index 00000000..d211caae --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseAdministratorRole.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible administrator roles in an enterprise account. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseAdministratorRole + { + /// + /// Represents an owner of the enterprise account. + /// + [EnumMember(Value = "OWNER")] + Owner, + + /// + /// Represents a billing manager of the enterprise account. + /// + [EnumMember(Value = "BILLING_MANAGER")] + BillingManager, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseAuditEntryData.cs b/Octokit.GraphQL/Model/EnterpriseAuditEntryData.cs new file mode 100644 index 00000000..1336fc8b --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseAuditEntryData.cs @@ -0,0 +1,58 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Model; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Metadata for an audit entry containing enterprise account information. + /// + public interface IEnterpriseAuditEntryData : IQueryableValue, IQueryableInterface + { + /// + /// The HTTP path for this enterprise. + /// + string EnterpriseResourcePath { get; } + + /// + /// The slug of the enterprise. + /// + string EnterpriseSlug { get; } + + /// + /// The HTTP URL for this enterprise. + /// + string EnterpriseUrl { get; } + } +} + +namespace Octokit.GraphQL.Model.Internal +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + internal class StubIEnterpriseAuditEntryData : QueryableValue, IEnterpriseAuditEntryData + { + internal StubIEnterpriseAuditEntryData(Expression expression) : base(expression) + { + } + + public string EnterpriseResourcePath { get; } + + public string EnterpriseSlug { get; } + + public string EnterpriseUrl { get; } + + internal static StubIEnterpriseAuditEntryData Create(Expression expression) + { + return new StubIEnterpriseAuditEntryData(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseBillingInfo.cs b/Octokit.GraphQL/Model/EnterpriseBillingInfo.cs new file mode 100644 index 00000000..aedab31f --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseBillingInfo.cs @@ -0,0 +1,85 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Enterprise billing information visible to enterprise billing managers and owners. + /// + public class EnterpriseBillingInfo : QueryableValue + { + internal EnterpriseBillingInfo(Expression expression) : base(expression) + { + } + + /// + /// The number of licenseable users/emails across the enterprise. + /// + public int AllLicensableUsersCount { get; } + + /// + /// The number of data packs used by all organizations owned by the enterprise. + /// + public int AssetPacks { get; } + + /// + /// The number of available seats across all owned organizations based on the unique number of billable users. + /// + [Obsolete(@"`availableSeats` will be replaced with `totalAvailableLicenses` to provide more clarity on the value being returned Use EnterpriseBillingInfo.totalAvailableLicenses instead. Removal on 2020-01-01 UTC.")] + public int AvailableSeats { get; } + + /// + /// The bandwidth quota in GB for all organizations owned by the enterprise. + /// + public double BandwidthQuota { get; } + + /// + /// The bandwidth usage in GB for all organizations owned by the enterprise. + /// + public double BandwidthUsage { get; } + + /// + /// The bandwidth usage as a percentage of the bandwidth quota. + /// + public int BandwidthUsagePercentage { get; } + + /// + /// The total seats across all organizations owned by the enterprise. + /// + [Obsolete(@"`seats` will be replaced with `totalLicenses` to provide more clarity on the value being returned Use EnterpriseBillingInfo.totalLicenses instead. Removal on 2020-01-01 UTC.")] + public int Seats { get; } + + /// + /// The storage quota in GB for all organizations owned by the enterprise. + /// + public double StorageQuota { get; } + + /// + /// The storage usage in GB for all organizations owned by the enterprise. + /// + public double StorageUsage { get; } + + /// + /// The storage usage as a percentage of the storage quota. + /// + public int StorageUsagePercentage { get; } + + /// + /// The number of available licenses across all owned organizations based on the unique number of billable users. + /// + public int TotalAvailableLicenses { get; } + + /// + /// The total number of licenses allocated. + /// + public int TotalLicenses { get; } + + internal static EnterpriseBillingInfo Create(Expression expression) + { + return new EnterpriseBillingInfo(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseDefaultRepositoryPermissionSettingValue.cs b/Octokit.GraphQL/Model/EnterpriseDefaultRepositoryPermissionSettingValue.cs new file mode 100644 index 00000000..230a19fd --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseDefaultRepositoryPermissionSettingValue.cs @@ -0,0 +1,44 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible values for the enterprise default repository permission setting. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseDefaultRepositoryPermissionSettingValue + { + /// + /// Organizations in the enterprise choose default repository permissions for their members. + /// + [EnumMember(Value = "NO_POLICY")] + NoPolicy, + + /// + /// Organization members will be able to clone, pull, push, and add new collaborators to all organization repositories. + /// + [EnumMember(Value = "ADMIN")] + Admin, + + /// + /// Organization members will be able to clone, pull, and push all organization repositories. + /// + [EnumMember(Value = "WRITE")] + Write, + + /// + /// Organization members will be able to clone and pull all organization repositories. + /// + [EnumMember(Value = "READ")] + Read, + + /// + /// Organization members will only be able to clone and pull public repositories. + /// + [EnumMember(Value = "NONE")] + None, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseEnabledDisabledSettingValue.cs b/Octokit.GraphQL/Model/EnterpriseEnabledDisabledSettingValue.cs new file mode 100644 index 00000000..c5780f12 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseEnabledDisabledSettingValue.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible values for an enabled/disabled enterprise setting. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseEnabledDisabledSettingValue + { + /// + /// The setting is enabled for organizations in the enterprise. + /// + [EnumMember(Value = "ENABLED")] + Enabled, + + /// + /// The setting is disabled for organizations in the enterprise. + /// + [EnumMember(Value = "DISABLED")] + Disabled, + + /// + /// There is no policy set for organizations in the enterprise. + /// + [EnumMember(Value = "NO_POLICY")] + NoPolicy, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseEnabledSettingValue.cs b/Octokit.GraphQL/Model/EnterpriseEnabledSettingValue.cs new file mode 100644 index 00000000..2eba60c9 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseEnabledSettingValue.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible values for an enabled/no policy enterprise setting. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseEnabledSettingValue + { + /// + /// The setting is enabled for organizations in the enterprise. + /// + [EnumMember(Value = "ENABLED")] + Enabled, + + /// + /// There is no policy set for organizations in the enterprise. + /// + [EnumMember(Value = "NO_POLICY")] + NoPolicy, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseIdentityProvider.cs b/Octokit.GraphQL/Model/EnterpriseIdentityProvider.cs new file mode 100644 index 00000000..30916494 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseIdentityProvider.cs @@ -0,0 +1,69 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An identity provider configured to provision identities for an enterprise. + /// + public class EnterpriseIdentityProvider : QueryableValue + { + internal EnterpriseIdentityProvider(Expression expression) : base(expression) + { + } + + /// + /// The digest algorithm used to sign SAML requests for the identity provider. + /// + public SamlDigestAlgorithm? DigestMethod { get; } + + /// + /// The enterprise this identity provider belongs to. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// ExternalIdentities provisioned by this identity provider. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public ExternalIdentityConnection ExternalIdentities(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.ExternalIdentities(first, after, last, before), Octokit.GraphQL.Model.ExternalIdentityConnection.Create); + + public ID Id { get; } + + /// + /// The x509 certificate used by the identity provider to sign assertions and responses. + /// + public string IdpCertificate { get; } + + /// + /// The Issuer Entity ID for the SAML identity provider. + /// + public string Issuer { get; } + + /// + /// Recovery codes that can be used by admins to access the enterprise if the identity provider is unavailable. + /// + public IEnumerable RecoveryCodes { get; } + + /// + /// The signature algorithm used to sign SAML requests for the identity provider. + /// + public SamlSignatureAlgorithm? SignatureMethod { get; } + + /// + /// The URL endpoint for the identity provider's SAML SSO. + /// + public string SsoUrl { get; } + + internal static EnterpriseIdentityProvider Create(Expression expression) + { + return new EnterpriseIdentityProvider(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseMember.cs b/Octokit.GraphQL/Model/EnterpriseMember.cs new file mode 100644 index 00000000..679a5743 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseMember.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An object that is a member of an enterprise. + /// + public class EnterpriseMember : QueryableValue, IUnion + { + internal EnterpriseMember(Expression expression) : base(expression) + { + } + + public TResult Switch(Expression, Selector>> select) => default; + + public class Selector + { + /// + /// An account for a user who is an admin of an enterprise or a member of an enterprise through one or more organizations. + /// + public Selector EnterpriseUserAccount(Func selector) => default; + + /// + /// A user is an individual's account on GitHub that owns repositories and can make new content. + /// + public Selector User(Func selector) => default; + } + + internal static EnterpriseMember Create(Expression expression) + { + return new EnterpriseMember(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseMemberConnection.cs b/Octokit.GraphQL/Model/EnterpriseMemberConnection.cs new file mode 100644 index 00000000..7c0cdf01 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseMemberConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for EnterpriseMember. + /// + public class EnterpriseMemberConnection : QueryableValue, IPagingConnection + { + internal EnterpriseMemberConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseMemberConnection Create(Expression expression) + { + return new EnterpriseMemberConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseMemberEdge.cs b/Octokit.GraphQL/Model/EnterpriseMemberEdge.cs new file mode 100644 index 00000000..8e45dd11 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseMemberEdge.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A User who is a member of an enterprise through one or more organizations. + /// + public class EnterpriseMemberEdge : QueryableValue + { + internal EnterpriseMemberEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// Whether the user does not have a license for the enterprise. + /// + public bool IsUnlicensed { get; } + + /// + /// The item at the end of the edge. + /// + public EnterpriseMember Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.EnterpriseMember.Create); + + internal static EnterpriseMemberEdge Create(Expression expression) + { + return new EnterpriseMemberEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseMemberOrder.cs b/Octokit.GraphQL/Model/EnterpriseMemberOrder.cs new file mode 100644 index 00000000..fa95f25f --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseMemberOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for enterprise member connections. + /// + public class EnterpriseMemberOrder + { + /// + /// The field to order enterprise members by. + /// + public EnterpriseMemberOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseMemberOrderField.cs b/Octokit.GraphQL/Model/EnterpriseMemberOrderField.cs new file mode 100644 index 00000000..e4dee8ad --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseMemberOrderField.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which enterprise member connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseMemberOrderField + { + /// + /// Order enterprise members by login + /// + [EnumMember(Value = "LOGIN")] + Login, + + /// + /// Order enterprise members by creation time + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseMembersCanCreateRepositoriesSettingValue.cs b/Octokit.GraphQL/Model/EnterpriseMembersCanCreateRepositoriesSettingValue.cs new file mode 100644 index 00000000..c5e4fe10 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseMembersCanCreateRepositoriesSettingValue.cs @@ -0,0 +1,44 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible values for the enterprise members can create repositories setting. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseMembersCanCreateRepositoriesSettingValue + { + /// + /// Organization administrators choose whether to allow members to create repositories. + /// + [EnumMember(Value = "NO_POLICY")] + NoPolicy, + + /// + /// Members will be able to create public and private repositories. + /// + [EnumMember(Value = "ALL")] + All, + + /// + /// Members will be able to create only public repositories. + /// + [EnumMember(Value = "PUBLIC")] + Public, + + /// + /// Members will be able to create only private repositories. + /// + [EnumMember(Value = "PRIVATE")] + Private, + + /// + /// Members will not be able to create public or private repositories. + /// + [EnumMember(Value = "DISABLED")] + Disabled, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseMembersCanMakePurchasesSettingValue.cs b/Octokit.GraphQL/Model/EnterpriseMembersCanMakePurchasesSettingValue.cs new file mode 100644 index 00000000..57b53b47 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseMembersCanMakePurchasesSettingValue.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible values for the members can make purchases setting. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseMembersCanMakePurchasesSettingValue + { + /// + /// The setting is enabled for organizations in the enterprise. + /// + [EnumMember(Value = "ENABLED")] + Enabled, + + /// + /// The setting is disabled for organizations in the enterprise. + /// + [EnumMember(Value = "DISABLED")] + Disabled, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseOrganizationMembershipConnection.cs b/Octokit.GraphQL/Model/EnterpriseOrganizationMembershipConnection.cs new file mode 100644 index 00000000..84cb9702 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseOrganizationMembershipConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for Organization. + /// + public class EnterpriseOrganizationMembershipConnection : QueryableValue, IPagingConnection + { + internal EnterpriseOrganizationMembershipConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseOrganizationMembershipConnection Create(Expression expression) + { + return new EnterpriseOrganizationMembershipConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseOrganizationMembershipEdge.cs b/Octokit.GraphQL/Model/EnterpriseOrganizationMembershipEdge.cs new file mode 100644 index 00000000..e59acb71 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseOrganizationMembershipEdge.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An enterprise organization that a user is a member of. + /// + public class EnterpriseOrganizationMembershipEdge : QueryableValue + { + internal EnterpriseOrganizationMembershipEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public Organization Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The role of the user in the enterprise membership. + /// + public EnterpriseUserAccountMembershipRole Role { get; } + + internal static EnterpriseOrganizationMembershipEdge Create(Expression expression) + { + return new EnterpriseOrganizationMembershipEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseOutsideCollaboratorConnection.cs b/Octokit.GraphQL/Model/EnterpriseOutsideCollaboratorConnection.cs new file mode 100644 index 00000000..2605cf1f --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseOutsideCollaboratorConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for User. + /// + public class EnterpriseOutsideCollaboratorConnection : QueryableValue, IPagingConnection + { + internal EnterpriseOutsideCollaboratorConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseOutsideCollaboratorConnection Create(Expression expression) + { + return new EnterpriseOutsideCollaboratorConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseOutsideCollaboratorEdge.cs b/Octokit.GraphQL/Model/EnterpriseOutsideCollaboratorEdge.cs new file mode 100644 index 00000000..771c1534 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseOutsideCollaboratorEdge.cs @@ -0,0 +1,48 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A User who is an outside collaborator of an enterprise through one or more organizations. + /// + public class EnterpriseOutsideCollaboratorEdge : QueryableValue + { + internal EnterpriseOutsideCollaboratorEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// Whether the outside collaborator does not have a license for the enterprise. + /// + public bool IsUnlicensed { get; } + + /// + /// The item at the end of the edge. + /// + public User Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.User.Create); + + /// + /// The enterprise organization repositories this user is a member of. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for repositories. + public EnterpriseRepositoryInfoConnection Repositories(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Repositories(first, after, last, before, orderBy), Octokit.GraphQL.Model.EnterpriseRepositoryInfoConnection.Create); + + internal static EnterpriseOutsideCollaboratorEdge Create(Expression expression) + { + return new EnterpriseOutsideCollaboratorEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseOwnerInfo.cs b/Octokit.GraphQL/Model/EnterpriseOwnerInfo.cs new file mode 100644 index 00000000..6679e71e --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseOwnerInfo.cs @@ -0,0 +1,370 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Enterprise information only visible to enterprise owners. + /// + public class EnterpriseOwnerInfo : QueryableValue + { + internal EnterpriseOwnerInfo(Expression expression) : base(expression) + { + } + + /// + /// A list of enterprise organizations configured with the provided action execution capabilities setting value. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection ActionExecutionCapabilitySettingOrganizations(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.ActionExecutionCapabilitySettingOrganizations(first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// A list of all of the administrators for this enterprise. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for administrators returned from the connection. + /// The search string to look for. + /// The role to filter by. + public EnterpriseAdministratorConnection Admins(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null, Arg? query = null, Arg? role = null) => this.CreateMethodCall(x => x.Admins(first, after, last, before, orderBy, query, role), Octokit.GraphQL.Model.EnterpriseAdministratorConnection.Create); + + /// + /// A list of users in the enterprise who currently have two-factor authentication disabled. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public UserConnection AffiliatedUsersWithTwoFactorDisabled(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.AffiliatedUsersWithTwoFactorDisabled(first, after, last, before), Octokit.GraphQL.Model.UserConnection.Create); + + /// + /// Whether or not affiliated users with two-factor authentication disabled exist in the enterprise. + /// + public bool AffiliatedUsersWithTwoFactorDisabledExist { get; } + + /// + /// The setting value for whether private repository forking is enabled for repositories in organizations in this enterprise. + /// + public EnterpriseEnabledDisabledSettingValue AllowPrivateRepositoryForkingSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided private repository forking setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection AllowPrivateRepositoryForkingSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.AllowPrivateRepositoryForkingSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The setting value for base repository permissions for organizations in this enterprise. + /// + public EnterpriseDefaultRepositoryPermissionSettingValue DefaultRepositoryPermissionSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided default repository permission. + /// + /// The permission to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection DefaultRepositoryPermissionSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.DefaultRepositoryPermissionSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// Enterprise Server installations owned by the enterprise. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Whether or not to only return installations discovered via GitHub Connect. + /// Ordering options for Enterprise Server installations returned. + public EnterpriseServerInstallationConnection EnterpriseServerInstallations(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? connectedOnly = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.EnterpriseServerInstallations(first, after, last, before, connectedOnly, orderBy), Octokit.GraphQL.Model.EnterpriseServerInstallationConnection.Create); + + /// + /// Whether or not the default repository permission is currently being updated. + /// + public bool IsUpdatingDefaultRepositoryPermission { get; } + + /// + /// Whether the two-factor authentication requirement is currently being enforced. + /// + public bool IsUpdatingTwoFactorRequirement { get; } + + /// + /// The setting value for whether organization members with admin permissions on a repository can change repository visibility. + /// + public EnterpriseEnabledDisabledSettingValue MembersCanChangeRepositoryVisibilitySetting { get; } + + /// + /// A list of enterprise organizations configured with the provided can change repository visibility setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection MembersCanChangeRepositoryVisibilitySettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.MembersCanChangeRepositoryVisibilitySettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The setting value for whether members of organizations in the enterprise can create internal repositories. + /// + public bool? MembersCanCreateInternalRepositoriesSetting { get; } + + /// + /// The setting value for whether members of organizations in the enterprise can create private repositories. + /// + public bool? MembersCanCreatePrivateRepositoriesSetting { get; } + + /// + /// The setting value for whether members of organizations in the enterprise can create public repositories. + /// + public bool? MembersCanCreatePublicRepositoriesSetting { get; } + + /// + /// The setting value for whether members of organizations in the enterprise can create repositories. + /// + public EnterpriseMembersCanCreateRepositoriesSettingValue? MembersCanCreateRepositoriesSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided repository creation setting value. + /// + /// The setting to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection MembersCanCreateRepositoriesSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.MembersCanCreateRepositoriesSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The setting value for whether members with admin permissions for repositories can delete issues. + /// + public EnterpriseEnabledDisabledSettingValue MembersCanDeleteIssuesSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided members can delete issues setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection MembersCanDeleteIssuesSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.MembersCanDeleteIssuesSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The setting value for whether members with admin permissions for repositories can delete or transfer repositories. + /// + public EnterpriseEnabledDisabledSettingValue MembersCanDeleteRepositoriesSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided members can delete repositories setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection MembersCanDeleteRepositoriesSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.MembersCanDeleteRepositoriesSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The setting value for whether members of organizations in the enterprise can invite outside collaborators. + /// + public EnterpriseEnabledDisabledSettingValue MembersCanInviteCollaboratorsSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided members can invite collaborators setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection MembersCanInviteCollaboratorsSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.MembersCanInviteCollaboratorsSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// Indicates whether members of this enterprise's organizations can purchase additional services for those organizations. + /// + public EnterpriseMembersCanMakePurchasesSettingValue MembersCanMakePurchasesSetting { get; } + + /// + /// The setting value for whether members with admin permissions for repositories can update protected branches. + /// + public EnterpriseEnabledDisabledSettingValue MembersCanUpdateProtectedBranchesSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided members can update protected branches setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection MembersCanUpdateProtectedBranchesSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.MembersCanUpdateProtectedBranchesSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The setting value for whether members can view dependency insights. + /// + public EnterpriseEnabledDisabledSettingValue MembersCanViewDependencyInsightsSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided members can view dependency insights setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection MembersCanViewDependencyInsightsSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.MembersCanViewDependencyInsightsSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The setting value for whether organization projects are enabled for organizations in this enterprise. + /// + public EnterpriseEnabledDisabledSettingValue OrganizationProjectsSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided organization projects setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection OrganizationProjectsSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.OrganizationProjectsSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// A list of outside collaborators across the repositories in the enterprise. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// The login of one specific outside collaborator. + /// Ordering options for outside collaborators returned from the connection. + /// The search string to look for. + /// Only return outside collaborators on repositories with this visibility. + public EnterpriseOutsideCollaboratorConnection OutsideCollaborators(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? login = null, Arg? orderBy = null, Arg? query = null, Arg? visibility = null) => this.CreateMethodCall(x => x.OutsideCollaborators(first, after, last, before, login, orderBy, query, visibility), Octokit.GraphQL.Model.EnterpriseOutsideCollaboratorConnection.Create); + + /// + /// A list of pending administrator invitations for the enterprise. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for pending enterprise administrator invitations returned from the connection. + /// The search string to look for. + /// The role to filter by. + public EnterpriseAdministratorInvitationConnection PendingAdminInvitations(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null, Arg? query = null, Arg? role = null) => this.CreateMethodCall(x => x.PendingAdminInvitations(first, after, last, before, orderBy, query, role), Octokit.GraphQL.Model.EnterpriseAdministratorInvitationConnection.Create); + + /// + /// A list of pending collaborators across the repositories in the enterprise. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for pending repository collaborator invitations returned from the connection. + /// The search string to look for. + public EnterprisePendingCollaboratorConnection PendingCollaborators(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null, Arg? query = null) => this.CreateMethodCall(x => x.PendingCollaborators(first, after, last, before, orderBy, query), Octokit.GraphQL.Model.EnterprisePendingCollaboratorConnection.Create); + + /// + /// A list of pending member invitations for organizations in the enterprise. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// The search string to look for. + public EnterprisePendingMemberInvitationConnection PendingMemberInvitations(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? query = null) => this.CreateMethodCall(x => x.PendingMemberInvitations(first, after, last, before, query), Octokit.GraphQL.Model.EnterprisePendingMemberInvitationConnection.Create); + + /// + /// The setting value for whether repository projects are enabled in this enterprise. + /// + public EnterpriseEnabledDisabledSettingValue RepositoryProjectsSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided repository projects setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection RepositoryProjectsSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.RepositoryProjectsSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The SAML Identity Provider for the enterprise. + /// + public EnterpriseIdentityProvider SamlIdentityProvider => this.CreateProperty(x => x.SamlIdentityProvider, Octokit.GraphQL.Model.EnterpriseIdentityProvider.Create); + + /// + /// A list of enterprise organizations configured with the SAML single sign-on setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection SamlIdentityProviderSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.SamlIdentityProviderSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The setting value for whether team discussions are enabled for organizations in this enterprise. + /// + public EnterpriseEnabledDisabledSettingValue TeamDiscussionsSetting { get; } + + /// + /// A list of enterprise organizations configured with the provided team discussions setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection TeamDiscussionsSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.TeamDiscussionsSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The setting value for whether the enterprise requires two-factor authentication for its organizations and users. + /// + public EnterpriseEnabledSettingValue TwoFactorRequiredSetting { get; } + + /// + /// A list of enterprise organizations configured with the two-factor authentication setting value. + /// + /// The setting value to find organizations for. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations with this setting. + public OrganizationConnection TwoFactorRequiredSettingOrganizations(Arg value, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.TwoFactorRequiredSettingOrganizations(value, first, after, last, before, orderBy), Octokit.GraphQL.Model.OrganizationConnection.Create); + + internal static EnterpriseOwnerInfo Create(Expression expression) + { + return new EnterpriseOwnerInfo(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterprisePendingCollaboratorConnection.cs b/Octokit.GraphQL/Model/EnterprisePendingCollaboratorConnection.cs new file mode 100644 index 00000000..deffadd8 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterprisePendingCollaboratorConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for User. + /// + public class EnterprisePendingCollaboratorConnection : QueryableValue, IPagingConnection + { + internal EnterprisePendingCollaboratorConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterprisePendingCollaboratorConnection Create(Expression expression) + { + return new EnterprisePendingCollaboratorConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterprisePendingCollaboratorEdge.cs b/Octokit.GraphQL/Model/EnterprisePendingCollaboratorEdge.cs new file mode 100644 index 00000000..e1e8ebf5 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterprisePendingCollaboratorEdge.cs @@ -0,0 +1,48 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A user with an invitation to be a collaborator on a repository owned by an organization in an enterprise. + /// + public class EnterprisePendingCollaboratorEdge : QueryableValue + { + internal EnterprisePendingCollaboratorEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// Whether the invited collaborator does not have a license for the enterprise. + /// + public bool IsUnlicensed { get; } + + /// + /// The item at the end of the edge. + /// + public User Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.User.Create); + + /// + /// The enterprise organization repositories this user is a member of. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for repositories. + public EnterpriseRepositoryInfoConnection Repositories(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Repositories(first, after, last, before, orderBy), Octokit.GraphQL.Model.EnterpriseRepositoryInfoConnection.Create); + + internal static EnterprisePendingCollaboratorEdge Create(Expression expression) + { + return new EnterprisePendingCollaboratorEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterprisePendingMemberInvitationConnection.cs b/Octokit.GraphQL/Model/EnterprisePendingMemberInvitationConnection.cs new file mode 100644 index 00000000..c4c8eca0 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterprisePendingMemberInvitationConnection.cs @@ -0,0 +1,50 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for OrganizationInvitation. + /// + public class EnterprisePendingMemberInvitationConnection : QueryableValue, IPagingConnection + { + internal EnterprisePendingMemberInvitationConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + /// + /// Identifies the total count of unique users in the connection. + /// + public int TotalUniqueUserCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterprisePendingMemberInvitationConnection Create(Expression expression) + { + return new EnterprisePendingMemberInvitationConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterprisePendingMemberInvitationEdge.cs b/Octokit.GraphQL/Model/EnterprisePendingMemberInvitationEdge.cs new file mode 100644 index 00000000..4c565bb3 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterprisePendingMemberInvitationEdge.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An invitation to be a member in an enterprise organization. + /// + public class EnterprisePendingMemberInvitationEdge : QueryableValue + { + internal EnterprisePendingMemberInvitationEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// Whether the invitation has a license for the enterprise. + /// + public bool IsUnlicensed { get; } + + /// + /// The item at the end of the edge. + /// + public OrganizationInvitation Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.OrganizationInvitation.Create); + + internal static EnterprisePendingMemberInvitationEdge Create(Expression expression) + { + return new EnterprisePendingMemberInvitationEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseRepositoryInfo.cs b/Octokit.GraphQL/Model/EnterpriseRepositoryInfo.cs new file mode 100644 index 00000000..d835e238 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseRepositoryInfo.cs @@ -0,0 +1,40 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A subset of repository information queryable from an enterprise. + /// + public class EnterpriseRepositoryInfo : QueryableValue + { + internal EnterpriseRepositoryInfo(Expression expression) : base(expression) + { + } + + public ID Id { get; } + + /// + /// Identifies if the repository is private. + /// + public bool IsPrivate { get; } + + /// + /// The repository's name. + /// + public string Name { get; } + + /// + /// The repository's name with owner. + /// + public string NameWithOwner { get; } + + internal static EnterpriseRepositoryInfo Create(Expression expression) + { + return new EnterpriseRepositoryInfo(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseRepositoryInfoConnection.cs b/Octokit.GraphQL/Model/EnterpriseRepositoryInfoConnection.cs new file mode 100644 index 00000000..d30c3a6d --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseRepositoryInfoConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for EnterpriseRepositoryInfo. + /// + public class EnterpriseRepositoryInfoConnection : QueryableValue, IPagingConnection + { + internal EnterpriseRepositoryInfoConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseRepositoryInfoConnection Create(Expression expression) + { + return new EnterpriseRepositoryInfoConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseRepositoryInfoEdge.cs b/Octokit.GraphQL/Model/EnterpriseRepositoryInfoEdge.cs new file mode 100644 index 00000000..1e207f4e --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseRepositoryInfoEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class EnterpriseRepositoryInfoEdge : QueryableValue + { + internal EnterpriseRepositoryInfoEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public EnterpriseRepositoryInfo Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.EnterpriseRepositoryInfo.Create); + + internal static EnterpriseRepositoryInfoEdge Create(Expression expression) + { + return new EnterpriseRepositoryInfoEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerInstallation.cs b/Octokit.GraphQL/Model/EnterpriseServerInstallation.cs new file mode 100644 index 00000000..c2274c64 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerInstallation.cs @@ -0,0 +1,70 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An Enterprise Server installation. + /// + public class EnterpriseServerInstallation : QueryableValue + { + internal EnterpriseServerInstallation(Expression expression) : base(expression) + { + } + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// The customer name to which the Enterprise Server installation belongs. + /// + public string CustomerName { get; } + + /// + /// The host name of the Enterprise Server installation. + /// + public string HostName { get; } + + public ID Id { get; } + + /// + /// Whether or not the installation is connected to an Enterprise Server installation via GitHub Connect. + /// + public bool IsConnected { get; } + + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + + /// + /// User accounts on this Enterprise Server installation. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for Enterprise Server user accounts returned from the connection. + public EnterpriseServerUserAccountConnection UserAccounts(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.UserAccounts(first, after, last, before, orderBy), Octokit.GraphQL.Model.EnterpriseServerUserAccountConnection.Create); + + /// + /// User accounts uploads for the Enterprise Server installation. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for Enterprise Server user accounts uploads returned from the connection. + public EnterpriseServerUserAccountsUploadConnection UserAccountsUploads(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.UserAccountsUploads(first, after, last, before, orderBy), Octokit.GraphQL.Model.EnterpriseServerUserAccountsUploadConnection.Create); + + internal static EnterpriseServerInstallation Create(Expression expression) + { + return new EnterpriseServerInstallation(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerInstallationConnection.cs b/Octokit.GraphQL/Model/EnterpriseServerInstallationConnection.cs new file mode 100644 index 00000000..bcac3946 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerInstallationConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for EnterpriseServerInstallation. + /// + public class EnterpriseServerInstallationConnection : QueryableValue, IPagingConnection + { + internal EnterpriseServerInstallationConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseServerInstallationConnection Create(Expression expression) + { + return new EnterpriseServerInstallationConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerInstallationEdge.cs b/Octokit.GraphQL/Model/EnterpriseServerInstallationEdge.cs new file mode 100644 index 00000000..eec7925e --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerInstallationEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class EnterpriseServerInstallationEdge : QueryableValue + { + internal EnterpriseServerInstallationEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public EnterpriseServerInstallation Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.EnterpriseServerInstallation.Create); + + internal static EnterpriseServerInstallationEdge Create(Expression expression) + { + return new EnterpriseServerInstallationEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerInstallationOrder.cs b/Octokit.GraphQL/Model/EnterpriseServerInstallationOrder.cs new file mode 100644 index 00000000..154f448d --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerInstallationOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for Enterprise Server installation connections. + /// + public class EnterpriseServerInstallationOrder + { + /// + /// The field to order Enterprise Server installations by. + /// + public EnterpriseServerInstallationOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerInstallationOrderField.cs b/Octokit.GraphQL/Model/EnterpriseServerInstallationOrderField.cs new file mode 100644 index 00000000..c082cbba --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerInstallationOrderField.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which Enterprise Server installation connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseServerInstallationOrderField + { + /// + /// Order Enterprise Server installations by host name + /// + [EnumMember(Value = "HOST_NAME")] + HostName, + + /// + /// Order Enterprise Server installations by customer name + /// + [EnumMember(Value = "CUSTOMER_NAME")] + CustomerName, + + /// + /// Order Enterprise Server installations by creation time + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccount.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccount.cs new file mode 100644 index 00000000..828d214c --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccount.cs @@ -0,0 +1,75 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A user account on an Enterprise Server installation. + /// + public class EnterpriseServerUserAccount : QueryableValue + { + internal EnterpriseServerUserAccount(Expression expression) : base(expression) + { + } + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// User emails belonging to this user account. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for Enterprise Server user account emails returned from the connection. + public EnterpriseServerUserAccountEmailConnection Emails(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Emails(first, after, last, before, orderBy), Octokit.GraphQL.Model.EnterpriseServerUserAccountEmailConnection.Create); + + /// + /// The Enterprise Server installation on which this user account exists. + /// + public EnterpriseServerInstallation EnterpriseServerInstallation => this.CreateProperty(x => x.EnterpriseServerInstallation, Octokit.GraphQL.Model.EnterpriseServerInstallation.Create); + + public ID Id { get; } + + /// + /// Whether the user account is a site administrator on the Enterprise Server installation. + /// + public bool IsSiteAdmin { get; } + + /// + /// The login of the user account on the Enterprise Server installation. + /// + public string Login { get; } + + /// + /// The profile name of the user account on the Enterprise Server installation. + /// + public string ProfileName { get; } + + /// + /// The date and time when the user account was created on the Enterprise Server installation. + /// + public DateTimeOffset RemoteCreatedAt { get; } + + /// + /// The ID of the user account on the Enterprise Server installation. + /// + public int RemoteUserId { get; } + + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + + internal static EnterpriseServerUserAccount Create(Expression expression) + { + return new EnterpriseServerUserAccount(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountConnection.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountConnection.cs new file mode 100644 index 00000000..fe41d36d --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for EnterpriseServerUserAccount. + /// + public class EnterpriseServerUserAccountConnection : QueryableValue, IPagingConnection + { + internal EnterpriseServerUserAccountConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseServerUserAccountConnection Create(Expression expression) + { + return new EnterpriseServerUserAccountConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountEdge.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEdge.cs new file mode 100644 index 00000000..b908d52c --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class EnterpriseServerUserAccountEdge : QueryableValue + { + internal EnterpriseServerUserAccountEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public EnterpriseServerUserAccount Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.EnterpriseServerUserAccount.Create); + + internal static EnterpriseServerUserAccountEdge Create(Expression expression) + { + return new EnterpriseServerUserAccountEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmail.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmail.cs new file mode 100644 index 00000000..3ff41e41 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmail.cs @@ -0,0 +1,50 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An email belonging to a user account on an Enterprise Server installation. + /// + public class EnterpriseServerUserAccountEmail : QueryableValue + { + internal EnterpriseServerUserAccountEmail(Expression expression) : base(expression) + { + } + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// The email address. + /// + public string Email { get; } + + public ID Id { get; } + + /// + /// Indicates whether this is the primary email of the associated user account. + /// + public bool IsPrimary { get; } + + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + + /// + /// The user account to which the email belongs. + /// + public EnterpriseServerUserAccount UserAccount => this.CreateProperty(x => x.UserAccount, Octokit.GraphQL.Model.EnterpriseServerUserAccount.Create); + + internal static EnterpriseServerUserAccountEmail Create(Expression expression) + { + return new EnterpriseServerUserAccountEmail(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailConnection.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailConnection.cs new file mode 100644 index 00000000..1b33ff8e --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for EnterpriseServerUserAccountEmail. + /// + public class EnterpriseServerUserAccountEmailConnection : QueryableValue, IPagingConnection + { + internal EnterpriseServerUserAccountEmailConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseServerUserAccountEmailConnection Create(Expression expression) + { + return new EnterpriseServerUserAccountEmailConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailEdge.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailEdge.cs new file mode 100644 index 00000000..bad359a8 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class EnterpriseServerUserAccountEmailEdge : QueryableValue + { + internal EnterpriseServerUserAccountEmailEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public EnterpriseServerUserAccountEmail Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.EnterpriseServerUserAccountEmail.Create); + + internal static EnterpriseServerUserAccountEmailEdge Create(Expression expression) + { + return new EnterpriseServerUserAccountEmailEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailOrder.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailOrder.cs new file mode 100644 index 00000000..c6dd8224 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for Enterprise Server user account email connections. + /// + public class EnterpriseServerUserAccountEmailOrder + { + /// + /// The field to order emails by. + /// + public EnterpriseServerUserAccountEmailOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailOrderField.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailOrderField.cs new file mode 100644 index 00000000..6ac73ed2 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountEmailOrderField.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which Enterprise Server user account email connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseServerUserAccountEmailOrderField + { + /// + /// Order emails by email + /// + [EnumMember(Value = "EMAIL")] + Email, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountOrder.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountOrder.cs new file mode 100644 index 00000000..51922e7f --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for Enterprise Server user account connections. + /// + public class EnterpriseServerUserAccountOrder + { + /// + /// The field to order user accounts by. + /// + public EnterpriseServerUserAccountOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountOrderField.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountOrderField.cs new file mode 100644 index 00000000..0f38d131 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountOrderField.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which Enterprise Server user account connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseServerUserAccountOrderField + { + /// + /// Order user accounts by login + /// + [EnumMember(Value = "LOGIN")] + Login, + + /// + /// Order user accounts by creation time on the Enterprise Server installation + /// + [EnumMember(Value = "REMOTE_CREATED_AT")] + RemoteCreatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUpload.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUpload.cs new file mode 100644 index 00000000..25225b63 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUpload.cs @@ -0,0 +1,55 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A user accounts upload from an Enterprise Server installation. + /// + public class EnterpriseServerUserAccountsUpload : QueryableValue + { + internal EnterpriseServerUserAccountsUpload(Expression expression) : base(expression) + { + } + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// The enterprise to which this upload belongs. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// The Enterprise Server installation for which this upload was generated. + /// + public EnterpriseServerInstallation EnterpriseServerInstallation => this.CreateProperty(x => x.EnterpriseServerInstallation, Octokit.GraphQL.Model.EnterpriseServerInstallation.Create); + + public ID Id { get; } + + /// + /// The name of the file uploaded. + /// + public string Name { get; } + + /// + /// The synchronization state of the upload + /// + public EnterpriseServerUserAccountsUploadSyncState SyncState { get; } + + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + + internal static EnterpriseServerUserAccountsUpload Create(Expression expression) + { + return new EnterpriseServerUserAccountsUpload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadConnection.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadConnection.cs new file mode 100644 index 00000000..7f6d0dd6 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for EnterpriseServerUserAccountsUpload. + /// + public class EnterpriseServerUserAccountsUploadConnection : QueryableValue, IPagingConnection + { + internal EnterpriseServerUserAccountsUploadConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseServerUserAccountsUploadConnection Create(Expression expression) + { + return new EnterpriseServerUserAccountsUploadConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadEdge.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadEdge.cs new file mode 100644 index 00000000..46e45363 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class EnterpriseServerUserAccountsUploadEdge : QueryableValue + { + internal EnterpriseServerUserAccountsUploadEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public EnterpriseServerUserAccountsUpload Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.EnterpriseServerUserAccountsUpload.Create); + + internal static EnterpriseServerUserAccountsUploadEdge Create(Expression expression) + { + return new EnterpriseServerUserAccountsUploadEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadOrder.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadOrder.cs new file mode 100644 index 00000000..50ee560e --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for Enterprise Server user accounts upload connections. + /// + public class EnterpriseServerUserAccountsUploadOrder + { + /// + /// The field to order user accounts uploads by. + /// + public EnterpriseServerUserAccountsUploadOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadOrderField.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadOrderField.cs new file mode 100644 index 00000000..6adedb5f --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadOrderField.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which Enterprise Server user accounts upload connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseServerUserAccountsUploadOrderField + { + /// + /// Order user accounts uploads by creation time + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadSyncState.cs b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadSyncState.cs new file mode 100644 index 00000000..9ceee935 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseServerUserAccountsUploadSyncState.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Synchronization state of the Enterprise Server user accounts upload + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseServerUserAccountsUploadSyncState + { + /// + /// The synchronization of the upload is pending. + /// + [EnumMember(Value = "PENDING")] + Pending, + + /// + /// The synchronization of the upload succeeded. + /// + [EnumMember(Value = "SUCCESS")] + Success, + + /// + /// The synchronization of the upload failed. + /// + [EnumMember(Value = "FAILURE")] + Failure, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseUserAccount.cs b/Octokit.GraphQL/Model/EnterpriseUserAccount.cs new file mode 100644 index 00000000..f37aee52 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseUserAccount.cs @@ -0,0 +1,83 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An account for a user who is an admin of an enterprise or a member of an enterprise through one or more organizations. + /// + public class EnterpriseUserAccount : QueryableValue + { + internal EnterpriseUserAccount(Expression expression) : base(expression) + { + } + + /// + /// A URL pointing to the enterprise user account's public avatar. + /// + /// The size of the resulting square image. + public string AvatarUrl(Arg? size = null) => default; + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// The enterprise in which this user account exists. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + public ID Id { get; } + + /// + /// An identifier for the enterprise user account, a login or email address + /// + public string Login { get; } + + /// + /// The name of the enterprise user account + /// + public string Name { get; } + + /// + /// A list of enterprise organizations this user is a member of. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for organizations returned from the connection. + /// The search string to look for. + /// The role of the user in the enterprise organization. + public EnterpriseOrganizationMembershipConnection Organizations(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null, Arg? query = null, Arg? role = null) => this.CreateMethodCall(x => x.Organizations(first, after, last, before, orderBy, query, role), Octokit.GraphQL.Model.EnterpriseOrganizationMembershipConnection.Create); + + /// + /// The HTTP path for this user. + /// + public string ResourcePath { get; } + + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + + /// + /// The HTTP URL for this user. + /// + public string Url { get; } + + /// + /// The user within the enterprise. + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + internal static EnterpriseUserAccount Create(Expression expression) + { + return new EnterpriseUserAccount(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseUserAccountConnection.cs b/Octokit.GraphQL/Model/EnterpriseUserAccountConnection.cs new file mode 100644 index 00000000..00698ff9 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseUserAccountConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for EnterpriseUserAccount. + /// + public class EnterpriseUserAccountConnection : QueryableValue, IPagingConnection + { + internal EnterpriseUserAccountConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static EnterpriseUserAccountConnection Create(Expression expression) + { + return new EnterpriseUserAccountConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseUserAccountEdge.cs b/Octokit.GraphQL/Model/EnterpriseUserAccountEdge.cs new file mode 100644 index 00000000..da70ed5f --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseUserAccountEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class EnterpriseUserAccountEdge : QueryableValue + { + internal EnterpriseUserAccountEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public EnterpriseUserAccount Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.EnterpriseUserAccount.Create); + + internal static EnterpriseUserAccountEdge Create(Expression expression) + { + return new EnterpriseUserAccountEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseUserAccountMembershipRole.cs b/Octokit.GraphQL/Model/EnterpriseUserAccountMembershipRole.cs new file mode 100644 index 00000000..71ed41c1 --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseUserAccountMembershipRole.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible roles for enterprise membership. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseUserAccountMembershipRole + { + /// + /// The user is a member of the enterprise membership. + /// + [EnumMember(Value = "MEMBER")] + Member, + + /// + /// The user is an owner of the enterprise membership. + /// + [EnumMember(Value = "OWNER")] + Owner, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/EnterpriseUserDeployment.cs b/Octokit.GraphQL/Model/EnterpriseUserDeployment.cs new file mode 100644 index 00000000..870bcf6c --- /dev/null +++ b/Octokit.GraphQL/Model/EnterpriseUserDeployment.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible GitHub Enterprise deployments where this user can exist. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum EnterpriseUserDeployment + { + /// + /// The user is part of a GitHub Enterprise Cloud deployment. + /// + [EnumMember(Value = "CLOUD")] + Cloud, + + /// + /// The user is part of a GitHub Enterprise Server deployment. + /// + [EnumMember(Value = "SERVER")] + Server, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/PinIssueInput.cs b/Octokit.GraphQL/Model/FollowUserInput.cs similarity index 68% rename from Octokit.GraphQL/Model/PinIssueInput.cs rename to Octokit.GraphQL/Model/FollowUserInput.cs index 4112845f..ec7a4748 100644 --- a/Octokit.GraphQL/Model/PinIssueInput.cs +++ b/Octokit.GraphQL/Model/FollowUserInput.cs @@ -4,14 +4,14 @@ namespace Octokit.GraphQL.Model using System.Collections.Generic; /// - /// Autogenerated input type of PinIssue + /// Autogenerated input type of FollowUser /// - public class PinIssueInput + public class FollowUserInput { /// - /// The ID of the issue to be pinned + /// ID of the user to follow. /// - public ID IssueId { get; set; } + public ID UserId { get; set; } /// /// A unique identifier for the client performing the mutation. diff --git a/Octokit.GraphQL/Model/FollowUserPayload.cs b/Octokit.GraphQL/Model/FollowUserPayload.cs new file mode 100644 index 00000000..d3a3141c --- /dev/null +++ b/Octokit.GraphQL/Model/FollowUserPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of FollowUser + /// + public class FollowUserPayload : QueryableValue + { + internal FollowUserPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The user that was followed. + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + internal static FollowUserPayload Create(Expression expression) + { + return new FollowUserPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/FundingLink.cs b/Octokit.GraphQL/Model/FundingLink.cs new file mode 100644 index 00000000..57b30768 --- /dev/null +++ b/Octokit.GraphQL/Model/FundingLink.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A funding platform link for a repository. + /// + public class FundingLink : QueryableValue + { + internal FundingLink(Expression expression) : base(expression) + { + } + + /// + /// The funding platform this link is for. + /// + public FundingPlatform Platform { get; } + + /// + /// The configured URL for this funding link. + /// + public string Url { get; } + + internal static FundingLink Create(Expression expression) + { + return new FundingLink(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/FundingPlatform.cs b/Octokit.GraphQL/Model/FundingPlatform.cs new file mode 100644 index 00000000..53800461 --- /dev/null +++ b/Octokit.GraphQL/Model/FundingPlatform.cs @@ -0,0 +1,74 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible funding platforms for repository funding links. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum FundingPlatform + { + /// + /// GitHub funding platform. + /// + [EnumMember(Value = "GITHUB")] + Github, + + /// + /// Patreon funding platform. + /// + [EnumMember(Value = "PATREON")] + Patreon, + + /// + /// Open Collective funding platform. + /// + [EnumMember(Value = "OPEN_COLLECTIVE")] + OpenCollective, + + /// + /// Ko-fi funding platform. + /// + [EnumMember(Value = "KO_FI")] + KoFi, + + /// + /// Tidelift funding platform. + /// + [EnumMember(Value = "TIDELIFT")] + Tidelift, + + /// + /// Community Bridge funding platform. + /// + [EnumMember(Value = "COMMUNITY_BRIDGE")] + CommunityBridge, + + /// + /// Liberapay funding platform. + /// + [EnumMember(Value = "LIBERAPAY")] + Liberapay, + + /// + /// IssueHunt funding platform. + /// + [EnumMember(Value = "ISSUEHUNT")] + Issuehunt, + + /// + /// Otechie funding platform. + /// + [EnumMember(Value = "OTECHIE")] + Otechie, + + /// + /// Custom funding platform. + /// + [EnumMember(Value = "CUSTOM")] + Custom, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/GenericHovercardContext.cs b/Octokit.GraphQL/Model/GenericHovercardContext.cs new file mode 100644 index 00000000..7e60c83c --- /dev/null +++ b/Octokit.GraphQL/Model/GenericHovercardContext.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A generic hovercard context with a message and icon + /// + public class GenericHovercardContext : QueryableValue + { + internal GenericHovercardContext(Expression expression) : base(expression) + { + } + + /// + /// A string describing this context + /// + public string Message { get; } + + /// + /// An octicon to accompany this context + /// + public string Octicon { get; } + + internal static GenericHovercardContext Create(Expression expression) + { + return new GenericHovercardContext(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/Gist.cs b/Octokit.GraphQL/Model/Gist.cs index 456299da..5f81c99f 100644 --- a/Octokit.GraphQL/Model/Gist.cs +++ b/Octokit.GraphQL/Model/Gist.cs @@ -78,6 +78,11 @@ internal Gist(Expression expression) : base(expression) /// public DateTimeOffset? PushedAt { get; } + /// + /// The HTML path to this resource. + /// + public string ResourcePath { get; } + /// /// A list of users who have starred this starrable. /// @@ -93,6 +98,11 @@ internal Gist(Expression expression) : base(expression) /// public DateTimeOffset UpdatedAt { get; } + /// + /// The HTTP URL for this Gist. + /// + public string Url { get; } + /// /// Returns a boolean indicating whether the viewing user has starred this starrable. /// diff --git a/Octokit.GraphQL/Model/GistComment.cs b/Octokit.GraphQL/Model/GistComment.cs index 883fa578..60cb3fb3 100644 --- a/Octokit.GraphQL/Model/GistComment.cs +++ b/Octokit.GraphQL/Model/GistComment.cs @@ -31,7 +31,7 @@ internal GistComment(Expression expression) : base(expression) public string Body { get; } /// - /// The comment body rendered to HTML. + /// The body rendered to HTML. /// public string BodyHTML { get; } diff --git a/Octokit.GraphQL/Model/Hovercard.cs b/Octokit.GraphQL/Model/Hovercard.cs new file mode 100644 index 00000000..bacc045c --- /dev/null +++ b/Octokit.GraphQL/Model/Hovercard.cs @@ -0,0 +1,28 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Detail needed to display a hovercard for a user + /// + public class Hovercard : QueryableValue + { + internal Hovercard(Expression expression) : base(expression) + { + } + + /// + /// Each of the contexts for this hovercard + /// + public IQueryableList Contexts => this.CreateProperty(x => x.Contexts); + + internal static Hovercard Create(Expression expression) + { + return new Hovercard(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/HovercardContext.cs b/Octokit.GraphQL/Model/HovercardContext.cs new file mode 100644 index 00000000..721f20cc --- /dev/null +++ b/Octokit.GraphQL/Model/HovercardContext.cs @@ -0,0 +1,51 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Model; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An individual line of a hovercard + /// + public interface IHovercardContext : IQueryableValue, IQueryableInterface + { + /// + /// A string describing this context + /// + string Message { get; } + + /// + /// An octicon to accompany this context + /// + string Octicon { get; } + } +} + +namespace Octokit.GraphQL.Model.Internal +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + internal class StubIHovercardContext : QueryableValue, IHovercardContext + { + internal StubIHovercardContext(Expression expression) : base(expression) + { + } + + public string Message { get; } + + public string Octicon { get; } + + internal static StubIHovercardContext Create(Expression expression) + { + return new StubIHovercardContext(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/InviteEnterpriseAdminInput.cs b/Octokit.GraphQL/Model/InviteEnterpriseAdminInput.cs new file mode 100644 index 00000000..7a6b92c9 --- /dev/null +++ b/Octokit.GraphQL/Model/InviteEnterpriseAdminInput.cs @@ -0,0 +1,36 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of InviteEnterpriseAdmin + /// + public class InviteEnterpriseAdminInput + { + /// + /// The ID of the enterprise to which you want to invite an administrator. + /// + public ID EnterpriseId { get; set; } + + /// + /// The login of a user to invite as an administrator. + /// + public string Invitee { get; set; } + + /// + /// The email of the person to invite as an administrator. + /// + public string Email { get; set; } + + /// + /// The role of the administrator. + /// + public EnterpriseAdministratorRole? Role { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/InviteEnterpriseAdminPayload.cs b/Octokit.GraphQL/Model/InviteEnterpriseAdminPayload.cs new file mode 100644 index 00000000..abb1dc06 --- /dev/null +++ b/Octokit.GraphQL/Model/InviteEnterpriseAdminPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of InviteEnterpriseAdmin + /// + public class InviteEnterpriseAdminPayload : QueryableValue + { + internal InviteEnterpriseAdminPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The created enterprise administrator invitation. + /// + public EnterpriseAdministratorInvitation Invitation => this.CreateProperty(x => x.Invitation, Octokit.GraphQL.Model.EnterpriseAdministratorInvitation.Create); + + internal static InviteEnterpriseAdminPayload Create(Expression expression) + { + return new InviteEnterpriseAdminPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/Issue.cs b/Octokit.GraphQL/Model/Issue.cs index b32e6ff9..28d5d3b0 100644 --- a/Octokit.GraphQL/Model/Issue.cs +++ b/Octokit.GraphQL/Model/Issue.cs @@ -45,7 +45,7 @@ internal Issue(Expression expression) : base(expression) public string Body { get; } /// - /// Identifies the body of the issue rendered to HTML. + /// The body rendered to HTML. /// public string BodyHTML { get; } @@ -93,6 +93,12 @@ internal Issue(Expression expression) : base(expression) /// public IActor Editor => this.CreateProperty(x => x.Editor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + /// + /// The hovercard information for this issue + /// + /// Whether or not to include notification contexts + public Hovercard Hovercard(Arg? includeNotificationContexts = null) => this.CreateMethodCall(x => x.Hovercard(includeNotificationContexts), Octokit.GraphQL.Model.Hovercard.Create); + public ID Id { get; } /// @@ -107,7 +113,8 @@ internal Issue(Expression expression) : base(expression) /// Returns the elements in the list that come after the specified cursor. /// Returns the last _n_ elements from the list. /// Returns the elements in the list that come before the specified cursor. - public LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.Labels(first, after, last, before), Octokit.GraphQL.Model.LabelConnection.Create); + /// Ordering options for labels returned from the connection. + public LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Labels(first, after, last, before, orderBy), Octokit.GraphQL.Model.LabelConnection.Create); /// /// The moment the editor made the last edit diff --git a/Octokit.GraphQL/Model/IssuePubSubTopic.cs b/Octokit.GraphQL/Model/IssuePubSubTopic.cs deleted file mode 100644 index 7208a813..00000000 --- a/Octokit.GraphQL/Model/IssuePubSubTopic.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Octokit.GraphQL.Model -{ - /// - /// The possible PubSub channels for an issue. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum IssuePubSubTopic - { - /// - /// The channel ID for observing issue updates. - /// - [EnumMember(Value = "UPDATED")] - Updated, - - /// - /// The channel ID for marking an issue as read. - /// - [EnumMember(Value = "MARKASREAD")] - Markasread, - - /// - /// The channel ID for updating items on the issue timeline. - /// - [EnumMember(Value = "TIMELINE")] - Timeline, - - /// - /// The channel ID for observing issue state updates. - /// - [EnumMember(Value = "STATE")] - State, - } -} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/IssueTimelineItem.cs b/Octokit.GraphQL/Model/IssueTimelineItem.cs index 58d65615..e0ac7c6e 100644 --- a/Octokit.GraphQL/Model/IssueTimelineItem.cs +++ b/Octokit.GraphQL/Model/IssueTimelineItem.cs @@ -20,99 +20,99 @@ internal IssueTimelineItem(Expression expression) : base(expression) public class Selector { /// - /// Represents a Git commit. + /// Represents an 'assigned' event on any assignable object. /// - public Selector Commit(Func selector) => default; + public Selector AssignedEvent(Func selector) => default; /// - /// Represents a comment on an Issue. + /// Represents a 'closed' event on any `Closable`. /// - public Selector IssueComment(Func selector) => default; + public Selector ClosedEvent(Func selector) => default; /// - /// Represents a mention made by one issue or pull request to another. + /// Represents a Git commit. /// - public Selector CrossReferencedEvent(Func selector) => default; + public Selector Commit(Func selector) => default; /// - /// Represents a 'closed' event on any `Closable`. + /// Represents a mention made by one issue or pull request to another. /// - public Selector ClosedEvent(Func selector) => default; + public Selector CrossReferencedEvent(Func selector) => default; /// - /// Represents a 'reopened' event on any `Closable`. + /// Represents a 'demilestoned' event on a given issue or pull request. /// - public Selector ReopenedEvent(Func selector) => default; + public Selector DemilestonedEvent(Func selector) => default; /// - /// Represents a 'subscribed' event on a given `Subscribable`. + /// Represents a comment on an Issue. /// - public Selector SubscribedEvent(Func selector) => default; + public Selector IssueComment(Func selector) => default; /// - /// Represents an 'unsubscribed' event on a given `Subscribable`. + /// Represents a 'labeled' event on a given issue or pull request. /// - public Selector UnsubscribedEvent(Func selector) => default; + public Selector LabeledEvent(Func selector) => default; /// - /// Represents a 'referenced' event on a given `ReferencedSubject`. + /// Represents a 'locked' event on a given issue or pull request. /// - public Selector ReferencedEvent(Func selector) => default; + public Selector LockedEvent(Func selector) => default; /// - /// Represents an 'assigned' event on any assignable object. + /// Represents a 'milestoned' event on a given issue or pull request. /// - public Selector AssignedEvent(Func selector) => default; + public Selector MilestonedEvent(Func selector) => default; /// - /// Represents an 'unassigned' event on any assignable object. + /// Represents a 'referenced' event on a given `ReferencedSubject`. /// - public Selector UnassignedEvent(Func selector) => default; + public Selector ReferencedEvent(Func selector) => default; /// - /// Represents a 'labeled' event on a given issue or pull request. + /// Represents a 'renamed' event on a given issue or pull request /// - public Selector LabeledEvent(Func selector) => default; + public Selector RenamedTitleEvent(Func selector) => default; /// - /// Represents an 'unlabeled' event on a given issue or pull request. + /// Represents a 'reopened' event on any `Closable`. /// - public Selector UnlabeledEvent(Func selector) => default; + public Selector ReopenedEvent(Func selector) => default; /// - /// Represents a 'user_blocked' event on a given user. + /// Represents a 'subscribed' event on a given `Subscribable`. /// - public Selector UserBlockedEvent(Func selector) => default; + public Selector SubscribedEvent(Func selector) => default; /// - /// Represents a 'milestoned' event on a given issue or pull request. + /// Represents a 'transferred' event on a given issue or pull request. /// - public Selector MilestonedEvent(Func selector) => default; + public Selector TransferredEvent(Func selector) => default; /// - /// Represents a 'demilestoned' event on a given issue or pull request. + /// Represents an 'unassigned' event on any assignable object. /// - public Selector DemilestonedEvent(Func selector) => default; + public Selector UnassignedEvent(Func selector) => default; /// - /// Represents a 'renamed' event on a given issue or pull request + /// Represents an 'unlabeled' event on a given issue or pull request. /// - public Selector RenamedTitleEvent(Func selector) => default; + public Selector UnlabeledEvent(Func selector) => default; /// - /// Represents a 'locked' event on a given issue or pull request. + /// Represents an 'unlocked' event on a given issue or pull request. /// - public Selector LockedEvent(Func selector) => default; + public Selector UnlockedEvent(Func selector) => default; /// - /// Represents an 'unlocked' event on a given issue or pull request. + /// Represents an 'unsubscribed' event on a given `Subscribable`. /// - public Selector UnlockedEvent(Func selector) => default; + public Selector UnsubscribedEvent(Func selector) => default; /// - /// Represents a 'transferred' event on a given issue or pull request. + /// Represents a 'user_blocked' event on a given user. /// - public Selector TransferredEvent(Func selector) => default; + public Selector UserBlockedEvent(Func selector) => default; } internal static IssueTimelineItem Create(Expression expression) diff --git a/Octokit.GraphQL/Model/IssueTimelineItems.cs b/Octokit.GraphQL/Model/IssueTimelineItems.cs index ede5d4db..fa14f551 100644 --- a/Octokit.GraphQL/Model/IssueTimelineItems.cs +++ b/Octokit.GraphQL/Model/IssueTimelineItems.cs @@ -19,16 +19,6 @@ internal IssueTimelineItems(Expression expression) : base(expression) public class Selector { - /// - /// Represents a comment on an Issue. - /// - public Selector IssueComment(Func selector) => default; - - /// - /// Represents a mention made by one issue or pull request to another. - /// - public Selector CrossReferencedEvent(Func selector) => default; - /// /// Represents a 'added_to_project' event on a given issue or pull request. /// @@ -49,16 +39,36 @@ public class Selector /// public Selector CommentDeletedEvent(Func selector) => default; + /// + /// Represents a 'connected' event on a given issue or pull request. + /// + public Selector ConnectedEvent(Func selector) => default; + /// /// Represents a 'converted_note_to_issue' event on a given issue or pull request. /// public Selector ConvertedNoteToIssueEvent(Func selector) => default; + /// + /// Represents a mention made by one issue or pull request to another. + /// + public Selector CrossReferencedEvent(Func selector) => default; + /// /// Represents a 'demilestoned' event on a given issue or pull request. /// public Selector DemilestonedEvent(Func selector) => default; + /// + /// Represents a 'disconnected' event on a given issue or pull request. + /// + public Selector DisconnectedEvent(Func selector) => default; + + /// + /// Represents a comment on an Issue. + /// + public Selector IssueComment(Func selector) => default; + /// /// Represents a 'labeled' event on a given issue or pull request. /// @@ -69,6 +79,11 @@ public class Selector /// public Selector LockedEvent(Func selector) => default; + /// + /// Represents a 'marked_as_duplicate' event on a given issue or pull request. + /// + public Selector MarkedAsDuplicateEvent(Func selector) => default; + /// /// Represents a 'mentioned' event on a given issue or pull request. /// @@ -135,9 +150,9 @@ public class Selector public Selector UnlockedEvent(Func selector) => default; /// - /// Represents a 'user_blocked' event on a given user. + /// Represents an 'unmarked_as_duplicate' event on a given issue or pull request. /// - public Selector UserBlockedEvent(Func selector) => default; + public Selector UnmarkedAsDuplicateEvent(Func selector) => default; /// /// Represents an 'unpinned' event on a given issue or pull request. @@ -148,6 +163,11 @@ public class Selector /// Represents an 'unsubscribed' event on a given `Subscribable`. /// public Selector UnsubscribedEvent(Func selector) => default; + + /// + /// Represents a 'user_blocked' event on a given user. + /// + public Selector UserBlockedEvent(Func selector) => default; } internal static IssueTimelineItems Create(Expression expression) diff --git a/Octokit.GraphQL/Model/IssueTimelineItemsItemType.cs b/Octokit.GraphQL/Model/IssueTimelineItemsItemType.cs index 8a07d146..f72a45be 100644 --- a/Octokit.GraphQL/Model/IssueTimelineItemsItemType.cs +++ b/Octokit.GraphQL/Model/IssueTimelineItemsItemType.cs @@ -47,6 +47,12 @@ public enum IssueTimelineItemsItemType [EnumMember(Value = "COMMENT_DELETED_EVENT")] CommentDeletedEvent, + /// + /// Represents a 'connected' event on a given issue or pull request. + /// + [EnumMember(Value = "CONNECTED_EVENT")] + ConnectedEvent, + /// /// Represents a 'converted_note_to_issue' event on a given issue or pull request. /// @@ -59,6 +65,12 @@ public enum IssueTimelineItemsItemType [EnumMember(Value = "DEMILESTONED_EVENT")] DemilestonedEvent, + /// + /// Represents a 'disconnected' event on a given issue or pull request. + /// + [EnumMember(Value = "DISCONNECTED_EVENT")] + DisconnectedEvent, + /// /// Represents a 'labeled' event on a given issue or pull request. /// @@ -71,6 +83,12 @@ public enum IssueTimelineItemsItemType [EnumMember(Value = "LOCKED_EVENT")] LockedEvent, + /// + /// Represents a 'marked_as_duplicate' event on a given issue or pull request. + /// + [EnumMember(Value = "MARKED_AS_DUPLICATE_EVENT")] + MarkedAsDuplicateEvent, + /// /// Represents a 'mentioned' event on a given issue or pull request. /// @@ -155,6 +173,12 @@ public enum IssueTimelineItemsItemType [EnumMember(Value = "USER_BLOCKED_EVENT")] UserBlockedEvent, + /// + /// Represents an 'unmarked_as_duplicate' event on a given issue or pull request. + /// + [EnumMember(Value = "UNMARKED_AS_DUPLICATE_EVENT")] + UnmarkedAsDuplicateEvent, + /// /// Represents an 'unpinned' event on a given issue or pull request. /// diff --git a/Octokit.GraphQL/Model/LabelOrder.cs b/Octokit.GraphQL/Model/LabelOrder.cs new file mode 100644 index 00000000..87554ea0 --- /dev/null +++ b/Octokit.GraphQL/Model/LabelOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ways in which lists of labels can be ordered upon return. + /// + public class LabelOrder + { + /// + /// The field in which to order labels by. + /// + public LabelOrderField Field { get; set; } + + /// + /// The direction in which to order labels by the specified field. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/LabelOrderField.cs b/Octokit.GraphQL/Model/LabelOrderField.cs new file mode 100644 index 00000000..76319873 --- /dev/null +++ b/Octokit.GraphQL/Model/LabelOrderField.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which label connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum LabelOrderField + { + /// + /// Order labels by name + /// + [EnumMember(Value = "NAME")] + Name, + + /// + /// Order labels by creation time + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/Labelable.cs b/Octokit.GraphQL/Model/Labelable.cs index 2b8a0027..db634979 100644 --- a/Octokit.GraphQL/Model/Labelable.cs +++ b/Octokit.GraphQL/Model/Labelable.cs @@ -20,7 +20,8 @@ public interface ILabelable : IQueryableValue, IQueryableInterface /// Returns the elements in the list that come after the specified cursor. /// Returns the last _n_ elements from the list. /// Returns the elements in the list that come before the specified cursor. - LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null); + /// Ordering options for labels returned from the connection. + LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null); } } @@ -38,7 +39,7 @@ internal StubILabelable(Expression expression) : base(expression) { } - public LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.Labels(first, after, last, before), Octokit.GraphQL.Model.LabelConnection.Create); + public LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Labels(first, after, last, before, orderBy), Octokit.GraphQL.Model.LabelConnection.Create); internal static StubILabelable Create(Expression expression) { diff --git a/Octokit.GraphQL/Model/LinkRepositoryToProjectInput.cs b/Octokit.GraphQL/Model/LinkRepositoryToProjectInput.cs new file mode 100644 index 00000000..dfe145a5 --- /dev/null +++ b/Octokit.GraphQL/Model/LinkRepositoryToProjectInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of LinkRepositoryToProject + /// + public class LinkRepositoryToProjectInput + { + /// + /// The ID of the Project to link to a Repository + /// + public ID ProjectId { get; set; } + + /// + /// The ID of the Repository to link to a Project. + /// + public ID RepositoryId { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/LinkRepositoryToProjectPayload.cs b/Octokit.GraphQL/Model/LinkRepositoryToProjectPayload.cs new file mode 100644 index 00000000..bc4b8401 --- /dev/null +++ b/Octokit.GraphQL/Model/LinkRepositoryToProjectPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of LinkRepositoryToProject + /// + public class LinkRepositoryToProjectPayload : QueryableValue + { + internal LinkRepositoryToProjectPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The linked Project. + /// + public Project Project => this.CreateProperty(x => x.Project, Octokit.GraphQL.Model.Project.Create); + + /// + /// The linked Repository. + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + internal static LinkRepositoryToProjectPayload Create(Expression expression) + { + return new LinkRepositoryToProjectPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/LockLockablePayload.cs b/Octokit.GraphQL/Model/LockLockablePayload.cs index f07579e4..4c3e1e3c 100644 --- a/Octokit.GraphQL/Model/LockLockablePayload.cs +++ b/Octokit.GraphQL/Model/LockLockablePayload.cs @@ -15,6 +15,11 @@ internal LockLockablePayload(Expression expression) : base(expression) { } + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + /// /// A unique identifier for the client performing the mutation. /// diff --git a/Octokit.GraphQL/Model/Mannequin.cs b/Octokit.GraphQL/Model/Mannequin.cs index ce80f076..6a89f08c 100644 --- a/Octokit.GraphQL/Model/Mannequin.cs +++ b/Octokit.GraphQL/Model/Mannequin.cs @@ -31,6 +31,11 @@ internal Mannequin(Expression expression) : base(expression) /// public int? DatabaseId { get; } + /// + /// The mannequin's email on the source instance. + /// + public string Email { get; } + public ID Id { get; } /// diff --git a/Octokit.GraphQL/Model/MarkedAsDuplicateEvent.cs b/Octokit.GraphQL/Model/MarkedAsDuplicateEvent.cs new file mode 100644 index 00000000..63c22066 --- /dev/null +++ b/Octokit.GraphQL/Model/MarkedAsDuplicateEvent.cs @@ -0,0 +1,35 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Represents a 'marked_as_duplicate' event on a given issue or pull request. + /// + public class MarkedAsDuplicateEvent : QueryableValue + { + internal MarkedAsDuplicateEvent(Expression expression) : base(expression) + { + } + + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + public ID Id { get; } + + internal static MarkedAsDuplicateEvent Create(Expression expression) + { + return new MarkedAsDuplicateEvent(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/MembersCanDeleteReposClearAuditEntry.cs b/Octokit.GraphQL/Model/MembersCanDeleteReposClearAuditEntry.cs new file mode 100644 index 00000000..eac5c315 --- /dev/null +++ b/Octokit.GraphQL/Model/MembersCanDeleteReposClearAuditEntry.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a members_can_delete_repos.clear event. + /// + public class MembersCanDeleteReposClearAuditEntry : QueryableValue + { + internal MembersCanDeleteReposClearAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The HTTP path for this enterprise. + /// + public string EnterpriseResourcePath { get; } + + /// + /// The slug of the enterprise. + /// + public string EnterpriseSlug { get; } + + /// + /// The HTTP URL for this enterprise. + /// + public string EnterpriseUrl { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static MembersCanDeleteReposClearAuditEntry Create(Expression expression) + { + return new MembersCanDeleteReposClearAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/MembersCanDeleteReposDisableAuditEntry.cs b/Octokit.GraphQL/Model/MembersCanDeleteReposDisableAuditEntry.cs new file mode 100644 index 00000000..6dcd9b2a --- /dev/null +++ b/Octokit.GraphQL/Model/MembersCanDeleteReposDisableAuditEntry.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a members_can_delete_repos.disable event. + /// + public class MembersCanDeleteReposDisableAuditEntry : QueryableValue + { + internal MembersCanDeleteReposDisableAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The HTTP path for this enterprise. + /// + public string EnterpriseResourcePath { get; } + + /// + /// The slug of the enterprise. + /// + public string EnterpriseSlug { get; } + + /// + /// The HTTP URL for this enterprise. + /// + public string EnterpriseUrl { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static MembersCanDeleteReposDisableAuditEntry Create(Expression expression) + { + return new MembersCanDeleteReposDisableAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/MembersCanDeleteReposEnableAuditEntry.cs b/Octokit.GraphQL/Model/MembersCanDeleteReposEnableAuditEntry.cs new file mode 100644 index 00000000..b9d008d6 --- /dev/null +++ b/Octokit.GraphQL/Model/MembersCanDeleteReposEnableAuditEntry.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a members_can_delete_repos.enable event. + /// + public class MembersCanDeleteReposEnableAuditEntry : QueryableValue + { + internal MembersCanDeleteReposEnableAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The HTTP path for this enterprise. + /// + public string EnterpriseResourcePath { get; } + + /// + /// The slug of the enterprise. + /// + public string EnterpriseSlug { get; } + + /// + /// The HTTP URL for this enterprise. + /// + public string EnterpriseUrl { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static MembersCanDeleteReposEnableAuditEntry Create(Expression expression) + { + return new MembersCanDeleteReposEnableAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/MergeBranchInput.cs b/Octokit.GraphQL/Model/MergeBranchInput.cs new file mode 100644 index 00000000..e1fbe054 --- /dev/null +++ b/Octokit.GraphQL/Model/MergeBranchInput.cs @@ -0,0 +1,36 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of MergeBranch + /// + public class MergeBranchInput + { + /// + /// The Node ID of the Repository containing the base branch that will be modified. + /// + public ID RepositoryId { get; set; } + + /// + /// The name of the base branch that the provided head will be merged into. + /// + public string Base { get; set; } + + /// + /// The head to merge into the base branch. This can be a branch name or a commit GitObjectID. + /// + public string Head { get; set; } + + /// + /// Message to use for the merge commit. If omitted, a default will be used. + /// + public string CommitMessage { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/MergeBranchPayload.cs b/Octokit.GraphQL/Model/MergeBranchPayload.cs new file mode 100644 index 00000000..2764354a --- /dev/null +++ b/Octokit.GraphQL/Model/MergeBranchPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of MergeBranch + /// + public class MergeBranchPayload : QueryableValue + { + internal MergeBranchPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The resulting merge Commit. + /// + public Commit MergeCommit => this.CreateProperty(x => x.MergeCommit, Octokit.GraphQL.Model.Commit.Create); + + internal static MergeBranchPayload Create(Expression expression) + { + return new MergeBranchPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/MergePullRequestInput.cs b/Octokit.GraphQL/Model/MergePullRequestInput.cs index d0370722..205266df 100644 --- a/Octokit.GraphQL/Model/MergePullRequestInput.cs +++ b/Octokit.GraphQL/Model/MergePullRequestInput.cs @@ -28,6 +28,11 @@ public class MergePullRequestInput /// public string ExpectedHeadOid { get; set; } + /// + /// The merge method to use. If omitted, defaults to 'MERGE' + /// + public PullRequestMergeMethod? MergeMethod { get; set; } + /// /// A unique identifier for the client performing the mutation. /// diff --git a/Octokit.GraphQL/Model/MergePullRequestPayload.cs b/Octokit.GraphQL/Model/MergePullRequestPayload.cs index 459f1e16..59b7afc1 100644 --- a/Octokit.GraphQL/Model/MergePullRequestPayload.cs +++ b/Octokit.GraphQL/Model/MergePullRequestPayload.cs @@ -15,6 +15,11 @@ internal MergePullRequestPayload(Expression expression) : base(expression) { } + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + /// /// A unique identifier for the client performing the mutation. /// diff --git a/Octokit.GraphQL/Model/OauthApplicationAuditEntryData.cs b/Octokit.GraphQL/Model/OauthApplicationAuditEntryData.cs new file mode 100644 index 00000000..0de60bcc --- /dev/null +++ b/Octokit.GraphQL/Model/OauthApplicationAuditEntryData.cs @@ -0,0 +1,58 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Model; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Metadata for an audit entry with action oauth_application.* + /// + public interface IOauthApplicationAuditEntryData : IQueryableValue, IQueryableInterface + { + /// + /// The name of the OAuth Application. + /// + string OauthApplicationName { get; } + + /// + /// The HTTP path for the OAuth Application + /// + string OauthApplicationResourcePath { get; } + + /// + /// The HTTP URL for the OAuth Application + /// + string OauthApplicationUrl { get; } + } +} + +namespace Octokit.GraphQL.Model.Internal +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + internal class StubIOauthApplicationAuditEntryData : QueryableValue, IOauthApplicationAuditEntryData + { + internal StubIOauthApplicationAuditEntryData(Expression expression) : base(expression) + { + } + + public string OauthApplicationName { get; } + + public string OauthApplicationResourcePath { get; } + + public string OauthApplicationUrl { get; } + + internal static StubIOauthApplicationAuditEntryData Create(Expression expression) + { + return new StubIOauthApplicationAuditEntryData(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OauthApplicationCreateAuditEntry.cs b/Octokit.GraphQL/Model/OauthApplicationCreateAuditEntry.cs new file mode 100644 index 00000000..43a46ad7 --- /dev/null +++ b/Octokit.GraphQL/Model/OauthApplicationCreateAuditEntry.cs @@ -0,0 +1,145 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a oauth_application.create event. + /// + public class OauthApplicationCreateAuditEntry : QueryableValue + { + internal OauthApplicationCreateAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The application URL of the OAuth Application. + /// + public string ApplicationUrl { get; } + + /// + /// The callback URL of the OAuth Application. + /// + public string CallbackUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The name of the OAuth Application. + /// + public string OauthApplicationName { get; } + + /// + /// The HTTP path for the OAuth Application + /// + public string OauthApplicationResourcePath { get; } + + /// + /// The HTTP URL for the OAuth Application + /// + public string OauthApplicationUrl { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The rate limit of the OAuth Application. + /// + public int? RateLimit { get; } + + /// + /// The state of the OAuth Application. + /// + public OauthApplicationCreateAuditEntryState? State { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OauthApplicationCreateAuditEntry Create(Expression expression) + { + return new OauthApplicationCreateAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OauthApplicationCreateAuditEntryState.cs b/Octokit.GraphQL/Model/OauthApplicationCreateAuditEntryState.cs new file mode 100644 index 00000000..5bd9a8bd --- /dev/null +++ b/Octokit.GraphQL/Model/OauthApplicationCreateAuditEntryState.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The state of an OAuth Application when it was created. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OauthApplicationCreateAuditEntryState + { + /// + /// The OAuth Application was active and allowed to have OAuth Accesses. + /// + [EnumMember(Value = "ACTIVE")] + Active, + + /// + /// The OAuth Application was suspended from generating OAuth Accesses due to abuse or security concerns. + /// + [EnumMember(Value = "SUSPENDED")] + Suspended, + + /// + /// The OAuth Application was in the process of being deleted. + /// + [EnumMember(Value = "PENDING_DELETION")] + PendingDeletion, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OperationType.cs b/Octokit.GraphQL/Model/OperationType.cs new file mode 100644 index 00000000..4d76e9c9 --- /dev/null +++ b/Octokit.GraphQL/Model/OperationType.cs @@ -0,0 +1,56 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The corresponding operation type for the action + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OperationType + { + /// + /// An existing resource was accessed + /// + [EnumMember(Value = "ACCESS")] + Access, + + /// + /// A resource performed an authentication event + /// + [EnumMember(Value = "AUTHENTICATION")] + Authentication, + + /// + /// A new resource was created + /// + [EnumMember(Value = "CREATE")] + Create, + + /// + /// An existing resource was modified + /// + [EnumMember(Value = "MODIFY")] + Modify, + + /// + /// An existing resource was removed + /// + [EnumMember(Value = "REMOVE")] + Remove, + + /// + /// An existing resource was restored + /// + [EnumMember(Value = "RESTORE")] + Restore, + + /// + /// An existing resource was transferred between multiple resources + /// + [EnumMember(Value = "TRANSFER")] + Transfer, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgAddBillingManagerAuditEntry.cs b/Octokit.GraphQL/Model/OrgAddBillingManagerAuditEntry.cs new file mode 100644 index 00000000..d20ac22e --- /dev/null +++ b/Octokit.GraphQL/Model/OrgAddBillingManagerAuditEntry.cs @@ -0,0 +1,115 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.add_billing_manager + /// + public class OrgAddBillingManagerAuditEntry : QueryableValue + { + internal OrgAddBillingManagerAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The email address used to invite a billing manager for the organization. + /// + public string InvitationEmail { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgAddBillingManagerAuditEntry Create(Expression expression) + { + return new OrgAddBillingManagerAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgAddMemberAuditEntry.cs b/Octokit.GraphQL/Model/OrgAddMemberAuditEntry.cs new file mode 100644 index 00000000..47a6a2cc --- /dev/null +++ b/Octokit.GraphQL/Model/OrgAddMemberAuditEntry.cs @@ -0,0 +1,115 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.add_member + /// + public class OrgAddMemberAuditEntry : QueryableValue + { + internal OrgAddMemberAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The permission level of the member added to the organization. + /// + public OrgAddMemberAuditEntryPermission? Permission { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgAddMemberAuditEntry Create(Expression expression) + { + return new OrgAddMemberAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgAddMemberAuditEntryPermission.cs b/Octokit.GraphQL/Model/OrgAddMemberAuditEntryPermission.cs new file mode 100644 index 00000000..d1c1d4a6 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgAddMemberAuditEntryPermission.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The permissions available to members on an Organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgAddMemberAuditEntryPermission + { + /// + /// Can read and clone repositories. + /// + [EnumMember(Value = "READ")] + Read, + + /// + /// Can read, clone, push, and add collaborators to repositories. + /// + [EnumMember(Value = "ADMIN")] + Admin, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgBlockUserAuditEntry.cs b/Octokit.GraphQL/Model/OrgBlockUserAuditEntry.cs new file mode 100644 index 00000000..79fd0518 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgBlockUserAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.block_user + /// + public class OrgBlockUserAuditEntry : QueryableValue + { + internal OrgBlockUserAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The blocked user. + /// + public User BlockedUser => this.CreateProperty(x => x.BlockedUser, Octokit.GraphQL.Model.User.Create); + + /// + /// The username of the blocked user. + /// + public string BlockedUserName { get; } + + /// + /// The HTTP path for the blocked user. + /// + public string BlockedUserResourcePath { get; } + + /// + /// The HTTP URL for the blocked user. + /// + public string BlockedUserUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgBlockUserAuditEntry Create(Expression expression) + { + return new OrgBlockUserAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgConfigDisableCollaboratorsOnlyAuditEntry.cs b/Octokit.GraphQL/Model/OrgConfigDisableCollaboratorsOnlyAuditEntry.cs new file mode 100644 index 00000000..4a44dbc7 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgConfigDisableCollaboratorsOnlyAuditEntry.cs @@ -0,0 +1,110 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.config.disable_collaborators_only event. + /// + public class OrgConfigDisableCollaboratorsOnlyAuditEntry : QueryableValue + { + internal OrgConfigDisableCollaboratorsOnlyAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgConfigDisableCollaboratorsOnlyAuditEntry Create(Expression expression) + { + return new OrgConfigDisableCollaboratorsOnlyAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgConfigEnableCollaboratorsOnlyAuditEntry.cs b/Octokit.GraphQL/Model/OrgConfigEnableCollaboratorsOnlyAuditEntry.cs new file mode 100644 index 00000000..a3710af9 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgConfigEnableCollaboratorsOnlyAuditEntry.cs @@ -0,0 +1,110 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.config.enable_collaborators_only event. + /// + public class OrgConfigEnableCollaboratorsOnlyAuditEntry : QueryableValue + { + internal OrgConfigEnableCollaboratorsOnlyAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgConfigEnableCollaboratorsOnlyAuditEntry Create(Expression expression) + { + return new OrgConfigEnableCollaboratorsOnlyAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgCreateAuditEntry.cs b/Octokit.GraphQL/Model/OrgCreateAuditEntry.cs new file mode 100644 index 00000000..fba387c4 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgCreateAuditEntry.cs @@ -0,0 +1,115 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.create event. + /// + public class OrgCreateAuditEntry : QueryableValue + { + internal OrgCreateAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The billing plan for the Organization. + /// + public OrgCreateAuditEntryBillingPlan? BillingPlan { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgCreateAuditEntry Create(Expression expression) + { + return new OrgCreateAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgCreateAuditEntryBillingPlan.cs b/Octokit.GraphQL/Model/OrgCreateAuditEntryBillingPlan.cs new file mode 100644 index 00000000..86698c41 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgCreateAuditEntryBillingPlan.cs @@ -0,0 +1,44 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The billing plans available for organizations. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgCreateAuditEntryBillingPlan + { + /// + /// Free Plan + /// + [EnumMember(Value = "FREE")] + Free, + + /// + /// Team Plan + /// + [EnumMember(Value = "BUSINESS")] + Business, + + /// + /// Enterprise Cloud Plan + /// + [EnumMember(Value = "BUSINESS_PLUS")] + BusinessPlus, + + /// + /// Legacy Unlimited Plan + /// + [EnumMember(Value = "UNLIMITED")] + Unlimited, + + /// + /// Tiered Per Seat Plan + /// + [EnumMember(Value = "TIERED_PER_SEAT")] + TieredPerSeat, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgDisableOauthAppRestrictionsAuditEntry.cs b/Octokit.GraphQL/Model/OrgDisableOauthAppRestrictionsAuditEntry.cs new file mode 100644 index 00000000..224ad845 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgDisableOauthAppRestrictionsAuditEntry.cs @@ -0,0 +1,110 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.disable_oauth_app_restrictions event. + /// + public class OrgDisableOauthAppRestrictionsAuditEntry : QueryableValue + { + internal OrgDisableOauthAppRestrictionsAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgDisableOauthAppRestrictionsAuditEntry Create(Expression expression) + { + return new OrgDisableOauthAppRestrictionsAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgDisableSamlAuditEntry.cs b/Octokit.GraphQL/Model/OrgDisableSamlAuditEntry.cs new file mode 100644 index 00000000..cc3108d7 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgDisableSamlAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.disable_saml event. + /// + public class OrgDisableSamlAuditEntry : QueryableValue + { + internal OrgDisableSamlAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The SAML provider's digest algorithm URL. + /// + public string DigestMethodUrl { get; } + + public ID Id { get; } + + /// + /// The SAML provider's issuer URL. + /// + public string IssuerUrl { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The SAML provider's signature algorithm URL. + /// + public string SignatureMethodUrl { get; } + + /// + /// The SAML provider's single sign-on URL. + /// + public string SingleSignOnUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgDisableSamlAuditEntry Create(Expression expression) + { + return new OrgDisableSamlAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgDisableTwoFactorRequirementAuditEntry.cs b/Octokit.GraphQL/Model/OrgDisableTwoFactorRequirementAuditEntry.cs new file mode 100644 index 00000000..13638d95 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgDisableTwoFactorRequirementAuditEntry.cs @@ -0,0 +1,110 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.disable_two_factor_requirement event. + /// + public class OrgDisableTwoFactorRequirementAuditEntry : QueryableValue + { + internal OrgDisableTwoFactorRequirementAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgDisableTwoFactorRequirementAuditEntry Create(Expression expression) + { + return new OrgDisableTwoFactorRequirementAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgEnableOauthAppRestrictionsAuditEntry.cs b/Octokit.GraphQL/Model/OrgEnableOauthAppRestrictionsAuditEntry.cs new file mode 100644 index 00000000..2854b2d2 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgEnableOauthAppRestrictionsAuditEntry.cs @@ -0,0 +1,110 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.enable_oauth_app_restrictions event. + /// + public class OrgEnableOauthAppRestrictionsAuditEntry : QueryableValue + { + internal OrgEnableOauthAppRestrictionsAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgEnableOauthAppRestrictionsAuditEntry Create(Expression expression) + { + return new OrgEnableOauthAppRestrictionsAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgEnableSamlAuditEntry.cs b/Octokit.GraphQL/Model/OrgEnableSamlAuditEntry.cs new file mode 100644 index 00000000..158ed677 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgEnableSamlAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.enable_saml event. + /// + public class OrgEnableSamlAuditEntry : QueryableValue + { + internal OrgEnableSamlAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The SAML provider's digest algorithm URL. + /// + public string DigestMethodUrl { get; } + + public ID Id { get; } + + /// + /// The SAML provider's issuer URL. + /// + public string IssuerUrl { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The SAML provider's signature algorithm URL. + /// + public string SignatureMethodUrl { get; } + + /// + /// The SAML provider's single sign-on URL. + /// + public string SingleSignOnUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgEnableSamlAuditEntry Create(Expression expression) + { + return new OrgEnableSamlAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgEnableTwoFactorRequirementAuditEntry.cs b/Octokit.GraphQL/Model/OrgEnableTwoFactorRequirementAuditEntry.cs new file mode 100644 index 00000000..74c7c414 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgEnableTwoFactorRequirementAuditEntry.cs @@ -0,0 +1,110 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.enable_two_factor_requirement event. + /// + public class OrgEnableTwoFactorRequirementAuditEntry : QueryableValue + { + internal OrgEnableTwoFactorRequirementAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgEnableTwoFactorRequirementAuditEntry Create(Expression expression) + { + return new OrgEnableTwoFactorRequirementAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgInviteMemberAuditEntry.cs b/Octokit.GraphQL/Model/OrgInviteMemberAuditEntry.cs new file mode 100644 index 00000000..c1ec1393 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgInviteMemberAuditEntry.cs @@ -0,0 +1,120 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.invite_member event. + /// + public class OrgInviteMemberAuditEntry : QueryableValue + { + internal OrgInviteMemberAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The email address of the organization invitation. + /// + public string Email { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The organization invitation. + /// + public OrganizationInvitation OrganizationInvitation => this.CreateProperty(x => x.OrganizationInvitation, Octokit.GraphQL.Model.OrganizationInvitation.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgInviteMemberAuditEntry Create(Expression expression) + { + return new OrgInviteMemberAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgInviteToBusinessAuditEntry.cs b/Octokit.GraphQL/Model/OrgInviteToBusinessAuditEntry.cs new file mode 100644 index 00000000..6e22e7c9 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgInviteToBusinessAuditEntry.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.invite_to_business event. + /// + public class OrgInviteToBusinessAuditEntry : QueryableValue + { + internal OrgInviteToBusinessAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The HTTP path for this enterprise. + /// + public string EnterpriseResourcePath { get; } + + /// + /// The slug of the enterprise. + /// + public string EnterpriseSlug { get; } + + /// + /// The HTTP URL for this enterprise. + /// + public string EnterpriseUrl { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgInviteToBusinessAuditEntry Create(Expression expression) + { + return new OrgInviteToBusinessAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgOauthAppAccessApprovedAuditEntry.cs b/Octokit.GraphQL/Model/OrgOauthAppAccessApprovedAuditEntry.cs new file mode 100644 index 00000000..117eb560 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgOauthAppAccessApprovedAuditEntry.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.oauth_app_access_approved event. + /// + public class OrgOauthAppAccessApprovedAuditEntry : QueryableValue + { + internal OrgOauthAppAccessApprovedAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The name of the OAuth Application. + /// + public string OauthApplicationName { get; } + + /// + /// The HTTP path for the OAuth Application + /// + public string OauthApplicationResourcePath { get; } + + /// + /// The HTTP URL for the OAuth Application + /// + public string OauthApplicationUrl { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgOauthAppAccessApprovedAuditEntry Create(Expression expression) + { + return new OrgOauthAppAccessApprovedAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgOauthAppAccessDeniedAuditEntry.cs b/Octokit.GraphQL/Model/OrgOauthAppAccessDeniedAuditEntry.cs new file mode 100644 index 00000000..8cb7faae --- /dev/null +++ b/Octokit.GraphQL/Model/OrgOauthAppAccessDeniedAuditEntry.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.oauth_app_access_denied event. + /// + public class OrgOauthAppAccessDeniedAuditEntry : QueryableValue + { + internal OrgOauthAppAccessDeniedAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The name of the OAuth Application. + /// + public string OauthApplicationName { get; } + + /// + /// The HTTP path for the OAuth Application + /// + public string OauthApplicationResourcePath { get; } + + /// + /// The HTTP URL for the OAuth Application + /// + public string OauthApplicationUrl { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgOauthAppAccessDeniedAuditEntry Create(Expression expression) + { + return new OrgOauthAppAccessDeniedAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgOauthAppAccessRequestedAuditEntry.cs b/Octokit.GraphQL/Model/OrgOauthAppAccessRequestedAuditEntry.cs new file mode 100644 index 00000000..d2183711 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgOauthAppAccessRequestedAuditEntry.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.oauth_app_access_requested event. + /// + public class OrgOauthAppAccessRequestedAuditEntry : QueryableValue + { + internal OrgOauthAppAccessRequestedAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The name of the OAuth Application. + /// + public string OauthApplicationName { get; } + + /// + /// The HTTP path for the OAuth Application + /// + public string OauthApplicationResourcePath { get; } + + /// + /// The HTTP URL for the OAuth Application + /// + public string OauthApplicationUrl { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgOauthAppAccessRequestedAuditEntry Create(Expression expression) + { + return new OrgOauthAppAccessRequestedAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRemoveBillingManagerAuditEntry.cs b/Octokit.GraphQL/Model/OrgRemoveBillingManagerAuditEntry.cs new file mode 100644 index 00000000..9bb6e90a --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRemoveBillingManagerAuditEntry.cs @@ -0,0 +1,115 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.remove_billing_manager event. + /// + public class OrgRemoveBillingManagerAuditEntry : QueryableValue + { + internal OrgRemoveBillingManagerAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The reason for the billing manager being removed. + /// + public OrgRemoveBillingManagerAuditEntryReason? Reason { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgRemoveBillingManagerAuditEntry Create(Expression expression) + { + return new OrgRemoveBillingManagerAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRemoveBillingManagerAuditEntryReason.cs b/Octokit.GraphQL/Model/OrgRemoveBillingManagerAuditEntryReason.cs new file mode 100644 index 00000000..9f6dc1a5 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRemoveBillingManagerAuditEntryReason.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The reason a billing manager was removed from an Organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgRemoveBillingManagerAuditEntryReason + { + /// + /// The organization required 2FA of its billing managers and this user did not have 2FA enabled. + /// + [EnumMember(Value = "TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE")] + TwoFactorRequirementNonCompliance, + + /// + /// SAML external identity missing + /// + [EnumMember(Value = "SAML_EXTERNAL_IDENTITY_MISSING")] + SamlExternalIdentityMissing, + + /// + /// SAML SSO enforcement requires an external identity + /// + [EnumMember(Value = "SAML_SSO_ENFORCEMENT_REQUIRES_EXTERNAL_IDENTITY")] + SamlSsoEnforcementRequiresExternalIdentity, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRemoveMemberAuditEntry.cs b/Octokit.GraphQL/Model/OrgRemoveMemberAuditEntry.cs new file mode 100644 index 00000000..2aadb170 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRemoveMemberAuditEntry.cs @@ -0,0 +1,120 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.remove_member event. + /// + public class OrgRemoveMemberAuditEntry : QueryableValue + { + internal OrgRemoveMemberAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The types of membership the member has with the organization. + /// + public IEnumerable MembershipTypes { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The reason for the member being removed. + /// + public OrgRemoveMemberAuditEntryReason? Reason { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgRemoveMemberAuditEntry Create(Expression expression) + { + return new OrgRemoveMemberAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRemoveMemberAuditEntryMembershipType.cs b/Octokit.GraphQL/Model/OrgRemoveMemberAuditEntryMembershipType.cs new file mode 100644 index 00000000..a128a56d --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRemoveMemberAuditEntryMembershipType.cs @@ -0,0 +1,44 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The type of membership a user has with an Organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgRemoveMemberAuditEntryMembershipType + { + /// + /// A direct member is a user that is a member of the Organization. + /// + [EnumMember(Value = "DIRECT_MEMBER")] + DirectMember, + + /// + /// Organization administrators have full access and can change several settings, including the names of repositories that belong to the Organization and Owners team membership. In addition, organization admins can delete the organization and all of its repositories. + /// + [EnumMember(Value = "ADMIN")] + Admin, + + /// + /// A billing manager is a user who manages the billing settings for the Organization, such as updating payment information. + /// + [EnumMember(Value = "BILLING_MANAGER")] + BillingManager, + + /// + /// An unaffiliated collaborator is a person who is not a member of the Organization and does not have access to any repositories in the Organization. + /// + [EnumMember(Value = "UNAFFILIATED")] + Unaffiliated, + + /// + /// An outside collaborator is a person who isn't explicitly a member of the Organization, but who has Read, Write, or Admin permissions to one or more repositories in the organization. + /// + [EnumMember(Value = "OUTSIDE_COLLABORATOR")] + OutsideCollaborator, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRemoveMemberAuditEntryReason.cs b/Octokit.GraphQL/Model/OrgRemoveMemberAuditEntryReason.cs new file mode 100644 index 00000000..f6b3f642 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRemoveMemberAuditEntryReason.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The reason a member was removed from an Organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgRemoveMemberAuditEntryReason + { + /// + /// The organization required 2FA of its billing managers and this user did not have 2FA enabled. + /// + [EnumMember(Value = "TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE")] + TwoFactorRequirementNonCompliance, + + /// + /// SAML external identity missing + /// + [EnumMember(Value = "SAML_EXTERNAL_IDENTITY_MISSING")] + SamlExternalIdentityMissing, + + /// + /// SAML SSO enforcement requires an external identity + /// + [EnumMember(Value = "SAML_SSO_ENFORCEMENT_REQUIRES_EXTERNAL_IDENTITY")] + SamlSsoEnforcementRequiresExternalIdentity, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRemoveOutsideCollaboratorAuditEntry.cs b/Octokit.GraphQL/Model/OrgRemoveOutsideCollaboratorAuditEntry.cs new file mode 100644 index 00000000..35a5938d --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRemoveOutsideCollaboratorAuditEntry.cs @@ -0,0 +1,120 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.remove_outside_collaborator event. + /// + public class OrgRemoveOutsideCollaboratorAuditEntry : QueryableValue + { + internal OrgRemoveOutsideCollaboratorAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The types of membership the outside collaborator has with the organization. + /// + public IEnumerable MembershipTypes { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The reason for the outside collaborator being removed from the Organization. + /// + public OrgRemoveOutsideCollaboratorAuditEntryReason? Reason { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgRemoveOutsideCollaboratorAuditEntry Create(Expression expression) + { + return new OrgRemoveOutsideCollaboratorAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRemoveOutsideCollaboratorAuditEntryMembershipType.cs b/Octokit.GraphQL/Model/OrgRemoveOutsideCollaboratorAuditEntryMembershipType.cs new file mode 100644 index 00000000..d55d2b2b --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRemoveOutsideCollaboratorAuditEntryMembershipType.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The type of membership a user has with an Organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgRemoveOutsideCollaboratorAuditEntryMembershipType + { + /// + /// An outside collaborator is a person who isn't explicitly a member of the Organization, but who has Read, Write, or Admin permissions to one or more repositories in the organization. + /// + [EnumMember(Value = "OUTSIDE_COLLABORATOR")] + OutsideCollaborator, + + /// + /// An unaffiliated collaborator is a person who is not a member of the Organization and does not have access to any repositories in the organization. + /// + [EnumMember(Value = "UNAFFILIATED")] + Unaffiliated, + + /// + /// A billing manager is a user who manages the billing settings for the Organization, such as updating payment information. + /// + [EnumMember(Value = "BILLING_MANAGER")] + BillingManager, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRemoveOutsideCollaboratorAuditEntryReason.cs b/Octokit.GraphQL/Model/OrgRemoveOutsideCollaboratorAuditEntryReason.cs new file mode 100644 index 00000000..4a1c7017 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRemoveOutsideCollaboratorAuditEntryReason.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The reason an outside collaborator was removed from an Organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgRemoveOutsideCollaboratorAuditEntryReason + { + /// + /// The organization required 2FA of its billing managers and this user did not have 2FA enabled. + /// + [EnumMember(Value = "TWO_FACTOR_REQUIREMENT_NON_COMPLIANCE")] + TwoFactorRequirementNonCompliance, + + /// + /// SAML external identity missing + /// + [EnumMember(Value = "SAML_EXTERNAL_IDENTITY_MISSING")] + SamlExternalIdentityMissing, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRestoreMemberAuditEntry.cs b/Octokit.GraphQL/Model/OrgRestoreMemberAuditEntry.cs new file mode 100644 index 00000000..2fd751f9 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRestoreMemberAuditEntry.cs @@ -0,0 +1,145 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.restore_member event. + /// + public class OrgRestoreMemberAuditEntry : QueryableValue + { + internal OrgRestoreMemberAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The number of custom email routings for the restored member. + /// + public int? RestoredCustomEmailRoutingsCount { get; } + + /// + /// The number of issue assignemnts for the restored member. + /// + public int? RestoredIssueAssignmentsCount { get; } + + /// + /// Restored organization membership objects. + /// + public IQueryableList RestoredMemberships => this.CreateProperty(x => x.RestoredMemberships); + + /// + /// The number of restored memberships. + /// + public int? RestoredMembershipsCount { get; } + + /// + /// The number of repositories of the restored member. + /// + public int? RestoredRepositoriesCount { get; } + + /// + /// The number of starred repositories for the restored member. + /// + public int? RestoredRepositoryStarsCount { get; } + + /// + /// The number of watched repositories for the restored member. + /// + public int? RestoredRepositoryWatchesCount { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgRestoreMemberAuditEntry Create(Expression expression) + { + return new OrgRestoreMemberAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRestoreMemberAuditEntryMembership.cs b/Octokit.GraphQL/Model/OrgRestoreMemberAuditEntryMembership.cs new file mode 100644 index 00000000..f41aa408 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRestoreMemberAuditEntryMembership.cs @@ -0,0 +1,43 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Types of memberships that can be restored for an Organization member. + /// + public class OrgRestoreMemberAuditEntryMembership : QueryableValue, IUnion + { + internal OrgRestoreMemberAuditEntryMembership(Expression expression) : base(expression) + { + } + + public TResult Switch(Expression, Selector>> select) => default; + + public class Selector + { + /// + /// Metadata for an organization membership for org.restore_member actions + /// + public Selector OrgRestoreMemberMembershipOrganizationAuditEntryData(Func selector) => default; + + /// + /// Metadata for a repository membership for org.restore_member actions + /// + public Selector OrgRestoreMemberMembershipRepositoryAuditEntryData(Func selector) => default; + + /// + /// Metadata for a team membership for org.restore_member actions + /// + public Selector OrgRestoreMemberMembershipTeamAuditEntryData(Func selector) => default; + } + + internal static OrgRestoreMemberAuditEntryMembership Create(Expression expression) + { + return new OrgRestoreMemberAuditEntryMembership(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRestoreMemberMembershipOrganizationAuditEntryData.cs b/Octokit.GraphQL/Model/OrgRestoreMemberMembershipOrganizationAuditEntryData.cs new file mode 100644 index 00000000..1be05238 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRestoreMemberMembershipOrganizationAuditEntryData.cs @@ -0,0 +1,43 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Metadata for an organization membership for org.restore_member actions + /// + public class OrgRestoreMemberMembershipOrganizationAuditEntryData : QueryableValue + { + internal OrgRestoreMemberMembershipOrganizationAuditEntryData(Expression expression) : base(expression) + { + } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + internal static OrgRestoreMemberMembershipOrganizationAuditEntryData Create(Expression expression) + { + return new OrgRestoreMemberMembershipOrganizationAuditEntryData(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRestoreMemberMembershipRepositoryAuditEntryData.cs b/Octokit.GraphQL/Model/OrgRestoreMemberMembershipRepositoryAuditEntryData.cs new file mode 100644 index 00000000..b6a2e8a0 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRestoreMemberMembershipRepositoryAuditEntryData.cs @@ -0,0 +1,43 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Metadata for a repository membership for org.restore_member actions + /// + public class OrgRestoreMemberMembershipRepositoryAuditEntryData : QueryableValue + { + internal OrgRestoreMemberMembershipRepositoryAuditEntryData(Expression expression) : base(expression) + { + } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + internal static OrgRestoreMemberMembershipRepositoryAuditEntryData Create(Expression expression) + { + return new OrgRestoreMemberMembershipRepositoryAuditEntryData(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgRestoreMemberMembershipTeamAuditEntryData.cs b/Octokit.GraphQL/Model/OrgRestoreMemberMembershipTeamAuditEntryData.cs new file mode 100644 index 00000000..c2357bef --- /dev/null +++ b/Octokit.GraphQL/Model/OrgRestoreMemberMembershipTeamAuditEntryData.cs @@ -0,0 +1,43 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Metadata for a team membership for org.restore_member actions + /// + public class OrgRestoreMemberMembershipTeamAuditEntryData : QueryableValue + { + internal OrgRestoreMemberMembershipTeamAuditEntryData(Expression expression) : base(expression) + { + } + + /// + /// The team associated with the action + /// + public Team Team => this.CreateProperty(x => x.Team, Octokit.GraphQL.Model.Team.Create); + + /// + /// The name of the team + /// + public string TeamName { get; } + + /// + /// The HTTP path for this team + /// + public string TeamResourcePath { get; } + + /// + /// The HTTP URL for this team + /// + public string TeamUrl { get; } + + internal static OrgRestoreMemberMembershipTeamAuditEntryData Create(Expression expression) + { + return new OrgRestoreMemberMembershipTeamAuditEntryData(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgUnblockUserAuditEntry.cs b/Octokit.GraphQL/Model/OrgUnblockUserAuditEntry.cs new file mode 100644 index 00000000..915d0494 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgUnblockUserAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.unblock_user + /// + public class OrgUnblockUserAuditEntry : QueryableValue + { + internal OrgUnblockUserAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The user being unblocked by the organization. + /// + public User BlockedUser => this.CreateProperty(x => x.BlockedUser, Octokit.GraphQL.Model.User.Create); + + /// + /// The username of the blocked user. + /// + public string BlockedUserName { get; } + + /// + /// The HTTP path for the blocked user. + /// + public string BlockedUserResourcePath { get; } + + /// + /// The HTTP URL for the blocked user. + /// + public string BlockedUserUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgUnblockUserAuditEntry Create(Expression expression) + { + return new OrgUnblockUserAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgUpdateDefaultRepositoryPermissionAuditEntry.cs b/Octokit.GraphQL/Model/OrgUpdateDefaultRepositoryPermissionAuditEntry.cs new file mode 100644 index 00000000..ecaa0fb9 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgUpdateDefaultRepositoryPermissionAuditEntry.cs @@ -0,0 +1,120 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.update_default_repository_permission + /// + public class OrgUpdateDefaultRepositoryPermissionAuditEntry : QueryableValue + { + internal OrgUpdateDefaultRepositoryPermissionAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The new default repository permission level for the organization. + /// + public OrgUpdateDefaultRepositoryPermissionAuditEntryPermission? Permission { get; } + + /// + /// The former default repository permission level for the organization. + /// + public OrgUpdateDefaultRepositoryPermissionAuditEntryPermission? PermissionWas { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgUpdateDefaultRepositoryPermissionAuditEntry Create(Expression expression) + { + return new OrgUpdateDefaultRepositoryPermissionAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgUpdateDefaultRepositoryPermissionAuditEntryPermission.cs b/Octokit.GraphQL/Model/OrgUpdateDefaultRepositoryPermissionAuditEntryPermission.cs new file mode 100644 index 00000000..c4fd2ad4 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgUpdateDefaultRepositoryPermissionAuditEntryPermission.cs @@ -0,0 +1,38 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The default permission a repository can have in an Organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgUpdateDefaultRepositoryPermissionAuditEntryPermission + { + /// + /// Can read and clone repositories. + /// + [EnumMember(Value = "READ")] + Read, + + /// + /// Can read, clone and push to repositories. + /// + [EnumMember(Value = "WRITE")] + Write, + + /// + /// Can read, clone, push, and add collaborators to repositories. + /// + [EnumMember(Value = "ADMIN")] + Admin, + + /// + /// No default permission value. + /// + [EnumMember(Value = "NONE")] + None, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgUpdateMemberAuditEntry.cs b/Octokit.GraphQL/Model/OrgUpdateMemberAuditEntry.cs new file mode 100644 index 00000000..654113b4 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgUpdateMemberAuditEntry.cs @@ -0,0 +1,120 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.update_member event. + /// + public class OrgUpdateMemberAuditEntry : QueryableValue + { + internal OrgUpdateMemberAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The new member permission level for the organization. + /// + public OrgUpdateMemberAuditEntryPermission? Permission { get; } + + /// + /// The former member permission level for the organization. + /// + public OrgUpdateMemberAuditEntryPermission? PermissionWas { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgUpdateMemberAuditEntry Create(Expression expression) + { + return new OrgUpdateMemberAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgUpdateMemberAuditEntryPermission.cs b/Octokit.GraphQL/Model/OrgUpdateMemberAuditEntryPermission.cs new file mode 100644 index 00000000..f6a944b5 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgUpdateMemberAuditEntryPermission.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The permissions available to members on an Organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgUpdateMemberAuditEntryPermission + { + /// + /// Can read and clone repositories. + /// + [EnumMember(Value = "READ")] + Read, + + /// + /// Can read, clone, push, and add collaborators to repositories. + /// + [EnumMember(Value = "ADMIN")] + Admin, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgUpdateMemberRepositoryCreationPermissionAuditEntry.cs b/Octokit.GraphQL/Model/OrgUpdateMemberRepositoryCreationPermissionAuditEntry.cs new file mode 100644 index 00000000..c7093fb0 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgUpdateMemberRepositoryCreationPermissionAuditEntry.cs @@ -0,0 +1,120 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.update_member_repository_creation_permission event. + /// + public class OrgUpdateMemberRepositoryCreationPermissionAuditEntry : QueryableValue + { + internal OrgUpdateMemberRepositoryCreationPermissionAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// Can members create repositories in the organization. + /// + public bool? CanCreateRepositories { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + /// + /// The permission for visibility level of repositories for this organization. + /// + public OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility? Visibility { get; } + + internal static OrgUpdateMemberRepositoryCreationPermissionAuditEntry Create(Expression expression) + { + return new OrgUpdateMemberRepositoryCreationPermissionAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility.cs b/Octokit.GraphQL/Model/OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility.cs new file mode 100644 index 00000000..5433b4af --- /dev/null +++ b/Octokit.GraphQL/Model/OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The permissions available for repository creation on an Organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrgUpdateMemberRepositoryCreationPermissionAuditEntryVisibility + { + /// + /// All organization members are restricted from creating any repositories. + /// + [EnumMember(Value = "ALL")] + All, + + /// + /// All organization members are restricted from creating public repositories. + /// + [EnumMember(Value = "PUBLIC")] + Public, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrgUpdateMemberRepositoryInvitationPermissionAuditEntry.cs b/Octokit.GraphQL/Model/OrgUpdateMemberRepositoryInvitationPermissionAuditEntry.cs new file mode 100644 index 00000000..4f21c123 --- /dev/null +++ b/Octokit.GraphQL/Model/OrgUpdateMemberRepositoryInvitationPermissionAuditEntry.cs @@ -0,0 +1,115 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a org.update_member_repository_invitation_permission event. + /// + public class OrgUpdateMemberRepositoryInvitationPermissionAuditEntry : QueryableValue + { + internal OrgUpdateMemberRepositoryInvitationPermissionAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// Can outside collaborators be invited to repositories in the organization. + /// + public bool? CanInviteOutsideCollaboratorsToRepositories { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static OrgUpdateMemberRepositoryInvitationPermissionAuditEntry Create(Expression expression) + { + return new OrgUpdateMemberRepositoryInvitationPermissionAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/Organization.cs b/Octokit.GraphQL/Model/Organization.cs index 44626658..53fd95cf 100644 --- a/Octokit.GraphQL/Model/Organization.cs +++ b/Octokit.GraphQL/Model/Organization.cs @@ -21,12 +21,28 @@ internal Organization(Expression expression) : base(expression) /// Filter to only a particular kind of pinnable item. public bool AnyPinnableItems(Arg? type = null) => default; + /// + /// Audit log entries of the organization + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for the returned audit log entries. + /// The query string to filter audit entries + public OrganizationAuditEntryConnection AuditLog(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null, Arg? query = null) => this.CreateMethodCall(x => x.AuditLog(first, after, last, before, orderBy, query), Octokit.GraphQL.Model.OrganizationAuditEntryConnection.Create); + /// /// A URL pointing to the organization's public avatar. /// /// The size of the resulting square image. public string AvatarUrl(Arg? size = null) => default; + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + /// /// Identifies the primary key from the database. /// @@ -37,6 +53,11 @@ internal Organization(Expression expression) : base(expression) /// public string Description { get; } + /// + /// The organization's public profile description rendered to HTML. + /// + public string DescriptionHTML { get; } + /// /// The organization's public email. /// @@ -179,6 +200,32 @@ internal Organization(Expression expression) : base(expression) /// public string ProjectsUrl { get; } + /// + /// A list of registry packages under the owner. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Find registry package by name. + /// Find registry packages by their names. + /// Filter registry package by type. + /// Filter registry package by whether it is publicly visible + /// Filter registry package by type (string). + /// Find registry packages in a repository. + public RegistryPackageConnection RegistryPackages(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? name = null, Arg>? names = null, Arg? packageType = null, Arg? publicOnly = null, Arg? registryPackageType = null, Arg? repositoryId = null) => this.CreateMethodCall(x => x.RegistryPackages(first, after, last, before, name, names, packageType, publicOnly, registryPackageType, repositoryId), Octokit.GraphQL.Model.RegistryPackageConnection.Create); + + /// + /// A list of registry packages for a particular search query. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Filter registry package by type. + /// Find registry package by search query. + public RegistryPackageConnection RegistryPackagesForQuery(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? packageType = null, Arg? query = null) => this.CreateMethodCall(x => x.RegistryPackagesForQuery(first, after, last, before, packageType, query), Octokit.GraphQL.Model.RegistryPackageConnection.Create); + /// /// A list of repositories that the user owns. /// @@ -215,6 +262,32 @@ internal Organization(Expression expression) : base(expression) /// public OrganizationIdentityProvider SamlIdentityProvider => this.CreateProperty(x => x.SamlIdentityProvider, Octokit.GraphQL.Model.OrganizationIdentityProvider.Create); + /// + /// The GitHub Sponsors listing for this user. + /// + public SponsorsListing SponsorsListing => this.CreateProperty(x => x.SponsorsListing, Octokit.GraphQL.Model.SponsorsListing.Create); + + /// + /// This object's sponsorships as the maintainer. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Whether or not to include private sponsorships in the result set + /// Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer. + public SponsorshipConnection SponsorshipsAsMaintainer(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? includePrivate = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.SponsorshipsAsMaintainer(first, after, last, before, includePrivate, orderBy), Octokit.GraphQL.Model.SponsorshipConnection.Create); + + /// + /// This object's sponsorships as the sponsor. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer. + public SponsorshipConnection SponsorshipsAsSponsor(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.SponsorshipsAsSponsor(first, after, last, before, orderBy), Octokit.GraphQL.Model.SponsorshipConnection.Create); + /// /// Find an organization's team by its slug. /// @@ -247,6 +320,11 @@ internal Organization(Expression expression) : base(expression) /// public string TeamsUrl { get; } + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + /// /// The HTTP URL for this organization. /// diff --git a/Octokit.GraphQL/Model/OrganizationAuditEntry.cs b/Octokit.GraphQL/Model/OrganizationAuditEntry.cs new file mode 100644 index 00000000..c245e8d6 --- /dev/null +++ b/Octokit.GraphQL/Model/OrganizationAuditEntry.cs @@ -0,0 +1,318 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An audit entry in an organization audit log. + /// + public class OrganizationAuditEntry : QueryableValue, IUnion + { + internal OrganizationAuditEntry(Expression expression) : base(expression) + { + } + + public TResult Switch(Expression, Selector>> select) => default; + + public class Selector + { + /// + /// Audit log entry for a members_can_delete_repos.clear event. + /// + public Selector MembersCanDeleteReposClearAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a members_can_delete_repos.disable event. + /// + public Selector MembersCanDeleteReposDisableAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a members_can_delete_repos.enable event. + /// + public Selector MembersCanDeleteReposEnableAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a oauth_application.create event. + /// + public Selector OauthApplicationCreateAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.add_billing_manager + /// + public Selector OrgAddBillingManagerAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.add_member + /// + public Selector OrgAddMemberAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.block_user + /// + public Selector OrgBlockUserAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.config.disable_collaborators_only event. + /// + public Selector OrgConfigDisableCollaboratorsOnlyAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.config.enable_collaborators_only event. + /// + public Selector OrgConfigEnableCollaboratorsOnlyAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.create event. + /// + public Selector OrgCreateAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.disable_oauth_app_restrictions event. + /// + public Selector OrgDisableOauthAppRestrictionsAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.disable_saml event. + /// + public Selector OrgDisableSamlAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.disable_two_factor_requirement event. + /// + public Selector OrgDisableTwoFactorRequirementAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.enable_oauth_app_restrictions event. + /// + public Selector OrgEnableOauthAppRestrictionsAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.enable_saml event. + /// + public Selector OrgEnableSamlAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.enable_two_factor_requirement event. + /// + public Selector OrgEnableTwoFactorRequirementAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.invite_member event. + /// + public Selector OrgInviteMemberAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.invite_to_business event. + /// + public Selector OrgInviteToBusinessAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.oauth_app_access_approved event. + /// + public Selector OrgOauthAppAccessApprovedAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.oauth_app_access_denied event. + /// + public Selector OrgOauthAppAccessDeniedAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.oauth_app_access_requested event. + /// + public Selector OrgOauthAppAccessRequestedAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.remove_billing_manager event. + /// + public Selector OrgRemoveBillingManagerAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.remove_member event. + /// + public Selector OrgRemoveMemberAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.remove_outside_collaborator event. + /// + public Selector OrgRemoveOutsideCollaboratorAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.restore_member event. + /// + public Selector OrgRestoreMemberAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.unblock_user + /// + public Selector OrgUnblockUserAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.update_default_repository_permission + /// + public Selector OrgUpdateDefaultRepositoryPermissionAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.update_member event. + /// + public Selector OrgUpdateMemberAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.update_member_repository_creation_permission event. + /// + public Selector OrgUpdateMemberRepositoryCreationPermissionAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a org.update_member_repository_invitation_permission event. + /// + public Selector OrgUpdateMemberRepositoryInvitationPermissionAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a private_repository_forking.disable event. + /// + public Selector PrivateRepositoryForkingDisableAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a private_repository_forking.enable event. + /// + public Selector PrivateRepositoryForkingEnableAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.access event. + /// + public Selector RepoAccessAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.add_member event. + /// + public Selector RepoAddMemberAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.add_topic event. + /// + public Selector RepoAddTopicAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.archived event. + /// + public Selector RepoArchivedAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.change_merge_setting event. + /// + public Selector RepoChangeMergeSettingAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.disable_anonymous_git_access event. + /// + public Selector RepoConfigDisableAnonymousGitAccessAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.disable_collaborators_only event. + /// + public Selector RepoConfigDisableCollaboratorsOnlyAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.disable_contributors_only event. + /// + public Selector RepoConfigDisableContributorsOnlyAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.disable_sockpuppet_disallowed event. + /// + public Selector RepoConfigDisableSockpuppetDisallowedAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.enable_anonymous_git_access event. + /// + public Selector RepoConfigEnableAnonymousGitAccessAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.enable_collaborators_only event. + /// + public Selector RepoConfigEnableCollaboratorsOnlyAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.enable_contributors_only event. + /// + public Selector RepoConfigEnableContributorsOnlyAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.enable_sockpuppet_disallowed event. + /// + public Selector RepoConfigEnableSockpuppetDisallowedAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.lock_anonymous_git_access event. + /// + public Selector RepoConfigLockAnonymousGitAccessAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.config.unlock_anonymous_git_access event. + /// + public Selector RepoConfigUnlockAnonymousGitAccessAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.create event. + /// + public Selector RepoCreateAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.destroy event. + /// + public Selector RepoDestroyAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.remove_member event. + /// + public Selector RepoRemoveMemberAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repo.remove_topic event. + /// + public Selector RepoRemoveTopicAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repository_visibility_change.disable event. + /// + public Selector RepositoryVisibilityChangeDisableAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a repository_visibility_change.enable event. + /// + public Selector RepositoryVisibilityChangeEnableAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a team.add_member event. + /// + public Selector TeamAddMemberAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a team.add_repository event. + /// + public Selector TeamAddRepositoryAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a team.change_parent_team event. + /// + public Selector TeamChangeParentTeamAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a team.remove_member event. + /// + public Selector TeamRemoveMemberAuditEntry(Func selector) => default; + + /// + /// Audit log entry for a team.remove_repository event. + /// + public Selector TeamRemoveRepositoryAuditEntry(Func selector) => default; + } + + internal static OrganizationAuditEntry Create(Expression expression) + { + return new OrganizationAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrganizationAuditEntryConnection.cs b/Octokit.GraphQL/Model/OrganizationAuditEntryConnection.cs new file mode 100644 index 00000000..7e8c4c26 --- /dev/null +++ b/Octokit.GraphQL/Model/OrganizationAuditEntryConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for OrganizationAuditEntry. + /// + public class OrganizationAuditEntryConnection : QueryableValue, IPagingConnection + { + internal OrganizationAuditEntryConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static OrganizationAuditEntryConnection Create(Expression expression) + { + return new OrganizationAuditEntryConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrganizationAuditEntryData.cs b/Octokit.GraphQL/Model/OrganizationAuditEntryData.cs new file mode 100644 index 00000000..b11091c4 --- /dev/null +++ b/Octokit.GraphQL/Model/OrganizationAuditEntryData.cs @@ -0,0 +1,65 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Model; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Metadata for an audit entry with action org.* + /// + public interface IOrganizationAuditEntryData : IQueryableValue, IQueryableInterface + { + /// + /// The Organization associated with the Audit Entry. + /// + Organization Organization { get; } + + /// + /// The name of the Organization. + /// + string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + string OrganizationUrl { get; } + } +} + +namespace Octokit.GraphQL.Model.Internal +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + internal class StubIOrganizationAuditEntryData : QueryableValue, IOrganizationAuditEntryData + { + internal StubIOrganizationAuditEntryData(Expression expression) : base(expression) + { + } + + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + public string OrganizationName { get; } + + public string OrganizationResourcePath { get; } + + public string OrganizationUrl { get; } + + internal static StubIOrganizationAuditEntryData Create(Expression expression) + { + return new StubIOrganizationAuditEntryData(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrganizationAuditEntryEdge.cs b/Octokit.GraphQL/Model/OrganizationAuditEntryEdge.cs new file mode 100644 index 00000000..a0dc31a0 --- /dev/null +++ b/Octokit.GraphQL/Model/OrganizationAuditEntryEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class OrganizationAuditEntryEdge : QueryableValue + { + internal OrganizationAuditEntryEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public OrganizationAuditEntry Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.OrganizationAuditEntry.Create); + + internal static OrganizationAuditEntryEdge Create(Expression expression) + { + return new OrganizationAuditEntryEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrganizationMembersCanCreateRepositoriesSettingValue.cs b/Octokit.GraphQL/Model/OrganizationMembersCanCreateRepositoriesSettingValue.cs new file mode 100644 index 00000000..e6b4b985 --- /dev/null +++ b/Octokit.GraphQL/Model/OrganizationMembersCanCreateRepositoriesSettingValue.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible values for the members can create repositories setting on an organization. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrganizationMembersCanCreateRepositoriesSettingValue + { + /// + /// Members will be able to create public and private repositories. + /// + [EnumMember(Value = "ALL")] + All, + + /// + /// Members will be able to create only private repositories. + /// + [EnumMember(Value = "PRIVATE")] + Private, + + /// + /// Members will not be able to create public or private repositories. + /// + [EnumMember(Value = "DISABLED")] + Disabled, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrganizationOrder.cs b/Octokit.GraphQL/Model/OrganizationOrder.cs new file mode 100644 index 00000000..8ae726c9 --- /dev/null +++ b/Octokit.GraphQL/Model/OrganizationOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for organization connections. + /// + public class OrganizationOrder + { + /// + /// The field to order organizations by. + /// + public OrganizationOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrganizationOrderField.cs b/Octokit.GraphQL/Model/OrganizationOrderField.cs new file mode 100644 index 00000000..32579d53 --- /dev/null +++ b/Octokit.GraphQL/Model/OrganizationOrderField.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which organization connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrganizationOrderField + { + /// + /// Order organizations by creation time + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + + /// + /// Order organizations by login + /// + [EnumMember(Value = "LOGIN")] + Login, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrganizationTeamsHovercardContext.cs b/Octokit.GraphQL/Model/OrganizationTeamsHovercardContext.cs new file mode 100644 index 00000000..2432b7a9 --- /dev/null +++ b/Octokit.GraphQL/Model/OrganizationTeamsHovercardContext.cs @@ -0,0 +1,57 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An organization teams hovercard context + /// + public class OrganizationTeamsHovercardContext : QueryableValue + { + internal OrganizationTeamsHovercardContext(Expression expression) : base(expression) + { + } + + /// + /// A string describing this context + /// + public string Message { get; } + + /// + /// An octicon to accompany this context + /// + public string Octicon { get; } + + /// + /// Teams in this organization the user is a member of that are relevant + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public TeamConnection RelevantTeams(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.RelevantTeams(first, after, last, before), Octokit.GraphQL.Model.TeamConnection.Create); + + /// + /// The path for the full team list for this user + /// + public string TeamsResourcePath { get; } + + /// + /// The URL for the full team list for this user + /// + public string TeamsUrl { get; } + + /// + /// The total number of teams the user is on in the organization + /// + public int TotalTeamCount { get; } + + internal static OrganizationTeamsHovercardContext Create(Expression expression) + { + return new OrganizationTeamsHovercardContext(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/OrganizationsHovercardContext.cs b/Octokit.GraphQL/Model/OrganizationsHovercardContext.cs new file mode 100644 index 00000000..f3ba6ea4 --- /dev/null +++ b/Octokit.GraphQL/Model/OrganizationsHovercardContext.cs @@ -0,0 +1,47 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An organization list hovercard context + /// + public class OrganizationsHovercardContext : QueryableValue + { + internal OrganizationsHovercardContext(Expression expression) : base(expression) + { + } + + /// + /// A string describing this context + /// + public string Message { get; } + + /// + /// An octicon to accompany this context + /// + public string Octicon { get; } + + /// + /// Organizations this user is a member of that are relevant + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public OrganizationConnection RelevantOrganizations(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.RelevantOrganizations(first, after, last, before), Octokit.GraphQL.Model.OrganizationConnection.Create); + + /// + /// The total number of organizations this user is in + /// + public int TotalOrganizationCount { get; } + + internal static OrganizationsHovercardContext Create(Expression expression) + { + return new OrganizationsHovercardContext(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/PrivateRepositoryForkingDisableAuditEntry.cs b/Octokit.GraphQL/Model/PrivateRepositoryForkingDisableAuditEntry.cs new file mode 100644 index 00000000..a1d37064 --- /dev/null +++ b/Octokit.GraphQL/Model/PrivateRepositoryForkingDisableAuditEntry.cs @@ -0,0 +1,145 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a private_repository_forking.disable event. + /// + public class PrivateRepositoryForkingDisableAuditEntry : QueryableValue + { + internal PrivateRepositoryForkingDisableAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The HTTP path for this enterprise. + /// + public string EnterpriseResourcePath { get; } + + /// + /// The slug of the enterprise. + /// + public string EnterpriseSlug { get; } + + /// + /// The HTTP URL for this enterprise. + /// + public string EnterpriseUrl { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static PrivateRepositoryForkingDisableAuditEntry Create(Expression expression) + { + return new PrivateRepositoryForkingDisableAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/PrivateRepositoryForkingEnableAuditEntry.cs b/Octokit.GraphQL/Model/PrivateRepositoryForkingEnableAuditEntry.cs new file mode 100644 index 00000000..910b5735 --- /dev/null +++ b/Octokit.GraphQL/Model/PrivateRepositoryForkingEnableAuditEntry.cs @@ -0,0 +1,145 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a private_repository_forking.enable event. + /// + public class PrivateRepositoryForkingEnableAuditEntry : QueryableValue + { + internal PrivateRepositoryForkingEnableAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The HTTP path for this enterprise. + /// + public string EnterpriseResourcePath { get; } + + /// + /// The slug of the enterprise. + /// + public string EnterpriseSlug { get; } + + /// + /// The HTTP URL for this enterprise. + /// + public string EnterpriseUrl { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static PrivateRepositoryForkingEnableAuditEntry Create(Expression expression) + { + return new PrivateRepositoryForkingEnableAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ProjectCardImport.cs b/Octokit.GraphQL/Model/ProjectCardImport.cs deleted file mode 100644 index 3b720335..00000000 --- a/Octokit.GraphQL/Model/ProjectCardImport.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace Octokit.GraphQL.Model -{ - using System; - using System.Collections.Generic; - - /// - /// An issue or PR and its owning repository to be used in a project card. - /// - public class ProjectCardImport - { - /// - /// Repository name with owner (owner/repository). - /// - public string Repository { get; set; } - - /// - /// The issue or pull request number. - /// - public int Number { get; set; } - } -} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ProjectColumnImport.cs b/Octokit.GraphQL/Model/ProjectColumnImport.cs deleted file mode 100644 index f88002b0..00000000 --- a/Octokit.GraphQL/Model/ProjectColumnImport.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace Octokit.GraphQL.Model -{ - using System; - using System.Collections.Generic; - - /// - /// A project column and a list of its issues and PRs. - /// - public class ProjectColumnImport - { - /// - /// The name of the column. - /// - public string ColumnName { get; set; } - - /// - /// The position of the column, starting from 0. - /// - public int Position { get; set; } - - /// - /// A list of issues and pull requests in the column. - /// - public IEnumerable Issues { get; set; } - } -} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ProjectTemplate.cs b/Octokit.GraphQL/Model/ProjectTemplate.cs new file mode 100644 index 00000000..249ecf31 --- /dev/null +++ b/Octokit.GraphQL/Model/ProjectTemplate.cs @@ -0,0 +1,38 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// GitHub-provided templates for Projects + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum ProjectTemplate + { + /// + /// Create a board with columns for To do, In progress and Done. + /// + [EnumMember(Value = "BASIC_KANBAN")] + BasicKanban, + + /// + /// Create a board with v2 triggers to automatically move cards across To do, In progress and Done columns. + /// + [EnumMember(Value = "AUTOMATED_KANBAN_V2")] + AutomatedKanbanV2, + + /// + /// Create a board with triggers to automatically move cards across columns with review automation. + /// + [EnumMember(Value = "AUTOMATED_REVIEWS_KANBAN")] + AutomatedReviewsKanban, + + /// + /// Create a board to triage and prioritize bugs with To do, priority, and Done columns. + /// + [EnumMember(Value = "BUG_TRIAGE")] + BugTriage, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/PullRequest.cs b/Octokit.GraphQL/Model/PullRequest.cs index 2514522a..5cd49061 100644 --- a/Octokit.GraphQL/Model/PullRequest.cs +++ b/Octokit.GraphQL/Model/PullRequest.cs @@ -84,6 +84,16 @@ internal PullRequest(Expression expression) : base(expression) /// public int ChangedFiles { get; } + /// + /// The HTTP path for the checks of this pull request. + /// + public string ChecksResourcePath { get; } + + /// + /// The HTTP URL for the checks of this pull request. + /// + public string ChecksUrl { get; } + /// /// `true` if the pull request is closed /// @@ -171,6 +181,12 @@ internal PullRequest(Expression expression) : base(expression) /// public IRepositoryOwner HeadRepositoryOwner => this.CreateProperty(x => x.HeadRepositoryOwner, Octokit.GraphQL.Model.Internal.StubIRepositoryOwner.Create); + /// + /// The hovercard information for this issue + /// + /// Whether or not to include notification contexts + public Hovercard Hovercard(Arg? includeNotificationContexts = null) => this.CreateMethodCall(x => x.Hovercard(includeNotificationContexts), Octokit.GraphQL.Model.Hovercard.Create); + public ID Id { get; } /// @@ -190,7 +206,8 @@ internal PullRequest(Expression expression) : base(expression) /// Returns the elements in the list that come after the specified cursor. /// Returns the last _n_ elements from the list. /// Returns the elements in the list that come before the specified cursor. - public LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.Labels(first, after, last, before), Octokit.GraphQL.Model.LabelConnection.Create); + /// Ordering options for labels returned from the connection. + public LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Labels(first, after, last, before, orderBy), Octokit.GraphQL.Model.LabelConnection.Create); /// /// The moment the editor made the last edit diff --git a/Octokit.GraphQL/Model/PullRequestMergeMethod.cs b/Octokit.GraphQL/Model/PullRequestMergeMethod.cs new file mode 100644 index 00000000..0496c5ae --- /dev/null +++ b/Octokit.GraphQL/Model/PullRequestMergeMethod.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Represents available types of methods to use when merging a pull request. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PullRequestMergeMethod + { + /// + /// Add all commits from the head branch to the base branch with a merge commit. + /// + [EnumMember(Value = "MERGE")] + Merge, + + /// + /// Combine all commits from the head branch into a single commit in the base branch. + /// + [EnumMember(Value = "SQUASH")] + Squash, + + /// + /// Add all commits from the head branch onto the base branch individually. + /// + [EnumMember(Value = "REBASE")] + Rebase, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/PullRequestPubSubTopic.cs b/Octokit.GraphQL/Model/PullRequestPubSubTopic.cs deleted file mode 100644 index 961d1ebd..00000000 --- a/Octokit.GraphQL/Model/PullRequestPubSubTopic.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Octokit.GraphQL.Model -{ - /// - /// The possible PubSub channels for a pull request. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PullRequestPubSubTopic - { - /// - /// The channel ID for observing pull request updates. - /// - [EnumMember(Value = "UPDATED")] - Updated, - - /// - /// The channel ID for marking an pull request as read. - /// - [EnumMember(Value = "MARKASREAD")] - Markasread, - - /// - /// The channel ID for observing head ref updates. - /// - [EnumMember(Value = "HEAD_REF")] - HeadRef, - - /// - /// The channel ID for updating items on the pull request timeline. - /// - [EnumMember(Value = "TIMELINE")] - Timeline, - - /// - /// The channel ID for observing pull request state updates. - /// - [EnumMember(Value = "STATE")] - State, - } -} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/PullRequestReview.cs b/Octokit.GraphQL/Model/PullRequestReview.cs index d9e516e8..dde4ba59 100644 --- a/Octokit.GraphQL/Model/PullRequestReview.cs +++ b/Octokit.GraphQL/Model/PullRequestReview.cs @@ -31,7 +31,7 @@ internal PullRequestReview(Expression expression) : base(expression) public string Body { get; } /// - /// The body of this review rendered to HTML. + /// The body rendered to HTML. /// public string BodyHTML { get; } diff --git a/Octokit.GraphQL/Model/PullRequestReviewComment.cs b/Octokit.GraphQL/Model/PullRequestReviewComment.cs index efe380ca..ceb4e990 100644 --- a/Octokit.GraphQL/Model/PullRequestReviewComment.cs +++ b/Octokit.GraphQL/Model/PullRequestReviewComment.cs @@ -31,7 +31,7 @@ internal PullRequestReviewComment(Expression expression) : base(expression) public string Body { get; } /// - /// The comment body of this review comment rendered to HTML. + /// The body rendered to HTML. /// public string BodyHTML { get; } diff --git a/Octokit.GraphQL/Model/PullRequestReviewThread.cs b/Octokit.GraphQL/Model/PullRequestReviewThread.cs index fdaec9e3..c2afd6d8 100644 --- a/Octokit.GraphQL/Model/PullRequestReviewThread.cs +++ b/Octokit.GraphQL/Model/PullRequestReviewThread.cs @@ -22,7 +22,8 @@ internal PullRequestReviewThread(Expression expression) : base(expression) /// Returns the elements in the list that come after the specified cursor. /// Returns the last _n_ elements from the list. /// Returns the elements in the list that come before the specified cursor. - public PullRequestReviewCommentConnection Comments(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.Comments(first, after, last, before), Octokit.GraphQL.Model.PullRequestReviewCommentConnection.Create); + /// Skips the first _n_ elements in the list. + public PullRequestReviewCommentConnection Comments(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? skip = null) => this.CreateMethodCall(x => x.Comments(first, after, last, before, skip), Octokit.GraphQL.Model.PullRequestReviewCommentConnection.Create); public ID Id { get; } diff --git a/Octokit.GraphQL/Model/PullRequestTimelineItem.cs b/Octokit.GraphQL/Model/PullRequestTimelineItem.cs index d18cd12b..9ca92c95 100644 --- a/Octokit.GraphQL/Model/PullRequestTimelineItem.cs +++ b/Octokit.GraphQL/Model/PullRequestTimelineItem.cs @@ -20,159 +20,159 @@ internal PullRequestTimelineItem(Expression expression) : base(expression) public class Selector { /// - /// Represents a Git commit. + /// Represents an 'assigned' event on any assignable object. /// - public Selector Commit(Func selector) => default; + public Selector AssignedEvent(Func selector) => default; /// - /// A thread of comments on a commit. + /// Represents a 'base_ref_force_pushed' event on a given pull request. /// - public Selector CommitCommentThread(Func selector) => default; + public Selector BaseRefForcePushedEvent(Func selector) => default; /// - /// A review object for a given pull request. + /// Represents a 'closed' event on any `Closable`. /// - public Selector PullRequestReview(Func selector) => default; + public Selector ClosedEvent(Func selector) => default; /// - /// A threaded list of comments for a given pull request. + /// Represents a Git commit. /// - public Selector PullRequestReviewThread(Func selector) => default; + public Selector Commit(Func selector) => default; /// - /// A review comment associated with a given repository pull request. + /// A thread of comments on a commit. /// - public Selector PullRequestReviewComment(Func selector) => default; + public Selector CommitCommentThread(Func selector) => default; /// - /// Represents a comment on an Issue. + /// Represents a mention made by one issue or pull request to another. /// - public Selector IssueComment(Func selector) => default; + public Selector CrossReferencedEvent(Func selector) => default; /// - /// Represents a 'closed' event on any `Closable`. + /// Represents a 'demilestoned' event on a given issue or pull request. /// - public Selector ClosedEvent(Func selector) => default; + public Selector DemilestonedEvent(Func selector) => default; /// - /// Represents a 'reopened' event on any `Closable`. + /// Represents a 'deployed' event on a given pull request. /// - public Selector ReopenedEvent(Func selector) => default; + public Selector DeployedEvent(Func selector) => default; /// - /// Represents a 'subscribed' event on a given `Subscribable`. + /// Represents a 'deployment_environment_changed' event on a given pull request. /// - public Selector SubscribedEvent(Func selector) => default; + public Selector DeploymentEnvironmentChangedEvent(Func selector) => default; /// - /// Represents an 'unsubscribed' event on a given `Subscribable`. + /// Represents a 'head_ref_deleted' event on a given pull request. /// - public Selector UnsubscribedEvent(Func selector) => default; + public Selector HeadRefDeletedEvent(Func selector) => default; /// - /// Represents a 'merged' event on a given pull request. + /// Represents a 'head_ref_force_pushed' event on a given pull request. /// - public Selector MergedEvent(Func selector) => default; + public Selector HeadRefForcePushedEvent(Func selector) => default; /// - /// Represents a 'referenced' event on a given `ReferencedSubject`. + /// Represents a 'head_ref_restored' event on a given pull request. /// - public Selector ReferencedEvent(Func selector) => default; + public Selector HeadRefRestoredEvent(Func selector) => default; /// - /// Represents a mention made by one issue or pull request to another. + /// Represents a comment on an Issue. /// - public Selector CrossReferencedEvent(Func selector) => default; + public Selector IssueComment(Func selector) => default; /// - /// Represents an 'assigned' event on any assignable object. + /// Represents a 'labeled' event on a given issue or pull request. /// - public Selector AssignedEvent(Func selector) => default; + public Selector LabeledEvent(Func selector) => default; /// - /// Represents an 'unassigned' event on any assignable object. + /// Represents a 'locked' event on a given issue or pull request. /// - public Selector UnassignedEvent(Func selector) => default; + public Selector LockedEvent(Func selector) => default; /// - /// Represents a 'labeled' event on a given issue or pull request. + /// Represents a 'merged' event on a given pull request. /// - public Selector LabeledEvent(Func selector) => default; + public Selector MergedEvent(Func selector) => default; /// - /// Represents an 'unlabeled' event on a given issue or pull request. + /// Represents a 'milestoned' event on a given issue or pull request. /// - public Selector UnlabeledEvent(Func selector) => default; + public Selector MilestonedEvent(Func selector) => default; /// - /// Represents a 'milestoned' event on a given issue or pull request. + /// A review object for a given pull request. /// - public Selector MilestonedEvent(Func selector) => default; + public Selector PullRequestReview(Func selector) => default; /// - /// Represents a 'demilestoned' event on a given issue or pull request. + /// A review comment associated with a given repository pull request. /// - public Selector DemilestonedEvent(Func selector) => default; + public Selector PullRequestReviewComment(Func selector) => default; /// - /// Represents a 'renamed' event on a given issue or pull request + /// A threaded list of comments for a given pull request. /// - public Selector RenamedTitleEvent(Func selector) => default; + public Selector PullRequestReviewThread(Func selector) => default; /// - /// Represents a 'locked' event on a given issue or pull request. + /// Represents a 'referenced' event on a given `ReferencedSubject`. /// - public Selector LockedEvent(Func selector) => default; + public Selector ReferencedEvent(Func selector) => default; /// - /// Represents an 'unlocked' event on a given issue or pull request. + /// Represents a 'renamed' event on a given issue or pull request /// - public Selector UnlockedEvent(Func selector) => default; + public Selector RenamedTitleEvent(Func selector) => default; /// - /// Represents a 'deployed' event on a given pull request. + /// Represents a 'reopened' event on any `Closable`. /// - public Selector DeployedEvent(Func selector) => default; + public Selector ReopenedEvent(Func selector) => default; /// - /// Represents a 'deployment_environment_changed' event on a given pull request. + /// Represents a 'review_dismissed' event on a given issue or pull request. /// - public Selector DeploymentEnvironmentChangedEvent(Func selector) => default; + public Selector ReviewDismissedEvent(Func selector) => default; /// - /// Represents a 'head_ref_deleted' event on a given pull request. + /// Represents an 'review_request_removed' event on a given pull request. /// - public Selector HeadRefDeletedEvent(Func selector) => default; + public Selector ReviewRequestRemovedEvent(Func selector) => default; /// - /// Represents a 'head_ref_restored' event on a given pull request. + /// Represents an 'review_requested' event on a given pull request. /// - public Selector HeadRefRestoredEvent(Func selector) => default; + public Selector ReviewRequestedEvent(Func selector) => default; /// - /// Represents a 'head_ref_force_pushed' event on a given pull request. + /// Represents a 'subscribed' event on a given `Subscribable`. /// - public Selector HeadRefForcePushedEvent(Func selector) => default; + public Selector SubscribedEvent(Func selector) => default; /// - /// Represents a 'base_ref_force_pushed' event on a given pull request. + /// Represents an 'unassigned' event on any assignable object. /// - public Selector BaseRefForcePushedEvent(Func selector) => default; + public Selector UnassignedEvent(Func selector) => default; /// - /// Represents an 'review_requested' event on a given pull request. + /// Represents an 'unlabeled' event on a given issue or pull request. /// - public Selector ReviewRequestedEvent(Func selector) => default; + public Selector UnlabeledEvent(Func selector) => default; /// - /// Represents an 'review_request_removed' event on a given pull request. + /// Represents an 'unlocked' event on a given issue or pull request. /// - public Selector ReviewRequestRemovedEvent(Func selector) => default; + public Selector UnlockedEvent(Func selector) => default; /// - /// Represents a 'review_dismissed' event on a given issue or pull request. + /// Represents an 'unsubscribed' event on a given `Subscribable`. /// - public Selector ReviewDismissedEvent(Func selector) => default; + public Selector UnsubscribedEvent(Func selector) => default; /// /// Represents a 'user_blocked' event on a given user. diff --git a/Octokit.GraphQL/Model/PullRequestTimelineItems.cs b/Octokit.GraphQL/Model/PullRequestTimelineItems.cs index 7938b5d6..2812911f 100644 --- a/Octokit.GraphQL/Model/PullRequestTimelineItems.cs +++ b/Octokit.GraphQL/Model/PullRequestTimelineItems.cs @@ -20,84 +20,84 @@ internal PullRequestTimelineItems(Expression expression) : base(expression) public class Selector { /// - /// Represents a Git commit part of a pull request. + /// Represents a 'added_to_project' event on a given issue or pull request. /// - public Selector PullRequestCommit(Func selector) => default; + public Selector AddedToProjectEvent(Func selector) => default; /// - /// Represents a commit comment thread part of a pull request. + /// Represents an 'assigned' event on any assignable object. /// - public Selector PullRequestCommitCommentThread(Func selector) => default; + public Selector AssignedEvent(Func selector) => default; /// - /// A review object for a given pull request. + /// Represents a 'base_ref_changed' event on a given issue or pull request. /// - public Selector PullRequestReview(Func selector) => default; + public Selector BaseRefChangedEvent(Func selector) => default; /// - /// A threaded list of comments for a given pull request. + /// Represents a 'base_ref_force_pushed' event on a given pull request. /// - public Selector PullRequestReviewThread(Func selector) => default; + public Selector BaseRefForcePushedEvent(Func selector) => default; /// - /// Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. + /// Represents a 'closed' event on any `Closable`. /// - public Selector PullRequestRevisionMarker(Func selector) => default; + public Selector ClosedEvent(Func selector) => default; /// - /// Represents a 'base_ref_changed' event on a given issue or pull request. + /// Represents a 'comment_deleted' event on a given issue or pull request. /// - public Selector BaseRefChangedEvent(Func selector) => default; + public Selector CommentDeletedEvent(Func selector) => default; /// - /// Represents a 'base_ref_force_pushed' event on a given pull request. + /// Represents a 'connected' event on a given issue or pull request. /// - public Selector BaseRefForcePushedEvent(Func selector) => default; + public Selector ConnectedEvent(Func selector) => default; /// - /// Represents a 'deployed' event on a given pull request. + /// Represents a 'converted_note_to_issue' event on a given issue or pull request. /// - public Selector DeployedEvent(Func selector) => default; + public Selector ConvertedNoteToIssueEvent(Func selector) => default; /// - /// Represents a 'deployment_environment_changed' event on a given pull request. + /// Represents a mention made by one issue or pull request to another. /// - public Selector DeploymentEnvironmentChangedEvent(Func selector) => default; + public Selector CrossReferencedEvent(Func selector) => default; /// - /// Represents a 'head_ref_deleted' event on a given pull request. + /// Represents a 'demilestoned' event on a given issue or pull request. /// - public Selector HeadRefDeletedEvent(Func selector) => default; + public Selector DemilestonedEvent(Func selector) => default; /// - /// Represents a 'head_ref_force_pushed' event on a given pull request. + /// Represents a 'deployed' event on a given pull request. /// - public Selector HeadRefForcePushedEvent(Func selector) => default; + public Selector DeployedEvent(Func selector) => default; /// - /// Represents a 'head_ref_restored' event on a given pull request. + /// Represents a 'deployment_environment_changed' event on a given pull request. /// - public Selector HeadRefRestoredEvent(Func selector) => default; + public Selector DeploymentEnvironmentChangedEvent(Func selector) => default; /// - /// Represents a 'merged' event on a given pull request. + /// Represents a 'disconnected' event on a given issue or pull request. /// - public Selector MergedEvent(Func selector) => default; + public Selector DisconnectedEvent(Func selector) => default; /// - /// Represents a 'review_dismissed' event on a given issue or pull request. + /// Represents a 'head_ref_deleted' event on a given pull request. /// - public Selector ReviewDismissedEvent(Func selector) => default; + public Selector HeadRefDeletedEvent(Func selector) => default; /// - /// Represents an 'review_requested' event on a given pull request. + /// Represents a 'head_ref_force_pushed' event on a given pull request. /// - public Selector ReviewRequestedEvent(Func selector) => default; + public Selector HeadRefForcePushedEvent(Func selector) => default; /// - /// Represents an 'review_request_removed' event on a given pull request. + /// Represents a 'head_ref_restored' event on a given pull request. /// - public Selector ReviewRequestRemovedEvent(Func selector) => default; + public Selector HeadRefRestoredEvent(Func selector) => default; /// /// Represents a comment on an Issue. @@ -105,69 +105,74 @@ public class Selector public Selector IssueComment(Func selector) => default; /// - /// Represents a mention made by one issue or pull request to another. + /// Represents a 'labeled' event on a given issue or pull request. /// - public Selector CrossReferencedEvent(Func selector) => default; + public Selector LabeledEvent(Func selector) => default; /// - /// Represents a 'added_to_project' event on a given issue or pull request. + /// Represents a 'locked' event on a given issue or pull request. /// - public Selector AddedToProjectEvent(Func selector) => default; + public Selector LockedEvent(Func selector) => default; /// - /// Represents an 'assigned' event on any assignable object. + /// Represents a 'marked_as_duplicate' event on a given issue or pull request. /// - public Selector AssignedEvent(Func selector) => default; + public Selector MarkedAsDuplicateEvent(Func selector) => default; /// - /// Represents a 'closed' event on any `Closable`. + /// Represents a 'mentioned' event on a given issue or pull request. /// - public Selector ClosedEvent(Func selector) => default; + public Selector MentionedEvent(Func selector) => default; /// - /// Represents a 'comment_deleted' event on a given issue or pull request. + /// Represents a 'merged' event on a given pull request. /// - public Selector CommentDeletedEvent(Func selector) => default; + public Selector MergedEvent(Func selector) => default; /// - /// Represents a 'converted_note_to_issue' event on a given issue or pull request. + /// Represents a 'milestoned' event on a given issue or pull request. /// - public Selector ConvertedNoteToIssueEvent(Func selector) => default; + public Selector MilestonedEvent(Func selector) => default; /// - /// Represents a 'demilestoned' event on a given issue or pull request. + /// Represents a 'moved_columns_in_project' event on a given issue or pull request. /// - public Selector DemilestonedEvent(Func selector) => default; + public Selector MovedColumnsInProjectEvent(Func selector) => default; /// - /// Represents a 'labeled' event on a given issue or pull request. + /// Represents a 'pinned' event on a given issue or pull request. /// - public Selector LabeledEvent(Func selector) => default; + public Selector PinnedEvent(Func selector) => default; /// - /// Represents a 'locked' event on a given issue or pull request. + /// Represents a Git commit part of a pull request. /// - public Selector LockedEvent(Func selector) => default; + public Selector PullRequestCommit(Func selector) => default; /// - /// Represents a 'mentioned' event on a given issue or pull request. + /// Represents a commit comment thread part of a pull request. /// - public Selector MentionedEvent(Func selector) => default; + public Selector PullRequestCommitCommentThread(Func selector) => default; /// - /// Represents a 'milestoned' event on a given issue or pull request. + /// A review object for a given pull request. /// - public Selector MilestonedEvent(Func selector) => default; + public Selector PullRequestReview(Func selector) => default; /// - /// Represents a 'moved_columns_in_project' event on a given issue or pull request. + /// A threaded list of comments for a given pull request. /// - public Selector MovedColumnsInProjectEvent(Func selector) => default; + public Selector PullRequestReviewThread(Func selector) => default; /// - /// Represents a 'pinned' event on a given issue or pull request. + /// Represents the latest point in the pull request timeline for which the viewer has seen the pull request's commits. /// - public Selector PinnedEvent(Func selector) => default; + public Selector PullRequestRevisionMarker(Func selector) => default; + + /// + /// Represents a 'ready_for_review' event on a given pull request. + /// + public Selector ReadyForReviewEvent(Func selector) => default; /// /// Represents a 'referenced' event on a given `ReferencedSubject`. @@ -189,6 +194,21 @@ public class Selector /// public Selector ReopenedEvent(Func selector) => default; + /// + /// Represents a 'review_dismissed' event on a given issue or pull request. + /// + public Selector ReviewDismissedEvent(Func selector) => default; + + /// + /// Represents an 'review_request_removed' event on a given pull request. + /// + public Selector ReviewRequestRemovedEvent(Func selector) => default; + + /// + /// Represents an 'review_requested' event on a given pull request. + /// + public Selector ReviewRequestedEvent(Func selector) => default; + /// /// Represents a 'subscribed' event on a given `Subscribable`. /// @@ -215,9 +235,9 @@ public class Selector public Selector UnlockedEvent(Func selector) => default; /// - /// Represents a 'user_blocked' event on a given user. + /// Represents an 'unmarked_as_duplicate' event on a given issue or pull request. /// - public Selector UserBlockedEvent(Func selector) => default; + public Selector UnmarkedAsDuplicateEvent(Func selector) => default; /// /// Represents an 'unpinned' event on a given issue or pull request. @@ -228,6 +248,11 @@ public class Selector /// Represents an 'unsubscribed' event on a given `Subscribable`. /// public Selector UnsubscribedEvent(Func selector) => default; + + /// + /// Represents a 'user_blocked' event on a given user. + /// + public Selector UserBlockedEvent(Func selector) => default; } internal static PullRequestTimelineItems Create(Expression expression) diff --git a/Octokit.GraphQL/Model/PullRequestTimelineItemsItemType.cs b/Octokit.GraphQL/Model/PullRequestTimelineItemsItemType.cs index a9891e10..d78fd199 100644 --- a/Octokit.GraphQL/Model/PullRequestTimelineItemsItemType.cs +++ b/Octokit.GraphQL/Model/PullRequestTimelineItemsItemType.cs @@ -107,6 +107,12 @@ public enum PullRequestTimelineItemsItemType [EnumMember(Value = "REVIEW_REQUEST_REMOVED_EVENT")] ReviewRequestRemovedEvent, + /// + /// Represents a 'ready_for_review' event on a given pull request. + /// + [EnumMember(Value = "READY_FOR_REVIEW_EVENT")] + ReadyForReviewEvent, + /// /// Represents a comment on an Issue. /// @@ -143,6 +149,12 @@ public enum PullRequestTimelineItemsItemType [EnumMember(Value = "COMMENT_DELETED_EVENT")] CommentDeletedEvent, + /// + /// Represents a 'connected' event on a given issue or pull request. + /// + [EnumMember(Value = "CONNECTED_EVENT")] + ConnectedEvent, + /// /// Represents a 'converted_note_to_issue' event on a given issue or pull request. /// @@ -155,6 +167,12 @@ public enum PullRequestTimelineItemsItemType [EnumMember(Value = "DEMILESTONED_EVENT")] DemilestonedEvent, + /// + /// Represents a 'disconnected' event on a given issue or pull request. + /// + [EnumMember(Value = "DISCONNECTED_EVENT")] + DisconnectedEvent, + /// /// Represents a 'labeled' event on a given issue or pull request. /// @@ -167,6 +185,12 @@ public enum PullRequestTimelineItemsItemType [EnumMember(Value = "LOCKED_EVENT")] LockedEvent, + /// + /// Represents a 'marked_as_duplicate' event on a given issue or pull request. + /// + [EnumMember(Value = "MARKED_AS_DUPLICATE_EVENT")] + MarkedAsDuplicateEvent, + /// /// Represents a 'mentioned' event on a given issue or pull request. /// @@ -251,6 +275,12 @@ public enum PullRequestTimelineItemsItemType [EnumMember(Value = "USER_BLOCKED_EVENT")] UserBlockedEvent, + /// + /// Represents an 'unmarked_as_duplicate' event on a given issue or pull request. + /// + [EnumMember(Value = "UNMARKED_AS_DUPLICATE_EVENT")] + UnmarkedAsDuplicateEvent, + /// /// Represents an 'unpinned' event on a given issue or pull request. /// diff --git a/Octokit.GraphQL/Model/PullRequestUpdateState.cs b/Octokit.GraphQL/Model/PullRequestUpdateState.cs new file mode 100644 index 00000000..d63cb07c --- /dev/null +++ b/Octokit.GraphQL/Model/PullRequestUpdateState.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible target states when updating a pull request. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum PullRequestUpdateState + { + /// + /// A pull request that is still open. + /// + [EnumMember(Value = "OPEN")] + Open, + + /// + /// A pull request that has been closed without being merged. + /// + [EnumMember(Value = "CLOSED")] + Closed, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/PushAllowance.cs b/Octokit.GraphQL/Model/PushAllowance.cs index dd515c45..091b502f 100644 --- a/Octokit.GraphQL/Model/PushAllowance.cs +++ b/Octokit.GraphQL/Model/PushAllowance.cs @@ -7,7 +7,7 @@ namespace Octokit.GraphQL.Model using Octokit.GraphQL.Core.Builders; /// - /// A team or user who has the ability to push to a protected branch. + /// A team, user or app who has the ability to push to a protected branch. /// public class PushAllowance : QueryableValue { diff --git a/Octokit.GraphQL/Model/PushAllowanceActor.cs b/Octokit.GraphQL/Model/PushAllowanceActor.cs index 96a32e0d..6fc90e41 100644 --- a/Octokit.GraphQL/Model/PushAllowanceActor.cs +++ b/Octokit.GraphQL/Model/PushAllowanceActor.cs @@ -20,14 +20,19 @@ internal PushAllowanceActor(Expression expression) : base(expression) public class Selector { /// - /// A user is an individual's account on GitHub that owns repositories and can make new content. + /// A GitHub App. /// - public Selector User(Func selector) => default; + public Selector App(Func selector) => default; /// /// A team of users in an organization. /// public Selector Team(Func selector) => default; + + /// + /// A user is an individual's account on GitHub that owns repositories and can make new content. + /// + public Selector User(Func selector) => default; } internal static PushAllowanceActor Create(Expression expression) diff --git a/Octokit.GraphQL/Model/ReactionContent.cs b/Octokit.GraphQL/Model/ReactionContent.cs index 1e7e214d..0d0016b2 100644 --- a/Octokit.GraphQL/Model/ReactionContent.cs +++ b/Octokit.GraphQL/Model/ReactionContent.cs @@ -12,49 +12,49 @@ namespace Octokit.GraphQL.Model public enum ReactionContent { /// - /// Represents the 👍 emoji. + /// Represents the `:+1:` emoji. /// [EnumMember(Value = "THUMBS_UP")] ThumbsUp, /// - /// Represents the 👎 emoji. + /// Represents the `:-1:` emoji. /// [EnumMember(Value = "THUMBS_DOWN")] ThumbsDown, /// - /// Represents the 😄 emoji. + /// Represents the `:laugh:` emoji. /// [EnumMember(Value = "LAUGH")] Laugh, /// - /// Represents the 🎉 emoji. + /// Represents the `:hooray:` emoji. /// [EnumMember(Value = "HOORAY")] Hooray, /// - /// Represents the 😕 emoji. + /// Represents the `:confused:` emoji. /// [EnumMember(Value = "CONFUSED")] Confused, /// - /// Represents the ❤️ emoji. + /// Represents the `:heart:` emoji. /// [EnumMember(Value = "HEART")] Heart, /// - /// Represents the 🚀 emoji. + /// Represents the `:rocket:` emoji. /// [EnumMember(Value = "ROCKET")] Rocket, /// - /// Represents the 👀 emoji. + /// Represents the `:eyes:` emoji. /// [EnumMember(Value = "EYES")] Eyes, diff --git a/Octokit.GraphQL/Model/ReadyForReviewEvent.cs b/Octokit.GraphQL/Model/ReadyForReviewEvent.cs new file mode 100644 index 00000000..6ca8df01 --- /dev/null +++ b/Octokit.GraphQL/Model/ReadyForReviewEvent.cs @@ -0,0 +1,50 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Represents a 'ready_for_review' event on a given pull request. + /// + public class ReadyForReviewEvent : QueryableValue + { + internal ReadyForReviewEvent(Expression expression) : base(expression) + { + } + + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + public ID Id { get; } + + /// + /// PullRequest referenced by event. + /// + public PullRequest PullRequest => this.CreateProperty(x => x.PullRequest, Octokit.GraphQL.Model.PullRequest.Create); + + /// + /// The HTTP path for this ready for review event. + /// + public string ResourcePath { get; } + + /// + /// The HTTP URL for this ready for review event. + /// + public string Url { get; } + + internal static ReadyForReviewEvent Create(Expression expression) + { + return new ReadyForReviewEvent(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegenerateEnterpriseIdentityProviderRecoveryCodesInput.cs b/Octokit.GraphQL/Model/RegenerateEnterpriseIdentityProviderRecoveryCodesInput.cs new file mode 100644 index 00000000..f6757b6e --- /dev/null +++ b/Octokit.GraphQL/Model/RegenerateEnterpriseIdentityProviderRecoveryCodesInput.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of RegenerateEnterpriseIdentityProviderRecoveryCodes + /// + public class RegenerateEnterpriseIdentityProviderRecoveryCodesInput + { + /// + /// The ID of the enterprise on which to set an identity provider. + /// + public ID EnterpriseId { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegenerateEnterpriseIdentityProviderRecoveryCodesPayload.cs b/Octokit.GraphQL/Model/RegenerateEnterpriseIdentityProviderRecoveryCodesPayload.cs new file mode 100644 index 00000000..e681327d --- /dev/null +++ b/Octokit.GraphQL/Model/RegenerateEnterpriseIdentityProviderRecoveryCodesPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of RegenerateEnterpriseIdentityProviderRecoveryCodes + /// + public class RegenerateEnterpriseIdentityProviderRecoveryCodesPayload : QueryableValue + { + internal RegenerateEnterpriseIdentityProviderRecoveryCodesPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The identity provider for the enterprise. + /// + public EnterpriseIdentityProvider IdentityProvider => this.CreateProperty(x => x.IdentityProvider, Octokit.GraphQL.Model.EnterpriseIdentityProvider.Create); + + internal static RegenerateEnterpriseIdentityProviderRecoveryCodesPayload Create(Expression expression) + { + return new RegenerateEnterpriseIdentityProviderRecoveryCodesPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackage.cs b/Octokit.GraphQL/Model/RegistryPackage.cs new file mode 100644 index 00000000..6a602fae --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackage.cs @@ -0,0 +1,150 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A registry package contains the content for an uploaded package. + /// + public class RegistryPackage : QueryableValue + { + internal RegistryPackage(Expression expression) : base(expression) + { + } + + /// + /// The package type color + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `Package` object instead. Removal on 2020-04-01 UTC.")] + public string Color { get; } + + public ID Id { get; } + + /// + /// Find the latest version for the package. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `Package` object instead. Removal on 2020-04-01 UTC.")] + public RegistryPackageVersion LatestVersion => this.CreateProperty(x => x.LatestVersion, Octokit.GraphQL.Model.RegistryPackageVersion.Create); + + /// + /// Identifies the title of the package. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `Package` object instead. Removal on 2020-04-01 UTC.")] + public string Name { get; } + + /// + /// Identifies the title of the package, with the owner prefixed. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `Package` object instead. Removal on 2020-04-01 UTC.")] + public string NameWithOwner { get; } + + /// + /// Find the package file identified by the guid. + /// + /// The unique identifier of the package_file + public RegistryPackageFile PackageFileByGuid(Arg guid) => this.CreateMethodCall(x => x.PackageFileByGuid(guid), Octokit.GraphQL.Model.RegistryPackageFile.Create); + + /// + /// Find the package file identified by the sha256. + /// + /// The SHA256 of the package_file + public RegistryPackageFile PackageFileBySha256(Arg sha256) => this.CreateMethodCall(x => x.PackageFileBySha256(sha256), Octokit.GraphQL.Model.RegistryPackageFile.Create); + + /// + /// Identifies the type of the package. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `Package` object instead. Removal on 2020-04-01 UTC.")] + public RegistryPackageType PackageType { get; } + + /// + /// List the prerelease versions for this package. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public RegistryPackageVersionConnection PreReleaseVersions(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.PreReleaseVersions(first, after, last, before), Octokit.GraphQL.Model.RegistryPackageVersionConnection.Create); + + /// + /// The type of the package. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `Package` object instead. Removal on 2020-04-01 UTC.")] + public string RegistryPackageType { get; } + + /// + /// repository that the release is associated with + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `Package` object instead. Removal on 2020-04-01 UTC.")] + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// Statistics about package activity. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `Package` object instead. Removal on 2020-04-01 UTC.")] + public RegistryPackageStatistics Statistics => this.CreateProperty(x => x.Statistics, Octokit.GraphQL.Model.RegistryPackageStatistics.Create); + + /// + /// list of tags for this package + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public RegistryPackageTagConnection Tags(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.Tags(first, after, last, before), Octokit.GraphQL.Model.RegistryPackageTagConnection.Create); + + /// + /// List the topics for this package. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public TopicConnection Topics(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.Topics(first, after, last, before), Octokit.GraphQL.Model.TopicConnection.Create); + + /// + /// Find package version by version string. + /// + /// The package version. + public RegistryPackageVersion Version(Arg version) => this.CreateMethodCall(x => x.Version(version), Octokit.GraphQL.Model.RegistryPackageVersion.Create); + + /// + /// Find package version by version string. + /// + /// Find a registry package for a specific platform. + /// The package version. + public RegistryPackageVersion VersionByPlatform(Arg platform, Arg version) => this.CreateMethodCall(x => x.VersionByPlatform(platform, version), Octokit.GraphQL.Model.RegistryPackageVersion.Create); + + /// + /// Find package version by manifest SHA256. + /// + /// The package SHA256 digest. + public RegistryPackageVersion VersionBySha256(Arg sha256) => this.CreateMethodCall(x => x.VersionBySha256(sha256), Octokit.GraphQL.Model.RegistryPackageVersion.Create); + + /// + /// list of versions for this package + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public RegistryPackageVersionConnection Versions(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.Versions(first, after, last, before), Octokit.GraphQL.Model.RegistryPackageVersionConnection.Create); + + /// + /// List package versions with a specific metadatum. + /// + /// Filter on a specific metadatum. + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public RegistryPackageVersionConnection VersionsByMetadatum(Arg metadatum, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.VersionsByMetadatum(metadatum, first, after, last, before), Octokit.GraphQL.Model.RegistryPackageVersionConnection.Create); + + internal static RegistryPackage Create(Expression expression) + { + return new RegistryPackage(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageConnection.cs b/Octokit.GraphQL/Model/RegistryPackageConnection.cs new file mode 100644 index 00000000..7375e97a --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for RegistryPackage. + /// + public class RegistryPackageConnection : QueryableValue, IPagingConnection + { + internal RegistryPackageConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static RegistryPackageConnection Create(Expression expression) + { + return new RegistryPackageConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageDependency.cs b/Octokit.GraphQL/Model/RegistryPackageDependency.cs new file mode 100644 index 00000000..e94a14ad --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageDependency.cs @@ -0,0 +1,43 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A package dependency contains the information needed to satisfy a dependency. + /// + public class RegistryPackageDependency : QueryableValue + { + internal RegistryPackageDependency(Expression expression) : base(expression) + { + } + + /// + /// Identifies the type of dependency. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageDependency` object instead. Removal on 2020-04-01 UTC.")] + public RegistryPackageDependencyType DependencyType { get; } + + public ID Id { get; } + + /// + /// Identifies the name of the dependency. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageDependency` object instead. Removal on 2020-04-01 UTC.")] + public string Name { get; } + + /// + /// Identifies the version of the dependency. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageDependency` object instead. Removal on 2020-04-01 UTC.")] + public string Version { get; } + + internal static RegistryPackageDependency Create(Expression expression) + { + return new RegistryPackageDependency(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageDependencyConnection.cs b/Octokit.GraphQL/Model/RegistryPackageDependencyConnection.cs new file mode 100644 index 00000000..7b750670 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageDependencyConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for RegistryPackageDependency. + /// + public class RegistryPackageDependencyConnection : QueryableValue, IPagingConnection + { + internal RegistryPackageDependencyConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static RegistryPackageDependencyConnection Create(Expression expression) + { + return new RegistryPackageDependencyConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageDependencyEdge.cs b/Octokit.GraphQL/Model/RegistryPackageDependencyEdge.cs new file mode 100644 index 00000000..37db8d55 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageDependencyEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class RegistryPackageDependencyEdge : QueryableValue + { + internal RegistryPackageDependencyEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public RegistryPackageDependency Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.RegistryPackageDependency.Create); + + internal static RegistryPackageDependencyEdge Create(Expression expression) + { + return new RegistryPackageDependencyEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageDependencyType.cs b/Octokit.GraphQL/Model/RegistryPackageDependencyType.cs new file mode 100644 index 00000000..50696cb8 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageDependencyType.cs @@ -0,0 +1,50 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible types of a registry package dependency. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RegistryPackageDependencyType + { + /// + /// A default registry package dependency type. + /// + [EnumMember(Value = "DEFAULT")] + Default, + + /// + /// A dev registry package dependency type. + /// + [EnumMember(Value = "DEV")] + Dev, + + /// + /// A test registry package dependency type. + /// + [EnumMember(Value = "TEST")] + Test, + + /// + /// A peer registry package dependency type. + /// + [EnumMember(Value = "PEER")] + Peer, + + /// + /// An optional registry package dependency type. + /// + [EnumMember(Value = "OPTIONAL")] + Optional, + + /// + /// An optional registry package dependency type. + /// + [EnumMember(Value = "BUNDLED")] + Bundled, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepositoryInvitationEdge.cs b/Octokit.GraphQL/Model/RegistryPackageEdge.cs similarity index 55% rename from Octokit.GraphQL/Model/RepositoryInvitationEdge.cs rename to Octokit.GraphQL/Model/RegistryPackageEdge.cs index f737b017..16290339 100644 --- a/Octokit.GraphQL/Model/RepositoryInvitationEdge.cs +++ b/Octokit.GraphQL/Model/RegistryPackageEdge.cs @@ -9,9 +9,9 @@ namespace Octokit.GraphQL.Model /// /// An edge in a connection. /// - public class RepositoryInvitationEdge : QueryableValue + public class RegistryPackageEdge : QueryableValue { - internal RepositoryInvitationEdge(Expression expression) : base(expression) + internal RegistryPackageEdge(Expression expression) : base(expression) { } @@ -23,11 +23,11 @@ internal RepositoryInvitationEdge(Expression expression) : base(expression) /// /// The item at the end of the edge. /// - public RepositoryInvitation Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.RepositoryInvitation.Create); + public RegistryPackage Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.RegistryPackage.Create); - internal static RepositoryInvitationEdge Create(Expression expression) + internal static RegistryPackageEdge Create(Expression expression) { - return new RepositoryInvitationEdge(expression); + return new RegistryPackageEdge(expression); } } } \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageFile.cs b/Octokit.GraphQL/Model/RegistryPackageFile.cs new file mode 100644 index 00000000..db1f2fbe --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageFile.cs @@ -0,0 +1,84 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A file in a specific registry package version. + /// + public class RegistryPackageFile : QueryableValue + { + internal RegistryPackageFile(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for this file. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageFile` object instead. Removal on 2020-04-01 UTC.")] + public string Guid { get; } + + public ID Id { get; } + + /// + /// Identifies the md5. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageFile` object instead. Removal on 2020-04-01 UTC.")] + public string Md5 { get; } + + /// + /// URL to download the asset metadata. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageFile` object instead. Removal on 2020-04-01 UTC.")] + public string MetadataUrl { get; } + + /// + /// Name of the file + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageFile` object instead. Removal on 2020-04-01 UTC.")] + public string Name { get; } + + /// + /// The package version this file belongs to. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageFile` object instead. Removal on 2020-04-01 UTC.")] + public RegistryPackageVersion PackageVersion => this.CreateProperty(x => x.PackageVersion, Octokit.GraphQL.Model.RegistryPackageVersion.Create); + + /// + /// Identifies the sha1. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageFile` object instead. Removal on 2020-04-01 UTC.")] + public string Sha1 { get; } + + /// + /// Identifies the sha256. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageFile` object instead. Removal on 2020-04-01 UTC.")] + public string Sha256 { get; } + + /// + /// Identifies the size. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageFile` object instead. Removal on 2020-04-01 UTC.")] + public int? Size { get; } + + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + + /// + /// URL to download the asset. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageFile` object instead. Removal on 2020-04-01 UTC.")] + public string Url { get; } + + internal static RegistryPackageFile Create(Expression expression) + { + return new RegistryPackageFile(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageFileConnection.cs b/Octokit.GraphQL/Model/RegistryPackageFileConnection.cs new file mode 100644 index 00000000..2c285b84 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageFileConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for RegistryPackageFile. + /// + public class RegistryPackageFileConnection : QueryableValue, IPagingConnection + { + internal RegistryPackageFileConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static RegistryPackageFileConnection Create(Expression expression) + { + return new RegistryPackageFileConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageFileEdge.cs b/Octokit.GraphQL/Model/RegistryPackageFileEdge.cs new file mode 100644 index 00000000..1a0a5776 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageFileEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class RegistryPackageFileEdge : QueryableValue + { + internal RegistryPackageFileEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public RegistryPackageFile Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.RegistryPackageFile.Create); + + internal static RegistryPackageFileEdge Create(Expression expression) + { + return new RegistryPackageFileEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageMetadatum.cs b/Octokit.GraphQL/Model/RegistryPackageMetadatum.cs new file mode 100644 index 00000000..42f19f63 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageMetadatum.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Represents a single registry metadatum + /// + public class RegistryPackageMetadatum + { + /// + /// Name of the metadatum. + /// + public string Name { get; set; } + + /// + /// Value of the metadatum. + /// + public string Value { get; set; } + + /// + /// True, if the metadatum can be updated if it already exists + /// + public bool? Update { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageOwner.cs b/Octokit.GraphQL/Model/RegistryPackageOwner.cs index e220cce2..1769f610 100644 --- a/Octokit.GraphQL/Model/RegistryPackageOwner.cs +++ b/Octokit.GraphQL/Model/RegistryPackageOwner.cs @@ -14,6 +14,21 @@ namespace Octokit.GraphQL.Model public interface IRegistryPackageOwner : IQueryableValue, IQueryableInterface { ID Id { get; } + + /// + /// A list of registry packages under the owner. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Find registry package by name. + /// Find registry packages by their names. + /// Filter registry package by type. + /// Filter registry package by whether it is publicly visible + /// Filter registry package by type (string). + /// Find registry packages in a repository. + RegistryPackageConnection RegistryPackages(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? name = null, Arg>? names = null, Arg? packageType = null, Arg? publicOnly = null, Arg? registryPackageType = null, Arg? repositoryId = null); } } @@ -33,6 +48,8 @@ internal StubIRegistryPackageOwner(Expression expression) : base(expression) public ID Id { get; } + public RegistryPackageConnection RegistryPackages(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? name = null, Arg>? names = null, Arg? packageType = null, Arg? publicOnly = null, Arg? registryPackageType = null, Arg? repositoryId = null) => this.CreateMethodCall(x => x.RegistryPackages(first, after, last, before, name, names, packageType, publicOnly, registryPackageType, repositoryId), Octokit.GraphQL.Model.RegistryPackageConnection.Create); + internal static StubIRegistryPackageOwner Create(Expression expression) { return new StubIRegistryPackageOwner(expression); diff --git a/Octokit.GraphQL/Model/RegistryPackageSearch.cs b/Octokit.GraphQL/Model/RegistryPackageSearch.cs index bd84cc2a..684cb478 100644 --- a/Octokit.GraphQL/Model/RegistryPackageSearch.cs +++ b/Octokit.GraphQL/Model/RegistryPackageSearch.cs @@ -14,6 +14,17 @@ namespace Octokit.GraphQL.Model public interface IRegistryPackageSearch : IQueryableValue, IQueryableInterface { ID Id { get; } + + /// + /// A list of registry packages for a particular search query. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Filter registry package by type. + /// Find registry package by search query. + RegistryPackageConnection RegistryPackagesForQuery(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? packageType = null, Arg? query = null); } } @@ -33,6 +44,8 @@ internal StubIRegistryPackageSearch(Expression expression) : base(expression) public ID Id { get; } + public RegistryPackageConnection RegistryPackagesForQuery(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? packageType = null, Arg? query = null) => this.CreateMethodCall(x => x.RegistryPackagesForQuery(first, after, last, before, packageType, query), Octokit.GraphQL.Model.RegistryPackageConnection.Create); + internal static StubIRegistryPackageSearch Create(Expression expression) { return new StubIRegistryPackageSearch(expression); diff --git a/Octokit.GraphQL/Model/RegistryPackageStatistics.cs b/Octokit.GraphQL/Model/RegistryPackageStatistics.cs new file mode 100644 index 00000000..5e1be7a7 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageStatistics.cs @@ -0,0 +1,53 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Represents a object that contains package activity statistics such as downloads. + /// + public class RegistryPackageStatistics : QueryableValue + { + internal RegistryPackageStatistics(Expression expression) : base(expression) + { + } + + /// + /// Number of times the package was downloaded this month. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsThisMonth { get; } + + /// + /// Number of times the package was downloaded this week. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsThisWeek { get; } + + /// + /// Number of times the package was downloaded this year. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsThisYear { get; } + + /// + /// Number of times the package was downloaded today. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsToday { get; } + + /// + /// Number of times the package was downloaded since it was created. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsTotalCount { get; } + + internal static RegistryPackageStatistics Create(Expression expression) + { + return new RegistryPackageStatistics(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageTag.cs b/Octokit.GraphQL/Model/RegistryPackageTag.cs new file mode 100644 index 00000000..42a61d62 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageTag.cs @@ -0,0 +1,37 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A version tag contains the mapping between a tag name and a version. + /// + public class RegistryPackageTag : QueryableValue + { + internal RegistryPackageTag(Expression expression) : base(expression) + { + } + + public ID Id { get; } + + /// + /// Identifies the tag name of the version. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageTag` object instead. Removal on 2020-04-01 UTC.")] + public string Name { get; } + + /// + /// version that the tag is associated with + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageTag` object instead. Removal on 2020-04-01 UTC.")] + public RegistryPackageVersion Version => this.CreateProperty(x => x.Version, Octokit.GraphQL.Model.RegistryPackageVersion.Create); + + internal static RegistryPackageTag Create(Expression expression) + { + return new RegistryPackageTag(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageTagConnection.cs b/Octokit.GraphQL/Model/RegistryPackageTagConnection.cs new file mode 100644 index 00000000..5c38aa02 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageTagConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for RegistryPackageTag. + /// + public class RegistryPackageTagConnection : QueryableValue, IPagingConnection + { + internal RegistryPackageTagConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static RegistryPackageTagConnection Create(Expression expression) + { + return new RegistryPackageTagConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageTagEdge.cs b/Octokit.GraphQL/Model/RegistryPackageTagEdge.cs new file mode 100644 index 00000000..4e6356df --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageTagEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class RegistryPackageTagEdge : QueryableValue + { + internal RegistryPackageTagEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public RegistryPackageTag Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.RegistryPackageTag.Create); + + internal static RegistryPackageTagEdge Create(Expression expression) + { + return new RegistryPackageTagEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageType.cs b/Octokit.GraphQL/Model/RegistryPackageType.cs new file mode 100644 index 00000000..c097911f --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageType.cs @@ -0,0 +1,56 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible types of a registry package. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RegistryPackageType + { + /// + /// An npm registry package. + /// + [EnumMember(Value = "NPM")] + Npm, + + /// + /// A rubygems registry package. + /// + [EnumMember(Value = "RUBYGEMS")] + Rubygems, + + /// + /// A maven registry package. + /// + [EnumMember(Value = "MAVEN")] + Maven, + + /// + /// A docker image. + /// + [EnumMember(Value = "DOCKER")] + Docker, + + /// + /// A debian package. + /// + [EnumMember(Value = "DEBIAN")] + Debian, + + /// + /// A nuget package. + /// + [EnumMember(Value = "NUGET")] + Nuget, + + /// + /// A python package. + /// + [EnumMember(Value = "PYTHON")] + Python, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageVersion.cs b/Octokit.GraphQL/Model/RegistryPackageVersion.cs new file mode 100644 index 00000000..d0488f2a --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageVersion.cs @@ -0,0 +1,140 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A package version contains the information about a specific package version. + /// + public class RegistryPackageVersion : QueryableValue + { + internal RegistryPackageVersion(Expression expression) : base(expression) + { + } + + /// + /// list of dependencies for this package + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Find dependencies by type. + public RegistryPackageDependencyConnection Dependencies(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? type = null) => this.CreateMethodCall(x => x.Dependencies(first, after, last, before, type), Octokit.GraphQL.Model.RegistryPackageDependencyConnection.Create); + + /// + /// A file associated with this registry package version + /// + /// A specific file to find. + public RegistryPackageFile FileByName(Arg filename) => this.CreateMethodCall(x => x.FileByName(filename), Octokit.GraphQL.Model.RegistryPackageFile.Create); + + /// + /// List of files associated with this registry package version + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public RegistryPackageFileConnection Files(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.Files(first, after, last, before), Octokit.GraphQL.Model.RegistryPackageFileConnection.Create); + + public ID Id { get; } + + /// + /// A single line of text to install this package version. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public string InstallationCommand { get; } + + /// + /// Identifies the package manifest for this package version. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public string Manifest { get; } + + /// + /// Identifies the platform this version was built for. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public string Platform { get; } + + /// + /// Indicates whether this version is a pre-release. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public bool PreRelease { get; } + + /// + /// The README of this package version + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public string Readme { get; } + + /// + /// The HTML README of this package version + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public string ReadmeHtml { get; } + + /// + /// Registry package associated with this version. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public RegistryPackage RegistryPackage => this.CreateProperty(x => x.RegistryPackage, Octokit.GraphQL.Model.RegistryPackage.Create); + + /// + /// Release associated with this package. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public Release Release => this.CreateProperty(x => x.Release, Octokit.GraphQL.Model.Release.Create); + + /// + /// Identifies the sha256. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public string Sha256 { get; } + + /// + /// Identifies the size. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public int? Size { get; } + + /// + /// Statistics about package activity. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public RegistryPackageVersionStatistics Statistics => this.CreateProperty(x => x.Statistics, Octokit.GraphQL.Model.RegistryPackageVersionStatistics.Create); + + /// + /// Identifies the package version summary. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public string Summary { get; } + + /// + /// Time at which the most recent file upload for this package version finished + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public DateTimeOffset UpdatedAt { get; } + + /// + /// Identifies the version number. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public string Version { get; } + + /// + /// Can the current viewer edit this Package version. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersion` object instead. Removal on 2020-04-01 UTC.")] + public bool ViewerCanEdit { get; } + + internal static RegistryPackageVersion Create(Expression expression) + { + return new RegistryPackageVersion(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageVersionConnection.cs b/Octokit.GraphQL/Model/RegistryPackageVersionConnection.cs new file mode 100644 index 00000000..605877d9 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageVersionConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for RegistryPackageVersion. + /// + public class RegistryPackageVersionConnection : QueryableValue, IPagingConnection + { + internal RegistryPackageVersionConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static RegistryPackageVersionConnection Create(Expression expression) + { + return new RegistryPackageVersionConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageVersionEdge.cs b/Octokit.GraphQL/Model/RegistryPackageVersionEdge.cs new file mode 100644 index 00000000..713011d8 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageVersionEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class RegistryPackageVersionEdge : QueryableValue + { + internal RegistryPackageVersionEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public RegistryPackageVersion Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.RegistryPackageVersion.Create); + + internal static RegistryPackageVersionEdge Create(Expression expression) + { + return new RegistryPackageVersionEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RegistryPackageVersionStatistics.cs b/Octokit.GraphQL/Model/RegistryPackageVersionStatistics.cs new file mode 100644 index 00000000..0c872515 --- /dev/null +++ b/Octokit.GraphQL/Model/RegistryPackageVersionStatistics.cs @@ -0,0 +1,53 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Represents a object that contains package version activity statistics such as downloads. + /// + public class RegistryPackageVersionStatistics : QueryableValue + { + internal RegistryPackageVersionStatistics(Expression expression) : base(expression) + { + } + + /// + /// Number of times the package was downloaded this month. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersionStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsThisMonth { get; } + + /// + /// Number of times the package was downloaded this week. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersionStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsThisWeek { get; } + + /// + /// Number of times the package was downloaded this year. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersionStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsThisYear { get; } + + /// + /// Number of times the package was downloaded today. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersionStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsToday { get; } + + /// + /// Number of times the package was downloaded since it was created. + /// + [Obsolete(@"Renaming GitHub Packages fields and objects. Use the `PackageVersionStatistics` object instead. Removal on 2020-04-01 UTC.")] + public int DownloadsTotalCount { get; } + + internal static RegistryPackageVersionStatistics Create(Expression expression) + { + return new RegistryPackageVersionStatistics(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/Release.cs b/Octokit.GraphQL/Model/Release.cs index dad7dfe5..1db5c03b 100644 --- a/Octokit.GraphQL/Model/Release.cs +++ b/Octokit.GraphQL/Model/Release.cs @@ -26,10 +26,15 @@ internal Release(Expression expression) : base(expression) public DateTimeOffset CreatedAt { get; } /// - /// Identifies the description of the release. + /// The description of the release. /// public string Description { get; } + /// + /// The description of this release rendered to HTML. + /// + public string DescriptionHTML { get; } + public ID Id { get; } /// @@ -43,7 +48,7 @@ internal Release(Expression expression) : base(expression) public bool IsPrerelease { get; } /// - /// Identifies the title of the release. + /// The title of the release. /// public string Name { get; } @@ -67,6 +72,12 @@ internal Release(Expression expression) : base(expression) /// public string ResourcePath { get; } + /// + /// A description of the release, rendered to HTML without any links in it. + /// + /// How many characters to return. + public string ShortDescriptionHTML(Arg? limit = null) => default; + /// /// The Git tag the release points to /// diff --git a/Octokit.GraphQL/Model/RemoveEnterpriseAdminInput.cs b/Octokit.GraphQL/Model/RemoveEnterpriseAdminInput.cs new file mode 100644 index 00000000..e046bb65 --- /dev/null +++ b/Octokit.GraphQL/Model/RemoveEnterpriseAdminInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of RemoveEnterpriseAdmin + /// + public class RemoveEnterpriseAdminInput + { + /// + /// The Enterprise ID from which to remove the administrator. + /// + public ID EnterpriseId { get; set; } + + /// + /// The login of the user to remove as an administrator. + /// + public string Login { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RemoveEnterpriseAdminPayload.cs b/Octokit.GraphQL/Model/RemoveEnterpriseAdminPayload.cs new file mode 100644 index 00000000..9ffd7015 --- /dev/null +++ b/Octokit.GraphQL/Model/RemoveEnterpriseAdminPayload.cs @@ -0,0 +1,48 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of RemoveEnterpriseAdmin + /// + public class RemoveEnterpriseAdminPayload : QueryableValue + { + internal RemoveEnterpriseAdminPayload(Expression expression) : base(expression) + { + } + + /// + /// The user who was removed as an administrator. + /// + public User Admin => this.CreateProperty(x => x.Admin, Octokit.GraphQL.Model.User.Create); + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The updated enterprise. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of removing an administrator. + /// + public string Message { get; } + + /// + /// The viewer performing the mutation. + /// + public User Viewer => this.CreateProperty(x => x.Viewer, Octokit.GraphQL.Model.User.Create); + + internal static RemoveEnterpriseAdminPayload Create(Expression expression) + { + return new RemoveEnterpriseAdminPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RemoveEnterpriseOrganizationInput.cs b/Octokit.GraphQL/Model/RemoveEnterpriseOrganizationInput.cs new file mode 100644 index 00000000..d3217023 --- /dev/null +++ b/Octokit.GraphQL/Model/RemoveEnterpriseOrganizationInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of RemoveEnterpriseOrganization + /// + public class RemoveEnterpriseOrganizationInput + { + /// + /// The ID of the enterprise from which the organization should be removed. + /// + public ID EnterpriseId { get; set; } + + /// + /// The ID of the organization to remove from the enterprise. + /// + public ID OrganizationId { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RemoveEnterpriseOrganizationPayload.cs b/Octokit.GraphQL/Model/RemoveEnterpriseOrganizationPayload.cs new file mode 100644 index 00000000..e3a85e54 --- /dev/null +++ b/Octokit.GraphQL/Model/RemoveEnterpriseOrganizationPayload.cs @@ -0,0 +1,43 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of RemoveEnterpriseOrganization + /// + public class RemoveEnterpriseOrganizationPayload : QueryableValue + { + internal RemoveEnterpriseOrganizationPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The updated enterprise. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// The organization that was removed from the enterprise. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The viewer performing the mutation. + /// + public User Viewer => this.CreateProperty(x => x.Viewer, Octokit.GraphQL.Model.User.Create); + + internal static RemoveEnterpriseOrganizationPayload Create(Expression expression) + { + return new RemoveEnterpriseOrganizationPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoAccessAuditEntry.cs b/Octokit.GraphQL/Model/RepoAccessAuditEntry.cs new file mode 100644 index 00000000..4da92205 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoAccessAuditEntry.cs @@ -0,0 +1,135 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.access event. + /// + public class RepoAccessAuditEntry : QueryableValue + { + internal RepoAccessAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + /// + /// The visibility of the repository + /// + public RepoAccessAuditEntryVisibility? Visibility { get; } + + internal static RepoAccessAuditEntry Create(Expression expression) + { + return new RepoAccessAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoAccessAuditEntryVisibility.cs b/Octokit.GraphQL/Model/RepoAccessAuditEntryVisibility.cs new file mode 100644 index 00000000..62561bdd --- /dev/null +++ b/Octokit.GraphQL/Model/RepoAccessAuditEntryVisibility.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The privacy of a repository + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RepoAccessAuditEntryVisibility + { + /// + /// The repository is visible only to users in the same business. + /// + [EnumMember(Value = "INTERNAL")] + Internal, + + /// + /// The repository is visible only to those with explicit access. + /// + [EnumMember(Value = "PRIVATE")] + Private, + + /// + /// The repository is visible to everyone. + /// + [EnumMember(Value = "PUBLIC")] + Public, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoAddMemberAuditEntry.cs b/Octokit.GraphQL/Model/RepoAddMemberAuditEntry.cs new file mode 100644 index 00000000..e819dba1 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoAddMemberAuditEntry.cs @@ -0,0 +1,135 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.add_member event. + /// + public class RepoAddMemberAuditEntry : QueryableValue + { + internal RepoAddMemberAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + /// + /// The visibility of the repository + /// + public RepoAddMemberAuditEntryVisibility? Visibility { get; } + + internal static RepoAddMemberAuditEntry Create(Expression expression) + { + return new RepoAddMemberAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoAddMemberAuditEntryVisibility.cs b/Octokit.GraphQL/Model/RepoAddMemberAuditEntryVisibility.cs new file mode 100644 index 00000000..9a49f769 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoAddMemberAuditEntryVisibility.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The privacy of a repository + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RepoAddMemberAuditEntryVisibility + { + /// + /// The repository is visible only to users in the same business. + /// + [EnumMember(Value = "INTERNAL")] + Internal, + + /// + /// The repository is visible only to those with explicit access. + /// + [EnumMember(Value = "PRIVATE")] + Private, + + /// + /// The repository is visible to everyone. + /// + [EnumMember(Value = "PUBLIC")] + Public, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoAddTopicAuditEntry.cs b/Octokit.GraphQL/Model/RepoAddTopicAuditEntry.cs new file mode 100644 index 00000000..38c9fcc5 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoAddTopicAuditEntry.cs @@ -0,0 +1,140 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.add_topic event. + /// + public class RepoAddTopicAuditEntry : QueryableValue + { + internal RepoAddTopicAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The name of the topic added to the repository + /// + public Topic Topic => this.CreateProperty(x => x.Topic, Octokit.GraphQL.Model.Topic.Create); + + /// + /// The name of the topic added to the repository + /// + public string TopicName { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoAddTopicAuditEntry Create(Expression expression) + { + return new RepoAddTopicAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoArchivedAuditEntry.cs b/Octokit.GraphQL/Model/RepoArchivedAuditEntry.cs new file mode 100644 index 00000000..8bcda03c --- /dev/null +++ b/Octokit.GraphQL/Model/RepoArchivedAuditEntry.cs @@ -0,0 +1,135 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.archived event. + /// + public class RepoArchivedAuditEntry : QueryableValue + { + internal RepoArchivedAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + /// + /// The visibility of the repository + /// + public RepoArchivedAuditEntryVisibility? Visibility { get; } + + internal static RepoArchivedAuditEntry Create(Expression expression) + { + return new RepoArchivedAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoArchivedAuditEntryVisibility.cs b/Octokit.GraphQL/Model/RepoArchivedAuditEntryVisibility.cs new file mode 100644 index 00000000..4a2aee57 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoArchivedAuditEntryVisibility.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The privacy of a repository + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RepoArchivedAuditEntryVisibility + { + /// + /// The repository is visible only to users in the same business. + /// + [EnumMember(Value = "INTERNAL")] + Internal, + + /// + /// The repository is visible only to those with explicit access. + /// + [EnumMember(Value = "PRIVATE")] + Private, + + /// + /// The repository is visible to everyone. + /// + [EnumMember(Value = "PUBLIC")] + Public, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoChangeMergeSettingAuditEntry.cs b/Octokit.GraphQL/Model/RepoChangeMergeSettingAuditEntry.cs new file mode 100644 index 00000000..04a5dd79 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoChangeMergeSettingAuditEntry.cs @@ -0,0 +1,140 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.change_merge_setting event. + /// + public class RepoChangeMergeSettingAuditEntry : QueryableValue + { + internal RepoChangeMergeSettingAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// Whether the change was to enable (true) or disable (false) the merge type + /// + public bool? IsEnabled { get; } + + /// + /// The merge method affected by the change + /// + public RepoChangeMergeSettingAuditEntryMergeType? MergeType { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoChangeMergeSettingAuditEntry Create(Expression expression) + { + return new RepoChangeMergeSettingAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoChangeMergeSettingAuditEntryMergeType.cs b/Octokit.GraphQL/Model/RepoChangeMergeSettingAuditEntryMergeType.cs new file mode 100644 index 00000000..9e8cfb46 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoChangeMergeSettingAuditEntryMergeType.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The merge options available for pull requests to this repository. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RepoChangeMergeSettingAuditEntryMergeType + { + /// + /// The pull request is added to the base branch in a merge commit. + /// + [EnumMember(Value = "MERGE")] + Merge, + + /// + /// Commits from the pull request are added onto the base branch individually without a merge commit. + /// + [EnumMember(Value = "REBASE")] + Rebase, + + /// + /// The pull request's commits are squashed into a single commit before they are merged to the base branch. + /// + [EnumMember(Value = "SQUASH")] + Squash, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigDisableAnonymousGitAccessAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigDisableAnonymousGitAccessAuditEntry.cs new file mode 100644 index 00000000..2ce5d9a9 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigDisableAnonymousGitAccessAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.disable_anonymous_git_access event. + /// + public class RepoConfigDisableAnonymousGitAccessAuditEntry : QueryableValue + { + internal RepoConfigDisableAnonymousGitAccessAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigDisableAnonymousGitAccessAuditEntry Create(Expression expression) + { + return new RepoConfigDisableAnonymousGitAccessAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigDisableCollaboratorsOnlyAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigDisableCollaboratorsOnlyAuditEntry.cs new file mode 100644 index 00000000..139b2ec2 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigDisableCollaboratorsOnlyAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.disable_collaborators_only event. + /// + public class RepoConfigDisableCollaboratorsOnlyAuditEntry : QueryableValue + { + internal RepoConfigDisableCollaboratorsOnlyAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigDisableCollaboratorsOnlyAuditEntry Create(Expression expression) + { + return new RepoConfigDisableCollaboratorsOnlyAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigDisableContributorsOnlyAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigDisableContributorsOnlyAuditEntry.cs new file mode 100644 index 00000000..da0b7ee2 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigDisableContributorsOnlyAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.disable_contributors_only event. + /// + public class RepoConfigDisableContributorsOnlyAuditEntry : QueryableValue + { + internal RepoConfigDisableContributorsOnlyAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigDisableContributorsOnlyAuditEntry Create(Expression expression) + { + return new RepoConfigDisableContributorsOnlyAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigDisableSockpuppetDisallowedAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigDisableSockpuppetDisallowedAuditEntry.cs new file mode 100644 index 00000000..5fcaede4 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigDisableSockpuppetDisallowedAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.disable_sockpuppet_disallowed event. + /// + public class RepoConfigDisableSockpuppetDisallowedAuditEntry : QueryableValue + { + internal RepoConfigDisableSockpuppetDisallowedAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigDisableSockpuppetDisallowedAuditEntry Create(Expression expression) + { + return new RepoConfigDisableSockpuppetDisallowedAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigEnableAnonymousGitAccessAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigEnableAnonymousGitAccessAuditEntry.cs new file mode 100644 index 00000000..b8a04665 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigEnableAnonymousGitAccessAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.enable_anonymous_git_access event. + /// + public class RepoConfigEnableAnonymousGitAccessAuditEntry : QueryableValue + { + internal RepoConfigEnableAnonymousGitAccessAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigEnableAnonymousGitAccessAuditEntry Create(Expression expression) + { + return new RepoConfigEnableAnonymousGitAccessAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigEnableCollaboratorsOnlyAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigEnableCollaboratorsOnlyAuditEntry.cs new file mode 100644 index 00000000..591116cb --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigEnableCollaboratorsOnlyAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.enable_collaborators_only event. + /// + public class RepoConfigEnableCollaboratorsOnlyAuditEntry : QueryableValue + { + internal RepoConfigEnableCollaboratorsOnlyAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigEnableCollaboratorsOnlyAuditEntry Create(Expression expression) + { + return new RepoConfigEnableCollaboratorsOnlyAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigEnableContributorsOnlyAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigEnableContributorsOnlyAuditEntry.cs new file mode 100644 index 00000000..6dc5dbd7 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigEnableContributorsOnlyAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.enable_contributors_only event. + /// + public class RepoConfigEnableContributorsOnlyAuditEntry : QueryableValue + { + internal RepoConfigEnableContributorsOnlyAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigEnableContributorsOnlyAuditEntry Create(Expression expression) + { + return new RepoConfigEnableContributorsOnlyAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigEnableSockpuppetDisallowedAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigEnableSockpuppetDisallowedAuditEntry.cs new file mode 100644 index 00000000..852caf3e --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigEnableSockpuppetDisallowedAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.enable_sockpuppet_disallowed event. + /// + public class RepoConfigEnableSockpuppetDisallowedAuditEntry : QueryableValue + { + internal RepoConfigEnableSockpuppetDisallowedAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigEnableSockpuppetDisallowedAuditEntry Create(Expression expression) + { + return new RepoConfigEnableSockpuppetDisallowedAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigLockAnonymousGitAccessAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigLockAnonymousGitAccessAuditEntry.cs new file mode 100644 index 00000000..a6a67abd --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigLockAnonymousGitAccessAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.lock_anonymous_git_access event. + /// + public class RepoConfigLockAnonymousGitAccessAuditEntry : QueryableValue + { + internal RepoConfigLockAnonymousGitAccessAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigLockAnonymousGitAccessAuditEntry Create(Expression expression) + { + return new RepoConfigLockAnonymousGitAccessAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoConfigUnlockAnonymousGitAccessAuditEntry.cs b/Octokit.GraphQL/Model/RepoConfigUnlockAnonymousGitAccessAuditEntry.cs new file mode 100644 index 00000000..07f161a0 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoConfigUnlockAnonymousGitAccessAuditEntry.cs @@ -0,0 +1,130 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.config.unlock_anonymous_git_access event. + /// + public class RepoConfigUnlockAnonymousGitAccessAuditEntry : QueryableValue + { + internal RepoConfigUnlockAnonymousGitAccessAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoConfigUnlockAnonymousGitAccessAuditEntry Create(Expression expression) + { + return new RepoConfigUnlockAnonymousGitAccessAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoCreateAuditEntry.cs b/Octokit.GraphQL/Model/RepoCreateAuditEntry.cs new file mode 100644 index 00000000..86c24655 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoCreateAuditEntry.cs @@ -0,0 +1,145 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.create event. + /// + public class RepoCreateAuditEntry : QueryableValue + { + internal RepoCreateAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The name of the parent repository for this forked repository. + /// + public string ForkParentName { get; } + + /// + /// The name of the root repository for this netork. + /// + public string ForkSourceName { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + /// + /// The visibility of the repository + /// + public RepoCreateAuditEntryVisibility? Visibility { get; } + + internal static RepoCreateAuditEntry Create(Expression expression) + { + return new RepoCreateAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoCreateAuditEntryVisibility.cs b/Octokit.GraphQL/Model/RepoCreateAuditEntryVisibility.cs new file mode 100644 index 00000000..a7ec5905 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoCreateAuditEntryVisibility.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The privacy of a repository + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RepoCreateAuditEntryVisibility + { + /// + /// The repository is visible only to users in the same business. + /// + [EnumMember(Value = "INTERNAL")] + Internal, + + /// + /// The repository is visible only to those with explicit access. + /// + [EnumMember(Value = "PRIVATE")] + Private, + + /// + /// The repository is visible to everyone. + /// + [EnumMember(Value = "PUBLIC")] + Public, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoDestroyAuditEntry.cs b/Octokit.GraphQL/Model/RepoDestroyAuditEntry.cs new file mode 100644 index 00000000..f7a91bcd --- /dev/null +++ b/Octokit.GraphQL/Model/RepoDestroyAuditEntry.cs @@ -0,0 +1,135 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.destroy event. + /// + public class RepoDestroyAuditEntry : QueryableValue + { + internal RepoDestroyAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + /// + /// The visibility of the repository + /// + public RepoDestroyAuditEntryVisibility? Visibility { get; } + + internal static RepoDestroyAuditEntry Create(Expression expression) + { + return new RepoDestroyAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoDestroyAuditEntryVisibility.cs b/Octokit.GraphQL/Model/RepoDestroyAuditEntryVisibility.cs new file mode 100644 index 00000000..26d4316e --- /dev/null +++ b/Octokit.GraphQL/Model/RepoDestroyAuditEntryVisibility.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The privacy of a repository + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RepoDestroyAuditEntryVisibility + { + /// + /// The repository is visible only to users in the same business. + /// + [EnumMember(Value = "INTERNAL")] + Internal, + + /// + /// The repository is visible only to those with explicit access. + /// + [EnumMember(Value = "PRIVATE")] + Private, + + /// + /// The repository is visible to everyone. + /// + [EnumMember(Value = "PUBLIC")] + Public, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoRemoveMemberAuditEntry.cs b/Octokit.GraphQL/Model/RepoRemoveMemberAuditEntry.cs new file mode 100644 index 00000000..5dbfdb2c --- /dev/null +++ b/Octokit.GraphQL/Model/RepoRemoveMemberAuditEntry.cs @@ -0,0 +1,135 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.remove_member event. + /// + public class RepoRemoveMemberAuditEntry : QueryableValue + { + internal RepoRemoveMemberAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + /// + /// The visibility of the repository + /// + public RepoRemoveMemberAuditEntryVisibility? Visibility { get; } + + internal static RepoRemoveMemberAuditEntry Create(Expression expression) + { + return new RepoRemoveMemberAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoRemoveMemberAuditEntryVisibility.cs b/Octokit.GraphQL/Model/RepoRemoveMemberAuditEntryVisibility.cs new file mode 100644 index 00000000..6b28c836 --- /dev/null +++ b/Octokit.GraphQL/Model/RepoRemoveMemberAuditEntryVisibility.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The privacy of a repository + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RepoRemoveMemberAuditEntryVisibility + { + /// + /// The repository is visible only to users in the same business. + /// + [EnumMember(Value = "INTERNAL")] + Internal, + + /// + /// The repository is visible only to those with explicit access. + /// + [EnumMember(Value = "PRIVATE")] + Private, + + /// + /// The repository is visible to everyone. + /// + [EnumMember(Value = "PUBLIC")] + Public, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepoRemoveTopicAuditEntry.cs b/Octokit.GraphQL/Model/RepoRemoveTopicAuditEntry.cs new file mode 100644 index 00000000..4011e9fa --- /dev/null +++ b/Octokit.GraphQL/Model/RepoRemoveTopicAuditEntry.cs @@ -0,0 +1,140 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repo.remove_topic event. + /// + public class RepoRemoveTopicAuditEntry : QueryableValue + { + internal RepoRemoveTopicAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The name of the topic added to the repository + /// + public Topic Topic => this.CreateProperty(x => x.Topic, Octokit.GraphQL.Model.Topic.Create); + + /// + /// The name of the topic added to the repository + /// + public string TopicName { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepoRemoveTopicAuditEntry Create(Expression expression) + { + return new RepoRemoveTopicAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ReportedContentClassifiers.cs b/Octokit.GraphQL/Model/ReportedContentClassifiers.cs deleted file mode 100644 index 94d0768c..00000000 --- a/Octokit.GraphQL/Model/ReportedContentClassifiers.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Octokit.GraphQL.Model -{ - /// - /// The reasons a piece of content can be reported or minimized. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ReportedContentClassifiers - { - /// - /// A spammy piece of content - /// - [EnumMember(Value = "SPAM")] - Spam, - - /// - /// An abusive or harassing piece of content - /// - [EnumMember(Value = "ABUSE")] - Abuse, - - /// - /// An irrelevant piece of content - /// - [EnumMember(Value = "OFF_TOPIC")] - OffTopic, - - /// - /// An outdated piece of content - /// - [EnumMember(Value = "OUTDATED")] - Outdated, - - /// - /// The content has been resolved - /// - [EnumMember(Value = "RESOLVED")] - Resolved, - } -} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/Repository.cs b/Octokit.GraphQL/Model/Repository.cs index e7cc6d97..d0a4afbc 100644 --- a/Octokit.GraphQL/Model/Repository.cs +++ b/Octokit.GraphQL/Model/Repository.cs @@ -22,7 +22,8 @@ internal Repository(Expression expression) : base(expression) /// Returns the elements in the list that come after the specified cursor. /// Returns the last _n_ elements from the list. /// Returns the elements in the list that come before the specified cursor. - public UserConnection AssignableUsers(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.AssignableUsers(first, after, last, before), Octokit.GraphQL.Model.UserConnection.Create); + /// Filters users with query on user name and login + public UserConnection AssignableUsers(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? query = null) => this.CreateMethodCall(x => x.AssignableUsers(first, after, last, before, query), Octokit.GraphQL.Model.UserConnection.Create); /// /// A list of branch protection rules for this repository. @@ -46,7 +47,8 @@ internal Repository(Expression expression) : base(expression) /// Returns the last _n_ elements from the list. /// Returns the elements in the list that come before the specified cursor. /// Collaborators affiliation level with a repository. - public RepositoryCollaboratorConnection Collaborators(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? affiliation = null) => this.CreateMethodCall(x => x.Collaborators(first, after, last, before, affiliation), Octokit.GraphQL.Model.RepositoryCollaboratorConnection.Create); + /// Filters users with query on user name and login + public RepositoryCollaboratorConnection Collaborators(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? affiliation = null, Arg? query = null) => this.CreateMethodCall(x => x.Collaborators(first, after, last, before, affiliation, query), Octokit.GraphQL.Model.RepositoryCollaboratorConnection.Create); /// /// A list of commit comments associated with the repository. @@ -72,6 +74,11 @@ internal Repository(Expression expression) : base(expression) /// public Ref DefaultBranchRef => this.CreateProperty(x => x.DefaultBranchRef, Octokit.GraphQL.Model.Ref.Create); + /// + /// Whether or not branches are automatically deleted when merged in this repository. + /// + public bool DeleteBranchOnMerge { get; } + /// /// A list of deploy keys that are on this repository. /// @@ -126,11 +133,21 @@ internal Repository(Expression expression) : base(expression) /// If non-null, filters repositories according to privacy public RepositoryConnection Forks(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg>? affiliations = null, Arg? isLocked = null, Arg? orderBy = null, Arg>? ownerAffiliations = null, Arg? privacy = null) => this.CreateMethodCall(x => x.Forks(first, after, last, before, affiliations, isLocked, orderBy, ownerAffiliations, privacy), Octokit.GraphQL.Model.RepositoryConnection.Create); + /// + /// The funding links for this repository + /// + public IQueryableList FundingLinks => this.CreateProperty(x => x.FundingLinks); + /// /// Indicates if the repository has issues feature enabled. /// public bool HasIssuesEnabled { get; } + /// + /// Indicates if the repository has the Projects feature enabled. + /// + public bool HasProjectsEnabled { get; } + /// /// Indicates if the repository has wiki feature enabled. /// @@ -216,8 +233,9 @@ internal Repository(Expression expression) : base(expression) /// Returns the elements in the list that come after the specified cursor. /// Returns the last _n_ elements from the list. /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for labels returned from the connection. /// If provided, searches labels by name and description. - public LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? query = null) => this.CreateMethodCall(x => x.Labels(first, after, last, before, query), Octokit.GraphQL.Model.LabelConnection.Create); + public LabelConnection Labels(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null, Arg? query = null) => this.CreateMethodCall(x => x.Labels(first, after, last, before, orderBy, query), Octokit.GraphQL.Model.LabelConnection.Create); /// /// A list containing a breakdown of the language composition of the repository. @@ -246,7 +264,8 @@ internal Repository(Expression expression) : base(expression) /// Returns the elements in the list that come after the specified cursor. /// Returns the last _n_ elements from the list. /// Returns the elements in the list that come before the specified cursor. - public UserConnection MentionableUsers(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.MentionableUsers(first, after, last, before), Octokit.GraphQL.Model.UserConnection.Create); + /// Filters users with query on user name and login + public UserConnection MentionableUsers(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? query = null) => this.CreateMethodCall(x => x.MentionableUsers(first, after, last, before, query), Octokit.GraphQL.Model.UserConnection.Create); /// /// Whether or not PRs are merged with a merge commit on this repository. @@ -388,6 +407,32 @@ internal Repository(Expression expression) : base(expression) /// Ordering options for refs returned from the connection. public RefConnection Refs(Arg refPrefix, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? direction = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Refs(refPrefix, first, after, last, before, direction, orderBy), Octokit.GraphQL.Model.RefConnection.Create); + /// + /// A list of registry packages under the owner. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Find registry package by name. + /// Find registry packages by their names. + /// Filter registry package by type. + /// Filter registry package by whether it is publicly visible + /// Filter registry package by type (string). + /// Find registry packages in a repository. + public RegistryPackageConnection RegistryPackages(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? name = null, Arg>? names = null, Arg? packageType = null, Arg? publicOnly = null, Arg? registryPackageType = null, Arg? repositoryId = null) => this.CreateMethodCall(x => x.RegistryPackages(first, after, last, before, name, names, packageType, publicOnly, registryPackageType, repositoryId), Octokit.GraphQL.Model.RegistryPackageConnection.Create); + + /// + /// A list of registry packages for a particular search query. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Filter registry package by type. + /// Find registry package by search query. + public RegistryPackageConnection RegistryPackagesForQuery(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? packageType = null, Arg? query = null) => this.CreateMethodCall(x => x.RegistryPackagesForQuery(first, after, last, before, packageType, query), Octokit.GraphQL.Model.RegistryPackageConnection.Create); + /// /// Lookup a single release given various criteria. /// @@ -444,6 +489,11 @@ internal Repository(Expression expression) : base(expression) /// Order for connection public StargazerConnection Stargazers(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Stargazers(first, after, last, before, orderBy), Octokit.GraphQL.Model.StargazerConnection.Create); + /// + /// Temporary authentication token for cloning this repository. + /// + public string TempCloneToken { get; } + /// /// The repository from which this repository was generated, if any. /// @@ -499,6 +549,15 @@ internal Repository(Expression expression) : base(expression) /// public SubscriptionState? ViewerSubscription { get; } + /// + /// A list of vulnerability alerts that are on this repository. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public RepositoryVulnerabilityAlertConnection VulnerabilityAlerts(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.VulnerabilityAlerts(first, after, last, before), Octokit.GraphQL.Model.RepositoryVulnerabilityAlertConnection.Create); + /// /// A list of users watching the repository. /// diff --git a/Octokit.GraphQL/Model/RepositoryAuditEntryData.cs b/Octokit.GraphQL/Model/RepositoryAuditEntryData.cs new file mode 100644 index 00000000..a2ce82f5 --- /dev/null +++ b/Octokit.GraphQL/Model/RepositoryAuditEntryData.cs @@ -0,0 +1,65 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Model; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Metadata for an audit entry with action repo.* + /// + public interface IRepositoryAuditEntryData : IQueryableValue, IQueryableInterface + { + /// + /// The repository associated with the action + /// + Repository Repository { get; } + + /// + /// The name of the repository + /// + string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + string RepositoryUrl { get; } + } +} + +namespace Octokit.GraphQL.Model.Internal +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + internal class StubIRepositoryAuditEntryData : QueryableValue, IRepositoryAuditEntryData + { + internal StubIRepositoryAuditEntryData(Expression expression) : base(expression) + { + } + + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + public string RepositoryName { get; } + + public string RepositoryResourcePath { get; } + + public string RepositoryUrl { get; } + + internal static StubIRepositoryAuditEntryData Create(Expression expression) + { + return new StubIRepositoryAuditEntryData(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepositoryCollaboratorAffiliation.cs b/Octokit.GraphQL/Model/RepositoryCollaboratorAffiliation.cs deleted file mode 100644 index 14d87611..00000000 --- a/Octokit.GraphQL/Model/RepositoryCollaboratorAffiliation.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; - -namespace Octokit.GraphQL.Model -{ - /// - /// The affiliation type between collaborator and repository. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RepositoryCollaboratorAffiliation - { - /// - /// All collaborators of the repository. - /// - [EnumMember(Value = "ALL")] - All, - - /// - /// All outside collaborators of an organization-owned repository. - /// - [EnumMember(Value = "OUTSIDE")] - Outside, - } -} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepositoryInfo.cs b/Octokit.GraphQL/Model/RepositoryInfo.cs index 7b9b66bc..c89ebaf8 100644 --- a/Octokit.GraphQL/Model/RepositoryInfo.cs +++ b/Octokit.GraphQL/Model/RepositoryInfo.cs @@ -38,6 +38,11 @@ public interface IRepositoryInfo : IQueryableValue, IQueryableI /// bool HasIssuesEnabled { get; } + /// + /// Indicates if the repository has the Projects feature enabled. + /// + bool HasProjectsEnabled { get; } + /// /// Indicates if the repository has wiki feature enabled. /// @@ -170,6 +175,8 @@ internal StubIRepositoryInfo(Expression expression) : base(expression) public bool HasIssuesEnabled { get; } + public bool HasProjectsEnabled { get; } + public bool HasWikiEnabled { get; } public string HomepageUrl { get; } diff --git a/Octokit.GraphQL/Model/RepositoryInvitationOrder.cs b/Octokit.GraphQL/Model/RepositoryInvitationOrder.cs new file mode 100644 index 00000000..bcd90a11 --- /dev/null +++ b/Octokit.GraphQL/Model/RepositoryInvitationOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for repository invitation connections. + /// + public class RepositoryInvitationOrder + { + /// + /// The field to order repository invitations by. + /// + public RepositoryInvitationOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepositoryInvitationOrderField.cs b/Octokit.GraphQL/Model/RepositoryInvitationOrderField.cs new file mode 100644 index 00000000..9eae4e9b --- /dev/null +++ b/Octokit.GraphQL/Model/RepositoryInvitationOrderField.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which repository invitation connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum RepositoryInvitationOrderField + { + /// + /// Order repository invitations by creation time + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + + /// + /// Order repository invitations by invitee login + /// + [EnumMember(Value = "INVITEE_LOGIN")] + InviteeLogin, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepositoryVisibilityChangeDisableAuditEntry.cs b/Octokit.GraphQL/Model/RepositoryVisibilityChangeDisableAuditEntry.cs new file mode 100644 index 00000000..4d432cff --- /dev/null +++ b/Octokit.GraphQL/Model/RepositoryVisibilityChangeDisableAuditEntry.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repository_visibility_change.disable event. + /// + public class RepositoryVisibilityChangeDisableAuditEntry : QueryableValue + { + internal RepositoryVisibilityChangeDisableAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The HTTP path for this enterprise. + /// + public string EnterpriseResourcePath { get; } + + /// + /// The slug of the enterprise. + /// + public string EnterpriseSlug { get; } + + /// + /// The HTTP URL for this enterprise. + /// + public string EnterpriseUrl { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepositoryVisibilityChangeDisableAuditEntry Create(Expression expression) + { + return new RepositoryVisibilityChangeDisableAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepositoryVisibilityChangeEnableAuditEntry.cs b/Octokit.GraphQL/Model/RepositoryVisibilityChangeEnableAuditEntry.cs new file mode 100644 index 00000000..fdcc26aa --- /dev/null +++ b/Octokit.GraphQL/Model/RepositoryVisibilityChangeEnableAuditEntry.cs @@ -0,0 +1,125 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a repository_visibility_change.enable event. + /// + public class RepositoryVisibilityChangeEnableAuditEntry : QueryableValue + { + internal RepositoryVisibilityChangeEnableAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + /// + /// The HTTP path for this enterprise. + /// + public string EnterpriseResourcePath { get; } + + /// + /// The slug of the enterprise. + /// + public string EnterpriseSlug { get; } + + /// + /// The HTTP URL for this enterprise. + /// + public string EnterpriseUrl { get; } + + public ID Id { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static RepositoryVisibilityChangeEnableAuditEntry Create(Expression expression) + { + return new RepositoryVisibilityChangeEnableAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepositoryVulnerabilityAlert.cs b/Octokit.GraphQL/Model/RepositoryVulnerabilityAlert.cs new file mode 100644 index 00000000..0a62442f --- /dev/null +++ b/Octokit.GraphQL/Model/RepositoryVulnerabilityAlert.cs @@ -0,0 +1,105 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A alert for a repository with an affected vulnerability. + /// + public class RepositoryVulnerabilityAlert : QueryableValue + { + internal RepositoryVulnerabilityAlert(Expression expression) : base(expression) + { + } + + /// + /// The affected version + /// + [Obsolete(@"advisory specific fields are being removed from repositoryVulnerabilityAlert objects Use `securityVulnerability.vulnerableVersionRange` instead. Removal on 2019-10-01 UTC.")] + public string AffectedRange { get; } + + /// + /// When was the alert created? + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// The reason the alert was dismissed + /// + public string DismissReason { get; } + + /// + /// When was the alert dimissed? + /// + public DateTimeOffset? DismissedAt { get; } + + /// + /// The user who dismissed the alert + /// + public User Dismisser => this.CreateProperty(x => x.Dismisser, Octokit.GraphQL.Model.User.Create); + + /// + /// The external identifier for the vulnerability + /// + [Obsolete(@"advisory specific fields are being removed from repositoryVulnerabilityAlert objects Use `securityAdvisory.identifiers` instead. Removal on 2019-10-01 UTC.")] + public string ExternalIdentifier { get; } + + /// + /// The external reference for the vulnerability + /// + [Obsolete(@"advisory specific fields are being removed from repositoryVulnerabilityAlert objects Use `securityAdvisory.references` instead. Removal on 2019-10-01 UTC.")] + public string ExternalReference { get; } + + /// + /// The fixed version + /// + [Obsolete(@"advisory specific fields are being removed from repositoryVulnerabilityAlert objects Use `securityVulnerability.firstPatchedVersion` instead. Removal on 2019-10-01 UTC.")] + public string FixedIn { get; } + + public ID Id { get; } + + /// + /// The affected package + /// + [Obsolete(@"advisory specific fields are being removed from repositoryVulnerabilityAlert objects Use `securityVulnerability.package` instead. Removal on 2019-10-01 UTC.")] + public string PackageName { get; } + + /// + /// The associated repository + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The associated security advisory + /// + public SecurityAdvisory SecurityAdvisory => this.CreateProperty(x => x.SecurityAdvisory, Octokit.GraphQL.Model.SecurityAdvisory.Create); + + /// + /// The associated security vulnerablity + /// + public SecurityVulnerability SecurityVulnerability => this.CreateProperty(x => x.SecurityVulnerability, Octokit.GraphQL.Model.SecurityVulnerability.Create); + + /// + /// The vulnerable manifest filename + /// + public string VulnerableManifestFilename { get; } + + /// + /// The vulnerable manifest path + /// + public string VulnerableManifestPath { get; } + + /// + /// The vulnerable requirements + /// + public string VulnerableRequirements { get; } + + internal static RepositoryVulnerabilityAlert Create(Expression expression) + { + return new RepositoryVulnerabilityAlert(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepositoryVulnerabilityAlertConnection.cs b/Octokit.GraphQL/Model/RepositoryVulnerabilityAlertConnection.cs new file mode 100644 index 00000000..d4383d79 --- /dev/null +++ b/Octokit.GraphQL/Model/RepositoryVulnerabilityAlertConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for RepositoryVulnerabilityAlert. + /// + public class RepositoryVulnerabilityAlertConnection : QueryableValue, IPagingConnection + { + internal RepositoryVulnerabilityAlertConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static RepositoryVulnerabilityAlertConnection Create(Expression expression) + { + return new RepositoryVulnerabilityAlertConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RepositoryVulnerabilityAlertEdge.cs b/Octokit.GraphQL/Model/RepositoryVulnerabilityAlertEdge.cs new file mode 100644 index 00000000..88762c13 --- /dev/null +++ b/Octokit.GraphQL/Model/RepositoryVulnerabilityAlertEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class RepositoryVulnerabilityAlertEdge : QueryableValue + { + internal RepositoryVulnerabilityAlertEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public RepositoryVulnerabilityAlert Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.RepositoryVulnerabilityAlert.Create); + + internal static RepositoryVulnerabilityAlertEdge Create(Expression expression) + { + return new RepositoryVulnerabilityAlertEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/RequestedReviewer.cs b/Octokit.GraphQL/Model/RequestedReviewer.cs index 470aa70d..a175558e 100644 --- a/Octokit.GraphQL/Model/RequestedReviewer.cs +++ b/Octokit.GraphQL/Model/RequestedReviewer.cs @@ -20,9 +20,9 @@ internal RequestedReviewer(Expression expression) : base(expression) public class Selector { /// - /// A user is an individual's account on GitHub that owns repositories and can make new content. + /// A placeholder user for attribution of imported data on GitHub. /// - public Selector User(Func selector) => default; + public Selector Mannequin(Func selector) => default; /// /// A team of users in an organization. @@ -30,9 +30,9 @@ public class Selector public Selector Team(Func selector) => default; /// - /// A placeholder user for attribution of imported data on GitHub. + /// A user is an individual's account on GitHub that owns repositories and can make new content. /// - public Selector Mannequin(Func selector) => default; + public Selector User(Func selector) => default; } internal static RequestedReviewer Create(Expression expression) diff --git a/Octokit.GraphQL/Model/ReviewDismissalAllowanceActor.cs b/Octokit.GraphQL/Model/ReviewDismissalAllowanceActor.cs index 18cf9c07..2c81f5bd 100644 --- a/Octokit.GraphQL/Model/ReviewDismissalAllowanceActor.cs +++ b/Octokit.GraphQL/Model/ReviewDismissalAllowanceActor.cs @@ -20,14 +20,14 @@ internal ReviewDismissalAllowanceActor(Expression expression) : base(expression) public class Selector { /// - /// A user is an individual's account on GitHub that owns repositories and can make new content. + /// A team of users in an organization. /// - public Selector User(Func selector) => default; + public Selector Team(Func selector) => default; /// - /// A team of users in an organization. + /// A user is an individual's account on GitHub that owns repositories and can make new content. /// - public Selector Team(Func selector) => default; + public Selector User(Func selector) => default; } internal static ReviewDismissalAllowanceActor Create(Expression expression) diff --git a/Octokit.GraphQL/Model/ReviewDismissedEvent.cs b/Octokit.GraphQL/Model/ReviewDismissedEvent.cs index e2f5ae94..0ea3b9f3 100644 --- a/Octokit.GraphQL/Model/ReviewDismissedEvent.cs +++ b/Octokit.GraphQL/Model/ReviewDismissedEvent.cs @@ -42,18 +42,6 @@ internal ReviewDismissedEvent(Expression expression) : base(expression) public ID Id { get; } - /// - /// Identifies the message associated with the 'review_dismissed' event. - /// - [Obsolete(@"`message` is being removed because it not nullable, whereas the underlying field is optional. Use `dismissalMessage` instead. Removal on 2019-07-01 UTC.")] - public string Message { get; } - - /// - /// The message associated with the event, rendered to HTML. - /// - [Obsolete(@"`messageHtml` is being removed because it not nullable, whereas the underlying field is optional. Use `dismissalMessageHTML` instead. Removal on 2019-07-01 UTC.")] - public string MessageHtml { get; } - /// /// Identifies the previous state of the review with the 'review_dismissed' event. /// diff --git a/Octokit.GraphQL/Model/ReviewStatusHovercardContext.cs b/Octokit.GraphQL/Model/ReviewStatusHovercardContext.cs new file mode 100644 index 00000000..a6f2a2bb --- /dev/null +++ b/Octokit.GraphQL/Model/ReviewStatusHovercardContext.cs @@ -0,0 +1,34 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A hovercard context with a message describing the current code review state of the pull + /// request. + /// + public class ReviewStatusHovercardContext : QueryableValue + { + internal ReviewStatusHovercardContext(Expression expression) : base(expression) + { + } + + /// + /// A string describing this context + /// + public string Message { get; } + + /// + /// An octicon to accompany this context + /// + public string Octicon { get; } + + internal static ReviewStatusHovercardContext Create(Expression expression) + { + return new ReviewStatusHovercardContext(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SamlDigestAlgorithm.cs b/Octokit.GraphQL/Model/SamlDigestAlgorithm.cs new file mode 100644 index 00000000..1e1fcc7f --- /dev/null +++ b/Octokit.GraphQL/Model/SamlDigestAlgorithm.cs @@ -0,0 +1,38 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible digest algorithms used to sign SAML requests for an identity provider. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SamlDigestAlgorithm + { + /// + /// SHA1 + /// + [EnumMember(Value = "SHA1")] + Sha1, + + /// + /// SHA256 + /// + [EnumMember(Value = "SHA256")] + Sha256, + + /// + /// SHA384 + /// + [EnumMember(Value = "SHA384")] + Sha384, + + /// + /// SHA512 + /// + [EnumMember(Value = "SHA512")] + Sha512, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SamlSignatureAlgorithm.cs b/Octokit.GraphQL/Model/SamlSignatureAlgorithm.cs new file mode 100644 index 00000000..2a7d1e27 --- /dev/null +++ b/Octokit.GraphQL/Model/SamlSignatureAlgorithm.cs @@ -0,0 +1,38 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The possible signature algorithms used to sign SAML requests for a Identity Provider. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SamlSignatureAlgorithm + { + /// + /// RSA-SHA1 + /// + [EnumMember(Value = "RSA_SHA1")] + RsaSha1, + + /// + /// RSA-SHA256 + /// + [EnumMember(Value = "RSA_SHA256")] + RsaSha256, + + /// + /// RSA-SHA384 + /// + [EnumMember(Value = "RSA_SHA384")] + RsaSha384, + + /// + /// RSA-SHA512 + /// + [EnumMember(Value = "RSA_SHA512")] + RsaSha512, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SavedReply.cs b/Octokit.GraphQL/Model/SavedReply.cs new file mode 100644 index 00000000..ef8f3717 --- /dev/null +++ b/Octokit.GraphQL/Model/SavedReply.cs @@ -0,0 +1,50 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A Saved Reply is text a user can use to reply quickly. + /// + public class SavedReply : QueryableValue + { + internal SavedReply(Expression expression) : base(expression) + { + } + + /// + /// The body of the saved reply. + /// + public string Body { get; } + + /// + /// The saved reply body rendered to HTML. + /// + public string BodyHTML { get; } + + /// + /// Identifies the primary key from the database. + /// + public int? DatabaseId { get; } + + public ID Id { get; } + + /// + /// The title of the saved reply. + /// + public string Title { get; } + + /// + /// The user that saved this reply. + /// + public IActor User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + internal static SavedReply Create(Expression expression) + { + return new SavedReply(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SavedReplyConnection.cs b/Octokit.GraphQL/Model/SavedReplyConnection.cs new file mode 100644 index 00000000..65734949 --- /dev/null +++ b/Octokit.GraphQL/Model/SavedReplyConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for SavedReply. + /// + public class SavedReplyConnection : QueryableValue, IPagingConnection + { + internal SavedReplyConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static SavedReplyConnection Create(Expression expression) + { + return new SavedReplyConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/AppEdge.cs b/Octokit.GraphQL/Model/SavedReplyEdge.cs similarity index 59% rename from Octokit.GraphQL/Model/AppEdge.cs rename to Octokit.GraphQL/Model/SavedReplyEdge.cs index 58f3e802..6366581a 100644 --- a/Octokit.GraphQL/Model/AppEdge.cs +++ b/Octokit.GraphQL/Model/SavedReplyEdge.cs @@ -9,9 +9,9 @@ namespace Octokit.GraphQL.Model /// /// An edge in a connection. /// - public class AppEdge : QueryableValue + public class SavedReplyEdge : QueryableValue { - internal AppEdge(Expression expression) : base(expression) + internal SavedReplyEdge(Expression expression) : base(expression) { } @@ -23,11 +23,11 @@ internal AppEdge(Expression expression) : base(expression) /// /// The item at the end of the edge. /// - public App Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.App.Create); + public SavedReply Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.SavedReply.Create); - internal static AppEdge Create(Expression expression) + internal static SavedReplyEdge Create(Expression expression) { - return new AppEdge(expression); + return new SavedReplyEdge(expression); } } } \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SavedReplyOrder.cs b/Octokit.GraphQL/Model/SavedReplyOrder.cs new file mode 100644 index 00000000..3bc3c07c --- /dev/null +++ b/Octokit.GraphQL/Model/SavedReplyOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for saved reply connections. + /// + public class SavedReplyOrder + { + /// + /// The field to order saved replies by. + /// + public SavedReplyOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SavedReplyOrderField.cs b/Octokit.GraphQL/Model/SavedReplyOrderField.cs new file mode 100644 index 00000000..c6ed9fff --- /dev/null +++ b/Octokit.GraphQL/Model/SavedReplyOrderField.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which saved reply connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SavedReplyOrderField + { + /// + /// Order saved reply by when they were updated. + /// + [EnumMember(Value = "UPDATED_AT")] + UpdatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SearchResultItem.cs b/Octokit.GraphQL/Model/SearchResultItem.cs index ee80b063..e7dc5cf2 100644 --- a/Octokit.GraphQL/Model/SearchResultItem.cs +++ b/Octokit.GraphQL/Model/SearchResultItem.cs @@ -20,39 +20,39 @@ internal SearchResultItem(Expression expression) : base(expression) public class Selector { /// - /// An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. + /// A GitHub App. /// - public Selector Issue(Func selector) => default; + public Selector App(Func selector) => default; /// - /// A repository pull request. + /// An Issue is a place to discuss ideas, enhancements, tasks, and bugs for a project. /// - public Selector PullRequest(Func selector) => default; + public Selector Issue(Func selector) => default; /// - /// A repository contains the content for a project. + /// A listing in the GitHub integration marketplace. /// - public Selector Repository(Func selector) => default; + public Selector MarketplaceListing(Func selector) => default; /// - /// A user is an individual's account on GitHub that owns repositories and can make new content. + /// An account on GitHub, with one or more owners, that has repositories, members and teams. /// - public Selector User(Func selector) => default; + public Selector Organization(Func selector) => default; /// - /// An account on GitHub, with one or more owners, that has repositories, members and teams. + /// A repository pull request. /// - public Selector Organization(Func selector) => default; + public Selector PullRequest(Func selector) => default; /// - /// A listing in the GitHub integration marketplace. + /// A repository contains the content for a project. /// - public Selector MarketplaceListing(Func selector) => default; + public Selector Repository(Func selector) => default; /// - /// A GitHub App. + /// A user is an individual's account on GitHub that owns repositories and can make new content. /// - public Selector App(Func selector) => default; + public Selector User(Func selector) => default; } internal static SearchResultItem Create(Expression expression) diff --git a/Octokit.GraphQL/Model/SecurityAdvisoryEcosystem.cs b/Octokit.GraphQL/Model/SecurityAdvisoryEcosystem.cs index 502ce060..8bb4083f 100644 --- a/Octokit.GraphQL/Model/SecurityAdvisoryEcosystem.cs +++ b/Octokit.GraphQL/Model/SecurityAdvisoryEcosystem.cs @@ -40,5 +40,11 @@ public enum SecurityAdvisoryEcosystem /// [EnumMember(Value = "NUGET")] Nuget, + + /// + /// PHP packages hosted at packagist.org + /// + [EnumMember(Value = "COMPOSER")] + Composer, } } \ No newline at end of file diff --git a/Octokit.GraphQL/Model/Sponsorable.cs b/Octokit.GraphQL/Model/Sponsorable.cs new file mode 100644 index 00000000..ecd88beb --- /dev/null +++ b/Octokit.GraphQL/Model/Sponsorable.cs @@ -0,0 +1,69 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Model; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Entities that can be sponsored through GitHub Sponsors + /// + public interface ISponsorable : IQueryableValue, IQueryableInterface + { + /// + /// The GitHub Sponsors listing for this user. + /// + SponsorsListing SponsorsListing { get; } + + /// + /// This object's sponsorships as the maintainer. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Whether or not to include private sponsorships in the result set + /// Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer. + SponsorshipConnection SponsorshipsAsMaintainer(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? includePrivate = null, Arg? orderBy = null); + + /// + /// This object's sponsorships as the sponsor. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer. + SponsorshipConnection SponsorshipsAsSponsor(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null); + } +} + +namespace Octokit.GraphQL.Model.Internal +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + internal class StubISponsorable : QueryableValue, ISponsorable + { + internal StubISponsorable(Expression expression) : base(expression) + { + } + + public SponsorsListing SponsorsListing => this.CreateProperty(x => x.SponsorsListing, Octokit.GraphQL.Model.SponsorsListing.Create); + + public SponsorshipConnection SponsorshipsAsMaintainer(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? includePrivate = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.SponsorshipsAsMaintainer(first, after, last, before, includePrivate, orderBy), Octokit.GraphQL.Model.SponsorshipConnection.Create); + + public SponsorshipConnection SponsorshipsAsSponsor(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.SponsorshipsAsSponsor(first, after, last, before, orderBy), Octokit.GraphQL.Model.SponsorshipConnection.Create); + + internal static StubISponsorable Create(Expression expression) + { + return new StubISponsorable(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorsListing.cs b/Octokit.GraphQL/Model/SponsorsListing.cs new file mode 100644 index 00000000..da790a40 --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorsListing.cs @@ -0,0 +1,65 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A GitHub Sponsors listing. + /// + public class SponsorsListing : QueryableValue + { + internal SponsorsListing(Expression expression) : base(expression) + { + } + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// The full description of the listing. + /// + public string FullDescription { get; } + + /// + /// The full description of the listing rendered to HTML. + /// + public string FullDescriptionHTML { get; } + + public ID Id { get; } + + /// + /// The listing's full name. + /// + public string Name { get; } + + /// + /// The short description of the listing. + /// + public string ShortDescription { get; } + + /// + /// The short name of the listing. + /// + public string Slug { get; } + + /// + /// The published tiers for this GitHub Sponsors listing. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for Sponsors tiers returned from the connection. + public SponsorsTierConnection Tiers(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Tiers(first, after, last, before, orderBy), Octokit.GraphQL.Model.SponsorsTierConnection.Create); + + internal static SponsorsListing Create(Expression expression) + { + return new SponsorsListing(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorsTier.cs b/Octokit.GraphQL/Model/SponsorsTier.cs new file mode 100644 index 00000000..ee18913a --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorsTier.cs @@ -0,0 +1,70 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A GitHub Sponsors tier associated with a GitHub Sponsors listing. + /// + public class SponsorsTier : QueryableValue + { + internal SponsorsTier(Expression expression) : base(expression) + { + } + + /// + /// SponsorsTier information only visible to users that can administer the associated Sponsors listing. + /// + public SponsorsTierAdminInfo AdminInfo => this.CreateProperty(x => x.AdminInfo, Octokit.GraphQL.Model.SponsorsTierAdminInfo.Create); + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// The description of the tier. + /// + public string Description { get; } + + /// + /// The tier description rendered to HTML + /// + public string DescriptionHTML { get; } + + public ID Id { get; } + + /// + /// How much this tier costs per month in cents. + /// + public int MonthlyPriceInCents { get; } + + /// + /// How much this tier costs per month in dollars. + /// + public int MonthlyPriceInDollars { get; } + + /// + /// The name of the tier. + /// + public string Name { get; } + + /// + /// The sponsors listing that this tier belongs to. + /// + public SponsorsListing SponsorsListing => this.CreateProperty(x => x.SponsorsListing, Octokit.GraphQL.Model.SponsorsListing.Create); + + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + + internal static SponsorsTier Create(Expression expression) + { + return new SponsorsTier(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorsTierAdminInfo.cs b/Octokit.GraphQL/Model/SponsorsTierAdminInfo.cs new file mode 100644 index 00000000..14809546 --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorsTierAdminInfo.cs @@ -0,0 +1,34 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// SponsorsTier information only visible to users that can administer the associated Sponsors listing. + /// + public class SponsorsTierAdminInfo : QueryableValue + { + internal SponsorsTierAdminInfo(Expression expression) : base(expression) + { + } + + /// + /// The sponsorships associated with this tier. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Whether or not to include private sponsorships in the result set + /// Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer. + public SponsorshipConnection Sponsorships(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? includePrivate = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Sponsorships(first, after, last, before, includePrivate, orderBy), Octokit.GraphQL.Model.SponsorshipConnection.Create); + + internal static SponsorsTierAdminInfo Create(Expression expression) + { + return new SponsorsTierAdminInfo(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorsTierConnection.cs b/Octokit.GraphQL/Model/SponsorsTierConnection.cs new file mode 100644 index 00000000..8bb5334f --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorsTierConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for SponsorsTier. + /// + public class SponsorsTierConnection : QueryableValue, IPagingConnection + { + internal SponsorsTierConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static SponsorsTierConnection Create(Expression expression) + { + return new SponsorsTierConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorsTierEdge.cs b/Octokit.GraphQL/Model/SponsorsTierEdge.cs new file mode 100644 index 00000000..69538143 --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorsTierEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class SponsorsTierEdge : QueryableValue + { + internal SponsorsTierEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public SponsorsTier Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.SponsorsTier.Create); + + internal static SponsorsTierEdge Create(Expression expression) + { + return new SponsorsTierEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorsTierOrder.cs b/Octokit.GraphQL/Model/SponsorsTierOrder.cs new file mode 100644 index 00000000..23ea5165 --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorsTierOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for Sponsors tiers connections. + /// + public class SponsorsTierOrder + { + /// + /// The field to order tiers by. + /// + public SponsorsTierOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorsTierOrderField.cs b/Octokit.GraphQL/Model/SponsorsTierOrderField.cs new file mode 100644 index 00000000..70a0dad3 --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorsTierOrderField.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which Sponsors tiers connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SponsorsTierOrderField + { + /// + /// Order tiers by creation time. + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + + /// + /// Order tiers by their monthly price in cents + /// + [EnumMember(Value = "MONTHLY_PRICE_IN_CENTS")] + MonthlyPriceInCents, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/Sponsorship.cs b/Octokit.GraphQL/Model/Sponsorship.cs new file mode 100644 index 00000000..7ba8f500 --- /dev/null +++ b/Octokit.GraphQL/Model/Sponsorship.cs @@ -0,0 +1,56 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A sponsorship relationship between a sponsor and a maintainer + /// + public class Sponsorship : QueryableValue + { + internal Sponsorship(Expression expression) : base(expression) + { + } + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + public ID Id { get; } + + /// + /// The entity that is being sponsored + /// + [Obsolete(@"`Sponsorship.maintainer` will be removed. Use `Sponsorship.sponsorable` instead. Removal on 2020-04-01 UTC.")] + public User Maintainer => this.CreateProperty(x => x.Maintainer, Octokit.GraphQL.Model.User.Create); + + /// + /// The privacy level for this sponsorship. + /// + public SponsorshipPrivacy PrivacyLevel { get; } + + /// + /// The entity that is sponsoring. Returns null if the sponsorship is private + /// + public User Sponsor => this.CreateProperty(x => x.Sponsor, Octokit.GraphQL.Model.User.Create); + + /// + /// The entity that is being sponsored + /// + public ISponsorable Sponsorable => this.CreateProperty(x => x.Sponsorable, Octokit.GraphQL.Model.Internal.StubISponsorable.Create); + + /// + /// The associated sponsorship tier + /// + public SponsorsTier Tier => this.CreateProperty(x => x.Tier, Octokit.GraphQL.Model.SponsorsTier.Create); + + internal static Sponsorship Create(Expression expression) + { + return new Sponsorship(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorshipConnection.cs b/Octokit.GraphQL/Model/SponsorshipConnection.cs new file mode 100644 index 00000000..68c49196 --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorshipConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for Sponsorship. + /// + public class SponsorshipConnection : QueryableValue, IPagingConnection + { + internal SponsorshipConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static SponsorshipConnection Create(Expression expression) + { + return new SponsorshipConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorshipEdge.cs b/Octokit.GraphQL/Model/SponsorshipEdge.cs new file mode 100644 index 00000000..dc81292d --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorshipEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class SponsorshipEdge : QueryableValue + { + internal SponsorshipEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public Sponsorship Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.Sponsorship.Create); + + internal static SponsorshipEdge Create(Expression expression) + { + return new SponsorshipEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorshipOrder.cs b/Octokit.GraphQL/Model/SponsorshipOrder.cs new file mode 100644 index 00000000..c51702c8 --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorshipOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ordering options for sponsorship connections. + /// + public class SponsorshipOrder + { + /// + /// The field to order sponsorship by. + /// + public SponsorshipOrderField Field { get; set; } + + /// + /// The ordering direction. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorshipOrderField.cs b/Octokit.GraphQL/Model/SponsorshipOrderField.cs new file mode 100644 index 00000000..3c3077c7 --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorshipOrderField.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which sponsorship connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SponsorshipOrderField + { + /// + /// Order sponsorship by creation time. + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SponsorshipPrivacy.cs b/Octokit.GraphQL/Model/SponsorshipPrivacy.cs new file mode 100644 index 00000000..762bfbfa --- /dev/null +++ b/Octokit.GraphQL/Model/SponsorshipPrivacy.cs @@ -0,0 +1,26 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// The privacy of a sponsorship + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SponsorshipPrivacy + { + /// + /// Public + /// + [EnumMember(Value = "PUBLIC")] + Public, + + /// + /// Private + /// + [EnumMember(Value = "PRIVATE")] + Private, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/SubmitPullRequestReviewInput.cs b/Octokit.GraphQL/Model/SubmitPullRequestReviewInput.cs index 5c5d5753..4c20222c 100644 --- a/Octokit.GraphQL/Model/SubmitPullRequestReviewInput.cs +++ b/Octokit.GraphQL/Model/SubmitPullRequestReviewInput.cs @@ -8,10 +8,15 @@ namespace Octokit.GraphQL.Model /// public class SubmitPullRequestReviewInput { + /// + /// The Pull Request ID to submit any pending reviews. + /// + public ID? PullRequestId { get; set; } + /// /// The Pull Request Review ID to submit. /// - public ID PullRequestReviewId { get; set; } + public ID? PullRequestReviewId { get; set; } /// /// The event to send to the Pull Request Review. diff --git a/Octokit.GraphQL/Model/Team.cs b/Octokit.GraphQL/Model/Team.cs index d496f078..d78dcc0b 100644 --- a/Octokit.GraphQL/Model/Team.cs +++ b/Octokit.GraphQL/Model/Team.cs @@ -57,6 +57,33 @@ internal Team(Expression expression) : base(expression) /// public string Description { get; } + /// + /// Find a team discussion by its number. + /// + /// The sequence number of the discussion to find. + public TeamDiscussion Discussion(Arg number) => this.CreateMethodCall(x => x.Discussion(number), Octokit.GraphQL.Model.TeamDiscussion.Create); + + /// + /// A list of team discussions. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// If provided, filters discussions according to whether or not they are pinned. + /// Order for connection + public TeamDiscussionConnection Discussions(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? isPinned = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Discussions(first, after, last, before, isPinned, orderBy), Octokit.GraphQL.Model.TeamDiscussionConnection.Create); + + /// + /// The HTTP path for team discussions + /// + public string DiscussionsResourcePath { get; } + + /// + /// The HTTP URL for team discussions + /// + public string DiscussionsUrl { get; } + /// /// The HTTP path for editing this team /// diff --git a/Octokit.GraphQL/Model/TeamAddMemberAuditEntry.cs b/Octokit.GraphQL/Model/TeamAddMemberAuditEntry.cs new file mode 100644 index 00000000..380aef33 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamAddMemberAuditEntry.cs @@ -0,0 +1,135 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a team.add_member event. + /// + public class TeamAddMemberAuditEntry : QueryableValue + { + internal TeamAddMemberAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// Whether the team was mapped to an LDAP Group. + /// + public bool? IsLdapMapped { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The team associated with the action + /// + public Team Team => this.CreateProperty(x => x.Team, Octokit.GraphQL.Model.Team.Create); + + /// + /// The name of the team + /// + public string TeamName { get; } + + /// + /// The HTTP path for this team + /// + public string TeamResourcePath { get; } + + /// + /// The HTTP URL for this team + /// + public string TeamUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static TeamAddMemberAuditEntry Create(Expression expression) + { + return new TeamAddMemberAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamAddRepositoryAuditEntry.cs b/Octokit.GraphQL/Model/TeamAddRepositoryAuditEntry.cs new file mode 100644 index 00000000..abb35ec9 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamAddRepositoryAuditEntry.cs @@ -0,0 +1,155 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a team.add_repository event. + /// + public class TeamAddRepositoryAuditEntry : QueryableValue + { + internal TeamAddRepositoryAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// Whether the team was mapped to an LDAP Group. + /// + public bool? IsLdapMapped { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The team associated with the action + /// + public Team Team => this.CreateProperty(x => x.Team, Octokit.GraphQL.Model.Team.Create); + + /// + /// The name of the team + /// + public string TeamName { get; } + + /// + /// The HTTP path for this team + /// + public string TeamResourcePath { get; } + + /// + /// The HTTP URL for this team + /// + public string TeamUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static TeamAddRepositoryAuditEntry Create(Expression expression) + { + return new TeamAddRepositoryAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamAuditEntryData.cs b/Octokit.GraphQL/Model/TeamAuditEntryData.cs new file mode 100644 index 00000000..3cccf5ac --- /dev/null +++ b/Octokit.GraphQL/Model/TeamAuditEntryData.cs @@ -0,0 +1,65 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Model; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Metadata for an audit entry with action team.* + /// + public interface ITeamAuditEntryData : IQueryableValue, IQueryableInterface + { + /// + /// The team associated with the action + /// + Team Team { get; } + + /// + /// The name of the team + /// + string TeamName { get; } + + /// + /// The HTTP path for this team + /// + string TeamResourcePath { get; } + + /// + /// The HTTP URL for this team + /// + string TeamUrl { get; } + } +} + +namespace Octokit.GraphQL.Model.Internal +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + internal class StubITeamAuditEntryData : QueryableValue, ITeamAuditEntryData + { + internal StubITeamAuditEntryData(Expression expression) : base(expression) + { + } + + public Team Team => this.CreateProperty(x => x.Team, Octokit.GraphQL.Model.Team.Create); + + public string TeamName { get; } + + public string TeamResourcePath { get; } + + public string TeamUrl { get; } + + internal static StubITeamAuditEntryData Create(Expression expression) + { + return new StubITeamAuditEntryData(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamChangeParentTeamAuditEntry.cs b/Octokit.GraphQL/Model/TeamChangeParentTeamAuditEntry.cs new file mode 100644 index 00000000..6ad1b266 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamChangeParentTeamAuditEntry.cs @@ -0,0 +1,175 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a team.change_parent_team event. + /// + public class TeamChangeParentTeamAuditEntry : QueryableValue + { + internal TeamChangeParentTeamAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// Whether the team was mapped to an LDAP Group. + /// + public bool? IsLdapMapped { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The new parent team. + /// + public Team ParentTeam => this.CreateProperty(x => x.ParentTeam, Octokit.GraphQL.Model.Team.Create); + + /// + /// The name of the new parent team + /// + public string ParentTeamName { get; } + + /// + /// The name of the former parent team + /// + public string ParentTeamNameWas { get; } + + /// + /// The HTTP path for the parent team + /// + public string ParentTeamResourcePath { get; } + + /// + /// The HTTP URL for the parent team + /// + public string ParentTeamUrl { get; } + + /// + /// The former parent team. + /// + public Team ParentTeamWas => this.CreateProperty(x => x.ParentTeamWas, Octokit.GraphQL.Model.Team.Create); + + /// + /// The HTTP path for the previous parent team + /// + public string ParentTeamWasResourcePath { get; } + + /// + /// The HTTP URL for the previous parent team + /// + public string ParentTeamWasUrl { get; } + + /// + /// The team associated with the action + /// + public Team Team => this.CreateProperty(x => x.Team, Octokit.GraphQL.Model.Team.Create); + + /// + /// The name of the team + /// + public string TeamName { get; } + + /// + /// The HTTP path for this team + /// + public string TeamResourcePath { get; } + + /// + /// The HTTP URL for this team + /// + public string TeamUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static TeamChangeParentTeamAuditEntry Create(Expression expression) + { + return new TeamChangeParentTeamAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussion.cs b/Octokit.GraphQL/Model/TeamDiscussion.cs new file mode 100644 index 00000000..1f81ee43 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussion.cs @@ -0,0 +1,216 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A team discussion. + /// + public class TeamDiscussion : QueryableValue + { + internal TeamDiscussion(Expression expression) : base(expression) + { + } + + /// + /// The actor who authored the comment. + /// + public IActor Author => this.CreateProperty(x => x.Author, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + /// + /// Author's association with the discussion's team. + /// + public CommentAuthorAssociation AuthorAssociation { get; } + + /// + /// The body as Markdown. + /// + public string Body { get; } + + /// + /// The body rendered to HTML. + /// + public string BodyHTML { get; } + + /// + /// The body rendered to text. + /// + public string BodyText { get; } + + /// + /// Identifies the discussion body hash. + /// + public string BodyVersion { get; } + + /// + /// A list of comments on this discussion. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// When provided, filters the connection such that results begin with the comment with this number. + /// Order for connection + public TeamDiscussionCommentConnection Comments(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? fromComment = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Comments(first, after, last, before, fromComment, orderBy), Octokit.GraphQL.Model.TeamDiscussionCommentConnection.Create); + + /// + /// The HTTP path for discussion comments + /// + public string CommentsResourcePath { get; } + + /// + /// The HTTP URL for discussion comments + /// + public string CommentsUrl { get; } + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// Check if this comment was created via an email reply. + /// + public bool CreatedViaEmail { get; } + + /// + /// Identifies the primary key from the database. + /// + public int? DatabaseId { get; } + + /// + /// The actor who edited the comment. + /// + public IActor Editor => this.CreateProperty(x => x.Editor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + public ID Id { get; } + + /// + /// Check if this comment was edited and includes an edit with the creation data + /// + public bool IncludesCreatedEdit { get; } + + /// + /// Whether or not the discussion is pinned. + /// + public bool IsPinned { get; } + + /// + /// Whether or not the discussion is only visible to team members and org admins. + /// + public bool IsPrivate { get; } + + /// + /// The moment the editor made the last edit + /// + public DateTimeOffset? LastEditedAt { get; } + + /// + /// Identifies the discussion within its team. + /// + public int Number { get; } + + /// + /// Identifies when the comment was published at. + /// + public DateTimeOffset? PublishedAt { get; } + + /// + /// A list of reactions grouped by content left on the subject. + /// + public IQueryableList ReactionGroups => this.CreateProperty(x => x.ReactionGroups); + + /// + /// A list of Reactions left on the Issue. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Allows filtering Reactions by emoji. + /// Allows specifying the order in which reactions are returned. + public ReactionConnection Reactions(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? content = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Reactions(first, after, last, before, content, orderBy), Octokit.GraphQL.Model.ReactionConnection.Create); + + /// + /// The HTTP path for this discussion + /// + public string ResourcePath { get; } + + /// + /// The team that defines the context of this discussion. + /// + public Team Team => this.CreateProperty(x => x.Team, Octokit.GraphQL.Model.Team.Create); + + /// + /// The title of the discussion + /// + public string Title { get; } + + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + + /// + /// The HTTP URL for this discussion + /// + public string Url { get; } + + /// + /// A list of edits to this content. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public UserContentEditConnection UserContentEdits(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.UserContentEdits(first, after, last, before), Octokit.GraphQL.Model.UserContentEditConnection.Create); + + /// + /// Check if the current viewer can delete this object. + /// + public bool ViewerCanDelete { get; } + + /// + /// Whether or not the current viewer can pin this discussion. + /// + public bool ViewerCanPin { get; } + + /// + /// Can user react to this subject + /// + public bool ViewerCanReact { get; } + + /// + /// Check if the viewer is able to change their subscription status for the repository. + /// + public bool ViewerCanSubscribe { get; } + + /// + /// Check if the current viewer can update this object. + /// + public bool ViewerCanUpdate { get; } + + /// + /// Reasons why the current viewer can not update this comment. + /// + public IEnumerable ViewerCannotUpdateReasons { get; } + + /// + /// Did the viewer author this comment. + /// + public bool ViewerDidAuthor { get; } + + /// + /// Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. + /// + public SubscriptionState? ViewerSubscription { get; } + + internal static TeamDiscussion Create(Expression expression) + { + return new TeamDiscussion(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussionComment.cs b/Octokit.GraphQL/Model/TeamDiscussionComment.cs new file mode 100644 index 00000000..08c4380b --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussionComment.cs @@ -0,0 +1,165 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A comment on a team discussion. + /// + public class TeamDiscussionComment : QueryableValue + { + internal TeamDiscussionComment(Expression expression) : base(expression) + { + } + + /// + /// The actor who authored the comment. + /// + public IActor Author => this.CreateProperty(x => x.Author, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + /// + /// Author's association with the comment's team. + /// + public CommentAuthorAssociation AuthorAssociation { get; } + + /// + /// The body as Markdown. + /// + public string Body { get; } + + /// + /// The body rendered to HTML. + /// + public string BodyHTML { get; } + + /// + /// The body rendered to text. + /// + public string BodyText { get; } + + /// + /// The current version of the body content. + /// + public string BodyVersion { get; } + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + /// + /// Check if this comment was created via an email reply. + /// + public bool CreatedViaEmail { get; } + + /// + /// Identifies the primary key from the database. + /// + public int? DatabaseId { get; } + + /// + /// The discussion this comment is about. + /// + public TeamDiscussion Discussion => this.CreateProperty(x => x.Discussion, Octokit.GraphQL.Model.TeamDiscussion.Create); + + /// + /// The actor who edited the comment. + /// + public IActor Editor => this.CreateProperty(x => x.Editor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + public ID Id { get; } + + /// + /// Check if this comment was edited and includes an edit with the creation data + /// + public bool IncludesCreatedEdit { get; } + + /// + /// The moment the editor made the last edit + /// + public DateTimeOffset? LastEditedAt { get; } + + /// + /// Identifies the comment number. + /// + public int Number { get; } + + /// + /// Identifies when the comment was published at. + /// + public DateTimeOffset? PublishedAt { get; } + + /// + /// A list of reactions grouped by content left on the subject. + /// + public IQueryableList ReactionGroups => this.CreateProperty(x => x.ReactionGroups); + + /// + /// A list of Reactions left on the Issue. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Allows filtering Reactions by emoji. + /// Allows specifying the order in which reactions are returned. + public ReactionConnection Reactions(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? content = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.Reactions(first, after, last, before, content, orderBy), Octokit.GraphQL.Model.ReactionConnection.Create); + + /// + /// The HTTP path for this comment + /// + public string ResourcePath { get; } + + /// + /// Identifies the date and time when the object was last updated. + /// + public DateTimeOffset UpdatedAt { get; } + + /// + /// The HTTP URL for this comment + /// + public string Url { get; } + + /// + /// A list of edits to this content. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + public UserContentEditConnection UserContentEdits(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null) => this.CreateMethodCall(x => x.UserContentEdits(first, after, last, before), Octokit.GraphQL.Model.UserContentEditConnection.Create); + + /// + /// Check if the current viewer can delete this object. + /// + public bool ViewerCanDelete { get; } + + /// + /// Can user react to this subject + /// + public bool ViewerCanReact { get; } + + /// + /// Check if the current viewer can update this object. + /// + public bool ViewerCanUpdate { get; } + + /// + /// Reasons why the current viewer can not update this comment. + /// + public IEnumerable ViewerCannotUpdateReasons { get; } + + /// + /// Did the viewer author this comment. + /// + public bool ViewerDidAuthor { get; } + + internal static TeamDiscussionComment Create(Expression expression) + { + return new TeamDiscussionComment(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussionCommentConnection.cs b/Octokit.GraphQL/Model/TeamDiscussionCommentConnection.cs new file mode 100644 index 00000000..d7b47533 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussionCommentConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for TeamDiscussionComment. + /// + public class TeamDiscussionCommentConnection : QueryableValue, IPagingConnection + { + internal TeamDiscussionCommentConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static TeamDiscussionCommentConnection Create(Expression expression) + { + return new TeamDiscussionCommentConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussionCommentEdge.cs b/Octokit.GraphQL/Model/TeamDiscussionCommentEdge.cs new file mode 100644 index 00000000..7911cf7c --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussionCommentEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class TeamDiscussionCommentEdge : QueryableValue + { + internal TeamDiscussionCommentEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public TeamDiscussionComment Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.TeamDiscussionComment.Create); + + internal static TeamDiscussionCommentEdge Create(Expression expression) + { + return new TeamDiscussionCommentEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussionCommentOrder.cs b/Octokit.GraphQL/Model/TeamDiscussionCommentOrder.cs new file mode 100644 index 00000000..174b0d2c --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussionCommentOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ways in which team discussion comment connections can be ordered. + /// + public class TeamDiscussionCommentOrder + { + /// + /// The field by which to order nodes. + /// + public TeamDiscussionCommentOrderField Field { get; set; } + + /// + /// The direction in which to order nodes. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussionCommentOrderField.cs b/Octokit.GraphQL/Model/TeamDiscussionCommentOrderField.cs new file mode 100644 index 00000000..52e2bf82 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussionCommentOrderField.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which team discussion comment connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TeamDiscussionCommentOrderField + { + /// + /// Allows sequential ordering of team discussion comments (which is equivalent to chronological ordering). + /// + [EnumMember(Value = "NUMBER")] + Number, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussionConnection.cs b/Octokit.GraphQL/Model/TeamDiscussionConnection.cs new file mode 100644 index 00000000..df9cb408 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussionConnection.cs @@ -0,0 +1,45 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// The connection type for TeamDiscussion. + /// + public class TeamDiscussionConnection : QueryableValue, IPagingConnection + { + internal TeamDiscussionConnection(Expression expression) : base(expression) + { + } + + /// + /// A list of edges. + /// + public IQueryableList Edges => this.CreateProperty(x => x.Edges); + + /// + /// A list of nodes. + /// + public IQueryableList Nodes => this.CreateProperty(x => x.Nodes); + + /// + /// Information to aid in pagination. + /// + public PageInfo PageInfo => this.CreateProperty(x => x.PageInfo, Octokit.GraphQL.Model.PageInfo.Create); + + /// + /// Identifies the total count of items in the connection. + /// + public int TotalCount { get; } + + IPageInfo IPagingConnection.PageInfo => PageInfo; + + internal static TeamDiscussionConnection Create(Expression expression) + { + return new TeamDiscussionConnection(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussionEdge.cs b/Octokit.GraphQL/Model/TeamDiscussionEdge.cs new file mode 100644 index 00000000..819e11ec --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussionEdge.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// An edge in a connection. + /// + public class TeamDiscussionEdge : QueryableValue + { + internal TeamDiscussionEdge(Expression expression) : base(expression) + { + } + + /// + /// A cursor for use in pagination. + /// + public string Cursor { get; } + + /// + /// The item at the end of the edge. + /// + public TeamDiscussion Node => this.CreateProperty(x => x.Node, Octokit.GraphQL.Model.TeamDiscussion.Create); + + internal static TeamDiscussionEdge Create(Expression expression) + { + return new TeamDiscussionEdge(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussionOrder.cs b/Octokit.GraphQL/Model/TeamDiscussionOrder.cs new file mode 100644 index 00000000..93c4de8f --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussionOrder.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Ways in which team discussion connections can be ordered. + /// + public class TeamDiscussionOrder + { + /// + /// The field by which to order nodes. + /// + public TeamDiscussionOrderField Field { get; set; } + + /// + /// The direction in which to order nodes. + /// + public OrderDirection Direction { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamDiscussionOrderField.cs b/Octokit.GraphQL/Model/TeamDiscussionOrderField.cs new file mode 100644 index 00000000..85528439 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamDiscussionOrderField.cs @@ -0,0 +1,20 @@ +using System; +using System.Runtime.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; + +namespace Octokit.GraphQL.Model +{ + /// + /// Properties by which team discussion connections can be ordered. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum TeamDiscussionOrderField + { + /// + /// Allows chronological ordering of team discussions. + /// + [EnumMember(Value = "CREATED_AT")] + CreatedAt, + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamRemoveMemberAuditEntry.cs b/Octokit.GraphQL/Model/TeamRemoveMemberAuditEntry.cs new file mode 100644 index 00000000..b0314e27 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamRemoveMemberAuditEntry.cs @@ -0,0 +1,135 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a team.remove_member event. + /// + public class TeamRemoveMemberAuditEntry : QueryableValue + { + internal TeamRemoveMemberAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// Whether the team was mapped to an LDAP Group. + /// + public bool? IsLdapMapped { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The team associated with the action + /// + public Team Team => this.CreateProperty(x => x.Team, Octokit.GraphQL.Model.Team.Create); + + /// + /// The name of the team + /// + public string TeamName { get; } + + /// + /// The HTTP path for this team + /// + public string TeamResourcePath { get; } + + /// + /// The HTTP URL for this team + /// + public string TeamUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static TeamRemoveMemberAuditEntry Create(Expression expression) + { + return new TeamRemoveMemberAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TeamRemoveRepositoryAuditEntry.cs b/Octokit.GraphQL/Model/TeamRemoveRepositoryAuditEntry.cs new file mode 100644 index 00000000..62b9dc94 --- /dev/null +++ b/Octokit.GraphQL/Model/TeamRemoveRepositoryAuditEntry.cs @@ -0,0 +1,155 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Audit log entry for a team.remove_repository event. + /// + public class TeamRemoveRepositoryAuditEntry : QueryableValue + { + internal TeamRemoveRepositoryAuditEntry(Expression expression) : base(expression) + { + } + + /// + /// The action name + /// + public string Action { get; } + + /// + /// The user who initiated the action + /// + public AuditEntryActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.AuditEntryActor.Create); + + /// + /// The IP address of the actor + /// + public string ActorIp { get; } + + /// + /// A readable representation of the actor's location + /// + public ActorLocation ActorLocation => this.CreateProperty(x => x.ActorLocation, Octokit.GraphQL.Model.ActorLocation.Create); + + /// + /// The username of the user who initiated the action + /// + public string ActorLogin { get; } + + /// + /// The HTTP path for the actor. + /// + public string ActorResourcePath { get; } + + /// + /// The HTTP URL for the actor. + /// + public string ActorUrl { get; } + + /// + /// The time the action was initiated + /// + public string CreatedAt { get; } + + public ID Id { get; } + + /// + /// Whether the team was mapped to an LDAP Group. + /// + public bool? IsLdapMapped { get; } + + /// + /// The corresponding operation type for the action + /// + public OperationType? OperationType { get; } + + /// + /// The Organization associated with the Audit Entry. + /// + public Organization Organization => this.CreateProperty(x => x.Organization, Octokit.GraphQL.Model.Organization.Create); + + /// + /// The name of the Organization. + /// + public string OrganizationName { get; } + + /// + /// The HTTP path for the organization + /// + public string OrganizationResourcePath { get; } + + /// + /// The HTTP URL for the organization + /// + public string OrganizationUrl { get; } + + /// + /// The repository associated with the action + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + /// + /// The name of the repository + /// + public string RepositoryName { get; } + + /// + /// The HTTP path for the repository + /// + public string RepositoryResourcePath { get; } + + /// + /// The HTTP URL for the repository + /// + public string RepositoryUrl { get; } + + /// + /// The team associated with the action + /// + public Team Team => this.CreateProperty(x => x.Team, Octokit.GraphQL.Model.Team.Create); + + /// + /// The name of the team + /// + public string TeamName { get; } + + /// + /// The HTTP path for this team + /// + public string TeamResourcePath { get; } + + /// + /// The HTTP URL for this team + /// + public string TeamUrl { get; } + + /// + /// The user affected by the action + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + /// + /// For actions involving two users, the actor is the initiator and the user is the affected user. + /// + public string UserLogin { get; } + + /// + /// The HTTP path for the user. + /// + public string UserResourcePath { get; } + + /// + /// The HTTP URL for the user. + /// + public string UserUrl { get; } + + internal static TeamRemoveRepositoryAuditEntry Create(Expression expression) + { + return new TeamRemoveRepositoryAuditEntry(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/TopicAuditEntryData.cs b/Octokit.GraphQL/Model/TopicAuditEntryData.cs new file mode 100644 index 00000000..278c33eb --- /dev/null +++ b/Octokit.GraphQL/Model/TopicAuditEntryData.cs @@ -0,0 +1,51 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Linq.Expressions; + using Octokit.GraphQL.Model; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Metadata for an audit entry with a topic. + /// + public interface ITopicAuditEntryData : IQueryableValue, IQueryableInterface + { + /// + /// The name of the topic added to the repository + /// + Topic Topic { get; } + + /// + /// The name of the topic added to the repository + /// + string TopicName { get; } + } +} + +namespace Octokit.GraphQL.Model.Internal +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + internal class StubITopicAuditEntryData : QueryableValue, ITopicAuditEntryData + { + internal StubITopicAuditEntryData(Expression expression) : base(expression) + { + } + + public Topic Topic => this.CreateProperty(x => x.Topic, Octokit.GraphQL.Model.Topic.Create); + + public string TopicName { get; } + + internal static StubITopicAuditEntryData Create(Expression expression) + { + return new StubITopicAuditEntryData(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/MinimizeCommentInput.cs b/Octokit.GraphQL/Model/TransferIssueInput.cs similarity index 57% rename from Octokit.GraphQL/Model/MinimizeCommentInput.cs rename to Octokit.GraphQL/Model/TransferIssueInput.cs index b04eb83a..a1acdd98 100644 --- a/Octokit.GraphQL/Model/MinimizeCommentInput.cs +++ b/Octokit.GraphQL/Model/TransferIssueInput.cs @@ -4,19 +4,19 @@ namespace Octokit.GraphQL.Model using System.Collections.Generic; /// - /// Autogenerated input type of MinimizeComment + /// Autogenerated input type of TransferIssue /// - public class MinimizeCommentInput + public class TransferIssueInput { /// - /// The Node ID of the subject to modify. + /// The Node ID of the issue to be transferred /// - public ID SubjectId { get; set; } + public ID IssueId { get; set; } /// - /// The classification of comment + /// The Node ID of the repository the issue should be transferred to /// - public ReportedContentClassifiers Classifier { get; set; } + public ID RepositoryId { get; set; } /// /// A unique identifier for the client performing the mutation. diff --git a/Octokit.GraphQL/Model/TransferIssuePayload.cs b/Octokit.GraphQL/Model/TransferIssuePayload.cs new file mode 100644 index 00000000..5e49f1dc --- /dev/null +++ b/Octokit.GraphQL/Model/TransferIssuePayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of TransferIssue + /// + public class TransferIssuePayload : QueryableValue + { + internal TransferIssuePayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The issue that was transferred + /// + public Issue Issue => this.CreateProperty(x => x.Issue, Octokit.GraphQL.Model.Issue.Create); + + internal static TransferIssuePayload Create(Expression expression) + { + return new TransferIssuePayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UnarchiveRepositoryInput.cs b/Octokit.GraphQL/Model/UnarchiveRepositoryInput.cs new file mode 100644 index 00000000..a4d728f3 --- /dev/null +++ b/Octokit.GraphQL/Model/UnarchiveRepositoryInput.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UnarchiveRepository + /// + public class UnarchiveRepositoryInput + { + /// + /// The ID of the repository to unarchive. + /// + public ID RepositoryId { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UnarchiveRepositoryPayload.cs b/Octokit.GraphQL/Model/UnarchiveRepositoryPayload.cs new file mode 100644 index 00000000..7a26f81b --- /dev/null +++ b/Octokit.GraphQL/Model/UnarchiveRepositoryPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UnarchiveRepository + /// + public class UnarchiveRepositoryPayload : QueryableValue + { + internal UnarchiveRepositoryPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The repository that was unarchived. + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + internal static UnarchiveRepositoryPayload Create(Expression expression) + { + return new UnarchiveRepositoryPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UnassignedEvent.cs b/Octokit.GraphQL/Model/UnassignedEvent.cs index 6965b073..6dc99561 100644 --- a/Octokit.GraphQL/Model/UnassignedEvent.cs +++ b/Octokit.GraphQL/Model/UnassignedEvent.cs @@ -25,6 +25,11 @@ internal UnassignedEvent(Expression expression) : base(expression) /// public IAssignable Assignable => this.CreateProperty(x => x.Assignable, Octokit.GraphQL.Model.Internal.StubIAssignable.Create); + /// + /// Identifies the user or mannequin that was unassigned. + /// + public Assignee Assignee => this.CreateProperty(x => x.Assignee, Octokit.GraphQL.Model.Assignee.Create); + /// /// Identifies the date and time when the object was created. /// @@ -35,6 +40,7 @@ internal UnassignedEvent(Expression expression) : base(expression) /// /// Identifies the subject (user) who was unassigned. /// + [Obsolete(@"Assignees can now be mannequins. Use the `assignee` field instead. Removal on 2020-01-01 UTC.")] public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); internal static UnassignedEvent Create(Expression expression) diff --git a/Octokit.GraphQL/Model/UnfollowUserInput.cs b/Octokit.GraphQL/Model/UnfollowUserInput.cs new file mode 100644 index 00000000..5c78d845 --- /dev/null +++ b/Octokit.GraphQL/Model/UnfollowUserInput.cs @@ -0,0 +1,21 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UnfollowUser + /// + public class UnfollowUserInput + { + /// + /// ID of the user to unfollow. + /// + public ID UserId { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UnfollowUserPayload.cs b/Octokit.GraphQL/Model/UnfollowUserPayload.cs new file mode 100644 index 00000000..f1ecdc62 --- /dev/null +++ b/Octokit.GraphQL/Model/UnfollowUserPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UnfollowUser + /// + public class UnfollowUserPayload : QueryableValue + { + internal UnfollowUserPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The user that was unfollowed. + /// + public User User => this.CreateProperty(x => x.User, Octokit.GraphQL.Model.User.Create); + + internal static UnfollowUserPayload Create(Expression expression) + { + return new UnfollowUserPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UnlinkRepositoryFromProjectInput.cs b/Octokit.GraphQL/Model/UnlinkRepositoryFromProjectInput.cs new file mode 100644 index 00000000..315a3d9f --- /dev/null +++ b/Octokit.GraphQL/Model/UnlinkRepositoryFromProjectInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UnlinkRepositoryFromProject + /// + public class UnlinkRepositoryFromProjectInput + { + /// + /// The ID of the Project linked to the Repository. + /// + public ID ProjectId { get; set; } + + /// + /// The ID of the Repository linked to the Project. + /// + public ID RepositoryId { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UnlinkRepositoryFromProjectPayload.cs b/Octokit.GraphQL/Model/UnlinkRepositoryFromProjectPayload.cs new file mode 100644 index 00000000..f4f0f00d --- /dev/null +++ b/Octokit.GraphQL/Model/UnlinkRepositoryFromProjectPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UnlinkRepositoryFromProject + /// + public class UnlinkRepositoryFromProjectPayload : QueryableValue + { + internal UnlinkRepositoryFromProjectPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The linked Project. + /// + public Project Project => this.CreateProperty(x => x.Project, Octokit.GraphQL.Model.Project.Create); + + /// + /// The linked Repository. + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + internal static UnlinkRepositoryFromProjectPayload Create(Expression expression) + { + return new UnlinkRepositoryFromProjectPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UnlockLockablePayload.cs b/Octokit.GraphQL/Model/UnlockLockablePayload.cs index f6db7f91..66963124 100644 --- a/Octokit.GraphQL/Model/UnlockLockablePayload.cs +++ b/Octokit.GraphQL/Model/UnlockLockablePayload.cs @@ -15,6 +15,11 @@ internal UnlockLockablePayload(Expression expression) : base(expression) { } + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + /// /// A unique identifier for the client performing the mutation. /// diff --git a/Octokit.GraphQL/Model/UnmarkedAsDuplicateEvent.cs b/Octokit.GraphQL/Model/UnmarkedAsDuplicateEvent.cs new file mode 100644 index 00000000..5a0a2346 --- /dev/null +++ b/Octokit.GraphQL/Model/UnmarkedAsDuplicateEvent.cs @@ -0,0 +1,35 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Represents an 'unmarked_as_duplicate' event on a given issue or pull request. + /// + public class UnmarkedAsDuplicateEvent : QueryableValue + { + internal UnmarkedAsDuplicateEvent(Expression expression) : base(expression) + { + } + + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + + /// + /// Identifies the date and time when the object was created. + /// + public DateTimeOffset CreatedAt { get; } + + public ID Id { get; } + + internal static UnmarkedAsDuplicateEvent Create(Expression expression) + { + return new UnmarkedAsDuplicateEvent(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateBranchProtectionRuleInput.cs b/Octokit.GraphQL/Model/UpdateBranchProtectionRuleInput.cs index ab2e5f77..abafd432 100644 --- a/Octokit.GraphQL/Model/UpdateBranchProtectionRuleInput.cs +++ b/Octokit.GraphQL/Model/UpdateBranchProtectionRuleInput.cs @@ -74,7 +74,7 @@ public class UpdateBranchProtectionRuleInput public bool? RestrictsPushes { get; set; } /// - /// A list of User or Team IDs allowed to push to matching branches. + /// A list of User, Team or App IDs allowed to push to matching branches. /// public IEnumerable PushActorIds { get; set; } diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseActionExecutionCapabilitySettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseActionExecutionCapabilitySettingInput.cs new file mode 100644 index 00000000..9ed4ddb7 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseActionExecutionCapabilitySettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseActionExecutionCapabilitySetting + /// + public class UpdateEnterpriseActionExecutionCapabilitySettingInput + { + /// + /// The ID of the enterprise on which to set the members can create repositories setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the action execution capability setting on the enterprise. + /// + public ActionExecutionCapabilitySetting Capability { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseActionExecutionCapabilitySettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseActionExecutionCapabilitySettingPayload.cs new file mode 100644 index 00000000..0e67b629 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseActionExecutionCapabilitySettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseActionExecutionCapabilitySetting + /// + public class UpdateEnterpriseActionExecutionCapabilitySettingPayload : QueryableValue + { + internal UpdateEnterpriseActionExecutionCapabilitySettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated action execution capability setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the action execution capability setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseActionExecutionCapabilitySettingPayload Create(Expression expression) + { + return new UpdateEnterpriseActionExecutionCapabilitySettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseAdministratorRoleInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseAdministratorRoleInput.cs new file mode 100644 index 00000000..7e54a769 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseAdministratorRoleInput.cs @@ -0,0 +1,31 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseAdministratorRole + /// + public class UpdateEnterpriseAdministratorRoleInput + { + /// + /// The ID of the Enterprise which the admin belongs to. + /// + public ID EnterpriseId { get; set; } + + /// + /// The login of a administrator whose role is being changed. + /// + public string Login { get; set; } + + /// + /// The new role for the Enterprise administrator. + /// + public EnterpriseAdministratorRole Role { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseAdministratorRolePayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseAdministratorRolePayload.cs new file mode 100644 index 00000000..e82ea226 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseAdministratorRolePayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseAdministratorRole + /// + public class UpdateEnterpriseAdministratorRolePayload : QueryableValue + { + internal UpdateEnterpriseAdministratorRolePayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// A message confirming the result of changing the administrator's role. + /// + public string Message { get; } + + internal static UpdateEnterpriseAdministratorRolePayload Create(Expression expression) + { + return new UpdateEnterpriseAdministratorRolePayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput.cs new file mode 100644 index 00000000..6c7a865d --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseAllowPrivateRepositoryForkingSetting + /// + public class UpdateEnterpriseAllowPrivateRepositoryForkingSettingInput + { + /// + /// The ID of the enterprise on which to set the allow private repository forking setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the allow private repository forking setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload.cs new file mode 100644 index 00000000..6c50fae8 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseAllowPrivateRepositoryForkingSetting + /// + public class UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload : QueryableValue + { + internal UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated allow private repository forking setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the allow private repository forking setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseDefaultRepositoryPermissionSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseDefaultRepositoryPermissionSettingInput.cs new file mode 100644 index 00000000..092e5e02 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseDefaultRepositoryPermissionSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseDefaultRepositoryPermissionSetting + /// + public class UpdateEnterpriseDefaultRepositoryPermissionSettingInput + { + /// + /// The ID of the enterprise on which to set the default repository permission setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the default repository permission setting on the enterprise. + /// + public EnterpriseDefaultRepositoryPermissionSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseDefaultRepositoryPermissionSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseDefaultRepositoryPermissionSettingPayload.cs new file mode 100644 index 00000000..0d3feb37 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseDefaultRepositoryPermissionSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseDefaultRepositoryPermissionSetting + /// + public class UpdateEnterpriseDefaultRepositoryPermissionSettingPayload : QueryableValue + { + internal UpdateEnterpriseDefaultRepositoryPermissionSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated default repository permission setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the default repository permission setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseDefaultRepositoryPermissionSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseDefaultRepositoryPermissionSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput.cs new file mode 100644 index 00000000..b2e6602c --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting + /// + public class UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingInput + { + /// + /// The ID of the enterprise on which to set the members can change repository visibility setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the members can change repository visibility setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload.cs new file mode 100644 index 00000000..1075acd9 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting + /// + public class UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload : QueryableValue + { + internal UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated members can change repository visibility setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the members can change repository visibility setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload Create(Expression expression) + { + return new UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanCreateRepositoriesSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanCreateRepositoriesSettingInput.cs new file mode 100644 index 00000000..429014ae --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanCreateRepositoriesSettingInput.cs @@ -0,0 +1,46 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseMembersCanCreateRepositoriesSetting + /// + public class UpdateEnterpriseMembersCanCreateRepositoriesSettingInput + { + /// + /// The ID of the enterprise on which to set the members can create repositories setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// Value for the members can create repositories setting on the enterprise. This or the granular public/private/internal allowed fields (but not both) must be provided. + /// + public EnterpriseMembersCanCreateRepositoriesSettingValue? SettingValue { get; set; } + + /// + /// When false, allow member organizations to set their own repository creation member privileges. + /// + public bool? MembersCanCreateRepositoriesPolicyEnabled { get; set; } + + /// + /// Allow members to create public repositories. Defaults to current value. + /// + public bool? MembersCanCreatePublicRepositories { get; set; } + + /// + /// Allow members to create private repositories. Defaults to current value. + /// + public bool? MembersCanCreatePrivateRepositories { get; set; } + + /// + /// Allow members to create internal repositories. Defaults to current value. + /// + public bool? MembersCanCreateInternalRepositories { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload.cs new file mode 100644 index 00000000..bd8dcd15 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseMembersCanCreateRepositoriesSetting + /// + public class UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload : QueryableValue + { + internal UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated members can create repositories setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the members can create repositories setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteIssuesSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteIssuesSettingInput.cs new file mode 100644 index 00000000..a27792f6 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteIssuesSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseMembersCanDeleteIssuesSetting + /// + public class UpdateEnterpriseMembersCanDeleteIssuesSettingInput + { + /// + /// The ID of the enterprise on which to set the members can delete issues setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the members can delete issues setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteIssuesSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteIssuesSettingPayload.cs new file mode 100644 index 00000000..fb4e5f6e --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteIssuesSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseMembersCanDeleteIssuesSetting + /// + public class UpdateEnterpriseMembersCanDeleteIssuesSettingPayload : QueryableValue + { + internal UpdateEnterpriseMembersCanDeleteIssuesSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated members can delete issues setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the members can delete issues setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseMembersCanDeleteIssuesSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseMembersCanDeleteIssuesSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput.cs new file mode 100644 index 00000000..e820ee9e --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseMembersCanDeleteRepositoriesSetting + /// + public class UpdateEnterpriseMembersCanDeleteRepositoriesSettingInput + { + /// + /// The ID of the enterprise on which to set the members can delete repositories setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the members can delete repositories setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload.cs new file mode 100644 index 00000000..184d599f --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseMembersCanDeleteRepositoriesSetting + /// + public class UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload : QueryableValue + { + internal UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated members can delete repositories setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the members can delete repositories setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput.cs new file mode 100644 index 00000000..9cd46159 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseMembersCanInviteCollaboratorsSetting + /// + public class UpdateEnterpriseMembersCanInviteCollaboratorsSettingInput + { + /// + /// The ID of the enterprise on which to set the members can invite collaborators setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the members can invite collaborators setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload.cs new file mode 100644 index 00000000..be9ebf0b --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseMembersCanInviteCollaboratorsSetting + /// + public class UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload : QueryableValue + { + internal UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated members can invite collaborators setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the members can invite collaborators setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanMakePurchasesSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanMakePurchasesSettingInput.cs new file mode 100644 index 00000000..f7ba9c2e --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanMakePurchasesSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseMembersCanMakePurchasesSetting + /// + public class UpdateEnterpriseMembersCanMakePurchasesSettingInput + { + /// + /// The ID of the enterprise on which to set the members can make purchases setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the members can make purchases setting on the enterprise. + /// + public EnterpriseMembersCanMakePurchasesSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanMakePurchasesSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanMakePurchasesSettingPayload.cs new file mode 100644 index 00000000..25a43b6d --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanMakePurchasesSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseMembersCanMakePurchasesSetting + /// + public class UpdateEnterpriseMembersCanMakePurchasesSettingPayload : QueryableValue + { + internal UpdateEnterpriseMembersCanMakePurchasesSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated members can make purchases setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the members can make purchases setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseMembersCanMakePurchasesSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseMembersCanMakePurchasesSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput.cs new file mode 100644 index 00000000..b0ec943b --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting + /// + public class UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingInput + { + /// + /// The ID of the enterprise on which to set the members can update protected branches setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the members can update protected branches setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload.cs new file mode 100644 index 00000000..c3158612 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting + /// + public class UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload : QueryableValue + { + internal UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated members can update protected branches setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the members can update protected branches setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput.cs new file mode 100644 index 00000000..ecc74aa4 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseMembersCanViewDependencyInsightsSetting + /// + public class UpdateEnterpriseMembersCanViewDependencyInsightsSettingInput + { + /// + /// The ID of the enterprise on which to set the members can view dependency insights setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the members can view dependency insights setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload.cs new file mode 100644 index 00000000..bf413708 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseMembersCanViewDependencyInsightsSetting + /// + public class UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload : QueryableValue + { + internal UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated members can view dependency insights setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the members can view dependency insights setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseOrganizationProjectsSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseOrganizationProjectsSettingInput.cs new file mode 100644 index 00000000..1d259945 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseOrganizationProjectsSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseOrganizationProjectsSetting + /// + public class UpdateEnterpriseOrganizationProjectsSettingInput + { + /// + /// The ID of the enterprise on which to set the organization projects setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the organization projects setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseOrganizationProjectsSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseOrganizationProjectsSettingPayload.cs new file mode 100644 index 00000000..15e31c22 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseOrganizationProjectsSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseOrganizationProjectsSetting + /// + public class UpdateEnterpriseOrganizationProjectsSettingPayload : QueryableValue + { + internal UpdateEnterpriseOrganizationProjectsSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated organization projects setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the organization projects setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseOrganizationProjectsSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseOrganizationProjectsSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/ImportProjectInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseProfileInput.cs similarity index 51% rename from Octokit.GraphQL/Model/ImportProjectInput.cs rename to Octokit.GraphQL/Model/UpdateEnterpriseProfileInput.cs index b01d379f..ca2556ec 100644 --- a/Octokit.GraphQL/Model/ImportProjectInput.cs +++ b/Octokit.GraphQL/Model/UpdateEnterpriseProfileInput.cs @@ -4,34 +4,34 @@ namespace Octokit.GraphQL.Model using System.Collections.Generic; /// - /// Autogenerated input type of ImportProject + /// Autogenerated input type of UpdateEnterpriseProfile /// - public class ImportProjectInput + public class UpdateEnterpriseProfileInput { /// - /// The name of the Organization or User to create the Project under. + /// The Enterprise ID to update. /// - public string OwnerName { get; set; } + public ID EnterpriseId { get; set; } /// - /// The name of Project. + /// The name of the enterprise. /// public string Name { get; set; } /// - /// The description of Project. + /// The description of the enterprise. /// - public string Body { get; set; } + public string Description { get; set; } /// - /// Whether the Project is public or not. + /// The URL of the enterprise's website. /// - public bool? Public { get; set; } + public string WebsiteUrl { get; set; } /// - /// A list of columns containing issues and pull requests. + /// The location of the enterprise. /// - public IEnumerable ColumnImports { get; set; } + public string Location { get; set; } /// /// A unique identifier for the client performing the mutation. diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseProfilePayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseProfilePayload.cs new file mode 100644 index 00000000..0b3645ed --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseProfilePayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseProfile + /// + public class UpdateEnterpriseProfilePayload : QueryableValue + { + internal UpdateEnterpriseProfilePayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The updated enterprise. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + internal static UpdateEnterpriseProfilePayload Create(Expression expression) + { + return new UpdateEnterpriseProfilePayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseRepositoryProjectsSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseRepositoryProjectsSettingInput.cs new file mode 100644 index 00000000..bfb35332 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseRepositoryProjectsSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseRepositoryProjectsSetting + /// + public class UpdateEnterpriseRepositoryProjectsSettingInput + { + /// + /// The ID of the enterprise on which to set the repository projects setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the repository projects setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseRepositoryProjectsSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseRepositoryProjectsSettingPayload.cs new file mode 100644 index 00000000..65638f91 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseRepositoryProjectsSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseRepositoryProjectsSetting + /// + public class UpdateEnterpriseRepositoryProjectsSettingPayload : QueryableValue + { + internal UpdateEnterpriseRepositoryProjectsSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated repository projects setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the repository projects setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseRepositoryProjectsSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseRepositoryProjectsSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseTeamDiscussionsSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseTeamDiscussionsSettingInput.cs new file mode 100644 index 00000000..6ad0c69b --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseTeamDiscussionsSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseTeamDiscussionsSetting + /// + public class UpdateEnterpriseTeamDiscussionsSettingInput + { + /// + /// The ID of the enterprise on which to set the team discussions setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the team discussions setting on the enterprise. + /// + public EnterpriseEnabledDisabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseTeamDiscussionsSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseTeamDiscussionsSettingPayload.cs new file mode 100644 index 00000000..1ede8f12 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseTeamDiscussionsSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseTeamDiscussionsSetting + /// + public class UpdateEnterpriseTeamDiscussionsSettingPayload : QueryableValue + { + internal UpdateEnterpriseTeamDiscussionsSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated team discussions setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the team discussions setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseTeamDiscussionsSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseTeamDiscussionsSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput.cs b/Octokit.GraphQL/Model/UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput.cs new file mode 100644 index 00000000..3a1b2c86 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput.cs @@ -0,0 +1,26 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateEnterpriseTwoFactorAuthenticationRequiredSetting + /// + public class UpdateEnterpriseTwoFactorAuthenticationRequiredSettingInput + { + /// + /// The ID of the enterprise on which to set the two factor authentication required setting. + /// + public ID EnterpriseId { get; set; } + + /// + /// The value for the two factor authentication required setting on the enterprise. + /// + public EnterpriseEnabledSettingValue SettingValue { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload.cs b/Octokit.GraphQL/Model/UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload.cs new file mode 100644 index 00000000..2c336e91 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateEnterpriseTwoFactorAuthenticationRequiredSetting + /// + public class UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload : QueryableValue + { + internal UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The enterprise with the updated two factor authentication required setting. + /// + public Enterprise Enterprise => this.CreateProperty(x => x.Enterprise, Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// A message confirming the result of updating the two factor authentication required setting. + /// + public string Message { get; } + + internal static UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload Create(Expression expression) + { + return new UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateIssuePayload.cs b/Octokit.GraphQL/Model/UpdateIssuePayload.cs index e06233ca..fdad2f23 100644 --- a/Octokit.GraphQL/Model/UpdateIssuePayload.cs +++ b/Octokit.GraphQL/Model/UpdateIssuePayload.cs @@ -15,6 +15,11 @@ internal UpdateIssuePayload(Expression expression) : base(expression) { } + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + /// /// A unique identifier for the client performing the mutation. /// diff --git a/Octokit.GraphQL/Model/UpdatePullRequestInput.cs b/Octokit.GraphQL/Model/UpdatePullRequestInput.cs index 3a20d83f..51d348fb 100644 --- a/Octokit.GraphQL/Model/UpdatePullRequestInput.cs +++ b/Octokit.GraphQL/Model/UpdatePullRequestInput.cs @@ -29,11 +29,36 @@ public class UpdatePullRequestInput /// public string Body { get; set; } + /// + /// The target state of the pull request. + /// + public PullRequestUpdateState? State { get; set; } + /// /// Indicates whether maintainers can modify the pull request. /// public bool? MaintainerCanModify { get; set; } + /// + /// An array of Node IDs of users for this pull request. + /// + public IEnumerable AssigneeIds { get; set; } + + /// + /// The Node ID of the milestone for this pull request. + /// + public ID? MilestoneId { get; set; } + + /// + /// An array of Node IDs of labels for this pull request. + /// + public IEnumerable LabelIds { get; set; } + + /// + /// An array of Node IDs for projects associated with this pull request. + /// + public IEnumerable ProjectIds { get; set; } + /// /// A unique identifier for the client performing the mutation. /// diff --git a/Octokit.GraphQL/Model/UpdatePullRequestPayload.cs b/Octokit.GraphQL/Model/UpdatePullRequestPayload.cs index 4c7af48d..8ac50fcf 100644 --- a/Octokit.GraphQL/Model/UpdatePullRequestPayload.cs +++ b/Octokit.GraphQL/Model/UpdatePullRequestPayload.cs @@ -15,6 +15,11 @@ internal UpdatePullRequestPayload(Expression expression) : base(expression) { } + /// + /// Identifies the actor who performed the event. + /// + public IActor Actor => this.CreateProperty(x => x.Actor, Octokit.GraphQL.Model.Internal.StubIActor.Create); + /// /// A unique identifier for the client performing the mutation. /// diff --git a/Octokit.GraphQL/Model/UpdateRefInput.cs b/Octokit.GraphQL/Model/UpdateRefInput.cs new file mode 100644 index 00000000..cc1f4329 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateRefInput.cs @@ -0,0 +1,31 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateRef + /// + public class UpdateRefInput + { + /// + /// The Node ID of the Ref to be updated. + /// + public ID RefId { get; set; } + + /// + /// The GitObjectID that the Ref shall be updated to target. + /// + public string Oid { get; set; } + + /// + /// Permit updates of branch Refs that are not fast-forwards? + /// + public bool? Force { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateRefPayload.cs b/Octokit.GraphQL/Model/UpdateRefPayload.cs new file mode 100644 index 00000000..ee87460a --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateRefPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateRef + /// + public class UpdateRefPayload : QueryableValue + { + internal UpdateRefPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The updated Ref. + /// + public Ref Ref => this.CreateProperty(x => x.Ref, Octokit.GraphQL.Model.Ref.Create); + + internal static UpdateRefPayload Create(Expression expression) + { + return new UpdateRefPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateRepositoryInput.cs b/Octokit.GraphQL/Model/UpdateRepositoryInput.cs new file mode 100644 index 00000000..9a2d9d37 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateRepositoryInput.cs @@ -0,0 +1,56 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateRepository + /// + public class UpdateRepositoryInput + { + /// + /// The ID of the repository to update. + /// + public ID RepositoryId { get; set; } + + /// + /// The new name of the repository. + /// + public string Name { get; set; } + + /// + /// A new description for the repository. Pass an empty string to erase the existing description. + /// + public string Description { get; set; } + + /// + /// Whether this repository should be marked as a template such that anyone who can access it can create new repositories with the same files and directory structure. + /// + public bool? Template { get; set; } + + /// + /// The URL for a web page about this repository. Pass an empty string to erase the existing URL. + /// + public string HomepageUrl { get; set; } + + /// + /// Indicates if the repository should have the wiki feature enabled. + /// + public bool? HasWikiEnabled { get; set; } + + /// + /// Indicates if the repository should have the issues feature enabled. + /// + public bool? HasIssuesEnabled { get; set; } + + /// + /// Indicates if the repository should have the project boards feature enabled. + /// + public bool? HasProjectsEnabled { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateRepositoryPayload.cs b/Octokit.GraphQL/Model/UpdateRepositoryPayload.cs new file mode 100644 index 00000000..e44c78a4 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateRepositoryPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateRepository + /// + public class UpdateRepositoryPayload : QueryableValue + { + internal UpdateRepositoryPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The updated repository. + /// + public Repository Repository => this.CreateProperty(x => x.Repository, Octokit.GraphQL.Model.Repository.Create); + + internal static UpdateRepositoryPayload Create(Expression expression) + { + return new UpdateRepositoryPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/CreateContentAttachmentInput.cs b/Octokit.GraphQL/Model/UpdateTeamDiscussionCommentInput.cs similarity index 56% rename from Octokit.GraphQL/Model/CreateContentAttachmentInput.cs rename to Octokit.GraphQL/Model/UpdateTeamDiscussionCommentInput.cs index 43cb7697..543edc85 100644 --- a/Octokit.GraphQL/Model/CreateContentAttachmentInput.cs +++ b/Octokit.GraphQL/Model/UpdateTeamDiscussionCommentInput.cs @@ -4,24 +4,24 @@ namespace Octokit.GraphQL.Model using System.Collections.Generic; /// - /// Autogenerated input type of CreateContentAttachment + /// Autogenerated input type of UpdateTeamDiscussionComment /// - public class CreateContentAttachmentInput + public class UpdateTeamDiscussionCommentInput { /// - /// The node ID of the content_reference. + /// The ID of the comment to modify. /// - public ID ContentReferenceId { get; set; } + public ID Id { get; set; } /// - /// The title of the content attachment. + /// The updated text of the comment. /// - public string Title { get; set; } + public string Body { get; set; } /// - /// The body of the content attachment, which may contain markdown. + /// The current version of the body content. /// - public string Body { get; set; } + public string BodyVersion { get; set; } /// /// A unique identifier for the client performing the mutation. diff --git a/Octokit.GraphQL/Model/UpdateTeamDiscussionCommentPayload.cs b/Octokit.GraphQL/Model/UpdateTeamDiscussionCommentPayload.cs new file mode 100644 index 00000000..abecc00b --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateTeamDiscussionCommentPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateTeamDiscussionComment + /// + public class UpdateTeamDiscussionCommentPayload : QueryableValue + { + internal UpdateTeamDiscussionCommentPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The updated comment. + /// + public TeamDiscussionComment TeamDiscussionComment => this.CreateProperty(x => x.TeamDiscussionComment, Octokit.GraphQL.Model.TeamDiscussionComment.Create); + + internal static UpdateTeamDiscussionCommentPayload Create(Expression expression) + { + return new UpdateTeamDiscussionCommentPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateTeamDiscussionInput.cs b/Octokit.GraphQL/Model/UpdateTeamDiscussionInput.cs new file mode 100644 index 00000000..04f1d4d2 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateTeamDiscussionInput.cs @@ -0,0 +1,41 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + + /// + /// Autogenerated input type of UpdateTeamDiscussion + /// + public class UpdateTeamDiscussionInput + { + /// + /// The Node ID of the discussion to modify. + /// + public ID Id { get; set; } + + /// + /// The updated title of the discussion. + /// + public string Title { get; set; } + + /// + /// The updated text of the discussion. + /// + public string Body { get; set; } + + /// + /// The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server. + /// + public string BodyVersion { get; set; } + + /// + /// If provided, sets the pinned state of the updated discussion. + /// + public bool? Pinned { get; set; } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; set; } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/UpdateTeamDiscussionPayload.cs b/Octokit.GraphQL/Model/UpdateTeamDiscussionPayload.cs new file mode 100644 index 00000000..f5b1c7e6 --- /dev/null +++ b/Octokit.GraphQL/Model/UpdateTeamDiscussionPayload.cs @@ -0,0 +1,33 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// Autogenerated return type of UpdateTeamDiscussion + /// + public class UpdateTeamDiscussionPayload : QueryableValue + { + internal UpdateTeamDiscussionPayload(Expression expression) : base(expression) + { + } + + /// + /// A unique identifier for the client performing the mutation. + /// + public string ClientMutationId { get; } + + /// + /// The updated discussion. + /// + public TeamDiscussion TeamDiscussion => this.CreateProperty(x => x.TeamDiscussion, Octokit.GraphQL.Model.TeamDiscussion.Create); + + internal static UpdateTeamDiscussionPayload Create(Expression expression) + { + return new UpdateTeamDiscussionPayload(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Model/User.cs b/Octokit.GraphQL/Model/User.cs index 6ba1071e..495cf739 100644 --- a/Octokit.GraphQL/Model/User.cs +++ b/Octokit.GraphQL/Model/User.cs @@ -123,6 +123,12 @@ internal User(Expression expression) : base(expression) /// Filters Gists according to privacy. public GistConnection Gists(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null, Arg? privacy = null) => this.CreateMethodCall(x => x.Gists(first, after, last, before, orderBy, privacy), Octokit.GraphQL.Model.GistConnection.Create); + /// + /// The hovercard information for this user in a given context + /// + /// The ID of the subject to get the hovercard in the context of + public Hovercard Hovercard(Arg? primarySubjectId = null) => this.CreateMethodCall(x => x.Hovercard(primarySubjectId), Octokit.GraphQL.Model.Hovercard.Create); + public ID Id { get; } /// @@ -307,6 +313,32 @@ internal User(Expression expression) : base(expression) /// A list of states to filter the pull requests by. public PullRequestConnection PullRequests(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? baseRefName = null, Arg? headRefName = null, Arg>? labels = null, Arg? orderBy = null, Arg>? states = null) => this.CreateMethodCall(x => x.PullRequests(first, after, last, before, baseRefName, headRefName, labels, orderBy, states), Octokit.GraphQL.Model.PullRequestConnection.Create); + /// + /// A list of registry packages under the owner. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Find registry package by name. + /// Find registry packages by their names. + /// Filter registry package by type. + /// Filter registry package by whether it is publicly visible + /// Filter registry package by type (string). + /// Find registry packages in a repository. + public RegistryPackageConnection RegistryPackages(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? name = null, Arg>? names = null, Arg? packageType = null, Arg? publicOnly = null, Arg? registryPackageType = null, Arg? repositoryId = null) => this.CreateMethodCall(x => x.RegistryPackages(first, after, last, before, name, names, packageType, publicOnly, registryPackageType, repositoryId), Octokit.GraphQL.Model.RegistryPackageConnection.Create); + + /// + /// A list of registry packages for a particular search query. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Filter registry package by type. + /// Find registry package by search query. + public RegistryPackageConnection RegistryPackagesForQuery(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? packageType = null, Arg? query = null) => this.CreateMethodCall(x => x.RegistryPackagesForQuery(first, after, last, before, packageType, query), Octokit.GraphQL.Model.RegistryPackageConnection.Create); + /// /// A list of repositories that the user owns. /// @@ -347,6 +379,42 @@ internal User(Expression expression) : base(expression) /// public string ResourcePath { get; } + /// + /// Replies this user has saved + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// The field to order saved replies by. + public SavedReplyConnection SavedReplies(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.SavedReplies(first, after, last, before, orderBy), Octokit.GraphQL.Model.SavedReplyConnection.Create); + + /// + /// The GitHub Sponsors listing for this user. + /// + public SponsorsListing SponsorsListing => this.CreateProperty(x => x.SponsorsListing, Octokit.GraphQL.Model.SponsorsListing.Create); + + /// + /// This object's sponsorships as the maintainer. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Whether or not to include private sponsorships in the result set + /// Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer. + public SponsorshipConnection SponsorshipsAsMaintainer(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? includePrivate = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.SponsorshipsAsMaintainer(first, after, last, before, includePrivate, orderBy), Octokit.GraphQL.Model.SponsorshipConnection.Create); + + /// + /// This object's sponsorships as the sponsor. + /// + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// Ordering options for sponsorships returned from this connection. If left blank, the sponsorships will be ordered based on relevancy to the viewer. + public SponsorshipConnection SponsorshipsAsSponsor(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? orderBy = null) => this.CreateMethodCall(x => x.SponsorshipsAsSponsor(first, after, last, before, orderBy), Octokit.GraphQL.Model.SponsorshipConnection.Create); + /// /// Repositories the user has starred. /// @@ -363,6 +431,17 @@ internal User(Expression expression) : base(expression) /// public UserStatus Status => this.CreateProperty(x => x.Status, Octokit.GraphQL.Model.UserStatus.Create); + /// + /// Repositories the user has contributed to, ordered by contribution rank, plus repositories the user has created + /// + /// Ordering options for repositories returned from the connection + /// Returns the first _n_ elements from the list. + /// Returns the elements in the list that come after the specified cursor. + /// Returns the last _n_ elements from the list. + /// Returns the elements in the list that come before the specified cursor. + /// How far back in time to fetch contributed repositories + public RepositoryConnection TopRepositories(Arg orderBy, Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? since = null) => this.CreateMethodCall(x => x.TopRepositories(orderBy, first, after, last, before, since), Octokit.GraphQL.Model.RepositoryConnection.Create); + /// /// Identifies the date and time when the object was last updated. /// diff --git a/Octokit.GraphQL/Model/UserStatus.cs b/Octokit.GraphQL/Model/UserStatus.cs index 0982cfc8..823db812 100644 --- a/Octokit.GraphQL/Model/UserStatus.cs +++ b/Octokit.GraphQL/Model/UserStatus.cs @@ -25,6 +25,11 @@ internal UserStatus(Expression expression) : base(expression) /// public string Emoji { get; } + /// + /// The status emoji as HTML. + /// + public string EmojiHTML { get; } + /// /// If set, the status will not be shown after this date. /// diff --git a/Octokit.GraphQL/Model/ViewerHovercardContext.cs b/Octokit.GraphQL/Model/ViewerHovercardContext.cs new file mode 100644 index 00000000..e7612265 --- /dev/null +++ b/Octokit.GraphQL/Model/ViewerHovercardContext.cs @@ -0,0 +1,38 @@ +namespace Octokit.GraphQL.Model +{ + using System; + using System.Collections.Generic; + using System.Linq.Expressions; + using Octokit.GraphQL.Core; + using Octokit.GraphQL.Core.Builders; + + /// + /// A hovercard context with a message describing how the viewer is related. + /// + public class ViewerHovercardContext : QueryableValue + { + internal ViewerHovercardContext(Expression expression) : base(expression) + { + } + + /// + /// A string describing this context + /// + public string Message { get; } + + /// + /// An octicon to accompany this context + /// + public string Octicon { get; } + + /// + /// Identifies the user who is related to this context. + /// + public User Viewer => this.CreateProperty(x => x.Viewer, Octokit.GraphQL.Model.User.Create); + + internal static ViewerHovercardContext Create(Expression expression) + { + return new ViewerHovercardContext(expression); + } + } +} \ No newline at end of file diff --git a/Octokit.GraphQL/Mutation.cs b/Octokit.GraphQL/Mutation.cs index bffd2a80..27d3c310 100644 --- a/Octokit.GraphQL/Mutation.cs +++ b/Octokit.GraphQL/Mutation.cs @@ -20,6 +20,11 @@ internal Mutation(Expression expression) : base(expression) { } + /// + /// Accepts a pending invitation for a user to become an administrator of an enterprise. + /// + public AcceptEnterpriseAdministratorInvitationPayload AcceptEnterpriseAdministratorInvitation(Arg input) => this.CreateMethodCall(x => x.AcceptEnterpriseAdministratorInvitation(input), Octokit.GraphQL.Model.AcceptEnterpriseAdministratorInvitationPayload.Create); + /// /// Applies a suggested topic to the repository. /// @@ -70,6 +75,16 @@ internal Mutation(Expression expression) : base(expression) /// public AddStarPayload AddStar(Arg input) => this.CreateMethodCall(x => x.AddStar(input), Octokit.GraphQL.Model.AddStarPayload.Create); + /// + /// Marks a repository as archived. + /// + public ArchiveRepositoryPayload ArchiveRepository(Arg input) => this.CreateMethodCall(x => x.ArchiveRepository(input), Octokit.GraphQL.Model.ArchiveRepositoryPayload.Create); + + /// + /// Cancels a pending invitation for an administrator to join an enterprise. + /// + public CancelEnterpriseAdminInvitationPayload CancelEnterpriseAdminInvitation(Arg input) => this.CreateMethodCall(x => x.CancelEnterpriseAdminInvitation(input), Octokit.GraphQL.Model.CancelEnterpriseAdminInvitationPayload.Create); + /// /// Update your status on GitHub. /// @@ -120,6 +135,11 @@ internal Mutation(Expression expression) : base(expression) /// public CreateCheckSuitePayload CreateCheckSuite(Arg input) => this.CreateMethodCall(x => x.CreateCheckSuite(input), Octokit.GraphQL.Model.CreateCheckSuitePayload.Create); + /// + /// Creates an organization as part of an enterprise account. + /// + public CreateEnterpriseOrganizationPayload CreateEnterpriseOrganization(Arg input) => this.CreateMethodCall(x => x.CreateEnterpriseOrganization(input), Octokit.GraphQL.Model.CreateEnterpriseOrganizationPayload.Create); + /// /// Creates a new issue. /// @@ -135,11 +155,26 @@ internal Mutation(Expression expression) : base(expression) /// public CreatePullRequestPayload CreatePullRequest(Arg input) => this.CreateMethodCall(x => x.CreatePullRequest(input), Octokit.GraphQL.Model.CreatePullRequestPayload.Create); + /// + /// Create a new Git Ref. + /// + public CreateRefPayload CreateRef(Arg input) => this.CreateMethodCall(x => x.CreateRef(input), Octokit.GraphQL.Model.CreateRefPayload.Create); + /// /// Create a new repository. /// public CreateRepositoryPayload CreateRepository(Arg input) => this.CreateMethodCall(x => x.CreateRepository(input), Octokit.GraphQL.Model.CreateRepositoryPayload.Create); + /// + /// Creates a new team discussion. + /// + public CreateTeamDiscussionPayload CreateTeamDiscussion(Arg input) => this.CreateMethodCall(x => x.CreateTeamDiscussion(input), Octokit.GraphQL.Model.CreateTeamDiscussionPayload.Create); + + /// + /// Creates a new team discussion comment. + /// + public CreateTeamDiscussionCommentPayload CreateTeamDiscussionComment(Arg input) => this.CreateMethodCall(x => x.CreateTeamDiscussionComment(input), Octokit.GraphQL.Model.CreateTeamDiscussionCommentPayload.Create); + /// /// Rejects a suggested topic for the repository. /// @@ -185,16 +220,51 @@ internal Mutation(Expression expression) : base(expression) /// public DeletePullRequestReviewCommentPayload DeletePullRequestReviewComment(Arg input) => this.CreateMethodCall(x => x.DeletePullRequestReviewComment(input), Octokit.GraphQL.Model.DeletePullRequestReviewCommentPayload.Create); + /// + /// Delete a Git Ref. + /// + public DeleteRefPayload DeleteRef(Arg input) => this.CreateMethodCall(x => x.DeleteRef(input), Octokit.GraphQL.Model.DeleteRefPayload.Create); + + /// + /// Deletes a team discussion. + /// + public DeleteTeamDiscussionPayload DeleteTeamDiscussion(Arg input) => this.CreateMethodCall(x => x.DeleteTeamDiscussion(input), Octokit.GraphQL.Model.DeleteTeamDiscussionPayload.Create); + + /// + /// Deletes a team discussion comment. + /// + public DeleteTeamDiscussionCommentPayload DeleteTeamDiscussionComment(Arg input) => this.CreateMethodCall(x => x.DeleteTeamDiscussionComment(input), Octokit.GraphQL.Model.DeleteTeamDiscussionCommentPayload.Create); + /// /// Dismisses an approved or rejected pull request review. /// public DismissPullRequestReviewPayload DismissPullRequestReview(Arg input) => this.CreateMethodCall(x => x.DismissPullRequestReview(input), Octokit.GraphQL.Model.DismissPullRequestReviewPayload.Create); + /// + /// Follow a user. + /// + public FollowUserPayload FollowUser(Arg input) => this.CreateMethodCall(x => x.FollowUser(input), Octokit.GraphQL.Model.FollowUserPayload.Create); + + /// + /// Invite someone to become an administrator of the enterprise. + /// + public InviteEnterpriseAdminPayload InviteEnterpriseAdmin(Arg input) => this.CreateMethodCall(x => x.InviteEnterpriseAdmin(input), Octokit.GraphQL.Model.InviteEnterpriseAdminPayload.Create); + + /// + /// Creates a repository link for a project. + /// + public LinkRepositoryToProjectPayload LinkRepositoryToProject(Arg input) => this.CreateMethodCall(x => x.LinkRepositoryToProject(input), Octokit.GraphQL.Model.LinkRepositoryToProjectPayload.Create); + /// /// Lock a lockable object /// public LockLockablePayload LockLockable(Arg input) => this.CreateMethodCall(x => x.LockLockable(input), Octokit.GraphQL.Model.LockLockablePayload.Create); + /// + /// Merge a head into a branch. + /// + public MergeBranchPayload MergeBranch(Arg input) => this.CreateMethodCall(x => x.MergeBranch(input), Octokit.GraphQL.Model.MergeBranchPayload.Create); + /// /// Merge a pull request. /// @@ -210,11 +280,26 @@ internal Mutation(Expression expression) : base(expression) /// public MoveProjectColumnPayload MoveProjectColumn(Arg input) => this.CreateMethodCall(x => x.MoveProjectColumn(input), Octokit.GraphQL.Model.MoveProjectColumnPayload.Create); + /// + /// Regenerates the identity provider recovery codes for an enterprise + /// + public RegenerateEnterpriseIdentityProviderRecoveryCodesPayload RegenerateEnterpriseIdentityProviderRecoveryCodes(Arg input) => this.CreateMethodCall(x => x.RegenerateEnterpriseIdentityProviderRecoveryCodes(input), Octokit.GraphQL.Model.RegenerateEnterpriseIdentityProviderRecoveryCodesPayload.Create); + /// /// Removes assignees from an assignable object. /// public RemoveAssigneesFromAssignablePayload RemoveAssigneesFromAssignable(Arg input) => this.CreateMethodCall(x => x.RemoveAssigneesFromAssignable(input), Octokit.GraphQL.Model.RemoveAssigneesFromAssignablePayload.Create); + /// + /// Removes an administrator from the enterprise. + /// + public RemoveEnterpriseAdminPayload RemoveEnterpriseAdmin(Arg input) => this.CreateMethodCall(x => x.RemoveEnterpriseAdmin(input), Octokit.GraphQL.Model.RemoveEnterpriseAdminPayload.Create); + + /// + /// Removes an organization from the enterprise + /// + public RemoveEnterpriseOrganizationPayload RemoveEnterpriseOrganization(Arg input) => this.CreateMethodCall(x => x.RemoveEnterpriseOrganization(input), Octokit.GraphQL.Model.RemoveEnterpriseOrganizationPayload.Create); + /// /// Removes labels from a Labelable object. /// @@ -265,6 +350,26 @@ internal Mutation(Expression expression) : base(expression) /// public SubmitPullRequestReviewPayload SubmitPullRequestReview(Arg input) => this.CreateMethodCall(x => x.SubmitPullRequestReview(input), Octokit.GraphQL.Model.SubmitPullRequestReviewPayload.Create); + /// + /// Transfer an issue to a different repository + /// + public TransferIssuePayload TransferIssue(Arg input) => this.CreateMethodCall(x => x.TransferIssue(input), Octokit.GraphQL.Model.TransferIssuePayload.Create); + + /// + /// Unarchives a repository. + /// + public UnarchiveRepositoryPayload UnarchiveRepository(Arg input) => this.CreateMethodCall(x => x.UnarchiveRepository(input), Octokit.GraphQL.Model.UnarchiveRepositoryPayload.Create); + + /// + /// Unfollow a user. + /// + public UnfollowUserPayload UnfollowUser(Arg input) => this.CreateMethodCall(x => x.UnfollowUser(input), Octokit.GraphQL.Model.UnfollowUserPayload.Create); + + /// + /// Deletes a repository link from a project. + /// + public UnlinkRepositoryFromProjectPayload UnlinkRepositoryFromProject(Arg input) => this.CreateMethodCall(x => x.UnlinkRepositoryFromProject(input), Octokit.GraphQL.Model.UnlinkRepositoryFromProjectPayload.Create); + /// /// Unlock a lockable object /// @@ -295,6 +400,91 @@ internal Mutation(Expression expression) : base(expression) /// public UpdateCheckSuitePreferencesPayload UpdateCheckSuitePreferences(Arg input) => this.CreateMethodCall(x => x.UpdateCheckSuitePreferences(input), Octokit.GraphQL.Model.UpdateCheckSuitePreferencesPayload.Create); + /// + /// Sets the action execution capability setting for an enterprise. + /// + public UpdateEnterpriseActionExecutionCapabilitySettingPayload UpdateEnterpriseActionExecutionCapabilitySetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseActionExecutionCapabilitySetting(input), Octokit.GraphQL.Model.UpdateEnterpriseActionExecutionCapabilitySettingPayload.Create); + + /// + /// Updates the role of an enterprise administrator. + /// + public UpdateEnterpriseAdministratorRolePayload UpdateEnterpriseAdministratorRole(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseAdministratorRole(input), Octokit.GraphQL.Model.UpdateEnterpriseAdministratorRolePayload.Create); + + /// + /// Sets whether private repository forks are enabled for an enterprise. + /// + public UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload UpdateEnterpriseAllowPrivateRepositoryForkingSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseAllowPrivateRepositoryForkingSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseAllowPrivateRepositoryForkingSettingPayload.Create); + + /// + /// Sets the default repository permission for organizations in an enterprise. + /// + public UpdateEnterpriseDefaultRepositoryPermissionSettingPayload UpdateEnterpriseDefaultRepositoryPermissionSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseDefaultRepositoryPermissionSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseDefaultRepositoryPermissionSettingPayload.Create); + + /// + /// Sets whether organization members with admin permissions on a repository can change repository visibility. + /// + public UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseMembersCanChangeRepositoryVisibilitySetting(input), Octokit.GraphQL.Model.UpdateEnterpriseMembersCanChangeRepositoryVisibilitySettingPayload.Create); + + /// + /// Sets the members can create repositories setting for an enterprise. + /// + public UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload UpdateEnterpriseMembersCanCreateRepositoriesSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseMembersCanCreateRepositoriesSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseMembersCanCreateRepositoriesSettingPayload.Create); + + /// + /// Sets the members can delete issues setting for an enterprise. + /// + public UpdateEnterpriseMembersCanDeleteIssuesSettingPayload UpdateEnterpriseMembersCanDeleteIssuesSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseMembersCanDeleteIssuesSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseMembersCanDeleteIssuesSettingPayload.Create); + + /// + /// Sets the members can delete repositories setting for an enterprise. + /// + public UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload UpdateEnterpriseMembersCanDeleteRepositoriesSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseMembersCanDeleteRepositoriesSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseMembersCanDeleteRepositoriesSettingPayload.Create); + + /// + /// Sets whether members can invite collaborators are enabled for an enterprise. + /// + public UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload UpdateEnterpriseMembersCanInviteCollaboratorsSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseMembersCanInviteCollaboratorsSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseMembersCanInviteCollaboratorsSettingPayload.Create); + + /// + /// Sets whether or not an organization admin can make purchases. + /// + public UpdateEnterpriseMembersCanMakePurchasesSettingPayload UpdateEnterpriseMembersCanMakePurchasesSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseMembersCanMakePurchasesSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseMembersCanMakePurchasesSettingPayload.Create); + + /// + /// Sets the members can update protected branches setting for an enterprise. + /// + public UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseMembersCanUpdateProtectedBranchesSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseMembersCanUpdateProtectedBranchesSettingPayload.Create); + + /// + /// Sets the members can view dependency insights for an enterprise. + /// + public UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload UpdateEnterpriseMembersCanViewDependencyInsightsSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseMembersCanViewDependencyInsightsSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseMembersCanViewDependencyInsightsSettingPayload.Create); + + /// + /// Sets whether organization projects are enabled for an enterprise. + /// + public UpdateEnterpriseOrganizationProjectsSettingPayload UpdateEnterpriseOrganizationProjectsSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseOrganizationProjectsSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseOrganizationProjectsSettingPayload.Create); + + /// + /// Updates an enterprise's profile. + /// + public UpdateEnterpriseProfilePayload UpdateEnterpriseProfile(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseProfile(input), Octokit.GraphQL.Model.UpdateEnterpriseProfilePayload.Create); + + /// + /// Sets whether repository projects are enabled for a enterprise. + /// + public UpdateEnterpriseRepositoryProjectsSettingPayload UpdateEnterpriseRepositoryProjectsSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseRepositoryProjectsSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseRepositoryProjectsSettingPayload.Create); + + /// + /// Sets whether team discussions are enabled for an enterprise. + /// + public UpdateEnterpriseTeamDiscussionsSettingPayload UpdateEnterpriseTeamDiscussionsSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseTeamDiscussionsSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseTeamDiscussionsSettingPayload.Create); + + /// + /// Sets whether two factor authentication is required for all users in an enterprise. + /// + public UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload UpdateEnterpriseTwoFactorAuthenticationRequiredSetting(Arg input) => this.CreateMethodCall(x => x.UpdateEnterpriseTwoFactorAuthenticationRequiredSetting(input), Octokit.GraphQL.Model.UpdateEnterpriseTwoFactorAuthenticationRequiredSettingPayload.Create); + /// /// Updates an Issue. /// @@ -335,11 +525,31 @@ internal Mutation(Expression expression) : base(expression) /// public UpdatePullRequestReviewCommentPayload UpdatePullRequestReviewComment(Arg input) => this.CreateMethodCall(x => x.UpdatePullRequestReviewComment(input), Octokit.GraphQL.Model.UpdatePullRequestReviewCommentPayload.Create); + /// + /// Update a Git Ref. + /// + public UpdateRefPayload UpdateRef(Arg input) => this.CreateMethodCall(x => x.UpdateRef(input), Octokit.GraphQL.Model.UpdateRefPayload.Create); + + /// + /// Update information about a repository. + /// + public UpdateRepositoryPayload UpdateRepository(Arg input) => this.CreateMethodCall(x => x.UpdateRepository(input), Octokit.GraphQL.Model.UpdateRepositoryPayload.Create); + /// /// Updates the state for subscribable subjects. /// public UpdateSubscriptionPayload UpdateSubscription(Arg input) => this.CreateMethodCall(x => x.UpdateSubscription(input), Octokit.GraphQL.Model.UpdateSubscriptionPayload.Create); + /// + /// Updates a team discussion. + /// + public UpdateTeamDiscussionPayload UpdateTeamDiscussion(Arg input) => this.CreateMethodCall(x => x.UpdateTeamDiscussion(input), Octokit.GraphQL.Model.UpdateTeamDiscussionPayload.Create); + + /// + /// Updates a discussion comment. + /// + public UpdateTeamDiscussionCommentPayload UpdateTeamDiscussionComment(Arg input) => this.CreateMethodCall(x => x.UpdateTeamDiscussionComment(input), Octokit.GraphQL.Model.UpdateTeamDiscussionCommentPayload.Create); + /// /// Replaces the repository's topics with the given topics. /// diff --git a/Octokit.GraphQL/Query.cs b/Octokit.GraphQL/Query.cs index 887df6aa..7e7ce2fc 100644 --- a/Octokit.GraphQL/Query.cs +++ b/Octokit.GraphQL/Query.cs @@ -31,6 +31,27 @@ internal Query(Expression expression) : base(expression) /// public IQueryableList CodesOfConduct => this.CreateProperty(x => x.CodesOfConduct); + /// + /// Look up an enterprise by URL slug. + /// + /// The enterprise URL slug. + /// The enterprise invitation token. + public Enterprise Enterprise(Arg slug, Arg? invitationToken = null) => this.CreateMethodCall(x => x.Enterprise(slug, invitationToken), Octokit.GraphQL.Model.Enterprise.Create); + + /// + /// Look up a pending enterprise administrator invitation by invitee, enterprise and role. + /// + /// The slug of the enterprise the user was invited to join. + /// The role for the business member invitation. + /// The login of the user invited to join the business. + public EnterpriseAdministratorInvitation EnterpriseAdministratorInvitation(Arg enterpriseSlug, Arg role, Arg userLogin) => this.CreateMethodCall(x => x.EnterpriseAdministratorInvitation(enterpriseSlug, role, userLogin), Octokit.GraphQL.Model.EnterpriseAdministratorInvitation.Create); + + /// + /// Look up a pending enterprise administrator invitation by invitation token. + /// + /// The invitation token sent with the invitation email. + public EnterpriseAdministratorInvitation EnterpriseAdministratorInvitationByToken(Arg invitationToken) => this.CreateMethodCall(x => x.EnterpriseAdministratorInvitationByToken(invitationToken), Octokit.GraphQL.Model.EnterpriseAdministratorInvitation.Create); + /// /// Look up an open source license by its key /// @@ -177,6 +198,12 @@ internal Query(Expression expression) : base(expression) /// A list of severities to filter vulnerabilities by. public SecurityVulnerabilityConnection SecurityVulnerabilities(Arg? first = null, Arg? after = null, Arg? last = null, Arg? before = null, Arg? ecosystem = null, Arg? orderBy = null, Arg? package = null, Arg>? severities = null) => this.CreateMethodCall(x => x.SecurityVulnerabilities(first, after, last, before, ecosystem, orderBy, package, severities), Octokit.GraphQL.Model.SecurityVulnerabilityConnection.Create); + /// + /// Look up a single Sponsors Listing + /// + /// Select the Sponsors listing which matches this slug + public SponsorsListing SponsorsListing(Arg slug) => this.CreateMethodCall(x => x.SponsorsListing(slug), Octokit.GraphQL.Model.SponsorsListing.Create); + /// /// Look up a topic by name. ///