-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathIntegrationEventV2Request.java
More file actions
353 lines (269 loc) · 12.3 KB
/
IntegrationEventV2Request.java
File metadata and controls
353 lines (269 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
/*
* Talon.One API
* Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
*
* The version of the OpenAPI document:
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package one.talon.model;
import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* IntegrationEventV2Request
*/
public class IntegrationEventV2Request {
public static final String SERIALIZED_NAME_PROFILE_ID = "profileId";
@SerializedName(SERIALIZED_NAME_PROFILE_ID)
private String profileId;
public static final String SERIALIZED_NAME_STORE_INTEGRATION_ID = "storeIntegrationId";
@SerializedName(SERIALIZED_NAME_STORE_INTEGRATION_ID)
private String storeIntegrationId;
public static final String SERIALIZED_NAME_EVALUABLE_CAMPAIGN_IDS = "evaluableCampaignIds";
@SerializedName(SERIALIZED_NAME_EVALUABLE_CAMPAIGN_IDS)
private List<Long> evaluableCampaignIds = null;
public static final String SERIALIZED_NAME_TYPE = "type";
@SerializedName(SERIALIZED_NAME_TYPE)
private String type;
public static final String SERIALIZED_NAME_ATTRIBUTES = "attributes";
@SerializedName(SERIALIZED_NAME_ATTRIBUTES)
private Object attributes;
public static final String SERIALIZED_NAME_LOYALTY_CARDS = "loyaltyCards";
@SerializedName(SERIALIZED_NAME_LOYALTY_CARDS)
private List<String> loyaltyCards = null;
/**
* Gets or Sets responseContent
*/
@JsonAdapter(ResponseContentEnum.Adapter.class)
public enum ResponseContentEnum {
CUSTOMERPROFILE("customerProfile"),
TRIGGEREDCAMPAIGNS("triggeredCampaigns"),
LOYALTY("loyalty"),
EVENT("event"),
AWARDEDGIVEAWAYS("awardedGiveaways"),
RULEFAILUREREASONS("ruleFailureReasons");
private String value;
ResponseContentEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static ResponseContentEnum fromValue(String value) {
for (ResponseContentEnum b : ResponseContentEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
public static class Adapter extends TypeAdapter<ResponseContentEnum> {
@Override
public void write(final JsonWriter jsonWriter, final ResponseContentEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public ResponseContentEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return ResponseContentEnum.fromValue(value);
}
}
}
public static final String SERIALIZED_NAME_RESPONSE_CONTENT = "responseContent";
@SerializedName(SERIALIZED_NAME_RESPONSE_CONTENT)
private List<ResponseContentEnum> responseContent = null;
public IntegrationEventV2Request profileId(String profileId) {
this.profileId = profileId;
return this;
}
/**
* ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`.
* @return profileId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "URNGV8294NV", value = "ID of the customer profile set by your integration layer. **Note:** If the customer does not yet have a known `profileId`, we recommend you use a guest `profileId`. ")
public String getProfileId() {
return profileId;
}
public void setProfileId(String profileId) {
this.profileId = profileId;
}
public IntegrationEventV2Request storeIntegrationId(String storeIntegrationId) {
this.storeIntegrationId = storeIntegrationId;
return this;
}
/**
* The integration ID of the store. You choose this ID when you create a store.
* @return storeIntegrationId
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "STORE-001", value = "The integration ID of the store. You choose this ID when you create a store.")
public String getStoreIntegrationId() {
return storeIntegrationId;
}
public void setStoreIntegrationId(String storeIntegrationId) {
this.storeIntegrationId = storeIntegrationId;
}
public IntegrationEventV2Request evaluableCampaignIds(List<Long> evaluableCampaignIds) {
this.evaluableCampaignIds = evaluableCampaignIds;
return this;
}
public IntegrationEventV2Request addEvaluableCampaignIdsItem(Long evaluableCampaignIdsItem) {
if (this.evaluableCampaignIds == null) {
this.evaluableCampaignIds = new ArrayList<Long>();
}
this.evaluableCampaignIds.add(evaluableCampaignIdsItem);
return this;
}
/**
* When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them.
* @return evaluableCampaignIds
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[10, 12]", value = "When using the `dry` query parameter, use this property to list the campaign to be evaluated by the Rule Engine. These campaigns will be evaluated, even if they are disabled, allowing you to test specific campaigns before activating them. ")
public List<Long> getEvaluableCampaignIds() {
return evaluableCampaignIds;
}
public void setEvaluableCampaignIds(List<Long> evaluableCampaignIds) {
this.evaluableCampaignIds = evaluableCampaignIds;
}
public IntegrationEventV2Request type(String type) {
this.type = type;
return this;
}
/**
* A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) of type `event` in the Campaign Manager.
* @return type
**/
@ApiModelProperty(example = "pageViewed", required = true, value = "A string representing the event name. Must not be a reserved event name. You create this value when you [create an attribute](https://docs.talon.one/docs/dev/concepts/entities/events#creating-a-custom-event) of type `event` in the Campaign Manager. ")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public IntegrationEventV2Request attributes(Object attributes) {
this.attributes = attributes;
return this;
}
/**
* Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-a-custom-attribute).
* @return attributes
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "{\"myAttribute\":\"myValue\"}", value = "Arbitrary additional JSON properties associated with the event. They must be created in the Campaign Manager before setting them with this property. See [creating custom attributes](https://docs.talon.one/docs/product/account/dev-tools/managing-attributes#creating-a-custom-attribute).")
public Object getAttributes() {
return attributes;
}
public void setAttributes(Object attributes) {
this.attributes = attributes;
}
public IntegrationEventV2Request loyaltyCards(List<String> loyaltyCards) {
this.loyaltyCards = loyaltyCards;
return this;
}
public IntegrationEventV2Request addLoyaltyCardsItem(String loyaltyCardsItem) {
if (this.loyaltyCards == null) {
this.loyaltyCards = new ArrayList<String>();
}
this.loyaltyCards.add(loyaltyCardsItem);
return this;
}
/**
* Identifier of the loyalty card used during this event.
* @return loyaltyCards
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[loyalty-card-1]", value = "Identifier of the loyalty card used during this event.")
public List<String> getLoyaltyCards() {
return loyaltyCards;
}
public void setLoyaltyCards(List<String> loyaltyCards) {
this.loyaltyCards = loyaltyCards;
}
public IntegrationEventV2Request responseContent(List<ResponseContentEnum> responseContent) {
this.responseContent = responseContent;
return this;
}
public IntegrationEventV2Request addResponseContentItem(ResponseContentEnum responseContentItem) {
if (this.responseContent == null) {
this.responseContent = new ArrayList<ResponseContentEnum>();
}
this.responseContent.add(responseContentItem);
return this;
}
/**
* Optional list of requested information to be present on the response related to the tracking custom event.
* @return responseContent
**/
@javax.annotation.Nullable
@ApiModelProperty(example = "[triggeredCampaigns, customerProfile]", value = "Optional list of requested information to be present on the response related to the tracking custom event. ")
public List<ResponseContentEnum> getResponseContent() {
return responseContent;
}
public void setResponseContent(List<ResponseContentEnum> responseContent) {
this.responseContent = responseContent;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
IntegrationEventV2Request integrationEventV2Request = (IntegrationEventV2Request) o;
return Objects.equals(this.profileId, integrationEventV2Request.profileId) &&
Objects.equals(this.storeIntegrationId, integrationEventV2Request.storeIntegrationId) &&
Objects.equals(this.evaluableCampaignIds, integrationEventV2Request.evaluableCampaignIds) &&
Objects.equals(this.type, integrationEventV2Request.type) &&
Objects.equals(this.attributes, integrationEventV2Request.attributes) &&
Objects.equals(this.loyaltyCards, integrationEventV2Request.loyaltyCards) &&
Objects.equals(this.responseContent, integrationEventV2Request.responseContent);
}
@Override
public int hashCode() {
return Objects.hash(profileId, storeIntegrationId, evaluableCampaignIds, type, attributes, loyaltyCards, responseContent);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class IntegrationEventV2Request {\n");
sb.append(" profileId: ").append(toIndentedString(profileId)).append("\n");
sb.append(" storeIntegrationId: ").append(toIndentedString(storeIntegrationId)).append("\n");
sb.append(" evaluableCampaignIds: ").append(toIndentedString(evaluableCampaignIds)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n");
sb.append(" loyaltyCards: ").append(toIndentedString(loyaltyCards)).append("\n");
sb.append(" responseContent: ").append(toIndentedString(responseContent)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}