Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@

package org.apache.cloudstack.storage.feign.model;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;

import java.util.List;
import java.util.Objects;
Expand Down Expand Up @@ -71,6 +73,7 @@ public enum OsTypeEnum {
this.value = value;
}

@JsonValue
public String getValue() {
return value;
}
Expand All @@ -80,9 +83,11 @@ public String toString() {
return String.valueOf(value);
}

@JsonCreator
public static OsTypeEnum fromValue(String text) {
if (text == null) return null;
for (OsTypeEnum b : OsTypeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
if (text.equalsIgnoreCase(b.value)) {
return b;
}
}
Expand Down Expand Up @@ -122,6 +127,7 @@ public enum ProtocolEnum {
this.value = value;
}

@JsonValue
public String getValue() {
return value;
}
Expand All @@ -131,9 +137,11 @@ public String toString() {
return String.valueOf(value);
}

@JsonCreator
public static ProtocolEnum fromValue(String text) {
if (text == null) return null;
for (ProtocolEnum b : ProtocolEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
if (text.equalsIgnoreCase(b.value)) {
Comment thread
piyush5netapp marked this conversation as resolved.
return b;
}
}
Expand Down
Loading