/** * Use this in place of valueOf. * * @param value * real value * @return BounceType corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static BounceType fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (BounceType enumEntry : BounceType.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * <p> * The reason for the bounce. You must provide either this parameter or <code>RecipientDsnFields</code>. * </p> * * @param bounceType * The reason for the bounce. You must provide either this parameter or <code>RecipientDsnFields</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see BounceType */ public BouncedRecipientInfo withBounceType(BounceType bounceType) { this.bounceType = bounceType.toString(); return this; }
/** * <p> * The reason for the bounce. You must provide either this parameter or * <code>RecipientDsnFields</code>. * </p> * <p> * <b>Constraints:</b><br/> * <b>Allowed Values: </b>DoesNotExist, MessageTooLarge, ExceededQuota, * ContentRejected, Undefined, TemporaryFailure * * @param bounceType <p> * The reason for the bounce. You must provide either this * parameter or <code>RecipientDsnFields</code>. * </p> * @see BounceType */ public void setBounceType(BounceType bounceType) { this.bounceType = bounceType.toString(); }
/** * Use this in place of valueOf. * * @param value * real value * @return BounceType corresponding to the value * * @throws IllegalArgumentException * If the specified value does not map to one of the known values in this enum. */ public static BounceType fromValue(String value) { if (value == null || "".equals(value)) { throw new IllegalArgumentException("Value cannot be null or empty!"); } for (BounceType enumEntry : BounceType.values()) { if (enumEntry.toString().equals(value)) { return enumEntry; } } throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); } }
/** * <p> * The reason for the bounce. You must provide either this parameter or * <code>RecipientDsnFields</code>. * </p> * <p> * Returns a reference to this object so that method calls can be chained * together. * <p> * <b>Constraints:</b><br/> * <b>Allowed Values: </b>DoesNotExist, MessageTooLarge, ExceededQuota, * ContentRejected, Undefined, TemporaryFailure * * @param bounceType <p> * The reason for the bounce. You must provide either this * parameter or <code>RecipientDsnFields</code>. * </p> * @return A reference to this updated object so that method calls can be * chained together. * @see BounceType */ public BouncedRecipientInfo withBounceType(BounceType bounceType) { this.bounceType = bounceType.toString(); return this; }
/** * <p> * The reason for the bounce. You must provide either this parameter or <code>RecipientDsnFields</code>. * </p> * * @param bounceType * The reason for the bounce. You must provide either this parameter or <code>RecipientDsnFields</code>. * @return Returns a reference to this object so that method calls can be chained together. * @see BounceType */ public BouncedRecipientInfo withBounceType(BounceType bounceType) { this.bounceType = bounceType.toString(); return this; }