
com.coveo.pushapiclient.BatchIdentity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of push-api-client.java Show documentation
Show all versions of push-api-client.java Show documentation
Coveo Push API client. See more on https://github.com/coveo/push-api-client.java
The newest version!
package com.coveo.pushapiclient;
import com.google.gson.Gson;
import com.google.gson.JsonObject;
import java.util.List;
/**
* See [Manage Batches of Security Identities](https://docs.coveo.com/en/55)
*/
public class BatchIdentity {
private List members;
private List mappings;
private List deleted;
public BatchIdentity(List members, List mappings, List deleted) {
this.members = members;
this.mappings = mappings;
this.deleted = deleted;
}
public BatchIdentityRecord marshal() {
return new BatchIdentityRecord(
this.members.stream().map(s -> new Gson().toJsonTree(s).getAsJsonObject()).toArray(JsonObject[]::new),
this.mappings.stream().map(s -> new Gson().toJsonTree(s).getAsJsonObject()).toArray(JsonObject[]::new),
this.deleted.stream().map(s -> new Gson().toJsonTree(s).getAsJsonObject()).toArray(JsonObject[]::new)
);
}
public List getMembers() {
return members;
}
public List getMappings() {
return mappings;
}
public List getDeleted() {
return deleted;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy