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

odata.msgraph.client.complex.Win32LobAppRestartSettings Maven / Gradle / Ivy

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.Integer;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.util.Optional;


/**
 * “Contains properties describing restart coordination following an app
 * installation.”
 */@JsonPropertyOrder({
    "@odata.type", 
    "countdownDisplayBeforeRestartInMinutes", 
    "gracePeriodInMinutes", 
    "restartNotificationSnoozeDurationInMinutes"})
@JsonInclude(Include.NON_NULL)
public class Win32LobAppRestartSettings implements ODataType {

    @JacksonInject
    @JsonIgnore
    protected ContextPath contextPath;

    @JacksonInject
    @JsonIgnore
    protected UnmappedFieldsImpl unmappedFields;

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

    @JsonProperty("countdownDisplayBeforeRestartInMinutes")
    protected Integer countdownDisplayBeforeRestartInMinutes;

    @JsonProperty("gracePeriodInMinutes")
    protected Integer gracePeriodInMinutes;

    @JsonProperty("restartNotificationSnoozeDurationInMinutes")
    protected Integer restartNotificationSnoozeDurationInMinutes;

    protected Win32LobAppRestartSettings() {
    }

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

    /**
     * “The number of minutes before the restart time to display the countdown dialog
     * for pending restarts.”
     * 
     * @return property countdownDisplayBeforeRestartInMinutes
     */
    @Property(name="countdownDisplayBeforeRestartInMinutes")
    @JsonIgnore
    public Optional getCountdownDisplayBeforeRestartInMinutes() {
        return Optional.ofNullable(countdownDisplayBeforeRestartInMinutes);
    }

