public static ObjectLockRetentionMode fromString(String objectLockRetentionModeString) { for (ObjectLockRetentionMode v : ObjectLockRetentionMode.values()) { if (v.toString().equals(objectLockRetentionModeString)) { return v; } } throw new IllegalArgumentException("Cannot create enum from " + objectLockRetentionModeString + " value!"); }
/** * The default Object Lock retention mode you want to apply to new objects placed in the specified bucket. */ public DefaultRetention withMode(ObjectLockRetentionMode mode) { return withMode(mode.toString()); }
/** * Indicates the Retention mode for the specified object. */ public void setMode(ObjectLockRetentionMode mode) { setMode(mode.toString()); }
/** * Indicates the Retention mode for the specified object. */ public ObjectLockRetention withMode(ObjectLockRetentionMode mode) { return withMode(mode.toString()); }