-- Do not manually edit this file, it was auto-generated by dillonkearns/elm-graphql -- https://github.com/dillonkearns/elm-graphql module Github.Object.Release exposing (ReleaseAssetsOptionalArguments, author, createdAt, description, id, isDraft, isPrerelease, name, publishedAt, releaseAssets, resourcePath, selection, tag, updatedAt, url) import Github.InputObject import Github.Interface import Github.Object import Github.Scalar import Github.Union import Graphql.Field as Field exposing (Field) 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.OptionalArgument exposing (OptionalArgument(..)) import Graphql.SelectionSet exposing (SelectionSet) import Json.Decode as Decode {-| Select fields to build up a SelectionSet for this object. -} selection : (a -> constructor) -> SelectionSet (a -> constructor) Github.Object.Release selection constructor = Object.selection constructor {-| The author of the release -} author : SelectionSet decodesTo Github.Object.User -> Field (Maybe decodesTo) Github.Object.Release author object_ = Object.selectionField "author" [] object_ (identity >> Decode.nullable) {-| Identifies the date and time when the object was created. -} createdAt : Field Github.Scalar.DateTime Github.Object.Release createdAt = Object.fieldDecoder "createdAt" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.DateTime) {-| Identifies the description of the release. -} description : Field (Maybe String) Github.Object.Release description = Object.fieldDecoder "description" [] (Decode.string |> Decode.nullable) id : Field Github.Scalar.Id Github.Object.Release id = Object.fieldDecoder "id" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Id) {-| Whether or not the release is a draft -} isDraft : Field Bool Github.Object.Release isDraft = Object.fieldDecoder "isDraft" [] Decode.bool {-| Whether or not the release is a prerelease -} isPrerelease : Field Bool Github.Object.Release isPrerelease = Object.fieldDecoder "isPrerelease" [] Decode.bool {-| Identifies the title of the release. -} name : Field (Maybe String) Github.Object.Release name = Object.fieldDecoder "name" [] (Decode.string |> Decode.nullable) {-| Identifies the date and time when the release was created. -} publishedAt : Field (Maybe Github.Scalar.DateTime) Github.Object.Release publishedAt = Object.fieldDecoder "publishedAt" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.DateTime |> Decode.nullable) type alias ReleaseAssetsOptionalArguments = { first : OptionalArgument Int, after : OptionalArgument String, last : OptionalArgument Int, before : OptionalArgument String, name : OptionalArgument String } {-| List of releases assets which are dependent on this release. - 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. - name - A list of names to filter the assets by. -} releaseAssets : (ReleaseAssetsOptionalArguments -> ReleaseAssetsOptionalArguments) -> SelectionSet decodesTo Github.Object.ReleaseAssetConnection -> Field decodesTo Github.Object.Release releaseAssets fillInOptionals object_ = let filledInOptionals = fillInOptionals { first = Absent, after = Absent, last = Absent, before = Absent, name = 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 "name" filledInOptionals.name Encode.string ] |> List.filterMap identity in Object.selectionField "releaseAssets" optionalArgs object_ identity {-| The HTTP path for this issue -} resourcePath : Field Github.Scalar.Uri Github.Object.Release resourcePath = Object.fieldDecoder "resourcePath" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri) {-| The Git tag the release points to -} tag : SelectionSet decodesTo Github.Object.Ref -> Field (Maybe decodesTo) Github.Object.Release tag object_ = Object.selectionField "tag" [] object_ (identity >> Decode.nullable) {-| Identifies the date and time when the object was last updated. -} updatedAt : Field Github.Scalar.DateTime Github.Object.Release updatedAt = Object.fieldDecoder "updatedAt" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.DateTime) {-| The HTTP URL for this issue -} url : Field Github.Scalar.Uri Github.Object.Release url = Object.fieldDecoder "url" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri)