
odata.msgraph.client.entity.SharedPCConfiguration Maven / Gradle / Ivy
package odata.msgraph.client.entity;
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.ClientException;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.ODataEntityType;
import com.github.davidmoten.odata.client.RequestOptions;
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.RequestHelper;
import com.github.davidmoten.odata.client.internal.UnmappedFieldsImpl;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.time.LocalTime;
import java.time.OffsetDateTime;
import java.util.Optional;
import odata.msgraph.client.complex.SharedPCAccountManagerPolicy;
import odata.msgraph.client.enums.SharedPCAllowedAccountType;
/**
* “This topic provides descriptions of the declared methods, properties and
* relationships exposed by the sharedPCConfiguration resource.”
*/@JsonPropertyOrder({
"@odata.type",
"accountManagerPolicy",
"allowedAccounts",
"allowLocalStorage",
"disableAccountManager",
"disableEduPolicies",
"disablePowerPolicies",
"disableSignInOnResume",
"enabled",
"idleTimeBeforeSleepInSeconds",
"kioskAppDisplayName",
"kioskAppUserModelId",
"maintenanceStartTime"})
@JsonInclude(Include.NON_NULL)
public class SharedPCConfiguration extends DeviceConfiguration implements ODataEntityType {
@Override
public String odataTypeName() {
return "microsoft.graph.sharedPCConfiguration";
}
@JsonProperty("accountManagerPolicy")
protected SharedPCAccountManagerPolicy accountManagerPolicy;
@JsonProperty("allowedAccounts")
protected SharedPCAllowedAccountType allowedAccounts;
@JsonProperty("allowLocalStorage")
protected Boolean allowLocalStorage;
@JsonProperty("disableAccountManager")
protected Boolean disableAccountManager;
@JsonProperty("disableEduPolicies")
protected Boolean disableEduPolicies;
@JsonProperty("disablePowerPolicies")
protected Boolean disablePowerPolicies;
@JsonProperty("disableSignInOnResume")
protected Boolean disableSignInOnResume;
@JsonProperty("enabled")
protected Boolean enabled;
@JsonProperty("idleTimeBeforeSleepInSeconds")
protected Integer idleTimeBeforeSleepInSeconds;
@JsonProperty("kioskAppDisplayName")
protected String kioskAppDisplayName;
@JsonProperty("kioskAppUserModelId")
protected String kioskAppUserModelId;
@JsonProperty("maintenanceStartTime")
protected LocalTime maintenanceStartTime;
protected SharedPCConfiguration() {
super();
}
/**
* 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 builderSharedPCConfiguration() {
return new Builder();
}
public static final class Builder {
private String id;
private OffsetDateTime createdDateTime;
private String description;
private String displayName;
private OffsetDateTime lastModifiedDateTime;
private Integer version;
private SharedPCAccountManagerPolicy accountManagerPolicy;
private SharedPCAllowedAccountType allowedAccounts;
private Boolean allowLocalStorage;
private Boolean disableAccountManager;
private Boolean disableEduPolicies;
private Boolean disablePowerPolicies;
private Boolean disableSignInOnResume;
private Boolean enabled;
private Integer idleTimeBeforeSleepInSeconds;
private String kioskAppDisplayName;
private String kioskAppUserModelId;
private LocalTime maintenanceStartTime;
private ChangedFields changedFields = ChangedFields.EMPTY;
Builder() {
// prevent instantiation
}
public Builder id(String id) {
this.id = id;
this.changedFields = changedFields.add("id");
return this;
}
public Builder createdDateTime(OffsetDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
this.changedFields = changedFields.add("createdDateTime");
return this;
}
public Builder description(String description) {
this.description = description;
this.changedFields = changedFields.add("description");
return this;
}
public Builder displayName(String displayName) {
this.displayName = displayName;
this.changedFields = changedFields.add("displayName");
return this;
}
public Builder lastModifiedDateTime(OffsetDateTime lastModifiedDateTime) {
this.lastModifiedDateTime = lastModifiedDateTime;
this.changedFields = changedFields.add("lastModifiedDateTime");
return this;
}
public Builder version(Integer version) {
this.version = version;
this.changedFields = changedFields.add("version");
return this;
}
/**
* “Specifies how accounts are managed on a shared PC. Only applies when
* disableAccountManager is false.”
*
* @param accountManagerPolicy
* value of {@code accountManagerPolicy} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder accountManagerPolicy(SharedPCAccountManagerPolicy accountManagerPolicy) {
this.accountManagerPolicy = accountManagerPolicy;
this.changedFields = changedFields.add("accountManagerPolicy");
return this;
}
/**
* “Indicates which type of accounts are allowed to use on a shared PC.”
*
* @param allowedAccounts
* value of {@code allowedAccounts} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder allowedAccounts(SharedPCAllowedAccountType allowedAccounts) {
this.allowedAccounts = allowedAccounts;
this.changedFields = changedFields.add("allowedAccounts");
return this;
}
/**
* “Specifies whether local storage is allowed on a shared PC.”
*
* @param allowLocalStorage
* value of {@code allowLocalStorage} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder allowLocalStorage(Boolean allowLocalStorage) {
this.allowLocalStorage = allowLocalStorage;
this.changedFields = changedFields.add("allowLocalStorage");
return this;
}
/**
* “Disables the account manager for shared PC mode.”
*
* @param disableAccountManager
* value of {@code disableAccountManager} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder disableAccountManager(Boolean disableAccountManager) {
this.disableAccountManager = disableAccountManager;
this.changedFields = changedFields.add("disableAccountManager");
return this;
}
/**
* “Specifies whether the default shared PC education environment policies should be
* disabled. For Windows 10 RS2 and later, this policy will be applied without
* setting Enabled to true.”
*
* @param disableEduPolicies
* value of {@code disableEduPolicies} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder disableEduPolicies(Boolean disableEduPolicies) {
this.disableEduPolicies = disableEduPolicies;
this.changedFields = changedFields.add("disableEduPolicies");
return this;
}
/**
* “Specifies whether the default shared PC power policies should be disabled.”
*
* @param disablePowerPolicies
* value of {@code disablePowerPolicies} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder disablePowerPolicies(Boolean disablePowerPolicies) {
this.disablePowerPolicies = disablePowerPolicies;
this.changedFields = changedFields.add("disablePowerPolicies");
return this;
}
/**
* “Disables the requirement to sign in whenever the device wakes up from sleep mode
* .”
*
* @param disableSignInOnResume
* value of {@code disableSignInOnResume} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder disableSignInOnResume(Boolean disableSignInOnResume) {
this.disableSignInOnResume = disableSignInOnResume;
this.changedFields = changedFields.add("disableSignInOnResume");
return this;
}
/**
* “Enables shared PC mode and applies the shared pc policies.”
*
* @param enabled
* value of {@code enabled} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder enabled(Boolean enabled) {
this.enabled = enabled;
this.changedFields = changedFields.add("enabled");
return this;
}
/**
* “Specifies the time in seconds that a device must sit idle before the PC goes to
* sleep. Setting this value to 0 prevents the sleep timeout from occurring.”
*
* @param idleTimeBeforeSleepInSeconds
* value of {@code idleTimeBeforeSleepInSeconds} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder idleTimeBeforeSleepInSeconds(Integer idleTimeBeforeSleepInSeconds) {
this.idleTimeBeforeSleepInSeconds = idleTimeBeforeSleepInSeconds;
this.changedFields = changedFields.add("idleTimeBeforeSleepInSeconds");
return this;
}
/**
* “Specifies the display text for the account shown on the sign-in screen which
* launches the app specified by SetKioskAppUserModelId. Only applies when
* KioskAppUserModelId is set.”
*
* @param kioskAppDisplayName
* value of {@code kioskAppDisplayName} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder kioskAppDisplayName(String kioskAppDisplayName) {
this.kioskAppDisplayName = kioskAppDisplayName;
this.changedFields = changedFields.add("kioskAppDisplayName");
return this;
}
/**
* “Specifies the application user model ID of the app to use with assigned access.”
*
* @param kioskAppUserModelId
* value of {@code kioskAppUserModelId} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder kioskAppUserModelId(String kioskAppUserModelId) {
this.kioskAppUserModelId = kioskAppUserModelId;
this.changedFields = changedFields.add("kioskAppUserModelId");
return this;
}
/**
* “Specifies the daily start time of maintenance hour.”
*
* @param maintenanceStartTime
* value of {@code maintenanceStartTime} property (as defined in service metadata)
* @return {@code this} (for method chaining)
*/
public Builder maintenanceStartTime(LocalTime maintenanceStartTime) {
this.maintenanceStartTime = maintenanceStartTime;
this.changedFields = changedFields.add("maintenanceStartTime");
return this;
}
public SharedPCConfiguration build() {
SharedPCConfiguration _x = new SharedPCConfiguration();
_x.contextPath = null;
_x.changedFields = changedFields;
_x.unmappedFields = new UnmappedFieldsImpl();
_x.odataType = "microsoft.graph.sharedPCConfiguration";
_x.id = id;
_x.createdDateTime = createdDateTime;
_x.description = description;
_x.displayName = displayName;
_x.lastModifiedDateTime = lastModifiedDateTime;
_x.version = version;
_x.accountManagerPolicy = accountManagerPolicy;
_x.allowedAccounts = allowedAccounts;
_x.allowLocalStorage = allowLocalStorage;
_x.disableAccountManager = disableAccountManager;
_x.disableEduPolicies = disableEduPolicies;
_x.disablePowerPolicies = disablePowerPolicies;
_x.disableSignInOnResume = disableSignInOnResume;
_x.enabled = enabled;
_x.idleTimeBeforeSleepInSeconds = idleTimeBeforeSleepInSeconds;
_x.kioskAppDisplayName = kioskAppDisplayName;
_x.kioskAppUserModelId = kioskAppUserModelId;
_x.maintenanceStartTime = maintenanceStartTime;
return _x;
}
}
@Override
@JsonIgnore
public ChangedFields getChangedFields() {
return changedFields;
}
@Override
public void postInject(boolean addKeysToContextPath) {
if (addKeysToContextPath && id != null) {
contextPath = contextPath.clearQueries().addKeys(new NameValue(id.toString()));
}
}
/**
* “Specifies how accounts are managed on a shared PC. Only applies when
* disableAccountManager is false.”
*
* @return property accountManagerPolicy
*/
@Property(name="accountManagerPolicy")
@JsonIgnore
public Optional getAccountManagerPolicy() {
return Optional.ofNullable(accountManagerPolicy);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* accountManagerPolicy} 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.
*
* “Specifies how accounts are managed on a shared PC. Only applies when
* disableAccountManager is false.”
*
* @param accountManagerPolicy
* new value of {@code accountManagerPolicy} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code accountManagerPolicy} field changed
*/
public SharedPCConfiguration withAccountManagerPolicy(SharedPCAccountManagerPolicy accountManagerPolicy) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("accountManagerPolicy");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.accountManagerPolicy = accountManagerPolicy;
return _x;
}
/**
* “Indicates which type of accounts are allowed to use on a shared PC.”
*
* @return property allowedAccounts
*/
@Property(name="allowedAccounts")
@JsonIgnore
public Optional getAllowedAccounts() {
return Optional.ofNullable(allowedAccounts);
}
/**
* Returns an immutable copy of {@code this} with just the {@code allowedAccounts}
* 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.
*
* “Indicates which type of accounts are allowed to use on a shared PC.”
*
* @param allowedAccounts
* new value of {@code allowedAccounts} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code allowedAccounts} field changed
*/
public SharedPCConfiguration withAllowedAccounts(SharedPCAllowedAccountType allowedAccounts) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("allowedAccounts");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.allowedAccounts = allowedAccounts;
return _x;
}
/**
* “Specifies whether local storage is allowed on a shared PC.”
*
* @return property allowLocalStorage
*/
@Property(name="allowLocalStorage")
@JsonIgnore
public Optional getAllowLocalStorage() {
return Optional.ofNullable(allowLocalStorage);
}
/**
* Returns an immutable copy of {@code this} with just the {@code allowLocalStorage
* } 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.
*
* “Specifies whether local storage is allowed on a shared PC.”
*
* @param allowLocalStorage
* new value of {@code allowLocalStorage} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code allowLocalStorage} field changed
*/
public SharedPCConfiguration withAllowLocalStorage(Boolean allowLocalStorage) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("allowLocalStorage");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.allowLocalStorage = allowLocalStorage;
return _x;
}
/**
* “Disables the account manager for shared PC mode.”
*
* @return property disableAccountManager
*/
@Property(name="disableAccountManager")
@JsonIgnore
public Optional getDisableAccountManager() {
return Optional.ofNullable(disableAccountManager);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* disableAccountManager} 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.
*
* “Disables the account manager for shared PC mode.”
*
* @param disableAccountManager
* new value of {@code disableAccountManager} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code disableAccountManager} field changed
*/
public SharedPCConfiguration withDisableAccountManager(Boolean disableAccountManager) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("disableAccountManager");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.disableAccountManager = disableAccountManager;
return _x;
}
/**
* “Specifies whether the default shared PC education environment policies should be
* disabled. For Windows 10 RS2 and later, this policy will be applied without
* setting Enabled to true.”
*
* @return property disableEduPolicies
*/
@Property(name="disableEduPolicies")
@JsonIgnore
public Optional getDisableEduPolicies() {
return Optional.ofNullable(disableEduPolicies);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* disableEduPolicies} 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.
*
* “Specifies whether the default shared PC education environment policies should be
* disabled. For Windows 10 RS2 and later, this policy will be applied without
* setting Enabled to true.”
*
* @param disableEduPolicies
* new value of {@code disableEduPolicies} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code disableEduPolicies} field changed
*/
public SharedPCConfiguration withDisableEduPolicies(Boolean disableEduPolicies) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("disableEduPolicies");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.disableEduPolicies = disableEduPolicies;
return _x;
}
/**
* “Specifies whether the default shared PC power policies should be disabled.”
*
* @return property disablePowerPolicies
*/
@Property(name="disablePowerPolicies")
@JsonIgnore
public Optional getDisablePowerPolicies() {
return Optional.ofNullable(disablePowerPolicies);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* disablePowerPolicies} 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.
*
* “Specifies whether the default shared PC power policies should be disabled.”
*
* @param disablePowerPolicies
* new value of {@code disablePowerPolicies} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code disablePowerPolicies} field changed
*/
public SharedPCConfiguration withDisablePowerPolicies(Boolean disablePowerPolicies) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("disablePowerPolicies");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.disablePowerPolicies = disablePowerPolicies;
return _x;
}
/**
* “Disables the requirement to sign in whenever the device wakes up from sleep mode
* .”
*
* @return property disableSignInOnResume
*/
@Property(name="disableSignInOnResume")
@JsonIgnore
public Optional getDisableSignInOnResume() {
return Optional.ofNullable(disableSignInOnResume);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* disableSignInOnResume} 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.
*
* “Disables the requirement to sign in whenever the device wakes up from sleep mode
* .”
*
* @param disableSignInOnResume
* new value of {@code disableSignInOnResume} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code disableSignInOnResume} field changed
*/
public SharedPCConfiguration withDisableSignInOnResume(Boolean disableSignInOnResume) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("disableSignInOnResume");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.disableSignInOnResume = disableSignInOnResume;
return _x;
}
/**
* “Enables shared PC mode and applies the shared pc policies.”
*
* @return property enabled
*/
@Property(name="enabled")
@JsonIgnore
public Optional getEnabled() {
return Optional.ofNullable(enabled);
}
/**
* Returns an immutable copy of {@code this} with just the {@code enabled} 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.
*
* “Enables shared PC mode and applies the shared pc policies.”
*
* @param enabled
* new value of {@code enabled} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code enabled} field changed
*/
public SharedPCConfiguration withEnabled(Boolean enabled) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("enabled");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.enabled = enabled;
return _x;
}
/**
* “Specifies the time in seconds that a device must sit idle before the PC goes to
* sleep. Setting this value to 0 prevents the sleep timeout from occurring.”
*
* @return property idleTimeBeforeSleepInSeconds
*/
@Property(name="idleTimeBeforeSleepInSeconds")
@JsonIgnore
public Optional getIdleTimeBeforeSleepInSeconds() {
return Optional.ofNullable(idleTimeBeforeSleepInSeconds);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* idleTimeBeforeSleepInSeconds} 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.
*
* “Specifies the time in seconds that a device must sit idle before the PC goes to
* sleep. Setting this value to 0 prevents the sleep timeout from occurring.”
*
* @param idleTimeBeforeSleepInSeconds
* new value of {@code idleTimeBeforeSleepInSeconds} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code idleTimeBeforeSleepInSeconds} field changed
*/
public SharedPCConfiguration withIdleTimeBeforeSleepInSeconds(Integer idleTimeBeforeSleepInSeconds) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("idleTimeBeforeSleepInSeconds");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.idleTimeBeforeSleepInSeconds = idleTimeBeforeSleepInSeconds;
return _x;
}
/**
* “Specifies the display text for the account shown on the sign-in screen which
* launches the app specified by SetKioskAppUserModelId. Only applies when
* KioskAppUserModelId is set.”
*
* @return property kioskAppDisplayName
*/
@Property(name="kioskAppDisplayName")
@JsonIgnore
public Optional getKioskAppDisplayName() {
return Optional.ofNullable(kioskAppDisplayName);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* kioskAppDisplayName} 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.
*
* “Specifies the display text for the account shown on the sign-in screen which
* launches the app specified by SetKioskAppUserModelId. Only applies when
* KioskAppUserModelId is set.”
*
* @param kioskAppDisplayName
* new value of {@code kioskAppDisplayName} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code kioskAppDisplayName} field changed
*/
public SharedPCConfiguration withKioskAppDisplayName(String kioskAppDisplayName) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("kioskAppDisplayName");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.kioskAppDisplayName = kioskAppDisplayName;
return _x;
}
/**
* “Specifies the application user model ID of the app to use with assigned access.”
*
* @return property kioskAppUserModelId
*/
@Property(name="kioskAppUserModelId")
@JsonIgnore
public Optional getKioskAppUserModelId() {
return Optional.ofNullable(kioskAppUserModelId);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* kioskAppUserModelId} 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.
*
* “Specifies the application user model ID of the app to use with assigned access.”
*
* @param kioskAppUserModelId
* new value of {@code kioskAppUserModelId} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code kioskAppUserModelId} field changed
*/
public SharedPCConfiguration withKioskAppUserModelId(String kioskAppUserModelId) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("kioskAppUserModelId");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.kioskAppUserModelId = kioskAppUserModelId;
return _x;
}
/**
* “Specifies the daily start time of maintenance hour.”
*
* @return property maintenanceStartTime
*/
@Property(name="maintenanceStartTime")
@JsonIgnore
public Optional getMaintenanceStartTime() {
return Optional.ofNullable(maintenanceStartTime);
}
/**
* Returns an immutable copy of {@code this} with just the {@code
* maintenanceStartTime} 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.
*
* “Specifies the daily start time of maintenance hour.”
*
* @param maintenanceStartTime
* new value of {@code maintenanceStartTime} field (as defined in service metadata)
* @return immutable copy of {@code this} with just the {@code maintenanceStartTime} field changed
*/
public SharedPCConfiguration withMaintenanceStartTime(LocalTime maintenanceStartTime) {
SharedPCConfiguration _x = _copy();
_x.changedFields = changedFields.add("maintenanceStartTime");
_x.odataType = Util.nvl(odataType, "microsoft.graph.sharedPCConfiguration");
_x.maintenanceStartTime = maintenanceStartTime;
return _x;
}
public SharedPCConfiguration withUnmappedField(String name, String value) {
SharedPCConfiguration _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();
}
/**
* Submits only changed fields for update and returns an
* immutable copy of {@code this} with changed fields reset.
*
* @return a copy of {@code this} with changed fields reset
* @throws ClientException if HTTP response is not as expected
*/
public SharedPCConfiguration patch() {
RequestHelper.patch(this, contextPath, RequestOptions.EMPTY);
SharedPCConfiguration _x = _copy();
_x.changedFields = null;
return _x;
}
/**
* Submits all fields for update and returns an immutable copy of {@code this}
* with changed fields reset (they were ignored anyway).
*
* @return a copy of {@code this} with changed fields reset
* @throws ClientException if HTTP response is not as expected
*/
public SharedPCConfiguration put() {
RequestHelper.put(this, contextPath, RequestOptions.EMPTY);
SharedPCConfiguration _x = _copy();
_x.changedFields = null;
return _x;
}
private SharedPCConfiguration _copy() {
SharedPCConfiguration _x = new SharedPCConfiguration();
_x.contextPath = contextPath;
_x.changedFields = changedFields;
_x.unmappedFields = unmappedFields.copy();
_x.odataType = odataType;
_x.id = id;
_x.createdDateTime = createdDateTime;
_x.description = description;
_x.displayName = displayName;
_x.lastModifiedDateTime = lastModifiedDateTime;
_x.version = version;
_x.accountManagerPolicy = accountManagerPolicy;
_x.allowedAccounts = allowedAccounts;
_x.allowLocalStorage = allowLocalStorage;
_x.disableAccountManager = disableAccountManager;
_x.disableEduPolicies = disableEduPolicies;
_x.disablePowerPolicies = disablePowerPolicies;
_x.disableSignInOnResume = disableSignInOnResume;
_x.enabled = enabled;
_x.idleTimeBeforeSleepInSeconds = idleTimeBeforeSleepInSeconds;
_x.kioskAppDisplayName = kioskAppDisplayName;
_x.kioskAppUserModelId = kioskAppUserModelId;
_x.maintenanceStartTime = maintenanceStartTime;
return _x;
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("SharedPCConfiguration[");
b.append("id=");
b.append(this.id);
b.append(", ");
b.append("createdDateTime=");
b.append(this.createdDateTime);
b.append(", ");
b.append("description=");
b.append(this.description);
b.append(", ");
b.append("displayName=");
b.append(this.displayName);
b.append(", ");
b.append("lastModifiedDateTime=");
b.append(this.lastModifiedDateTime);
b.append(", ");
b.append("version=");
b.append(this.version);
b.append(", ");
b.append("accountManagerPolicy=");
b.append(this.accountManagerPolicy);
b.append(", ");
b.append("allowedAccounts=");
b.append(this.allowedAccounts);
b.append(", ");
b.append("allowLocalStorage=");
b.append(this.allowLocalStorage);
b.append(", ");
b.append("disableAccountManager=");
b.append(this.disableAccountManager);
b.append(", ");
b.append("disableEduPolicies=");
b.append(this.disableEduPolicies);
b.append(", ");
b.append("disablePowerPolicies=");
b.append(this.disablePowerPolicies);
b.append(", ");
b.append("disableSignInOnResume=");
b.append(this.disableSignInOnResume);
b.append(", ");
b.append("enabled=");
b.append(this.enabled);
b.append(", ");
b.append("idleTimeBeforeSleepInSeconds=");
b.append(this.idleTimeBeforeSleepInSeconds);
b.append(", ");
b.append("kioskAppDisplayName=");
b.append(this.kioskAppDisplayName);
b.append(", ");
b.append("kioskAppUserModelId=");
b.append(this.kioskAppUserModelId);
b.append(", ");
b.append("maintenanceStartTime=");
b.append(this.maintenanceStartTime);
b.append("]");
b.append(",unmappedFields=");
b.append(unmappedFields);
b.append(",odataType=");
b.append(odataType);
return b.toString();
}
}