5454 */
5555public class SlaveOptions implements Describable <SlaveOptions >, Serializable {
5656 private static final long serialVersionUID = -1L ;
57- private static final SlaveOptions EMPTY = new SlaveOptions (null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
57+ private static final SlaveOptions EMPTY = new SlaveOptions (null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null , null );
5858
5959 // Provisioning attributes
6060 private /*final*/ @ CheckForNull BootSource bootSource ;
6161 private final @ CheckForNull String hardwareId ;
6262 private final @ CheckForNull String networkId ; // csv list of networkIds, in fact
63+ private final @ CheckForNull String customMetaData ; // csv list of keyvalue, in fact
6364 private final @ CheckForNull String userDataId ;
6465 private final Integer instanceCap ;
6566 private final Integer instancesMin ;
@@ -106,6 +107,10 @@ public class SlaveOptions implements Describable<SlaveOptions>, Serializable {
106107 return networkId ;
107108 }
108109
110+ public @ CheckForNull String getCustomMetaData () {
111+ return customMetaData ;
112+ }
113+
109114 public @ CheckForNull String getUserDataId () {
110115 return userDataId ;
111116 }
@@ -165,6 +170,7 @@ public SlaveOptions(Builder b) {
165170 b .bootSource ,
166171 b .hardwareId ,
167172 b .networkId ,
173+ b .customMetaData ,
168174 b .userDataId ,
169175 b .instanceCap ,
170176 b .instancesMin ,
@@ -188,6 +194,7 @@ public SlaveOptions(
188194 @ CheckForNull BootSource bootSource ,
189195 String hardwareId ,
190196 String networkId ,
197+ String customMetaData ,
191198 String userDataId ,
192199 Integer instanceCap ,
193200 Integer instancesMin ,
@@ -207,6 +214,7 @@ public SlaveOptions(
207214 this .bootSource = bootSource ;
208215 this .hardwareId = Util .fixEmpty (hardwareId );
209216 this .networkId = Util .fixEmpty (networkId );
217+ this .customMetaData = Util .fixEmpty (customMetaData );
210218 this .userDataId = Util .fixEmpty (userDataId );
211219 this .instanceCap = instanceCap ;
212220 this .instancesMin = instancesMin ;
@@ -244,6 +252,7 @@ private Object readResolve() {
244252 .bootSource (_override (this .bootSource , o .bootSource ))
245253 .hardwareId (_override (this .hardwareId , o .hardwareId ))
246254 .networkId (_override (this .networkId , o .networkId ))
255+ .customMetaData (_override (this .customMetaData , o .customMetaData ))
247256 .userDataId (_override (this .userDataId , o .userDataId ))
248257 .instanceCap (_override (this .instanceCap , o .instanceCap ))
249258 .instancesMin (_override (this .instancesMin , o .instancesMin ))
@@ -275,6 +284,7 @@ private Object readResolve() {
275284 .bootSource (_erase (this .bootSource , defaults .bootSource ))
276285 .hardwareId (_erase (this .hardwareId , defaults .hardwareId ))
277286 .networkId (_erase (this .networkId , defaults .networkId ))
287+ .customMetaData (_erase (this .customMetaData , defaults .customMetaData ))
278288 .userDataId (_erase (this .userDataId , defaults .userDataId ))
279289 .instanceCap (_erase (this .instanceCap , defaults .instanceCap ))
280290 .instancesMin (_erase (this .instancesMin , defaults .instancesMin ))
@@ -307,6 +317,7 @@ public String toString() {
307317 .append ("bootSource" , bootSource )
308318 .append ("hardwareId" , hardwareId )
309319 .append ("networkId" , networkId )
320+ .append ("customMetaData" , customMetaData )
310321 .append ("userDataId" , userDataId )
311322 .append ("instanceCap" , instanceCap )
312323 .append ("instancesMin" , instancesMin )
@@ -336,6 +347,7 @@ public boolean equals(Object o) {
336347 if (!Objects .equals (bootSource , that .bootSource )) return false ;
337348 if (!Objects .equals (hardwareId , that .hardwareId )) return false ;
338349 if (!Objects .equals (networkId , that .networkId )) return false ;
350+ if (!Objects .equals (customMetaData , that .customMetaData )) return false ;
339351 if (!Objects .equals (userDataId , that .userDataId )) return false ;
340352 if (!Objects .equals (instanceCap , that .instanceCap )) return false ;
341353 if (!Objects .equals (instancesMin , that .instancesMin )) return false ;
@@ -358,6 +370,7 @@ public int hashCode() {
358370 int result = bootSource != null ? bootSource .hashCode () : 0 ;
359371 result = 31 * result + (hardwareId != null ? hardwareId .hashCode () : 0 );
360372 result = 31 * result + (networkId != null ? networkId .hashCode () : 0 );
373+ result = 31 * result + (customMetaData != null ? customMetaData .hashCode () : 0 );
361374 result = 31 * result + (userDataId != null ? userDataId .hashCode () : 0 );
362375 result = 31 * result + (instanceCap != null ? instanceCap .hashCode () : 0 );
363376 result = 31 * result + (instancesMin != null ? instancesMin .hashCode () : 0 );
@@ -384,6 +397,7 @@ public Builder getBuilder() {
384397 .bootSource (bootSource )
385398 .hardwareId (hardwareId )
386399 .networkId (networkId )
400+ .customMetaData (customMetaData )
387401 .userDataId (userDataId )
388402 .instanceCap (instanceCap )
389403 .instancesMin (instancesMin )
@@ -417,6 +431,7 @@ public static final class Builder {
417431 private @ CheckForNull BootSource bootSource ;
418432 private @ CheckForNull String hardwareId ;
419433 private @ CheckForNull String networkId ;
434+ private @ CheckForNull String customMetaData ;
420435 private @ CheckForNull String userDataId ;
421436 private @ CheckForNull Integer instanceCap ;
422437 private @ CheckForNull Integer instancesMin ;
@@ -456,6 +471,11 @@ public Builder() {}
456471 return this ;
457472 }
458473
474+ public @ Nonnull Builder customMetaData (String customMetaData ) {
475+ this .customMetaData = customMetaData ;
476+ return this ;
477+ }
478+
459479 public @ Nonnull Builder userDataId (String userDataId ) {
460480 this .userDataId = userDataId ;
461481 return this ;
0 commit comments