    /**
     * Returns an immutable copy of {@code this} with just the {@code
     * countdownDisplayBeforeRestartInMinutes} 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.
     * 

* “The number of minutes before the restart time to display the countdown dialog * for pending restarts.” * * @param countdownDisplayBeforeRestartInMinutes * new value of {@code countdownDisplayBeforeRestartInMinutes} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code countdownDisplayBeforeRestartInMinutes} field changed */ public Win32LobAppRestartSettings withCountdownDisplayBeforeRestartInMinutes(Integer countdownDisplayBeforeRestartInMinutes) { Win32LobAppRestartSettings _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.win32LobAppRestartSettings"); _x.countdownDisplayBeforeRestartInMinutes = countdownDisplayBeforeRestartInMinutes; return _x; } /** * “The number of minutes to wait before restarting the device after an app * installation.” * * @return property gracePeriodInMinutes */ @Property(name="gracePeriodInMinutes") @JsonIgnore public Optional getGracePeriodInMinutes() { return Optional.ofNullable(gracePeriodInMinutes); } /** * Returns an immutable copy of {@code this} with just the {@code * gracePeriodInMinutes} 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. *

* “The number of minutes to wait before restarting the device after an app * installation.” * * @param gracePeriodInMinutes * new value of {@code gracePeriodInMinutes} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code gracePeriodInMinutes} field changed */ public Win32LobAppRestartSettings withGracePeriodInMinutes(Integer gracePeriodInMinutes) { Win32LobAppRestartSettings _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.win32LobAppRestartSettings"); _x.gracePeriodInMinutes = gracePeriodInMinutes; return _x; } /** * “The number of minutes to snooze the restart notification dialog when the snooze * button is selected.” * * @return property restartNotificationSnoozeDurationInMinutes */ @Property(name="restartNotificationSnoozeDurationInMinutes") @JsonIgnore public Optional getRestartNotificationSnoozeDurationInMinutes() { return Optional.ofNullable(restartNotificationSnoozeDurationInMinutes); } /** * Returns an immutable copy of {@code this} with just the {@code * restartNotificationSnoozeDurationInMinutes} 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. *

* “The number of minutes to snooze the restart notification dialog when the snooze * button is selected.” * * @param restartNotificationSnoozeDurationInMinutes * new value of {@code restartNotificationSnoozeDurationInMinutes} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code restartNotificationSnoozeDurationInMinutes} field changed */ public Win32LobAppRestartSettings withRestartNotificationSnoozeDurationInMinutes(Integer restartNotificationSnoozeDurationInMinutes) { Win32LobAppRestartSettings _x = _copy(); _x.odataType = Util.nvl(odataType, "microsoft.graph.win32LobAppRestartSettings"); _x.restartNotificationSnoozeDurationInMinutes = restartNotificationSnoozeDurationInMinutes; return _x; } public Win32LobAppRestartSettings withUnmappedField(String name, String value) { Win32LobAppRestartSettings _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 Integer countdownDisplayBeforeRestartInMinutes; private Integer gracePeriodInMinutes; private Integer restartNotificationSnoozeDurationInMinutes; private ChangedFields changedFields = ChangedFields.EMPTY; Builder() { // prevent instantiation } /** * “The number of minutes before the restart time to display the countdown dialog * for pending restarts.” * * @param countdownDisplayBeforeRestartInMinutes * value of {@code countdownDisplayBeforeRestartInMinutes} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder countdownDisplayBeforeRestartInMinutes(Integer countdownDisplayBeforeRestartInMinutes) { this.countdownDisplayBeforeRestartInMinutes = countdownDisplayBeforeRestartInMinutes; this.changedFields = changedFields.add("countdownDisplayBeforeRestartInMinutes"); return this; } /** * “The number of minutes to wait before restarting the device after an app * installation.” * * @param gracePeriodInMinutes * value of {@code gracePeriodInMinutes} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder gracePeriodInMinutes(Integer gracePeriodInMinutes) { this.gracePeriodInMinutes = gracePeriodInMinutes; this.changedFields = changedFields.add("gracePeriodInMinutes"); return this; } /** * “The number of minutes to snooze the restart notification dialog when the snooze * button is selected.” * * @param restartNotificationSnoozeDurationInMinutes * value of {@code restartNotificationSnoozeDurationInMinutes} property (as defined in service metadata) * @return {@code this} (for method chaining) */ public Builder restartNotificationSnoozeDurationInMinutes(Integer restartNotificationSnoozeDurationInMinutes) { this.restartNotificationSnoozeDurationInMinutes = restartNotificationSnoozeDurationInMinutes; this.changedFields = changedFields.add("restartNotificationSnoozeDurationInMinutes"); return this; } public Win32LobAppRestartSettings build() { Win32LobAppRestartSettings _x = new Win32LobAppRestartSettings(); _x.contextPath = null; _x.unmappedFields = new UnmappedFieldsImpl(); _x.odataType = "microsoft.graph.win32LobAppRestartSettings"; _x.countdownDisplayBeforeRestartInMinutes = countdownDisplayBeforeRestartInMinutes; _x.gracePeriodInMinutes = gracePeriodInMinutes; _x.restartNotificationSnoozeDurationInMinutes = restartNotificationSnoozeDurationInMinutes; return _x; } } private Win32LobAppRestartSettings _copy() { Win32LobAppRestartSettings _x = new Win32LobAppRestartSettings(); _x.contextPath = contextPath; _x.unmappedFields = unmappedFields.copy(); _x.odataType = odataType; _x.countdownDisplayBeforeRestartInMinutes = countdownDisplayBeforeRestartInMinutes; _x.gracePeriodInMinutes = gracePeriodInMinutes; _x.restartNotificationSnoozeDurationInMinutes = restartNotificationSnoozeDurationInMinutes; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("Win32LobAppRestartSettings["); b.append("countdownDisplayBeforeRestartInMinutes="); b.append(this.countdownDisplayBeforeRestartInMinutes); b.append(", "); b.append("gracePeriodInMinutes="); b.append(this.gracePeriodInMinutes); b.append(", "); b.append("restartNotificationSnoozeDurationInMinutes="); b.append(this.restartNotificationSnoozeDurationInMinutes); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy