Package org.kohsuke.github
Class GHDeployment
- java.lang.Object
-
- org.kohsuke.github.GHObject
-
- org.kohsuke.github.GHDeployment
-
public class GHDeployment extends GHObject
Represents a deployment.
-
-
Field Summary
Fields Modifier and Type Field Description protected GHUsercreatorThe creator.protected StringdescriptionThe description.protected StringenvironmentThe environment.protected Stringoriginal_environmentThe original environment.protected ObjectpayloadThe payload.protected booleanproduction_environmentThe production environment.protected StringrefThe ref.protected Stringrepository_urlThe repository url.protected StringshaThe sha.protected Stringstatuses_urlThe statuses url.protected StringtaskThe task.protected booleantransient_environmentThe transient environment.-
Fields inherited from class org.kohsuke.github.GHObject
responseHeaderFields
-
-
Constructor Summary
Constructors Constructor Description GHDeployment()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description GHDeploymentStatusBuildercreateStatus(GHDeploymentState state)Create status gh deployment status builder.GHUsergetCreator()Gets creator.StringgetEnvironment()Gets environment.URLgetHtmlUrl()Deprecated.This object has no HTML URL.StringgetOriginalEnvironment()Deprecated.until preview feature has graduated to stableStringgetPayload()Gets payload.Map<String,Object>getPayloadMap()Gets payload.ObjectgetPayloadObject()Gets payload without assuming its type.StringgetRef()Gets ref.URLgetRepositoryUrl()Gets repository url.GitHubgetRoot()Deprecated.For access to theGitHubinstance, use a local copy instead of pulling it out of objects.StringgetSha()Gets sha.URLgetStatusesUrl()Gets statuses url.StringgetTask()Gets task.booleanisProductionEnvironment()Deprecated.until preview feature has graduated to stablebooleanisTransientEnvironment()Deprecated.until preview feature has graduated to stablePagedIterable<GHDeploymentStatus>listStatuses()List statuses paged iterable.-
Methods inherited from class org.kohsuke.github.GHObject
getCreatedAt, getId, getNodeId, getResponseHeaderFields, getUpdatedAt, getUrl, setResponseHeaderFields, toString
-
-
-
-
Field Detail
-
sha
protected String sha
The sha.
-
ref
protected String ref
The ref.
-
task
protected String task
The task.
-
payload
protected Object payload
The payload.
-
environment
protected String environment
The environment.
-
description
protected String description
The description.
-
statuses_url
protected String statuses_url
The statuses url.
-
repository_url
protected String repository_url
The repository url.
-
creator
protected GHUser creator
The creator.
-
original_environment
protected String original_environment
The original environment.
-
transient_environment
protected boolean transient_environment
The transient environment.
-
production_environment
protected boolean production_environment
The production environment.
-
-
Method Detail
-
getStatusesUrl
public URL getStatusesUrl()
Gets statuses url.- Returns:
- the statuses url
-
getRepositoryUrl
public URL getRepositoryUrl()
Gets repository url.- Returns:
- the repository url
-
getTask
public String getTask()
Gets task.- Returns:
- the task
-
getPayload
public String getPayload()
Gets payload. NOTE: only use this method if you can guarantee the payload will be a simple string, otherwise usegetPayloadObject().- Returns:
- the payload
-
getPayloadMap
public Map<String,Object> getPayloadMap()
Gets payload. NOTE: only use this method if you can guarantee the payload will be a JSON object (Map), otherwise usegetPayloadObject().- Returns:
- the payload
-
getPayloadObject
public Object getPayloadObject()
Gets payload without assuming its type. It could be a String or a Map.- Returns:
- the payload
-
getOriginalEnvironment
@Preview(FLASH) public String getOriginalEnvironment()
Deprecated.until preview feature has graduated to stableThe environment defined when the deployment was first created.- Returns:
- the original deployment environment
-
getEnvironment
public String getEnvironment()
Gets environment.- Returns:
- the environment
-
isTransientEnvironment
@Preview(ANT_MAN) public boolean isTransientEnvironment()
Deprecated.until preview feature has graduated to stableSpecifies if the given environment is specific to the deployment and will no longer exist at some point in the future.- Returns:
- the environment is transient
-
isProductionEnvironment
@Preview(ANT_MAN) public boolean isProductionEnvironment()
Deprecated.until preview feature has graduated to stableSpecifies if the given environment is one that end-users directly interact with.- Returns:
- the environment is used by end-users directly
-
getCreator
public GHUser getCreator() throws IOException
Gets creator.- Returns:
- the creator
- Throws:
IOException- the io exception
-
getRef
public String getRef()
Gets ref.- Returns:
- the ref
-
getSha
public String getSha()
Gets sha.- Returns:
- the sha
-
getHtmlUrl
public URL getHtmlUrl()
Deprecated.This object has no HTML URL.Gets the html url.- Specified by:
getHtmlUrlin classGHObject- Returns:
- the html url
-
createStatus
public GHDeploymentStatusBuilder createStatus(GHDeploymentState state)
Create status gh deployment status builder.- Parameters:
state- the state- Returns:
- the gh deployment status builder
-
listStatuses
public PagedIterable<GHDeploymentStatus> listStatuses()
List statuses paged iterable.- Returns:
- the paged iterable
-
getRoot
@Deprecated public GitHub getRoot()
Deprecated.For access to theGitHubinstance, use a local copy instead of pulling it out of objects.Get the rootGitHubinstance for this object.- Returns:
- the root
GitHubinstance
-
-