odata.msgraph.client.beta.complex.OutlookGeoCoordinates 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.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.Double;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.util.Optional;
@JsonPropertyOrder({
"@odata.type",
"accuracy",
"altitude",
"altitudeAccuracy",
"latitude",
"longitude"})
@JsonInclude(Include.NON_NULL)
public class OutlookGeoCoordinates implements ODataType {
@JacksonInject
@JsonIgnore
protected ContextPath contextPath;
@JacksonInject
@JsonIgnore
protected UnmappedFieldsImpl unmappedFields;
@JsonProperty("@odata.type")
protected String odataType;
@JsonProperty("accuracy")
protected Double accuracy;
@JsonProperty("altitude")
protected Double altitude;
@JsonProperty("altitudeAccuracy")
protected Double altitudeAccuracy;
@JsonProperty("latitude")
protected Double latitude;
@JsonProperty("longitude")
protected Double longitude;
protected OutlookGeoCoordinates() {
}
@Override
public String odataTypeName() {
return "microsoft.graph.outlookGeoCoordinates";
}
@Property(name="accuracy")
@JsonIgnore
public Optional getAccuracy() {
return Optional.ofNullable(accuracy);
}
public OutlookGeoCoordinates withAccuracy(Double accuracy) {
OutlookGeoCoordinates _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.outlookGeoCoordinates");
_x.accuracy = accuracy;
return _x;
}
@Property(name="altitude")
@JsonIgnore
public Optional getAltitude() {
return Optional.ofNullable(altitude);
}
public OutlookGeoCoordinates withAltitude(Double altitude) {
OutlookGeoCoordinates _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.outlookGeoCoordinates");
_x.altitude = altitude;
return _x;
}
@Property(name="altitudeAccuracy")
@JsonIgnore
public Optional getAltitudeAccuracy() {
return Optional.ofNullable(altitudeAccuracy);
}
public OutlookGeoCoordinates withAltitudeAccuracy(Double altitudeAccuracy) {
OutlookGeoCoordinates _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.outlookGeoCoordinates");
_x.altitudeAccuracy = altitudeAccuracy;
return _x;
}
@Property(name="latitude")
@JsonIgnore
public Optional getLatitude() {
return Optional.ofNullable(latitude);
}
public OutlookGeoCoordinates withLatitude(Double latitude) {
OutlookGeoCoordinates _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.outlookGeoCoordinates");
_x.latitude = latitude;
return _x;
}
@Property(name="longitude")
@JsonIgnore
public Optional getLongitude() {
return Optional.ofNullable(longitude);
}
public OutlookGeoCoordinates withLongitude(Double longitude) {
OutlookGeoCoordinates _x = _copy();
_x.odataType = Util.nvl(odataType, "microsoft.graph.outlookGeoCoordinates");
_x.longitude = longitude;
return _x;
}
public OutlookGeoCoordinates withUnmappedField(String name, String value) {
OutlookGeoCoordinates _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 Double accuracy;
private Double altitude;
private Double altitudeAccuracy;
private Double latitude;
private Double longitude;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder accuracy(Double accuracy) {
this.accuracy = accuracy;
this.changedFields = changedFields.add("accuracy");
return this;
}
public Builder altitude(Double altitude) {
this.altitude = altitude;
this.changedFields = changedFields.add("altitude");
return this;
}
public Builder altitudeAccuracy(Double altitudeAccuracy) {
this.altitudeAccuracy = altitudeAccuracy;
this.changedFields = changedFields.add("altitudeAccuracy");
return this;
}
public Builder latitude(Double latitude) {
this.latitude = latitude;
this.changedFields = changedFields.add("latitude");
return this;
}
public Builder longitude(Double longitude) {
this.longitude = longitude;
this.changedFields = changedFields.add("longitude");
return this;
}
public OutlookGeoCoordinates build() {
OutlookGeoCoordinates _x = new OutlookGeoCoordinates();
_x.contextPath = null;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.outlookGeoCoordinates";
_x.accuracy = accuracy;
_x.altitude = altitude;
_x.altitudeAccuracy = altitudeAccuracy;
_x.latitude = latitude;
_x.longitude = longitude;
return _x;
}
}
private OutlookGeoCoordinates _copy() {
OutlookGeoCoordinates _x = new OutlookGeoCoordinates();
_x.contextPath = contextPath;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.accuracy = accuracy;
_x.altitude = altitude;
_x.altitudeAccuracy = altitudeAccuracy;
_x.latitude = latitude;
_x.longitude = longitude;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("OutlookGeoCoordinates[");
b.append("accuracy=");
b.append(this.accuracy);
b.append(", ");
b.append("altitude=");
b.append(this.altitude);
b.append(", ");
b.append("altitudeAccuracy=");
b.append(this.altitudeAccuracy);
b.append(", ");
b.append("latitude=");
b.append(this.latitude);
b.append(", ");
b.append("longitude=");
b.append(this.longitude);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy