com.mailgun.model.mailing.lists.UpdateMailingListRequest Maven / Gradle / Ivy
package com.mailgun.model.mailing.lists;
import com.mailgun.enums.AccessLevel;
import com.mailgun.enums.ReplyPreference;
import feign.form.FormProperty;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
/**
*
* Update mailgun lists request.
*
*
* @see Mailing Lists
*/
@Getter
@ToString
@EqualsAndHashCode
@Builder
public class UpdateMailingListRequest {
/**
*
* New mailing list address, e.g. [email protected]
(optional).
*
*/
String address;
/**
*
* New name, e.g. My newsletter
(optional).
*
*/
String name;
/**
*
* A description (optional)
*
*/
String description;
/**
*
* List access level, one of: READONLY
(default), MEMBERS
, EVERYONE
.
*
*/
@FormProperty("access_level")
String accessLevel;
/**
*
* Set where replies should go: list
(default) | sender
(optional).
*
*/
@FormProperty("reply_preference")
String replyPreference;
public static class UpdateMailingListRequestBuilder {
/**
*
* List access level, one of: READONLY
(default), MEMBERS
, EVERYONE
.
*
*
* @param accessLevel {@link AccessLevel}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateMailingListRequest.UpdateMailingListRequestBuilder accessLevel(AccessLevel accessLevel) {
this.accessLevel = accessLevel.getValue();
return this;
}
/**
*
* Set where replies should go: list
(default) | sender
(optional).
*
*
* @param replyPreference {@link ReplyPreference}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateMailingListRequest.UpdateMailingListRequestBuilder replyPreference(ReplyPreference replyPreference) {
this.replyPreference = replyPreference.getValue();
return this;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy