All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mailgun.model.mailing.lists.AddMailingListMembersRequest Maven / Gradle / Ivy

Go to download

The Mailgun SDK for Java enables Java developers to work with Mailgun API efficiently.

The newest version!
package com.mailgun.model.mailing.lists;

import com.mailgun.enums.YesNo;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;
import lombok.extern.jackson.Jacksonized;

import java.util.List;

/**
 * 

* Request to add members to the mailing list. *

* * @see Mailing Lists */ @Jacksonized @Getter @ToString @EqualsAndHashCode @Builder public class AddMailingListMembersRequest { /** *

* JSON-encoded array. Elements can be either addresses, e.g. {@code ["[email protected]", "[email protected]"] }. *

*

* Or JSON objects, e.g. {@code [{"address": "[email protected]", "name": "Bob", "subscribed": false}, {"address": "[email protected]", "name": "Alice"}] }. *

*

* Custom variables can be provided. *

*/ List members; /** *

* yes to update existing members. *

*

* no (default) to ignore duplicates. *

*/ String upsert; public static class AddMailingListMembersRequestBuilder { /** *

* true to update existing members. *

*

* false (default) to ignore duplicates. *

* * @param updateExistingMembers update existing members or ignore duplicates * @return Returns a reference to this object so that method calls can be chained together. */ public AddMailingListMembersRequest.AddMailingListMembersRequestBuilder upsert(boolean updateExistingMembers) { this.upsert = YesNo.getValue(updateExistingMembers); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy