odata.msgraph.client.complex.EmailPayloadDetail Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of odata-client-msgraph Show documentation
Show all versions of odata-client-msgraph Show documentation
Java client for use with the Microsoft Graph v1.0 endpoint
package odata.msgraph.client.complex;
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.ODataType;
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.UnmappedFieldsImpl;
import java.lang.Boolean;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
@JsonPropertyOrder({
"@odata.type",
"fromEmail",
"fromName",
"isExternalSender",
"subject"})
@JsonInclude(Include.NON_NULL)
public class EmailPayloadDetail extends PayloadDetail implements ODataType {
@JsonProperty("fromEmail")
protected String fromEmail;
@JsonProperty("fromName")
protected String fromName;
@JsonProperty("isExternalSender")
protected Boolean isExternalSender;
@JsonProperty("subject")
protected String subject;
protected EmailPayloadDetail() {
super();
}
@Override
public String odataTypeName() {
return "microsoft.graph.emailPayloadDetail";
}
@Property(name="fromEmail")
@JsonIgnore
public Optional getFromEmail() {
return Optional.ofNullable(fromEmail);
}
public EmailPayloadDetail withFromEmail(String fromEmail) {
EmailPayloadDetail _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.emailPayloadDetail");
_x.fromEmail = fromEmail;
return _x;
}
@Property(name="fromName")
@JsonIgnore
public Optional getFromName() {
return Optional.ofNullable(fromName);
}
public EmailPayloadDetail withFromName(String fromName) {
EmailPayloadDetail _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.emailPayloadDetail");
_x.fromName = fromName;
return _x;
}
@Property(name="isExternalSender")
@JsonIgnore
public Optional getIsExternalSender() {
return Optional.ofNullable(isExternalSender);
}
public EmailPayloadDetail withIsExternalSender(Boolean isExternalSender) {
EmailPayloadDetail _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.emailPayloadDetail");
_x.isExternalSender = isExternalSender;
return _x;
}
@Property(name="subject")
@JsonIgnore
public Optional getSubject() {
return Optional.ofNullable(subject);
}
public EmailPayloadDetail withSubject(String subject) {
EmailPayloadDetail _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.emailPayloadDetail");
_x.subject = subject;
return _x;
}
public EmailPayloadDetail withUnmappedField(String name, Object value) {
EmailPayloadDetail _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();
}
@Override
public void postInject(boolean addKeysToContextPath) {
// do nothing;
}
/**
* 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 builderEmailPayloadDetail() {
return new Builder();
}
public static final class Builder {
private List coachmarks;
private String coachmarksNextLink;
private String content;
private String phishingUrl;
private String fromEmail;
private String fromName;
private Boolean isExternalSender;
private String subject;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder coachmarks(List coachmarks) {
this.coachmarks = coachmarks;
this.changedFields = changedFields.add("coachmarks");
return this;
}
public Builder coachmarks(PayloadCoachmark... coachmarks) {
return coachmarks(Arrays.asList(coachmarks));
}
public Builder coachmarksNextLink(String coachmarksNextLink) {
this.coachmarksNextLink = coachmarksNextLink;
this.changedFields = changedFields.add("coachmarks");
return this;
}
public Builder content(String content) {
this.content = content;
this.changedFields = changedFields.add("content");
return this;
}
public Builder phishingUrl(String phishingUrl) {
this.phishingUrl = phishingUrl;
this.changedFields = changedFields.add("phishingUrl");
return this;
}
public Builder fromEmail(String fromEmail) {
this.fromEmail = fromEmail;
this.changedFields = changedFields.add("fromEmail");
return this;
}
public Builder fromName(String fromName) {
this.fromName = fromName;
this.changedFields = changedFields.add("fromName");
return this;
}
public Builder isExternalSender(Boolean isExternalSender) {
this.isExternalSender = isExternalSender;
this.changedFields = changedFields.add("isExternalSender");
return this;
}
public Builder subject(String subject) {
this.subject = subject;
this.changedFields = changedFields.add("subject");
return this;
}
public EmailPayloadDetail build() {
EmailPayloadDetail _x = new EmailPayloadDetail();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.emailPayloadDetail";
_x.coachmarks = coachmarks;
_x.coachmarksNextLink = coachmarksNextLink;
_x.content = content;
_x.phishingUrl = phishingUrl;
_x.fromEmail = fromEmail;
_x.fromName = fromName;
_x.isExternalSender = isExternalSender;
_x.subject = subject;
return _x;
}
}
private EmailPayloadDetail _copy() {
EmailPayloadDetail _x = new EmailPayloadDetail();
_x.contextPath = contextPath;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.coachmarks = coachmarks;
_x.content = content;
_x.phishingUrl = phishingUrl;
_x.fromEmail = fromEmail;
_x.fromName = fromName;
_x.isExternalSender = isExternalSender;
_x.subject = subject;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("EmailPayloadDetail[");
b.append("coachmarks=");
b.append(this.coachmarks);
b.append(", ");
b.append("content=");
b.append(this.content);
b.append(", ");
b.append("phishingUrl=");
b.append(this.phishingUrl);
b.append(", ");
b.append("fromEmail=");
b.append(this.fromEmail);
b.append(", ");
b.append("fromName=");
b.append(this.fromName);
b.append(", ");
b.append("isExternalSender=");
b.append(this.isExternalSender);
b.append(", ");
b.append("subject=");
b.append(this.subject);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy