public static class Project.Builder extends ProjectInfo.Builder
Project
.Modifier and Type | Method and Description |
---|---|
Project.Builder |
addLabel(String key,
String value)
Add a label associated with this project.
|
Project |
build() |
Project.Builder |
clearLabels()
Clear the labels associated with this project.
|
Project.Builder |
removeLabel(String key)
Remove a label associated with this project.
|
Project.Builder |
setLabels(Map<String,String> labels)
Set the labels associated with this project.
|
Project.Builder |
setName(String name)
Set the user-assigned name of the project.
|
Project.Builder |
setParent(ProjectInfo.ResourceId parent) |
Project.Builder |
setProjectId(String projectId)
Set the unique, user-assigned ID of the project.
|
public Project.Builder setName(String name)
ProjectInfo.Builder
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.
setName
in class ProjectInfo.Builder
public Project.Builder setProjectId(String projectId)
ProjectInfo.Builder
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.
setProjectId
in class ProjectInfo.Builder
public Project.Builder addLabel(String key, String value)
ProjectInfo.Builder
See ProjectInfo.labels
for label restrictions.
addLabel
in class ProjectInfo.Builder
public Project.Builder removeLabel(String key)
ProjectInfo.Builder
removeLabel
in class ProjectInfo.Builder
public Project.Builder clearLabels()
ProjectInfo.Builder
clearLabels
in class ProjectInfo.Builder
public Project.Builder setLabels(Map<String,String> labels)
ProjectInfo.Builder
Label keys must be between 1 and 63 characters long and must conform to the following regular expression: [a-z]([-a-z0-9]*[a-z0-9])?. Label values must be between 0 and 63 characters long and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?. No more than 256 labels can be associated with a given resource. This field can be changed after project creation.
setLabels
in class ProjectInfo.Builder
public Project.Builder setParent(ProjectInfo.ResourceId parent)
setParent
in class ProjectInfo.Builder
public Project build()
build
in class ProjectInfo.Builder
Copyright © 2019 Google LLC. All rights reserved.