Package com.circleci.client.v2.model
Class PipelineVcs
- java.lang.Object
-
- com.circleci.client.v2.model.PipelineVcs
-
public class PipelineVcs extends Object
VCS information for the pipeline.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_BRANCHstatic StringJSON_PROPERTY_COMMITstatic StringJSON_PROPERTY_ORIGIN_REPOSITORY_URLstatic StringJSON_PROPERTY_PROVIDER_NAMEstatic StringJSON_PROPERTY_REVISIONstatic StringJSON_PROPERTY_TAGstatic StringJSON_PROPERTY_TARGET_REPOSITORY_URL
-
Constructor Summary
Constructors Constructor Description PipelineVcs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PipelineVcsbranch(String branch)PipelineVcscommit(PipelineVcsCommit commit)booleanequals(Object o)StringgetBranch()The branch where the pipeline ran.PipelineVcsCommitgetCommit()Get commitStringgetOriginRepositoryUrl()URL for the repository where the trigger originated.StringgetProviderName()Name of the VCS provider (e.g.StringgetRevision()The code revision the pipeline ran.StringgetTag()The tag used by the pipeline.StringgetTargetRepositoryUrl()URL for the repository the trigger targets (i.e.inthashCode()PipelineVcsoriginRepositoryUrl(String originRepositoryUrl)PipelineVcsproviderName(String providerName)PipelineVcsrevision(String revision)voidsetBranch(String branch)voidsetCommit(PipelineVcsCommit commit)voidsetOriginRepositoryUrl(String originRepositoryUrl)voidsetProviderName(String providerName)voidsetRevision(String revision)voidsetTag(String tag)voidsetTargetRepositoryUrl(String targetRepositoryUrl)PipelineVcstag(String tag)PipelineVcstargetRepositoryUrl(String targetRepositoryUrl)StringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_PROVIDER_NAME
public static final String JSON_PROPERTY_PROVIDER_NAME
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ORIGIN_REPOSITORY_URL
public static final String JSON_PROPERTY_ORIGIN_REPOSITORY_URL
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TARGET_REPOSITORY_URL
public static final String JSON_PROPERTY_TARGET_REPOSITORY_URL
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REVISION
public static final String JSON_PROPERTY_REVISION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_BRANCH
public static final String JSON_PROPERTY_BRANCH
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TAG
public static final String JSON_PROPERTY_TAG
- See Also:
- Constant Field Values
-
JSON_PROPERTY_COMMIT
public static final String JSON_PROPERTY_COMMIT
- See Also:
- Constant Field Values
-
-
Method Detail
-
providerName
public PipelineVcs providerName(String providerName)
-
getProviderName
public String getProviderName()
Name of the VCS provider (e.g. GitHub, Bitbucket).- Returns:
- providerName
-
setProviderName
public void setProviderName(String providerName)
-
originRepositoryUrl
public PipelineVcs originRepositoryUrl(String originRepositoryUrl)
-
getOriginRepositoryUrl
public String getOriginRepositoryUrl()
URL for the repository where the trigger originated. For fork-PR pipelines, this is the URL to the fork. For other pipelines the `origin_` and `target_repository_url`s will be the same.- Returns:
- originRepositoryUrl
-
setOriginRepositoryUrl
public void setOriginRepositoryUrl(String originRepositoryUrl)
-
targetRepositoryUrl
public PipelineVcs targetRepositoryUrl(String targetRepositoryUrl)
-
getTargetRepositoryUrl
public String getTargetRepositoryUrl()
URL for the repository the trigger targets (i.e. the repository where the PR will be merged). For fork-PR pipelines, this is the URL to the parent repo. For other pipelines, the `origin_` and `target_repository_url`s will be the same.- Returns:
- targetRepositoryUrl
-
setTargetRepositoryUrl
public void setTargetRepositoryUrl(String targetRepositoryUrl)
-
revision
public PipelineVcs revision(String revision)
-
getRevision
public String getRevision()
The code revision the pipeline ran.- Returns:
- revision
-
setRevision
public void setRevision(String revision)
-
branch
public PipelineVcs branch(String branch)
-
getBranch
@Nullable public String getBranch()
The branch where the pipeline ran. The HEAD commit on this branch was used for the pipeline. Note that `branch` and `tag` are mutually exclusive.- Returns:
- branch
-
setBranch
public void setBranch(String branch)
-
tag
public PipelineVcs tag(String tag)
-
getTag
@Nullable public String getTag()
The tag used by the pipeline. The commit that this tag points to was used for the pipeline. Note that `branch` and `tag` are mutually exclusive.- Returns:
- tag
-
setTag
public void setTag(String tag)
-
commit
public PipelineVcs commit(PipelineVcsCommit commit)
-
getCommit
@Nullable public PipelineVcsCommit getCommit()
Get commit- Returns:
- commit
-
setCommit
public void setCommit(PipelineVcsCommit commit)
-
-