public static class

RepositoryUpdateRequest.Builder

extends AbstractRepositoryRequest.AbstractBuilder<B extends AbstractBuilder<B>>
java.lang.Object
   ↳ com.atlassian.bitbucket.util.BuilderSupport
     ↳ com.atlassian.bitbucket.repository.AbstractRepositoryRequest.AbstractBuilder<B extends com.atlassian.bitbucket.repository.AbstractRepositoryRequest.AbstractBuilder<B>>
       ↳ com.atlassian.bitbucket.repository.RepositoryUpdateRequest.Builder

Class Overview

Constructs requests for updating repositories.

Summary

[Expand]
Inherited Fields
From class com.atlassian.bitbucket.repository.AbstractRepositoryRequest.AbstractBuilder
From class com.atlassian.bitbucket.util.BuilderSupport
Public Constructors
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.
Public Methods
@Nonnull RepositoryUpdateRequest build()
Builds a request from the assembled values.
@Nonnull RepositoryUpdateRequest.Builder id(int value)
Sets the ID of the repository to be updated.
@Nonnull RepositoryUpdateRequest.Builder project(Project value)
Sets the project the repository should be moved to.
Protected Methods
RepositoryUpdateRequest.Builder self()
Overridden in concrete builder implementations to return this.
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.repository.AbstractRepositoryRequest.AbstractBuilder
From class com.atlassian.bitbucket.util.BuilderSupport
From class java.lang.Object

Public Constructors

public Builder ()

public Builder (Repository repository)

Constructs a new Builder which will update the specified Repository. The following values are copied:

The caller may then change the specific fields they wish to update before building the request. If the request is built immediately, the repository will not be updated in any way.

Parameters
repository the repository to update, and from which all default values should be drawn

public Builder (RepositoryUpdateRequest request)

Constructs a new Builder which uses as its defaults all the values from the provided request.

Parameters
request the request to copy into the new builder

Public Methods

@Nonnull public RepositoryUpdateRequest build ()

Builds a request from the assembled values. Before the request is built, it is first verified that a name was specified and an exception is thrown if it was not.

Returns
  • the built request
Throws
IllegalStateException if the name is null, empty or contains only whitespace

@Nonnull public RepositoryUpdateRequest.Builder id (int value)

Sets the 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.

Parameters
value the repository's ID
Returns
  • this

@Nonnull public RepositoryUpdateRequest.Builder project (Project value)

Sets the project the repository should be moved to.

Parameters
value the project to move the repository to. If null, leave the repository in the existing project
Returns
  • this

Protected Methods

protected RepositoryUpdateRequest.Builder self ()

Overridden in concrete builder implementations to return this.

Returns
  • this