public static class RepositoryUpdateRequest.Builder extends AbstractRepositoryRequest.AbstractBuilder<RepositoryUpdateRequest.Builder>
requests for updating repositories.NOT_BLANK| Constructor and Description |
|---|
Builder() |
Builder(Repository repository)
Constructs a new
Builder which will update the specified Repository. |
Builder(RepositoryUpdateRequest request)
Constructs a new
Builder which uses as its defaults all the values from the provided request. |
| Modifier and Type | Method and Description |
|---|---|
RepositoryUpdateRequest.Builder |
archived(boolean value)
Sets the
archive state of the repository when it is updated. |
RepositoryUpdateRequest |
build()
Builds a
request from the assembled values. |
RepositoryUpdateRequest.Builder |
defaultBranch(String value)
Sets the new default branch name to be applied when the repository is updated.
|
RepositoryUpdateRequest.Builder |
id(int value)
Sets the
ID of the repository to be updated. |
RepositoryUpdateRequest.Builder |
project(Project value)
Sets the
project the repository should be moved to. |
protected RepositoryUpdateRequest.Builder |
self()
Overridden in concrete builder implementations to return
this. |
description, forkable, name, publiclyAccessibleaddIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlankpublic Builder()
public Builder(@Nonnull Repository repository)
Builder which will update the specified Repository. The following values
are copied:
Repository.getId() -> id(int)Repository.getName() -> AbstractRepositoryRequest.AbstractBuilder.name(String)Repository.isArchived() -> archived(boolean)Repository.isForkable() -> AbstractRepositoryRequest.AbstractBuilder.forkable(boolean)Repository.isPublic() -> AbstractRepositoryRequest.AbstractBuilder.publiclyAccessible(boolean)repository - the repository to update, and from which all default values should be drawnpublic Builder(@Nonnull RepositoryUpdateRequest request)
Builder which uses as its defaults all the values from the provided request.request - the request to copy into the new builder@Nonnull public RepositoryUpdateRequest build()
request from the assembled values.@Nonnull public RepositoryUpdateRequest.Builder archived(boolean value)
archive state of the repository when it is updated.value - true if the repository has been archived, false otherwise.this@Nonnull public RepositoryUpdateRequest.Builder defaultBranch(@Nullable String value)
value - the new default branch name, or null to retain the existing namethis@Nonnull public RepositoryUpdateRequest.Builder id(int value)
ID of the repository to be updated.
Note: This value is required. If the ID specified does not match an existing repository, or if this
method is not called prior to building, an exception will be thrown when attempting to
perform the update.
value - the repository's IDthis@Nonnull public RepositoryUpdateRequest.Builder project(@Nullable Project value)
project the repository should be moved to.value - the project to move the repository to. If null,
leave the repository in the existing projectthisprotected RepositoryUpdateRequest.Builder self()
AbstractRepositoryRequest.AbstractBuilderthis.self in class AbstractRepositoryRequest.AbstractBuilder<RepositoryUpdateRequest.Builder>thisCopyright © 2024 Atlassian. All rights reserved.