You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: branches/update-datastore/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ProjectInfo.java
+92-2Lines changed: 92 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -41,11 +41,24 @@ public class ProjectInfo implements Serializable {
41
41
privatefinalLongcreateTimeMillis;
42
42
privatefinalResourceIdparent;
43
43
44
+
/**
45
+
* The project lifecycle state.
46
+
*
47
+
* <ul>
48
+
* <li>LIFECYCLE_STATE_UNSPECIFIED: only used/useful for distinguishing unset values
49
+
* <li>ACTIVE: the normal and active state
50
+
* <li>DELETE_REQUESTED: the project has been marked for deletion by the user or by the system
51
+
* (Google Cloud Platform). This can generally be reversed by calling
52
+
* {@link ResourceManager#undelete}.
53
+
* <li>DELETE_IN_PROGRESS: the process of deleting the project has begun. Reversing the deletion
54
+
* is no longer possible.
55
+
* <ul>
56
+
*/
44
57
publicenumState {
45
58
LIFECYCLE_STATE_UNSPECIFIED,
46
59
ACTIVE,
47
60
DELETE_REQUESTED,
48
-
DELETE_IN_PROGRESS;
61
+
DELETE_IN_PROGRESS
49
62
}
50
63
51
64
publicstaticclassBuilder {
@@ -58,34 +71,68 @@ public static class Builder {
58
71
privateResourceIdparent;
59
72
60
73
Builder() {
61
-
labels = newHashMap<String, String>();
74
+
labels = newHashMap<>();
62
75
}
63
76
77
+
/**
78
+
* Set the user-assigned name of the project.
79
+
*
80
+
* This field is optional and can remain unset. Allowed characters are: lowercase and uppercase
81
+
* letters, numbers, hyphen, single-quote, double-quote, space, and exclamation point. This
82
+
* field can be changed after project creation.
83
+
*/
64
84
publicBuildername(Stringname) {
65
85
this.name = name;
66
86
returnthis;
67
87
}
68
88
89
+
/**
90
+
* Set the unique, user-assigned ID of the project.
91
+
*
92
+
* The ID must be 6 to 30 lowercase letters, digits, or hyphens. It must start with a letter.
93
+
* Trailing hyphens are prohibited. This field cannot be changed after the server creates the
94
+
* project.
95
+
*/
69
96
publicBuilderid(Stringid) {
70
97
this.id = id;
71
98
returnthis;
72
99
}
73
100
101
+
/**
102
+
* Add a label associated with this project.
103
+
*
104
+
* See {@link #labels} for label restrictions.
105
+
*/
74
106
publicBuilderaddLabel(Stringkey, Stringvalue) {
75
107
this.labels.put(key, value);
76
108
returnthis;
77
109
}
78
110
111
+
/**
112
+
* Remove a label associated with this project.
113
+
*/
79
114
publicBuilderremoveLabel(Stringkey) {
80
115
this.labels.remove(key);
81
116
returnthis;
82
117
}
83
118
119
+
/**
120
+
* Clear the labels associated with this project.
121
+
*/
84
122
publicBuilderclearLabels() {
85
123
this.labels.clear();
86
124
returnthis;
87
125
}
88
126
127
+
/**
128
+
* Set the labels associated with this project.
129
+
*
130
+
* Label keys must be between 1 and 63 characters long and must conform to the following regular
131
+
* expression: [a-z]([-a-z0-9]*[a-z0-9])?. Label values must be between 0 and 63 characters long
132
+
* and must conform to the regular expression ([a-z]([-a-z0-9]*[a-z0-9])?)?. No more than 256
133
+
* labels can be associated with a given resource. This field can be changed after project
Copy file name to clipboardExpand all lines: branches/update-datastore/gcloud-java-resourcemanager/src/main/java/com/google/gcloud/resourcemanager/ResourceId.java
+5-10Lines changed: 5 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -26,14 +26,9 @@ public class ResourceId implements Serializable {
Copy file name to clipboardExpand all lines: branches/update-datastore/gcloud-java-resourcemanager/src/test/java/com/google/gcloud/resourcemanager/ProjectInfoTest.java
Copy file name to clipboardExpand all lines: branches/update-datastore/gcloud-java-resourcemanager/src/test/java/com/google/gcloud/resourcemanager/ProjectTest.java
Copy file name to clipboardExpand all lines: branches/update-datastore/gcloud-java-resourcemanager/src/test/java/com/google/gcloud/resourcemanager/ResourceIdTest.java
Copy file name to clipboardExpand all lines: branches/update-datastore/gcloud-java-resourcemanager/src/test/java/com/google/gcloud/resourcemanager/SerializationTest.java
0 commit comments