All Downloads are FREE. Search and download functionalities are using the official Maven repository.

odata.msgraph.client.beta.complex.CustomUpdateTimeWindow Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
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.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.time.LocalTime;
import java.util.Optional;

import odata.msgraph.client.beta.enums.DayOfWeek;


/**
 * “Custom update time window”
 */@JsonPropertyOrder({
    "@odata.type", 
    "endDay", 
    "endTime", 
    "startDay", 
    "startTime"})
@JsonInclude(Include.NON_NULL)
public class CustomUpdateTimeWindow implements ODataType {

    @JacksonInject
    @JsonIgnore
    protected ContextPath contextPath;

    @JacksonInject
    @JsonIgnore
    protected UnmappedFieldsImpl unmappedFields;

    @JsonProperty("@odata.type")
    protected String odataType;

    @JsonProperty("endDay")
    protected DayOfWeek endDay;

    @JsonProperty("endTime")
    protected LocalTime endTime;

    @JsonProperty("startDay")
    protected DayOfWeek startDay;

    @JsonProperty("startTime")
    protected LocalTime startTime;

    protected CustomUpdateTimeWindow() {
    }

    @Override
    public String odataTypeName() {
        return "microsoft.graph.customUpdateTimeWindow";
    }

    /**
     * “End day of the time window”
     * 
     * @return property endDay
     */
    @Property(name="endDay")
    @JsonIgnore
    public Optional getEndDay() {
        return Optional.ofNullable(endDay);
    }

    /**
     * Returns an immutable copy of {@code this} with just the {@code endDay} field
     * changed. Field description below. The field name is also added to an internal
     * map of changed fields in the returned object so that when {@code this.patch()}
     * is called (if available)on the returned object only the changed fields are
     * submitted.
     * 

* “End day of the time window” * * @param endDay * new value of {@code endDay} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code endDay} field changed */ public CustomUpdateTimeWindow withEndDay(DayOfWeek endDay) { CustomUpdateTimeWindow _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.customUpdateTimeWindow"); _x.endDay = endDay; return _x; } /** * “End time of the time window” * * @return property endTime */ @Property(name="endTime") @JsonIgnore public Optional getEndTime() { return Optional.ofNullable(endTime); } /** * Returns an immutable copy of {@code this} with just the {@code endTime} field * changed. Field description below. The field name is also added to an internal * map of changed fields in the returned object so that when {@code this.patch()} * is called (if available)on the returned object only the changed fields are * submitted. *

* “End time of the time window” * * @param endTime * new value of {@code endTime} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code endTime} field changed */ public CustomUpdateTimeWindow withEndTime(LocalTime endTime) { CustomUpdateTimeWindow _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.customUpdateTimeWindow"); _x.endTime = endTime; return _x; } /** * “Start day of the time window” * * @return property startDay */ @Property(name="startDay") @JsonIgnore public Optional getStartDay() { return Optional.ofNullable(startDay); } /** * Returns an immutable copy of {@code this} with just the {@code startDay} field * changed. Field description below. The field name is also added to an internal * map of changed fields in the returned object so that when {@code this.patch()} * is called (if available)on the returned object only the changed fields are * submitted. *

* “Start day of the time window” * * @param startDay * new value of {@code startDay} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code startDay} field changed */ public CustomUpdateTimeWindow withStartDay(DayOfWeek startDay) { CustomUpdateTimeWindow _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.customUpdateTimeWindow"); _x.startDay = startDay; return _x; } /** * “Start time of the time window” * * @return property startTime */ @Property(name="startTime") @JsonIgnore public Optional getStartTime() { return Optional.ofNullable(startTime); } /** * Returns an immutable copy of {@code this} with just the {@code startTime} field * changed. Field description below. The field name is also added to an internal * map of changed fields in the returned object so that when {@code this.patch()} * is called (if available)on the returned object only the changed fields are * submitted. *

* “Start time of the time window” * * @param startTime * new value of {@code startTime} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code startTime} field changed */ public CustomUpdateTimeWindow withStartTime(LocalTime startTime) { CustomUpdateTimeWindow _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.customUpdateTimeWindow"); _x.startTime = startTime; return _x; } public CustomUpdateTimeWindow withUnmappedField(String name, String value) { CustomUpdateTimeWindow _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 DayOfWeek endDay; private LocalTime endTime; private DayOfWeek startDay; private LocalTime startTime; private ChangedFields changedFields = ChangedFields.EMPTY; Builder() { // prevent instantiation } /** * “End day of the time window” * * @param endDay * value of {@code endDay} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder endDay(DayOfWeek endDay) { this.endDay = endDay; this.changedFields = changedFields.add("endDay"); return this; } /** * “End time of the time window” * * @param endTime * value of {@code endTime} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder endTime(LocalTime endTime) { this.endTime = endTime; this.changedFields = changedFields.add("endTime"); return this; } /** * “Start day of the time window” * * @param startDay * value of {@code startDay} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder startDay(DayOfWeek startDay) { this.startDay = startDay; this.changedFields = changedFields.add("startDay"); return this; } /** * “Start time of the time window” * * @param startTime * value of {@code startTime} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder startTime(LocalTime startTime) { this.startTime = startTime; this.changedFields = changedFields.add("startTime"); return this; } public CustomUpdateTimeWindow build() { CustomUpdateTimeWindow _x = new CustomUpdateTimeWindow(); _x.contextPath = null; _x.unmappedFields = new UnmappedFieldsImpl(); _x.odataType = "microsoft.graph.customUpdateTimeWindow"; _x.endDay = endDay; _x.endTime = endTime; _x.startDay = startDay; _x.startTime = startTime; return _x; } } private CustomUpdateTimeWindow _copy() { CustomUpdateTimeWindow _x = new CustomUpdateTimeWindow(); _x.contextPath = contextPath; _x.unmappedFields = unmappedFields.copy(); _x.odataType = odataType; _x.endDay = endDay; _x.endTime = endTime; _x.startDay = startDay; _x.startTime = startTime; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("CustomUpdateTimeWindow["); b.append("endDay="); b.append(this.endDay); b.append(", "); b.append("endTime="); b.append(this.endTime); b.append(", "); b.append("startDay="); b.append(this.startDay); b.append(", "); b.append("startTime="); b.append(this.startTime); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy