/** * Use this in place of valueOf. * * @param value * real value * @return Platform corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static Platform fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (Platform enumEntry : Platform.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * <p> * Developer desktop or target application platform. * </p> * * @param platform * Developer desktop or target application platform. * @return Returns a reference to this object so that method calls can be chained together. * @see Platform */ public ExportBundleRequest withPlatform(Platform platform) { this.platform = platform.toString(); return this; }
/** * @param availablePlatforms * @return Returns a reference to this object so that method calls can be chained together. * @see Platform */ public BundleDetails withAvailablePlatforms(Platform... availablePlatforms) { java.util.ArrayList<String> availablePlatformsCopy = new java.util.ArrayList<String>(availablePlatforms.length); for (Platform value : availablePlatforms) { availablePlatformsCopy.add(value.toString()); } if (getAvailablePlatforms() == null) { setAvailablePlatforms(availablePlatformsCopy); } else { getAvailablePlatforms().addAll(availablePlatformsCopy); } return this; }
/** * Use this in place of valueOf. * * @param value * real value * @return Platform corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static Platform fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (Platform enumEntry : Platform.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * <p> * Developer desktop or target application platform. * </p> * * @param platform * Developer desktop or target application platform. * @return Returns a reference to this object so that method calls can be chained together. * @see Platform */ public ExportBundleRequest withPlatform(Platform platform) { this.platform = platform.toString(); return this; }
/** * @param availablePlatforms * @return Returns a reference to this object so that method calls can be chained together. * @see Platform */ public BundleDetails withAvailablePlatforms(Platform... availablePlatforms) { java.util.ArrayList<String> availablePlatformsCopy = new java.util.ArrayList<String>(availablePlatforms.length); for (Platform value : availablePlatforms) { availablePlatformsCopy.add(value.toString()); } if (getAvailablePlatforms() == null) { setAvailablePlatforms(availablePlatformsCopy); } else { getAvailablePlatforms().addAll(availablePlatformsCopy); } return this; }