odata.msgraph.client.beta.complex.AddContentHeaderAction 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.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.Integer;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.util.Optional;
import odata.msgraph.client.beta.enums.ContentAlignment;
@JsonPropertyOrder({
"@odata.type",
"alignment",
"fontColor",
"fontName",
"fontSize",
"margin",
"text",
"uiElementName"})
@JsonInclude(Include.NON_NULL)
public class AddContentHeaderAction extends InformationProtectionAction implements ODataType {
@JsonProperty("alignment")
protected ContentAlignment alignment;
@JsonProperty("fontColor")
protected String fontColor;
@JsonProperty("fontName")
protected String fontName;
@JsonProperty("fontSize")
protected Integer fontSize;
@JsonProperty("margin")
protected Integer margin;
@JsonProperty("text")
protected String text;
@JsonProperty("uiElementName")
protected String uiElementName;
protected AddContentHeaderAction() {
super();
}
@Override
public String odataTypeName() {
return "microsoft.graph.addContentHeaderAction";
}
@Property(name="alignment")
@JsonIgnore
public Optional getAlignment() {
return Optional.ofNullable(alignment);
}
public AddContentHeaderAction withAlignment(ContentAlignment alignment) {
AddContentHeaderAction _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.addContentHeaderAction");
_x.alignment = alignment;
return _x;
}
@Property(name="fontColor")
@JsonIgnore
public Optional getFontColor() {
return Optional.ofNullable(fontColor);
}
public AddContentHeaderAction withFontColor(String fontColor) {
AddContentHeaderAction _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.addContentHeaderAction");
_x.fontColor = fontColor;
return _x;
}
@Property(name="fontName")
@JsonIgnore
public Optional getFontName() {
return Optional.ofNullable(fontName);
}
public AddContentHeaderAction withFontName(String fontName) {
AddContentHeaderAction _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.addContentHeaderAction");
_x.fontName = fontName;
return _x;
}
@Property(name="fontSize")
@JsonIgnore
public Optional getFontSize() {
return Optional.ofNullable(fontSize);
}
public AddContentHeaderAction withFontSize(Integer fontSize) {
AddContentHeaderAction _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.addContentHeaderAction");
_x.fontSize = fontSize;
return _x;
}
@Property(name="margin")
@JsonIgnore
public Optional getMargin() {
return Optional.ofNullable(margin);
}
public AddContentHeaderAction withMargin(Integer margin) {
AddContentHeaderAction _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.addContentHeaderAction");
_x.margin = margin;
return _x;
}
@Property(name="text")
@JsonIgnore
public Optional getText() {
return Optional.ofNullable(text);
}
public AddContentHeaderAction withText(String text) {
AddContentHeaderAction _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.addContentHeaderAction");
_x.text = text;
return _x;
}
@Property(name="uiElementName")
@JsonIgnore
public Optional getUiElementName() {
return Optional.ofNullable(uiElementName);
}
public AddContentHeaderAction withUiElementName(String uiElementName) {
AddContentHeaderAction _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.addContentHeaderAction");
_x.uiElementName = uiElementName;
return _x;
}
public AddContentHeaderAction withUnmappedField(String name, String value) {
AddContentHeaderAction _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 builderAddContentHeaderAction() {
return new Builder();
}
public static final class Builder {
private ContentAlignment alignment;
private String fontColor;
private String fontName;
private Integer fontSize;
private Integer margin;
private String text;
private String uiElementName;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder alignment(ContentAlignment alignment) {
this.alignment = alignment;
this.changedFields = changedFields.add("alignment");
return this;
}
public Builder fontColor(String fontColor) {
this.fontColor = fontColor;
this.changedFields = changedFields.add("fontColor");
return this;
}
public Builder fontName(String fontName) {
this.fontName = fontName;
this.changedFields = changedFields.add("fontName");
return this;
}
public Builder fontSize(Integer fontSize) {
this.fontSize = fontSize;
this.changedFields = changedFields.add("fontSize");
return this;
}
public Builder margin(Integer margin) {
this.margin = margin;
this.changedFields = changedFields.add("margin");
return this;
}
public Builder text(String text) {
this.text = text;
this.changedFields = changedFields.add("text");
return this;
}
public Builder uiElementName(String uiElementName) {
this.uiElementName = uiElementName;
this.changedFields = changedFields.add("uiElementName");
return this;
}
public AddContentHeaderAction build() {
AddContentHeaderAction _x = new AddContentHeaderAction();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.addContentHeaderAction";
_x.alignment = alignment;
_x.fontColor = fontColor;
_x.fontName = fontName;
_x.fontSize = fontSize;
_x.margin = margin;
_x.text = text;
_x.uiElementName = uiElementName;
return _x;
}
}
private AddContentHeaderAction _copy() {
AddContentHeaderAction _x = new AddContentHeaderAction();
_x.contextPath = contextPath;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.alignment = alignment;
_x.fontColor = fontColor;
_x.fontName = fontName;
_x.fontSize = fontSize;
_x.margin = margin;
_x.text = text;
_x.uiElementName = uiElementName;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("AddContentHeaderAction[");
b.append("alignment=");
b.append(this.alignment);
b.append(", ");
b.append("fontColor=");
b.append(this.fontColor);
b.append(", ");
b.append("fontName=");
b.append(this.fontName);
b.append(", ");
b.append("fontSize=");
b.append(this.fontSize);
b.append(", ");
b.append("margin=");
b.append(this.margin);
b.append(", ");
b.append("text=");
b.append(this.text);
b.append(", ");
b.append("uiElementName=");
b.append(this.uiElementName);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy