public static class RepositoryCreateRequest.Builder extends AbstractRepositoryRequest.AbstractBuilder<RepositoryCreateRequest.Builder>
requests
for creating new repositories.forkable, name, publiclyAccessible
NOT_BLANK
Constructor and Description |
---|
Builder() |
Builder(Repository repository) |
Builder(RepositoryCreateRequest request) |
Modifier and Type | Method and Description |
---|---|
RepositoryCreateRequest |
build()
Builds a
request from the assembled values. |
RepositoryCreateRequest.Builder |
project(Project value)
Sets the project in which the repository will be created.
|
RepositoryCreateRequest.Builder |
scmId(String value)
Sets the SCM to be used by the new repository.
|
protected RepositoryCreateRequest.Builder |
self()
Overridden in concrete builder implementations to return
this . |
description, forkable, name, publiclyAccessible
addIf, addIf, addIf, addIf, addIf, addIf, checkNotBlank, requireNonBlank
public Builder()
public Builder(@Nonnull Repository repository)
public Builder(@Nonnull RepositoryCreateRequest request)
@Nonnull public RepositoryCreateRequest build()
request
from the assembled values. Before the request is built,
it is first verified that a name
, project
and
SCM ID
were specified, and an exception is thrown if any are missing.IllegalStateException
- if the name
or SCM ID
are blank
(empty, or containing only whitespace), or the project(Project)
is
null
@Nonnull public RepositoryCreateRequest.Builder project(@Nonnull Project value)
Note: This value is required. If this method is not called prior to building
the
request, an exception will be thrown.
value
- the destination projectthis
NullPointerException
- if the provided value
is null
@Nonnull public RepositoryCreateRequest.Builder scmId(@Nonnull String value)
Note: This value is required. If this method is not called prior to building
the
request, an exception will be thrown.
value
- the SCM used to handle the repositorythis
IllegalArgumentException
- if the provided value
is empty or contains only whitespaceNullPointerException
- if the provided value
is null
protected RepositoryCreateRequest.Builder self()
AbstractRepositoryRequest.AbstractBuilder
this
.self
in class AbstractRepositoryRequest.AbstractBuilder<RepositoryCreateRequest.Builder>
this
Copyright © 2019 Atlassian. All rights reserved.