odata.msgraph.client.complex.TeamFunSettings 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.JacksonInject;
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.ContextPath;
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.Optional;
import odata.msgraph.client.enums.GiphyRatingType;
@JsonPropertyOrder({
"@odata.type",
"allowCustomMemes",
"allowGiphy",
"allowStickersAndMemes",
"giphyContentRating"})
@JsonInclude(Include.NON_NULL)
public class TeamFunSettings implements ODataType {
@JacksonInject
@JsonIgnore
protected ContextPath contextPath;
@JacksonInject
@JsonIgnore
protected UnmappedFieldsImpl unmappedFields;
@JsonProperty("@odata.type")
protected String odataType;
@JsonProperty("allowCustomMemes")
protected Boolean allowCustomMemes;
@JsonProperty("allowGiphy")
protected Boolean allowGiphy;
@JsonProperty("allowStickersAndMemes")
protected Boolean allowStickersAndMemes;
@JsonProperty("giphyContentRating")
protected GiphyRatingType giphyContentRating;
protected TeamFunSettings() {
}
@Override
public String odataTypeName() {
return "microsoft.graph.teamFunSettings";
}
@Property(name="allowCustomMemes")
@JsonIgnore
public Optional getAllowCustomMemes() {
return Optional.ofNullable(allowCustomMemes);
}
public TeamFunSettings withAllowCustomMemes(Boolean allowCustomMemes) {
TeamFunSettings _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.teamFunSettings");
_x.allowCustomMemes = allowCustomMemes;
return _x;
}
@Property(name="allowGiphy")
@JsonIgnore
public Optional getAllowGiphy() {
return Optional.ofNullable(allowGiphy);
}
public TeamFunSettings withAllowGiphy(Boolean allowGiphy) {
TeamFunSettings _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.teamFunSettings");
_x.allowGiphy = allowGiphy;
return _x;
}
@Property(name="allowStickersAndMemes")
@JsonIgnore
public Optional getAllowStickersAndMemes() {
return Optional.ofNullable(allowStickersAndMemes);
}
public TeamFunSettings withAllowStickersAndMemes(Boolean allowStickersAndMemes) {
TeamFunSettings _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.teamFunSettings");
_x.allowStickersAndMemes = allowStickersAndMemes;
return _x;
}
@Property(name="giphyContentRating")
@JsonIgnore
public Optional getGiphyContentRating() {
return Optional.ofNullable(giphyContentRating);
}
public TeamFunSettings withGiphyContentRating(GiphyRatingType giphyContentRating) {
TeamFunSettings _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.teamFunSettings");
_x.giphyContentRating = giphyContentRating;
return _x;
}
public TeamFunSettings withUnmappedField(String name, Object value) {
TeamFunSettings _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 builder() {
return new Builder();
}
public static final class Builder {
private Boolean allowCustomMemes;
private Boolean allowGiphy;
private Boolean allowStickersAndMemes;
private GiphyRatingType giphyContentRating;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder allowCustomMemes(Boolean allowCustomMemes) {
this.allowCustomMemes = allowCustomMemes;
this.changedFields = changedFields.add("allowCustomMemes");
return this;
}
public Builder allowGiphy(Boolean allowGiphy) {
this.allowGiphy = allowGiphy;
this.changedFields = changedFields.add("allowGiphy");
return this;
}
public Builder allowStickersAndMemes(Boolean allowStickersAndMemes) {
this.allowStickersAndMemes = allowStickersAndMemes;
this.changedFields = changedFields.add("allowStickersAndMemes");
return this;
}
public Builder giphyContentRating(GiphyRatingType giphyContentRating) {
this.giphyContentRating = giphyContentRating;
this.changedFields = changedFields.add("giphyContentRating");
return this;
}
public TeamFunSettings build() {
TeamFunSettings _x = new TeamFunSettings();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.teamFunSettings";
_x.allowCustomMemes = allowCustomMemes;
_x.allowGiphy = allowGiphy;
_x.allowStickersAndMemes = allowStickersAndMemes;
_x.giphyContentRating = giphyContentRating;
return _x;
}
}
private TeamFunSettings _copy() {
TeamFunSettings _x = new TeamFunSettings();
_x.contextPath = contextPath;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.allowCustomMemes = allowCustomMemes;
_x.allowGiphy = allowGiphy;
_x.allowStickersAndMemes = allowStickersAndMemes;
_x.giphyContentRating = giphyContentRating;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("TeamFunSettings[");
b.append("allowCustomMemes=");
b.append(this.allowCustomMemes);
b.append(", ");
b.append("allowGiphy=");
b.append(this.allowGiphy);
b.append(", ");
b.append("allowStickersAndMemes=");
b.append(this.allowStickersAndMemes);
b.append(", ");
b.append("giphyContentRating=");
b.append(this.giphyContentRating);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy