odata.msgraph.client.beta.entity.YammerActivityUserDetail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odata-client-msgraph-beta Show documentation
Show all versions of odata-client-msgraph-beta Show documentation
Java client for use with Microsoft Graph beta endpoint
package odata.msgraph.client.beta.entity;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.github.davidmoten.odata.client.ClientException;
import com.github.davidmoten.odata.client.CollectionPage;
import com.github.davidmoten.odata.client.HttpRequestOptions;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.ODataEntityType;
import com.github.davidmoten.odata.client.RequestOptions;
import com.github.davidmoten.odata.client.UnmappedFields;
import com.github.davidmoten.odata.client.Util;
import com.github.davidmoten.odata.client.annotation.Property;
import com.github.davidmoten.odata.client.internal.ChangedFields;
import com.github.davidmoten.odata.client.internal.RequestHelper;
import com.github.davidmoten.odata.client.internal.UnmappedFieldsImpl;
import java.lang.Long;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.time.LocalDate;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
@JsonPropertyOrder({
"@odata.type",
"assignedProducts",
"displayName",
"lastActivityDate",
"likedCount",
"postedCount",
"readCount",
"reportPeriod",
"reportRefreshDate",
"stateChangeDate",
"userPrincipalName",
"userState"})
@JsonInclude(Include.NON_NULL)
public class YammerActivityUserDetail extends Entity implements ODataEntityType {
@Override
public String odataTypeName() {
return "microsoft.graph.yammerActivityUserDetail";
}
@JsonProperty("assignedProducts")
protected List assignedProducts;
@JsonProperty("assignedProducts@nextLink")
protected String assignedProductsNextLink;
@JsonProperty("displayName")
protected String displayName;
@JsonProperty("lastActivityDate")
protected LocalDate lastActivityDate;
@JsonProperty("likedCount")
protected Long likedCount;
@JsonProperty("postedCount")
protected Long postedCount;
@JsonProperty("readCount")
protected Long readCount;
@JsonProperty("reportPeriod")
protected String reportPeriod;
@JsonProperty("reportRefreshDate")
protected LocalDate reportRefreshDate;
@JsonProperty("stateChangeDate")
protected LocalDate stateChangeDate;
@JsonProperty("userPrincipalName")
protected String userPrincipalName;
@JsonProperty("userState")
protected String userState;
protected YammerActivityUserDetail() {
super();
}
/**
* Returns a builder which is used to create a new
* instance of this class (given that this class is immutable).
*
* @return a new Builder for this class
*/
// Suffix used on builder factory method to differentiate the method
// from static builder methods on superclasses
public static Builder builderYammerActivityUserDetail() {
return new Builder();
}
public static final class Builder {
private String id;
private List assignedProducts;
private String assignedProductsNextLink;
private String displayName;
private LocalDate lastActivityDate;
private Long likedCount;
private Long postedCount;
private Long readCount;
private String reportPeriod;
private LocalDate reportRefreshDate;
private LocalDate stateChangeDate;
private String userPrincipalName;
private String userState;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder id(String id) {
this.id = id;
this.changedFields = changedFields.add("id");
return this;
}
public Builder assignedProducts(List assignedProducts) {
this.assignedProducts = assignedProducts;
this.changedFields = changedFields.add("assignedProducts");
return this;
}
public Builder assignedProducts(String... assignedProducts) {
return assignedProducts(Arrays.asList(assignedProducts));
}
public Builder assignedProductsNextLink(String assignedProductsNextLink) {
this.assignedProductsNextLink = assignedProductsNextLink;
this.changedFields = changedFields.add("assignedProducts");
return this;
}
public Builder displayName(String displayName) {
this.displayName = displayName;
this.changedFields = changedFields.add("displayName");
return this;
}
public Builder lastActivityDate(LocalDate lastActivityDate) {
this.lastActivityDate = lastActivityDate;
this.changedFields = changedFields.add("lastActivityDate");
return this;
}
public Builder likedCount(Long likedCount) {
this.likedCount = likedCount;
this.changedFields = changedFields.add("likedCount");
return this;
}
public Builder postedCount(Long postedCount) {
this.postedCount = postedCount;
this.changedFields = changedFields.add("postedCount");
return this;
}
public Builder readCount(Long readCount) {
this.readCount = readCount;
this.changedFields = changedFields.add("readCount");
return this;
}
public Builder reportPeriod(String reportPeriod) {
this.reportPeriod = reportPeriod;
this.changedFields = changedFields.add("reportPeriod");
return this;
}
public Builder reportRefreshDate(LocalDate reportRefreshDate) {
this.reportRefreshDate = reportRefreshDate;
this.changedFields = changedFields.add("reportRefreshDate");
return this;
}
public Builder stateChangeDate(LocalDate stateChangeDate) {
this.stateChangeDate = stateChangeDate;
this.changedFields = changedFields.add("stateChangeDate");
return this;
}
public Builder userPrincipalName(String userPrincipalName) {
this.userPrincipalName = userPrincipalName;
this.changedFields = changedFields.add("userPrincipalName");
return this;
}
public Builder userState(String userState) {
this.userState = userState;
this.changedFields = changedFields.add("userState");
return this;
}
public YammerActivityUserDetail build() {
YammerActivityUserDetail _x = new YammerActivityUserDetail();
_x.contextPath = null;
_x.changedFields = changedFields;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.yammerActivityUserDetail";
_x.id = id;
_x.assignedProducts = assignedProducts;
_x.assignedProductsNextLink = assignedProductsNextLink;
_x.displayName = displayName;
_x.lastActivityDate = lastActivityDate;
_x.likedCount = likedCount;
_x.postedCount = postedCount;
_x.readCount = readCount;
_x.reportPeriod = reportPeriod;
_x.reportRefreshDate = reportRefreshDate;
_x.stateChangeDate = stateChangeDate;
_x.userPrincipalName = userPrincipalName;
_x.userState = userState;
return _x;
}
}
@Override
@JsonIgnore
public ChangedFields getChangedFields() {
return changedFields;
}
@Override
public void postInject(boolean addKeysToContextPath) {
if (addKeysToContextPath && id != null) {
contextPath = contextPath.clearQueries().addKeys(new NameValue(id.toString()));
}
}
@Property(name="assignedProducts")
@JsonIgnore
public CollectionPage getAssignedProducts() {
return new CollectionPage(contextPath, String.class, this.assignedProducts, Optional.ofNullable(assignedProductsNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY);
}
public YammerActivityUserDetail withAssignedProducts(List assignedProducts) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("assignedProducts");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.assignedProducts = assignedProducts;
return _x;
}
@Property(name="assignedProducts")
@JsonIgnore
public CollectionPage getAssignedProducts(HttpRequestOptions options) {
return new CollectionPage(contextPath, String.class, this.assignedProducts, Optional.ofNullable(assignedProductsNextLink), Collections.emptyList(), options);
}
@Property(name="displayName")
@JsonIgnore
public Optional getDisplayName() {
return Optional.ofNullable(displayName);
}
public YammerActivityUserDetail withDisplayName(String displayName) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("displayName");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.displayName = displayName;
return _x;
}
@Property(name="lastActivityDate")
@JsonIgnore
public Optional getLastActivityDate() {
return Optional.ofNullable(lastActivityDate);
}
public YammerActivityUserDetail withLastActivityDate(LocalDate lastActivityDate) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("lastActivityDate");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.lastActivityDate = lastActivityDate;
return _x;
}
@Property(name="likedCount")
@JsonIgnore
public Optional getLikedCount() {
return Optional.ofNullable(likedCount);
}
public YammerActivityUserDetail withLikedCount(Long likedCount) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("likedCount");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.likedCount = likedCount;
return _x;
}
@Property(name="postedCount")
@JsonIgnore
public Optional getPostedCount() {
return Optional.ofNullable(postedCount);
}
public YammerActivityUserDetail withPostedCount(Long postedCount) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("postedCount");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.postedCount = postedCount;
return _x;
}
@Property(name="readCount")
@JsonIgnore
public Optional getReadCount() {
return Optional.ofNullable(readCount);
}
public YammerActivityUserDetail withReadCount(Long readCount) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("readCount");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.readCount = readCount;
return _x;
}
@Property(name="reportPeriod")
@JsonIgnore
public Optional getReportPeriod() {
return Optional.ofNullable(reportPeriod);
}
public YammerActivityUserDetail withReportPeriod(String reportPeriod) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("reportPeriod");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.reportPeriod = reportPeriod;
return _x;
}
@Property(name="reportRefreshDate")
@JsonIgnore
public Optional getReportRefreshDate() {
return Optional.ofNullable(reportRefreshDate);
}
public YammerActivityUserDetail withReportRefreshDate(LocalDate reportRefreshDate) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("reportRefreshDate");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.reportRefreshDate = reportRefreshDate;
return _x;
}
@Property(name="stateChangeDate")
@JsonIgnore
public Optional getStateChangeDate() {
return Optional.ofNullable(stateChangeDate);
}
public YammerActivityUserDetail withStateChangeDate(LocalDate stateChangeDate) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("stateChangeDate");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.stateChangeDate = stateChangeDate;
return _x;
}
@Property(name="userPrincipalName")
@JsonIgnore
public Optional getUserPrincipalName() {
return Optional.ofNullable(userPrincipalName);
}
public YammerActivityUserDetail withUserPrincipalName(String userPrincipalName) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("userPrincipalName");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.userPrincipalName = userPrincipalName;
return _x;
}
@Property(name="userState")
@JsonIgnore
public Optional getUserState() {
return Optional.ofNullable(userState);
}
public YammerActivityUserDetail withUserState(String userState) {
YammerActivityUserDetail _x = _copy();
_x.changedFields = changedFields.add("userState");
_x.odataType = Util.nvl(odataType, "microsoft.graph.yammerActivityUserDetail");
_x.userState = userState;
return _x;
}
public YammerActivityUserDetail withUnmappedField(String name, String value) {
YammerActivityUserDetail _x = _copy();
_x.setUnmappedField(name, value);
return _x;
}
@JsonAnySetter
private void setUnmappedField(String name, Object value) {
if (unmappedFields == null) {
unmappedFields = new UnmappedFieldsImpl();
}
unmappedFields.put(name, value);
}
@JsonAnyGetter
private UnmappedFieldsImpl unmappedFields() {
return unmappedFields == null ? UnmappedFieldsImpl.EMPTY : unmappedFields;
}
@Override
public UnmappedFields getUnmappedFields() {
return unmappedFields();
}
/**
* Submits only changed fields for update and returns an
* immutable copy of {@code this} with changed fields reset.
*
* @return a copy of {@code this} with changed fields reset
* @throws ClientException if HTTP response is not as expected
*/
public YammerActivityUserDetail patch() {
RequestHelper.patch(this, contextPath, RequestOptions.EMPTY);
YammerActivityUserDetail _x = _copy();
_x.changedFields = null;
return _x;
}
/**
* Submits all fields for update and returns an immutable copy of {@code this}
* with changed fields reset (they were ignored anyway).
*
* @return a copy of {@code this} with changed fields reset
* @throws ClientException if HTTP response is not as expected
*/
public YammerActivityUserDetail put() {
RequestHelper.put(this, contextPath, RequestOptions.EMPTY);
YammerActivityUserDetail _x = _copy();
_x.changedFields = null;
return _x;
}
private YammerActivityUserDetail _copy() {
YammerActivityUserDetail _x = new YammerActivityUserDetail();
_x.contextPath = contextPath;
_x.changedFields = changedFields;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.id = id;
_x.assignedProducts = assignedProducts;
_x.displayName = displayName;
_x.lastActivityDate = lastActivityDate;
_x.likedCount = likedCount;
_x.postedCount = postedCount;
_x.readCount = readCount;
_x.reportPeriod = reportPeriod;
_x.reportRefreshDate = reportRefreshDate;
_x.stateChangeDate = stateChangeDate;
_x.userPrincipalName = userPrincipalName;
_x.userState = userState;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("YammerActivityUserDetail[");
b.append("id=");
b.append(this.id);
b.append(", ");
b.append("assignedProducts=");
b.append(this.assignedProducts);
b.append(", ");
b.append("displayName=");
b.append(this.displayName);
b.append(", ");
b.append("lastActivityDate=");
b.append(this.lastActivityDate);
b.append(", ");
b.append("likedCount=");
b.append(this.likedCount);
b.append(", ");
b.append("postedCount=");
b.append(this.postedCount);
b.append(", ");
b.append("readCount=");
b.append(this.readCount);
b.append(", ");
b.append("reportPeriod=");
b.append(this.reportPeriod);
b.append(", ");
b.append("reportRefreshDate=");
b.append(this.reportRefreshDate);
b.append(", ");
b.append("stateChangeDate=");
b.append(this.stateChangeDate);
b.append(", ");
b.append("userPrincipalName=");
b.append(this.userPrincipalName);
b.append(", ");
b.append("userState=");
b.append(this.userState);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy