Package com.jcabi.github
Class Statuses.StatusCreate
- java.lang.Object
-
- com.jcabi.github.Statuses.StatusCreate
-
- All Implemented Interfaces:
JsonReadable
- Enclosing interface:
- Statuses
@Loggable(1) public static final class Statuses.StatusCreate extends Object implements JsonReadable
Data to use when creating a new GitHub commit status.- Since:
- 0.24
- Version:
- $Id: 72914b994af8bda4a5fb440c9bbe7cf9021bf34a $
- Author:
- Chris Rebert (github@rebertia.com)
- See Also:
- Create a Status
-
-
Constructor Summary
Constructors Constructor Description StatusCreate(Status.State stat)
Public ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.json.JsonObject
json()
Describe it in a JSON object.Statuses.StatusCreate
withContext(com.google.common.base.Optional<String> cntxt)
Returns a StatusCreate with the given context.Statuses.StatusCreate
withDescription(String desc)
Returns a StatusCreate with the given description.Statuses.StatusCreate
withState(Status.State stat)
Returns a StatusCreate with the given state.Statuses.StatusCreate
withTargetUrl(com.google.common.base.Optional<String> target)
Returns a StatusCreate with the given target URL.
-
-
-
Constructor Detail
-
StatusCreate
public StatusCreate(Status.State stat)
Public ctor.- Parameters:
stat
- State
-
-
Method Detail
-
withState
public Statuses.StatusCreate withState(Status.State stat)
Returns a StatusCreate with the given state.- Parameters:
stat
- State- Returns:
- StatusCreate
-
withDescription
public Statuses.StatusCreate withDescription(String desc)
Returns a StatusCreate with the given description.- Parameters:
desc
- Description- Returns:
- StatusCreate
-
withContext
public Statuses.StatusCreate withContext(com.google.common.base.Optional<String> cntxt)
Returns a StatusCreate with the given context.- Parameters:
cntxt
- Context- Returns:
- StatusCreate
-
withTargetUrl
public Statuses.StatusCreate withTargetUrl(com.google.common.base.Optional<String> target)
Returns a StatusCreate with the given target URL.- Parameters:
target
- Target URL- Returns:
- StatusCreate
-
json
public javax.json.JsonObject json()
Description copied from interface:JsonReadable
Describe it in a JSON object.- Specified by:
json
in interfaceJsonReadable
- Returns:
- JSON object
-
-