Package org.kohsuke.github
Class GHDiscussion
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHDiscussion
-
public class GHDiscussion extends GHObject
A discussion in GitHub Team.- Author:
- Charles Moulliard
- See Also:
- GitHub Team Discussions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GHDiscussion.Creator
static class
GHDiscussion.Setter
AGHLabelBuilder
that updates a single property per requestdone()
is called automatically after the property is set.static class
GHDiscussion.Updater
AGHLabelBuilder
that allows multiple properties to be updated per request.
-
Field Summary
-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Constructor Summary
Constructors Constructor Description GHDiscussion()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
delete()
Delete the discussion.boolean
equals(Object o)
Equals.String
getBody()
The description of this discussion.URL
getHtmlUrl()
Gets the html url.long
getId()
The id number of this discussion.long
getNumber()
The number of this discussion.GitHub
getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.GHTeam
getTeam()
Get the team to which this discussion belongs.String
getTitle()
Get the title of the discussion.int
hashCode()
Hash code.boolean
isPrivate()
Whether the discussion is private to the team.GHDiscussion.Setter
set()
Begins a single property update.GHDiscussion.Updater
update()
Begins a batch update Consumer must callAbstractBuilder.done()
to commit changes.-
Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
-
-
-
Method Detail
-
getHtmlUrl
public URL getHtmlUrl() throws IOException
Gets the html url.- Specified by:
getHtmlUrl
in classGHObject
- Returns:
- the html url
- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getTeam
@Nonnull public GHTeam getTeam()
Get the team to which this discussion belongs.- Returns:
- the team for this discussion
-
getTitle
public String getTitle()
Get the title of the discussion.- Returns:
- the title
-
getBody
public String getBody()
The description of this discussion.- Returns:
- the body
-
getNumber
public long getNumber()
The number of this discussion.- Returns:
- the number
-
getId
public long getId()
The id number of this discussion. GitHub discussions have "number" instead of "id". This is provided for convenience.- Overrides:
getId
in classGHObject
- Returns:
- the id number for this discussion
- See Also:
getNumber()
-
isPrivate
public boolean isPrivate()
Whether the discussion is private to the team.- Returns:
true
if discussion is private.
-
update
@Preview(SQUIRREL_GIRL) public GHDiscussion.Updater update()
Begins a batch update Consumer must callAbstractBuilder.done()
to commit changes.- Returns:
- a
GHDiscussion.Updater
-
set
@Preview(SQUIRREL_GIRL) public GHDiscussion.Setter set()
Begins a single property update.- Returns:
- a
GHDiscussion.Setter
-
delete
public void delete() throws IOException
Delete the discussion.- Throws:
IOException
- the io exception
-
equals
public boolean equals(Object o)
Equals.
-
getRoot
@Deprecated public GitHub getRoot()
Deprecated.For access to theGitHub
instance, use a local copy instead of pulling it out of objects.Get the rootGitHub
instance for this object.- Returns:
- the root
GitHub
instance
-
-