static Body fromBytes(byte[] bytes) { return bytes != null ? new Body(bytes) : none(); }
public ResponseDefinition() { this(HTTP_OK, null, Body.none(), null, null, null, null, null, null, null, null, Collections.<String>emptyList(), Parameters.empty(), true); }
static Body fromString(String str) { return str != null ? new Body(str) : none(); }
public static Body fromOneOf(byte[] bytes, String str, JsonNode json, String base64) { if (bytes != null) return new Body(bytes); if (str != null) return new Body(str); if (json != null && !(json instanceof NullNode)) return new Body(json); if (base64 != null) return new Body(decodeBase64(base64), true); return none(); }