-- Do not manually edit this file, it was auto-generated by dillonkearns/elm-graphql -- https://github.com/dillonkearns/elm-graphql module Github.Object.Issue exposing (AssigneesOptionalArguments, CommentsOptionalArguments, LabelsOptionalArguments, ParticipantsOptionalArguments, ProjectCardsOptionalArguments, ReactionsOptionalArguments, TimelineOptionalArguments, UserContentEditsOptionalArguments, activeLockReason, assignees, author, authorAssociation, body, bodyHTML, bodyText, closed, closedAt, comments, createdAt, createdViaEmail, databaseId, editor, id, labels, lastEditedAt, locked, milestone, number, participants, projectCards, publishedAt, reactionGroups, reactions, repository, resourcePath, state, timeline, title, updatedAt, url, userContentEdits, viewerCanReact, viewerCanSubscribe, viewerCanUpdate, viewerCannotUpdateReasons, viewerDidAuthor, viewerSubscription) import Github.Enum.CommentAuthorAssociation import Github.Enum.CommentCannotUpdateReason import Github.Enum.IssueState import Github.Enum.LockReason import Github.Enum.ReactionContent import Github.Enum.SubscriptionState import Github.InputObject import Github.Interface import Github.Object import Github.Scalar import Github.ScalarCodecs import Github.Union import Graphql.Internal.Builder.Argument as Argument exposing (Argument) import Graphql.Internal.Builder.Object as Object import Graphql.Internal.Encode as Encode exposing (Value) import Graphql.Operation exposing (RootMutation, RootQuery, RootSubscription) import Graphql.OptionalArgument exposing (OptionalArgument(..)) import Graphql.SelectionSet exposing (SelectionSet) import Json.Decode as Decode {-| Reason that the conversation was locked. -} activeLockReason : SelectionSet (Maybe Github.Enum.LockReason.LockReason) Github.Object.Issue activeLockReason = Object.selectionForField "(Maybe Enum.LockReason.LockReason)" "activeLockReason" [] (Github.Enum.LockReason.decoder |> Decode.nullable) type alias AssigneesOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String } {-| A list of Users assigned to this object. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. -} assignees : (AssigneesOptionalArguments -> AssigneesOptionalArguments) -> SelectionSet decodesTo Github.Object.UserConnection -> SelectionSet decodesTo Github.Object.Issue assignees fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string ] |> List.filterMap identity in Object.selectionForCompositeField "assignees" optionalArgs object_ identity {-| The actor who authored the comment. -} author : SelectionSet decodesTo Github.Interface.Actor -> SelectionSet (Maybe decodesTo) Github.Object.Issue author object_ = Object.selectionForCompositeField "author" [] object_ (identity >> Decode.nullable) {-| Author's association with the subject of the comment. -} authorAssociation : SelectionSet Github.Enum.CommentAuthorAssociation.CommentAuthorAssociation Github.Object.Issue authorAssociation = Object.selectionForField "Enum.CommentAuthorAssociation.CommentAuthorAssociation" "authorAssociation" [] Github.Enum.CommentAuthorAssociation.decoder {-| Identifies the body of the issue. -} body : SelectionSet String Github.Object.Issue body = Object.selectionForField "String" "body" [] Decode.string {-| Identifies the body of the issue rendered to HTML. -} bodyHTML : SelectionSet Github.ScalarCodecs.Html Github.Object.Issue bodyHTML = Object.selectionForField "ScalarCodecs.Html" "bodyHTML" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecHtml |> .decoder) {-| Identifies the body of the issue rendered to text. -} bodyText : SelectionSet String Github.Object.Issue bodyText = Object.selectionForField "String" "bodyText" [] Decode.string {-| `true` if the object is closed (definition of closed may depend on type) -} closed : SelectionSet Bool Github.Object.Issue closed = Object.selectionForField "Bool" "closed" [] Decode.bool {-| Identifies the date and time when the object was closed. -} closedAt : SelectionSet (Maybe Github.ScalarCodecs.DateTime) Github.Object.Issue closedAt = Object.selectionForField "(Maybe ScalarCodecs.DateTime)" "closedAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder |> Decode.nullable) type alias CommentsOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String } {-| A list of comments associated with the Issue. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. -} comments : (CommentsOptionalArguments -> CommentsOptionalArguments) -> SelectionSet decodesTo Github.Object.IssueCommentConnection -> SelectionSet decodesTo Github.Object.Issue comments fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string ] |> List.filterMap identity in Object.selectionForCompositeField "comments" optionalArgs object_ identity {-| Identifies the date and time when the object was created. -} createdAt : SelectionSet Github.ScalarCodecs.DateTime Github.Object.Issue createdAt = Object.selectionForField "ScalarCodecs.DateTime" "createdAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder) {-| Check if this comment was created via an email reply. -} createdViaEmail : SelectionSet Bool Github.Object.Issue createdViaEmail = Object.selectionForField "Bool" "createdViaEmail" [] Decode.bool {-| Identifies the primary key from the database. -} databaseId : SelectionSet (Maybe Int) Github.Object.Issue databaseId = Object.selectionForField "(Maybe Int)" "databaseId" [] (Decode.int |> Decode.nullable) {-| The actor who edited the comment. -} editor : SelectionSet decodesTo Github.Interface.Actor -> SelectionSet (Maybe decodesTo) Github.Object.Issue editor object_ = Object.selectionForCompositeField "editor" [] object_ (identity >> Decode.nullable) id : SelectionSet Github.ScalarCodecs.Id Github.Object.Issue id = Object.selectionForField "ScalarCodecs.Id" "id" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecId |> .decoder) type alias LabelsOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String } {-| A list of labels associated with the object. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. -} labels : (LabelsOptionalArguments -> LabelsOptionalArguments) -> SelectionSet decodesTo Github.Object.LabelConnection -> SelectionSet (Maybe decodesTo) Github.Object.Issue labels fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string ] |> List.filterMap identity in Object.selectionForCompositeField "labels" optionalArgs object_ (identity >> Decode.nullable) {-| The moment the editor made the last edit -} lastEditedAt : SelectionSet (Maybe Github.ScalarCodecs.DateTime) Github.Object.Issue lastEditedAt = Object.selectionForField "(Maybe ScalarCodecs.DateTime)" "lastEditedAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder |> Decode.nullable) {-| `true` if the object is locked -} locked : SelectionSet Bool Github.Object.Issue locked = Object.selectionForField "Bool" "locked" [] Decode.bool {-| Identifies the milestone associated with the issue. -} milestone : SelectionSet decodesTo Github.Object.Milestone -> SelectionSet (Maybe decodesTo) Github.Object.Issue milestone object_ = Object.selectionForCompositeField "milestone" [] object_ (identity >> Decode.nullable) {-| Identifies the issue number. -} number : SelectionSet Int Github.Object.Issue number = Object.selectionForField "Int" "number" [] Decode.int type alias ParticipantsOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String } {-| A list of Users that are participating in the Issue conversation. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. -} participants : (ParticipantsOptionalArguments -> ParticipantsOptionalArguments) -> SelectionSet decodesTo Github.Object.UserConnection -> SelectionSet decodesTo Github.Object.Issue participants fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string ] |> List.filterMap identity in Object.selectionForCompositeField "participants" optionalArgs object_ identity type alias ProjectCardsOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String } {-| List of project cards associated with this issue. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. -} projectCards : (ProjectCardsOptionalArguments -> ProjectCardsOptionalArguments) -> SelectionSet decodesTo Github.Object.ProjectCardConnection -> SelectionSet decodesTo Github.Object.Issue projectCards fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string ] |> List.filterMap identity in Object.selectionForCompositeField "projectCards" optionalArgs object_ identity {-| Identifies when the comment was published at. -} publishedAt : SelectionSet (Maybe Github.ScalarCodecs.DateTime) Github.Object.Issue publishedAt = Object.selectionForField "(Maybe ScalarCodecs.DateTime)" "publishedAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder |> Decode.nullable) {-| A list of reactions grouped by content left on the subject. -} reactionGroups : SelectionSet decodesTo Github.Object.ReactionGroup -> SelectionSet (Maybe (List decodesTo)) Github.Object.Issue reactionGroups object_ = Object.selectionForCompositeField "reactionGroups" [] object_ (identity >> Decode.list >> Decode.nullable) type alias ReactionsOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String , content : OptionalArgument Github.Enum.ReactionContent.ReactionContent , orderBy : OptionalArgument Github.InputObject.ReactionOrder } {-| A list of Reactions left on the Issue. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. - content - Allows filtering Reactions by emoji. - orderBy - Allows specifying the order in which reactions are returned. -} reactions : (ReactionsOptionalArguments -> ReactionsOptionalArguments) -> SelectionSet decodesTo Github.Object.ReactionConnection -> SelectionSet decodesTo Github.Object.Issue reactions fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent, content = Absent, orderBy = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string, Argument.optional "content" filledInOptionals.content (Encode.enum Github.Enum.ReactionContent.toString), Argument.optional "orderBy" filledInOptionals.orderBy Github.InputObject.encodeReactionOrder ] |> List.filterMap identity in Object.selectionForCompositeField "reactions" optionalArgs object_ identity {-| The repository associated with this node. -} repository : SelectionSet decodesTo Github.Object.Repository -> SelectionSet decodesTo Github.Object.Issue repository object_ = Object.selectionForCompositeField "repository" [] object_ identity {-| The HTTP path for this issue -} resourcePath : SelectionSet Github.ScalarCodecs.Uri Github.Object.Issue resourcePath = Object.selectionForField "ScalarCodecs.Uri" "resourcePath" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecUri |> .decoder) {-| Identifies the state of the issue. -} state : SelectionSet Github.Enum.IssueState.IssueState Github.Object.Issue state = Object.selectionForField "Enum.IssueState.IssueState" "state" [] Github.Enum.IssueState.decoder type alias TimelineOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String , since : OptionalArgument Github.ScalarCodecs.DateTime } {-| A list of events, comments, commits, etc. associated with the issue. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. - since - Allows filtering timeline events by a `since` timestamp. -} timeline : (TimelineOptionalArguments -> TimelineOptionalArguments) -> SelectionSet decodesTo Github.Object.IssueTimelineConnection -> SelectionSet decodesTo Github.Object.Issue timeline fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent, since = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string, Argument.optional "since" filledInOptionals.since (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapEncoder .codecDateTime) ] |> List.filterMap identity in Object.selectionForCompositeField "timeline" optionalArgs object_ identity {-| Identifies the issue title. -} title : SelectionSet String Github.Object.Issue title = Object.selectionForField "String" "title" [] Decode.string {-| Identifies the date and time when the object was last updated. -} updatedAt : SelectionSet Github.ScalarCodecs.DateTime Github.Object.Issue updatedAt = Object.selectionForField "ScalarCodecs.DateTime" "updatedAt" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecDateTime |> .decoder) {-| The HTTP URL for this issue -} url : SelectionSet Github.ScalarCodecs.Uri Github.Object.Issue url = Object.selectionForField "ScalarCodecs.Uri" "url" [] (Github.ScalarCodecs.codecs |> Github.Scalar.unwrapCodecs |> .codecUri |> .decoder) type alias UserContentEditsOptionalArguments = { first : OptionalArgument Int , after : OptionalArgument String , last : OptionalArgument Int , before : OptionalArgument String } {-| A list of edits to this content. - first - Returns the first _n_ elements from the list. - after - Returns the elements in the list that come after the specified global ID. - last - Returns the last _n_ elements from the list. - before - Returns the elements in the list that come before the specified global ID. -} userContentEdits : (UserContentEditsOptionalArguments -> UserContentEditsOptionalArguments) -> SelectionSet decodesTo Github.Object.UserContentEditConnection -> SelectionSet (Maybe decodesTo) Github.Object.Issue userContentEdits fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent } optionalArgs = [ Argument.optional "first" filledInOptionals.first Encode.int, Argument.optional "after" filledInOptionals.after Encode.string, Argument.optional "last" filledInOptionals.last Encode.int, Argument.optional "before" filledInOptionals.before Encode.string ] |> List.filterMap identity in Object.selectionForCompositeField "userContentEdits" optionalArgs object_ (identity >> Decode.nullable) {-| Can user react to this subject -} viewerCanReact : SelectionSet Bool Github.Object.Issue viewerCanReact = Object.selectionForField "Bool" "viewerCanReact" [] Decode.bool {-| Check if the viewer is able to change their subscription status for the repository. -} viewerCanSubscribe : SelectionSet Bool Github.Object.Issue viewerCanSubscribe = Object.selectionForField "Bool" "viewerCanSubscribe" [] Decode.bool {-| Check if the current viewer can update this object. -} viewerCanUpdate : SelectionSet Bool Github.Object.Issue viewerCanUpdate = Object.selectionForField "Bool" "viewerCanUpdate" [] Decode.bool {-| Reasons why the current viewer can not update this comment. -} viewerCannotUpdateReasons : SelectionSet (List Github.Enum.CommentCannotUpdateReason.CommentCannotUpdateReason) Github.Object.Issue viewerCannotUpdateReasons = Object.selectionForField "(List Enum.CommentCannotUpdateReason.CommentCannotUpdateReason)" "viewerCannotUpdateReasons" [] (Github.Enum.CommentCannotUpdateReason.decoder |> Decode.list) {-| Did the viewer author this comment. -} viewerDidAuthor : SelectionSet Bool Github.Object.Issue viewerDidAuthor = Object.selectionForField "Bool" "viewerDidAuthor" [] Decode.bool {-| Identifies if the viewer is watching, not watching, or ignoring the subscribable entity. -} viewerSubscription : SelectionSet Github.Enum.SubscriptionState.SubscriptionState Github.Object.Issue viewerSubscription = Object.selectionForField "Enum.SubscriptionState.SubscriptionState" "viewerSubscription" [] Github.Enum.SubscriptionState.decoder