|
| 1 | +/** |
| 2 | + * Podio Java client library |
| 3 | + */ |
| 4 | +package com.podio.space; |
| 5 | + |
| 6 | +import java.util.List; |
| 7 | + |
| 8 | +import javax.ws.rs.core.MultivaluedMap; |
| 9 | + |
| 10 | +import org.codehaus.jackson.annotate.JsonProperty; |
| 11 | + |
| 12 | +import com.podio.common.Role; |
| 13 | + |
| 14 | +/** |
| 15 | + * To match the format of the JSON data sent using the 'add member to space' API call |
| 16 | + * |
| 17 | + * @author apitman |
| 18 | + */ |
| 19 | +public class SpaceMemberAdd { |
| 20 | + |
| 21 | + /** |
| 22 | + * The role of the new users |
| 23 | + */ |
| 24 | + private Role role; |
| 25 | + |
| 26 | + /** |
| 27 | + * The personalized message to put in the invitation |
| 28 | + */ |
| 29 | + private String message; |
| 30 | + |
| 31 | + /** |
| 32 | + * The list of users ids to invite |
| 33 | + */ |
| 34 | + private List<Integer> users; |
| 35 | + |
| 36 | + /** |
| 37 | + * The list of profile ids to invite to the space |
| 38 | + */ |
| 39 | + private List<Integer> profiles; |
| 40 | + |
| 41 | + /** |
| 42 | + * The list of mail addresses for new or existing Podio users |
| 43 | + */ |
| 44 | + private List<String> mails; |
| 45 | + |
| 46 | + /** |
| 47 | + * The external contacts to invite |
| 48 | + */ |
| 49 | + private MultivaluedMap<Integer, String> externalContacts; |
| 50 | + |
| 51 | + /** |
| 52 | + * Optionally specify "item" to indicate invite to a specific item |
| 53 | + */ |
| 54 | + private String contextRefType; |
| 55 | + |
| 56 | + /** |
| 57 | + * Must be set to the item id if source_key is set |
| 58 | + */ |
| 59 | + private int contextRefId; |
| 60 | + |
| 61 | + /** |
| 62 | + * A optional custom string indicating where the user was when he/she invited the user(s) |
| 63 | + */ |
| 64 | + private String inviteContext; |
| 65 | + |
| 66 | + /** |
| 67 | + * @return the role |
| 68 | + */ |
| 69 | + public Role getRole() { |
| 70 | + return role; |
| 71 | + } |
| 72 | + |
| 73 | + /** |
| 74 | + * @param role the role to set |
| 75 | + */ |
| 76 | + public void setRole(Role role) { |
| 77 | + this.role = role; |
| 78 | + } |
| 79 | + |
| 80 | + /** |
| 81 | + * @return the message |
| 82 | + */ |
| 83 | + public String getMessage() { |
| 84 | + return message; |
| 85 | + } |
| 86 | + |
| 87 | + /** |
| 88 | + * @param message the message to set |
| 89 | + */ |
| 90 | + public void setMessage(String message) { |
| 91 | + this.message = message; |
| 92 | + } |
| 93 | + |
| 94 | + /** |
| 95 | + * @return the users |
| 96 | + */ |
| 97 | + public List<Integer> getUsers() { |
| 98 | + return users; |
| 99 | + } |
| 100 | + |
| 101 | + /** |
| 102 | + * @param users the users to set |
| 103 | + */ |
| 104 | + public void setUsers(List<Integer> users) { |
| 105 | + this.users = users; |
| 106 | + } |
| 107 | + |
| 108 | + /** |
| 109 | + * @return the profiles |
| 110 | + */ |
| 111 | + public List<Integer> getProfiles() { |
| 112 | + return profiles; |
| 113 | + } |
| 114 | + |
| 115 | + /** |
| 116 | + * @param profiles the profiles to set |
| 117 | + */ |
| 118 | + public void setProfiles(List<Integer> profiles) { |
| 119 | + this.profiles = profiles; |
| 120 | + } |
| 121 | + |
| 122 | + /** |
| 123 | + * @return the mails |
| 124 | + */ |
| 125 | + public List<String> getMails() { |
| 126 | + return mails; |
| 127 | + } |
| 128 | + |
| 129 | + /** |
| 130 | + * @param mails the mails to set |
| 131 | + */ |
| 132 | + public void setMails(List<String> mails) { |
| 133 | + this.mails = mails; |
| 134 | + } |
| 135 | + |
| 136 | + /** |
| 137 | + * @return the externalContacts |
| 138 | + */ |
| 139 | + @JsonProperty("external_contacts") |
| 140 | + public MultivaluedMap<Integer, String> getExternalContacts() { |
| 141 | + return externalContacts; |
| 142 | + } |
| 143 | + |
| 144 | + /** |
| 145 | + * @param externalContacts the externalContacts to set |
| 146 | + */ |
| 147 | + @JsonProperty("external_contacts") |
| 148 | + public void setExternalContacts(MultivaluedMap<Integer, String> externalContacts) { |
| 149 | + this.externalContacts = externalContacts; |
| 150 | + } |
| 151 | + |
| 152 | + /** |
| 153 | + * @return the contextRefType |
| 154 | + */ |
| 155 | + @JsonProperty("context_ref_type") |
| 156 | + public String getContextRefType() { |
| 157 | + return contextRefType; |
| 158 | + } |
| 159 | + |
| 160 | + /** |
| 161 | + * @param contextRefType the contextRefType to set |
| 162 | + */ |
| 163 | + @JsonProperty("context_ref_type") |
| 164 | + public void setContextRefType(String contextRefType) { |
| 165 | + this.contextRefType = contextRefType; |
| 166 | + } |
| 167 | + |
| 168 | + /** |
| 169 | + * @return the contextRefId |
| 170 | + */ |
| 171 | + @JsonProperty("context_ref_id") |
| 172 | + public int getContextRefId() { |
| 173 | + return contextRefId; |
| 174 | + } |
| 175 | + |
| 176 | + /** |
| 177 | + * @param contextRefId the contextRefId to set |
| 178 | + */ |
| 179 | + @JsonProperty("context_ref_id") |
| 180 | + public void setContextRefId(int contextRefId) { |
| 181 | + this.contextRefId = contextRefId; |
| 182 | + } |
| 183 | + |
| 184 | + /** |
| 185 | + * @return the inviteContext |
| 186 | + */ |
| 187 | + @JsonProperty("invite_context") |
| 188 | + public String getInviteContext() { |
| 189 | + return inviteContext; |
| 190 | + } |
| 191 | + |
| 192 | + /** |
| 193 | + * @param inviteContext the inviteContext to set |
| 194 | + */ |
| 195 | + @JsonProperty("invite_context") |
| 196 | + public void setInviteContext(String inviteContext) { |
| 197 | + this.inviteContext = inviteContext; |
| 198 | + } |
| 199 | + |
| 200 | +} |
0 commit comments