@@ -38,6 +38,11 @@ public class CreateNetworkPayload {
3838 @ SerializedName (SERIALIZED_NAME_ADDRESS_FAMILY )
3939 @ javax .annotation .Nullable private CreateNetworkAddressFamily addressFamily ;
4040
41+ public static final String SERIALIZED_NAME_DESCRIPTION = "description" ;
42+
43+ @ SerializedName (SERIALIZED_NAME_DESCRIPTION )
44+ @ javax .annotation .Nullable private String description ;
45+
4146 public static final String SERIALIZED_NAME_DHCP = "dhcp" ;
4247
4348 @ SerializedName (SERIALIZED_NAME_DHCP )
@@ -81,6 +86,24 @@ public void setAddressFamily(
8186 this .addressFamily = addressFamily ;
8287 }
8388
89+ public CreateNetworkPayload description (@ javax .annotation .Nullable String description ) {
90+ this .description = description ;
91+ return this ;
92+ }
93+
94+ /**
95+ * Description Object. Allows string up to 255 Characters.
96+ *
97+ * @return description
98+ */
99+ @ javax .annotation .Nullable public String getDescription () {
100+ return description ;
101+ }
102+
103+ public void setDescription (@ javax .annotation .Nullable String description ) {
104+ this .description = description ;
105+ }
106+
84107 public CreateNetworkPayload dhcp (@ javax .annotation .Nullable Boolean dhcp ) {
85108 this .dhcp = dhcp ;
86109 return this ;
@@ -105,11 +128,21 @@ public CreateNetworkPayload labels(@javax.annotation.Nullable Object labels) {
105128 }
106129
107130 /**
108- * Object that represents the labels of an object. Regex for keys:
109- * `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values:
110- * `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a
111- * `null` value for a key will remove that key. The `stackit-` prefix is
112- * reserved and cannot be used for Keys.
131+ * Object that represents the labels as key-value pairs of a resource. Key constraints: - May
132+ * contain an optional domain prefix separated by a slash (`/`). - Domain prefix must
133+ * be less than or equal to 250 characters. - Domain prefix must ba a valid DNS subdomain
134+ * containing only lowercase alphanumerics (`[a-z0-9]`) and dashes (`-`),
135+ * separated by dots (`.`). - Length (excluding the domain prefix) must be between 1
136+ * and 63 characters. - Must begin and end with an alphanumerical character
137+ * (`[a-z0-9A-Z]`). - May contain dashes (`-`), underscores (`_`),
138+ * dots (`.`), and alphanumerics in between. - Keys starting with the prefix
139+ * `stackit-` or having a domain prefix of `stackit.cloud` (including its
140+ * subdomains, e.g., `*.stackit.cloud/`) are reserved for system use. Value
141+ * constraints: - Must be less than or equal to 63 characters long (can be empty). - If not
142+ * empty it must begin and end with an alphanumeric character (`[a-z0-9A-Z]`). - May
143+ * contain dashes (`-`), underscores (`_`), dots (`.`), and
144+ * alphanumerics in between. A resource can have a maximum of 64 labels. Reserved labels are
145+ * excluded from this count. Providing a `null` value for a key will remove that key.
113146 *
114147 * @return labels
115148 */
@@ -212,6 +245,7 @@ public boolean equals(Object o) {
212245 }
213246 CreateNetworkPayload createNetworkPayload = (CreateNetworkPayload ) o ;
214247 return Objects .equals (this .addressFamily , createNetworkPayload .addressFamily )
248+ && Objects .equals (this .description , createNetworkPayload .description )
215249 && Objects .equals (this .dhcp , createNetworkPayload .dhcp )
216250 && Objects .equals (this .labels , createNetworkPayload .labels )
217251 && Objects .equals (this .name , createNetworkPayload .name )
@@ -222,14 +256,16 @@ public boolean equals(Object o) {
222256
223257 @ Override
224258 public int hashCode () {
225- return Objects .hash (addressFamily , dhcp , labels , name , routed , additionalProperties );
259+ return Objects .hash (
260+ addressFamily , description , dhcp , labels , name , routed , additionalProperties );
226261 }
227262
228263 @ Override
229264 public String toString () {
230265 StringBuilder sb = new StringBuilder ();
231266 sb .append ("class CreateNetworkPayload {\n " );
232267 sb .append (" addressFamily: " ).append (toIndentedString (addressFamily )).append ("\n " );
268+ sb .append (" description: " ).append (toIndentedString (description )).append ("\n " );
233269 sb .append (" dhcp: " ).append (toIndentedString (dhcp )).append ("\n " );
234270 sb .append (" labels: " ).append (toIndentedString (labels )).append ("\n " );
235271 sb .append (" name: " ).append (toIndentedString (name )).append ("\n " );
@@ -259,7 +295,13 @@ private String toIndentedString(Object o) {
259295 // a set of all properties/fields (JSON key names)
260296 openapiFields =
261297 new HashSet <String >(
262- Arrays .asList ("addressFamily" , "dhcp" , "labels" , "name" , "routed" ));
298+ Arrays .asList (
299+ "addressFamily" ,
300+ "description" ,
301+ "dhcp" ,
302+ "labels" ,
303+ "name" ,
304+ "routed" ));
263305
264306 // a set of required properties/fields (JSON key names)
265307 openapiRequiredFields = new HashSet <String >(Arrays .asList ("name" ));
@@ -299,6 +341,14 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
299341 if (jsonObj .get ("addressFamily" ) != null && !jsonObj .get ("addressFamily" ).isJsonNull ()) {
300342 CreateNetworkAddressFamily .validateJsonElement (jsonObj .get ("addressFamily" ));
301343 }
344+ if ((jsonObj .get ("description" ) != null && !jsonObj .get ("description" ).isJsonNull ())
345+ && !jsonObj .get ("description" ).isJsonPrimitive ()) {
346+ throw new IllegalArgumentException (
347+ String .format (
348+ java .util .Locale .ROOT ,
349+ "Expected the field `description` to be a primitive type in the JSON string but got `%s`" ,
350+ jsonObj .get ("description" ).toString ()));
351+ }
302352 if (!jsonObj .get ("name" ).isJsonPrimitive ()) {
303353 throw new IllegalArgumentException (
304354 String .format (
0 commit comments