Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/sfs/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a2700649defb7b45c9c4d8c1de6212374519e42c
37b3b223bda4dbadc466cfb001bafa0fdf49b68f
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public class CreateShareExportPolicyPayload {
public static final String SERIALIZED_NAME_NAME = "name";

@SerializedName(SERIALIZED_NAME_NAME)
@javax.annotation.Nullable private String name;
@javax.annotation.Nonnull
private String name;

public static final String SERIALIZED_NAME_RULES = "rules";

Expand Down Expand Up @@ -84,7 +85,7 @@ public void setLabels(@javax.annotation.Nullable Map<String, String> labels) {
this.labels = labels;
}

public CreateShareExportPolicyPayload name(@javax.annotation.Nullable String name) {
public CreateShareExportPolicyPayload name(@javax.annotation.Nonnull String name) {
this.name = name;
return this;
}
Expand All @@ -94,11 +95,12 @@ public CreateShareExportPolicyPayload name(@javax.annotation.Nullable String nam
*
* @return name
*/
@javax.annotation.Nullable public String getName() {
@javax.annotation.Nonnull
public String getName() {
return name;
}

public void setName(@javax.annotation.Nullable String name) {
public void setName(@javax.annotation.Nonnull String name) {
this.name = name;
}

Expand Down Expand Up @@ -232,7 +234,7 @@ private String toIndentedString(Object o) {
openapiFields = new HashSet<String>(Arrays.asList("labels", "name", "rules"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(0);
openapiRequiredFields = new HashSet<String>(Arrays.asList("name"));
}

/**
Expand All @@ -253,9 +255,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
CreateShareExportPolicyPayload.openapiRequiredFields.toString()));
}
}

// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : CreateShareExportPolicyPayload.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
throw new IllegalArgumentException(
String.format(
java.util.Locale.ROOT,
"The required field `%s` is not found in the JSON string: %s",
requiredField,
jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull())
&& !jsonObj.get("name").isJsonPrimitive()) {
if (!jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(
String.format(
java.util.Locale.ROOT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ public class CreateSharePayload {
public static final String SERIALIZED_NAME_NAME = "name";

@SerializedName(SERIALIZED_NAME_NAME)
@javax.annotation.Nullable private String name;
@javax.annotation.Nonnull
private String name;

public static final String SERIALIZED_NAME_SPACE_HARD_LIMIT_GIGABYTES =
"spaceHardLimitGigabytes";

@SerializedName(SERIALIZED_NAME_SPACE_HARD_LIMIT_GIGABYTES)
@javax.annotation.Nullable private Integer spaceHardLimitGigabytes;
@javax.annotation.Nonnull
private Integer spaceHardLimitGigabytes;

public CreateSharePayload() {}

Expand Down Expand Up @@ -107,7 +109,7 @@ public void setLabels(@javax.annotation.Nullable Map<String, String> labels) {
this.labels = labels;
}

public CreateSharePayload name(@javax.annotation.Nullable String name) {
public CreateSharePayload name(@javax.annotation.Nonnull String name) {
this.name = name;
return this;
}
Expand All @@ -117,16 +119,17 @@ public CreateSharePayload name(@javax.annotation.Nullable String name) {
*
* @return name
*/
@javax.annotation.Nullable public String getName() {
@javax.annotation.Nonnull
public String getName() {
return name;
}

public void setName(@javax.annotation.Nullable String name) {
public void setName(@javax.annotation.Nonnull String name) {
this.name = name;
}

public CreateSharePayload spaceHardLimitGigabytes(
@javax.annotation.Nullable Integer spaceHardLimitGigabytes) {
@javax.annotation.Nonnull Integer spaceHardLimitGigabytes) {
this.spaceHardLimitGigabytes = spaceHardLimitGigabytes;
return this;
}
Expand All @@ -137,12 +140,13 @@ public CreateSharePayload spaceHardLimitGigabytes(
*
* @return spaceHardLimitGigabytes
*/
@javax.annotation.Nullable public Integer getSpaceHardLimitGigabytes() {
@javax.annotation.Nonnull
public Integer getSpaceHardLimitGigabytes() {
return spaceHardLimitGigabytes;
}

public void setSpaceHardLimitGigabytes(
@javax.annotation.Nullable Integer spaceHardLimitGigabytes) {
@javax.annotation.Nonnull Integer spaceHardLimitGigabytes) {
this.spaceHardLimitGigabytes = spaceHardLimitGigabytes;
}

Expand Down Expand Up @@ -269,7 +273,8 @@ private String toIndentedString(Object o) {
"exportPolicyName", "labels", "name", "spaceHardLimitGigabytes"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(0);
openapiRequiredFields =
new HashSet<String>(Arrays.asList("name", "spaceHardLimitGigabytes"));
}

/**
Expand All @@ -289,6 +294,18 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
CreateSharePayload.openapiRequiredFields.toString()));
}
}

// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : CreateSharePayload.openapiRequiredFields) {
if (jsonElement.getAsJsonObject().get(requiredField) == null) {
throw new IllegalArgumentException(
String.format(
java.util.Locale.ROOT,
"The required field `%s` is not found in the JSON string: %s",
requiredField,
jsonElement.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("exportPolicyName") != null
&& !jsonObj.get("exportPolicyName").isJsonNull())
Expand All @@ -299,8 +316,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
"Expected the field `exportPolicyName` to be a primitive type in the JSON string but got `%s`",
jsonObj.get("exportPolicyName").toString()));
}
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull())
&& !jsonObj.get("name").isJsonPrimitive()) {
if (!jsonObj.get("name").isJsonPrimitive()) {
throw new IllegalArgumentException(
String.format(
java.util.Locale.ROOT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public class ResourcePool {
public static final String SERIALIZED_NAME_SNAPSHOTS_ARE_VISIBLE = "snapshotsAreVisible";

@SerializedName(SERIALIZED_NAME_SNAPSHOTS_ARE_VISIBLE)
@javax.annotation.Nullable private Boolean snapshotsAreVisible;
@javax.annotation.Nullable private Boolean snapshotsAreVisible = false;

public static final String SERIALIZED_NAME_SPACE = "space";

Expand Down