Class Project.Builder (1.15.0)

public static class Project.Builder extends ProjectInfo.Builder

Builder for Project.

Inheritance

java.lang.Object > ProjectInfo.Builder > Project.Builder

Methods

addLabel(String key, String value)

public Project.Builder addLabel(String key, String value)

Add a label associated with this project.

See #labels for label restrictions.

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
Project.Builder
Overrides

build()

public Project build()
Returns
TypeDescription
Project
Overrides

clearLabels()

public Project.Builder clearLabels()

Clear the labels associated with this project.

Returns
TypeDescription
Project.Builder
Overrides

removeLabel(String key)

public Project.Builder removeLabel(String key)

Remove a label associated with this project.

Parameter
NameDescription
keyString
Returns
TypeDescription
Project.Builder
Overrides

setLabels(Map<String,String> labels)

public Project.Builder setLabels(Map<String,String> labels)

Set the labels associated with this project.

Label keys must be between 1 and 63 characters long and must conform to the following regular expression: a-z?. Label values must be between 0 and 63 characters long and must conform to the regular expression (a-z?)?. No more than 256 labels can be associated with a given resource. This field can be changed after project creation.

Parameter
NameDescription
labelsMap<String,String>
Returns
TypeDescription
Project.Builder
Overrides

setName(String name)

public Project.Builder setName(String name)

Set the user-assigned name of the project.

This field is optional and can remain unset. Allowed characters are: lowercase and uppercase letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. This field can be changed after project creation.

Parameter
NameDescription
nameString
Returns
TypeDescription
Project.Builder
Overrides

setParent(ProjectInfo.ResourceId parent)

public Project.Builder setParent(ProjectInfo.ResourceId parent)
Parameter
NameDescription
parentProjectInfo.ResourceId
Returns
TypeDescription
Project.Builder
Overrides

setProjectId(String projectId)

public Project.Builder setProjectId(String projectId)

Set the unique, user-assigned ID of the project.

The ID must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter. Trailing hyphens are prohibited. This field cannot be changed after the server creates the project.

Parameter
NameDescription
projectIdString
Returns
TypeDescription
Project.Builder
Overrides