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

odata.msgraph.client.entity.IosCompliancePolicy 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.OffsetDateTime;
import java.util.Optional;

import odata.msgraph.client.enums.DeviceThreatProtectionLevel;
import odata.msgraph.client.enums.RequiredPasswordType;


/**
 * “This class contains compliance settings for IOS.”
 */@JsonPropertyOrder({
    "@odata.type", 
    "deviceThreatProtectionEnabled", 
    "deviceThreatProtectionRequiredSecurityLevel", 
    "managedEmailProfileRequired", 
    "osMaximumVersion", 
    "osMinimumVersion", 
    "passcodeBlockSimple", 
    "passcodeExpirationDays", 
    "passcodeMinimumCharacterSetCount", 
    "passcodeMinimumLength", 
    "passcodeMinutesOfInactivityBeforeLock", 
    "passcodePreviousPasscodeBlockCount", 
    "passcodeRequired", 
    "passcodeRequiredType", 
    "securityBlockJailbrokenDevices"})
@JsonInclude(Include.NON_NULL)
public class IosCompliancePolicy extends DeviceCompliancePolicy implements ODataEntityType {

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

    @JsonProperty("deviceThreatProtectionEnabled")
    protected Boolean deviceThreatProtectionEnabled;

    @JsonProperty("deviceThreatProtectionRequiredSecurityLevel")
    protected DeviceThreatProtectionLevel deviceThreatProtectionRequiredSecurityLevel;

    @JsonProperty("managedEmailProfileRequired")
    protected Boolean managedEmailProfileRequired;

    @JsonProperty("osMaximumVersion")
    protected String osMaximumVersion;

    @JsonProperty("osMinimumVersion")
    protected String osMinimumVersion;

    @JsonProperty("passcodeBlockSimple")
    protected Boolean passcodeBlockSimple;

    @JsonProperty("passcodeExpirationDays")
    protected Integer passcodeExpirationDays;

    @JsonProperty("passcodeMinimumCharacterSetCount")
    protected Integer passcodeMinimumCharacterSetCount;

    @JsonProperty("passcodeMinimumLength")
    protected Integer passcodeMinimumLength;

    @JsonProperty("passcodeMinutesOfInactivityBeforeLock")
    protected Integer passcodeMinutesOfInactivityBeforeLock;

    @JsonProperty("passcodePreviousPasscodeBlockCount")
    protected Integer passcodePreviousPasscodeBlockCount;

    @JsonProperty("passcodeRequired")
    protected Boolean passcodeRequired;

    @JsonProperty("passcodeRequiredType")
    protected RequiredPasswordType passcodeRequiredType;

    @JsonProperty("securityBlockJailbrokenDevices")
    protected Boolean securityBlockJailbrokenDevices;

    protected IosCompliancePolicy() {
        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 builderIosCompliancePolicy() {
        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 Boolean deviceThreatProtectionEnabled;
        private DeviceThreatProtectionLevel deviceThreatProtectionRequiredSecurityLevel;
        private Boolean managedEmailProfileRequired;
        private String osMaximumVersion;
        private String osMinimumVersion;
        private Boolean passcodeBlockSimple;
        private Integer passcodeExpirationDays;
        private Integer passcodeMinimumCharacterSetCount;
        private Integer passcodeMinimumLength;
        private Integer passcodeMinutesOfInactivityBeforeLock;
        private Integer passcodePreviousPasscodeBlockCount;
        private Boolean passcodeRequired;
        private RequiredPasswordType passcodeRequiredType;
        private Boolean securityBlockJailbrokenDevices;
        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;
        }

        /**
         * “Require that devices have enabled device threat protection .”
         * 
         * @param deviceThreatProtectionEnabled
         *            value of {@code deviceThreatProtectionEnabled} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder deviceThreatProtectionEnabled(Boolean deviceThreatProtectionEnabled) {
            this.deviceThreatProtectionEnabled = deviceThreatProtectionEnabled;
            this.changedFields = changedFields.add("deviceThreatProtectionEnabled");
            return this;
        }

        /**
         * “Require Mobile Threat Protection minimum risk level to report noncompliance.”
         * 
         * @param deviceThreatProtectionRequiredSecurityLevel
         *            value of {@code deviceThreatProtectionRequiredSecurityLevel} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder deviceThreatProtectionRequiredSecurityLevel(DeviceThreatProtectionLevel deviceThreatProtectionRequiredSecurityLevel) {
            this.deviceThreatProtectionRequiredSecurityLevel = deviceThreatProtectionRequiredSecurityLevel;
            this.changedFields = changedFields.add("deviceThreatProtectionRequiredSecurityLevel");
            return this;
        }

        /**
         * “Indicates whether or not to require a managed email profile.”
         * 
         * @param managedEmailProfileRequired
         *            value of {@code managedEmailProfileRequired} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder managedEmailProfileRequired(Boolean managedEmailProfileRequired) {
            this.managedEmailProfileRequired = managedEmailProfileRequired;
            this.changedFields = changedFields.add("managedEmailProfileRequired");
            return this;
        }

        /**
         * “Maximum IOS version.”
         * 
         * @param osMaximumVersion
         *            value of {@code osMaximumVersion} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder osMaximumVersion(String osMaximumVersion) {
            this.osMaximumVersion = osMaximumVersion;
            this.changedFields = changedFields.add("osMaximumVersion");
            return this;
        }

        /**
         * “Minimum IOS version.”
         * 
         * @param osMinimumVersion
         *            value of {@code osMinimumVersion} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder osMinimumVersion(String osMinimumVersion) {
            this.osMinimumVersion = osMinimumVersion;
            this.changedFields = changedFields.add("osMinimumVersion");
            return this;
        }

        /**
         * “Indicates whether or not to block simple passcodes.”
         * 
         * @param passcodeBlockSimple
         *            value of {@code passcodeBlockSimple} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder passcodeBlockSimple(Boolean passcodeBlockSimple) {
            this.passcodeBlockSimple = passcodeBlockSimple;
            this.changedFields = changedFields.add("passcodeBlockSimple");
            return this;
        }

        /**
         * “Number of days before the passcode expires. Valid values 1 to 65535”
         * 
         * @param passcodeExpirationDays
         *            value of {@code passcodeExpirationDays} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder passcodeExpirationDays(Integer passcodeExpirationDays) {
            this.passcodeExpirationDays = passcodeExpirationDays;
            this.changedFields = changedFields.add("passcodeExpirationDays");
            return this;
        }

        /**
         * “The number of character sets required in the password.”
         * 
         * @param passcodeMinimumCharacterSetCount
         *            value of {@code passcodeMinimumCharacterSetCount} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder passcodeMinimumCharacterSetCount(Integer passcodeMinimumCharacterSetCount) {
            this.passcodeMinimumCharacterSetCount = passcodeMinimumCharacterSetCount;
            this.changedFields = changedFields.add("passcodeMinimumCharacterSetCount");
            return this;
        }

        /**
         * “Minimum length of passcode. Valid values 4 to 14”
         * 
         * @param passcodeMinimumLength
         *            value of {@code passcodeMinimumLength} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder passcodeMinimumLength(Integer passcodeMinimumLength) {
            this.passcodeMinimumLength = passcodeMinimumLength;
            this.changedFields = changedFields.add("passcodeMinimumLength");
            return this;
        }

        /**
         * “Minutes of inactivity before a passcode is required.”
         * 
         * @param passcodeMinutesOfInactivityBeforeLock
         *            value of {@code passcodeMinutesOfInactivityBeforeLock} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder passcodeMinutesOfInactivityBeforeLock(Integer passcodeMinutesOfInactivityBeforeLock) {
            this.passcodeMinutesOfInactivityBeforeLock = passcodeMinutesOfInactivityBeforeLock;
            this.changedFields = changedFields.add("passcodeMinutesOfInactivityBeforeLock");
            return this;
        }

        /**
         * “Number of previous passcodes to block. Valid values 1 to 24”
         * 
         * @param passcodePreviousPasscodeBlockCount
         *            value of {@code passcodePreviousPasscodeBlockCount} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder passcodePreviousPasscodeBlockCount(Integer passcodePreviousPasscodeBlockCount) {
            this.passcodePreviousPasscodeBlockCount = passcodePreviousPasscodeBlockCount;
            this.changedFields = changedFields.add("passcodePreviousPasscodeBlockCount");
            return this;
        }

        /**
         * “Indicates whether or not to require a passcode.”
         * 
         * @param passcodeRequired
         *            value of {@code passcodeRequired} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder passcodeRequired(Boolean passcodeRequired) {
            this.passcodeRequired = passcodeRequired;
            this.changedFields = changedFields.add("passcodeRequired");
            return this;
        }

        /**
         * “The required passcode type.”
         * 
         * @param passcodeRequiredType
         *            value of {@code passcodeRequiredType} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder passcodeRequiredType(RequiredPasswordType passcodeRequiredType) {
            this.passcodeRequiredType = passcodeRequiredType;
            this.changedFields = changedFields.add("passcodeRequiredType");
            return this;
        }

        /**
         * “Devices must not be jailbroken or rooted.”
         * 
         * @param securityBlockJailbrokenDevices
         *            value of {@code securityBlockJailbrokenDevices} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder securityBlockJailbrokenDevices(Boolean securityBlockJailbrokenDevices) {
            this.securityBlockJailbrokenDevices = securityBlockJailbrokenDevices;
            this.changedFields = changedFields.add("securityBlockJailbrokenDevices");
            return this;
        }

        public IosCompliancePolicy build() {
            IosCompliancePolicy _x = new IosCompliancePolicy();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFieldsImpl();
            _x.odataType = "microsoft.graph.iosCompliancePolicy";
            _x.id = id;
            _x.createdDateTime = createdDateTime;
            _x.description = description;
            _x.displayName = displayName;
            _x.lastModifiedDateTime = lastModifiedDateTime;
            _x.version = version;
            _x.deviceThreatProtectionEnabled = deviceThreatProtectionEnabled;
            _x.deviceThreatProtectionRequiredSecurityLevel = deviceThreatProtectionRequiredSecurityLevel;
            _x.managedEmailProfileRequired = managedEmailProfileRequired;
            _x.osMaximumVersion = osMaximumVersion;
            _x.osMinimumVersion = osMinimumVersion;
            _x.passcodeBlockSimple = passcodeBlockSimple;
            _x.passcodeExpirationDays = passcodeExpirationDays;
            _x.passcodeMinimumCharacterSetCount = passcodeMinimumCharacterSetCount;
            _x.passcodeMinimumLength = passcodeMinimumLength;
            _x.passcodeMinutesOfInactivityBeforeLock = passcodeMinutesOfInactivityBeforeLock;
            _x.passcodePreviousPasscodeBlockCount = passcodePreviousPasscodeBlockCount;
            _x.passcodeRequired = passcodeRequired;
            _x.passcodeRequiredType = passcodeRequiredType;
            _x.securityBlockJailbrokenDevices = securityBlockJailbrokenDevices;
            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()));
        }
    }

    /**
     * “Require that devices have enabled device threat protection .”
     * 
     * @return property deviceThreatProtectionEnabled
     */
    @Property(name="deviceThreatProtectionEnabled")
    @JsonIgnore
    public Optional getDeviceThreatProtectionEnabled() {
        return Optional.ofNullable(deviceThreatProtectionEnabled);
    }

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

* “Require that devices have enabled device threat protection .” * * @param deviceThreatProtectionEnabled * new value of {@code deviceThreatProtectionEnabled} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code deviceThreatProtectionEnabled} field changed */ public IosCompliancePolicy withDeviceThreatProtectionEnabled(Boolean deviceThreatProtectionEnabled) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("deviceThreatProtectionEnabled"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.deviceThreatProtectionEnabled = deviceThreatProtectionEnabled; return _x; } /** * “Require Mobile Threat Protection minimum risk level to report noncompliance.” * * @return property deviceThreatProtectionRequiredSecurityLevel */ @Property(name="deviceThreatProtectionRequiredSecurityLevel") @JsonIgnore public Optional getDeviceThreatProtectionRequiredSecurityLevel() { return Optional.ofNullable(deviceThreatProtectionRequiredSecurityLevel); } /** * Returns an immutable copy of {@code this} with just the {@code * deviceThreatProtectionRequiredSecurityLevel} 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. *

* “Require Mobile Threat Protection minimum risk level to report noncompliance.” * * @param deviceThreatProtectionRequiredSecurityLevel * new value of {@code deviceThreatProtectionRequiredSecurityLevel} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code deviceThreatProtectionRequiredSecurityLevel} field changed */ public IosCompliancePolicy withDeviceThreatProtectionRequiredSecurityLevel(DeviceThreatProtectionLevel deviceThreatProtectionRequiredSecurityLevel) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("deviceThreatProtectionRequiredSecurityLevel"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.deviceThreatProtectionRequiredSecurityLevel = deviceThreatProtectionRequiredSecurityLevel; return _x; } /** * “Indicates whether or not to require a managed email profile.” * * @return property managedEmailProfileRequired */ @Property(name="managedEmailProfileRequired") @JsonIgnore public Optional getManagedEmailProfileRequired() { return Optional.ofNullable(managedEmailProfileRequired); } /** * Returns an immutable copy of {@code this} with just the {@code * managedEmailProfileRequired} 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 whether or not to require a managed email profile.” * * @param managedEmailProfileRequired * new value of {@code managedEmailProfileRequired} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code managedEmailProfileRequired} field changed */ public IosCompliancePolicy withManagedEmailProfileRequired(Boolean managedEmailProfileRequired) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("managedEmailProfileRequired"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.managedEmailProfileRequired = managedEmailProfileRequired; return _x; } /** * “Maximum IOS version.” * * @return property osMaximumVersion */ @Property(name="osMaximumVersion") @JsonIgnore public Optional getOsMaximumVersion() { return Optional.ofNullable(osMaximumVersion); } /** * Returns an immutable copy of {@code this} with just the {@code osMaximumVersion} * 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. *

* “Maximum IOS version.” * * @param osMaximumVersion * new value of {@code osMaximumVersion} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code osMaximumVersion} field changed */ public IosCompliancePolicy withOsMaximumVersion(String osMaximumVersion) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("osMaximumVersion"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.osMaximumVersion = osMaximumVersion; return _x; } /** * “Minimum IOS version.” * * @return property osMinimumVersion */ @Property(name="osMinimumVersion") @JsonIgnore public Optional getOsMinimumVersion() { return Optional.ofNullable(osMinimumVersion); } /** * Returns an immutable copy of {@code this} with just the {@code osMinimumVersion} * 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. *

* “Minimum IOS version.” * * @param osMinimumVersion * new value of {@code osMinimumVersion} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code osMinimumVersion} field changed */ public IosCompliancePolicy withOsMinimumVersion(String osMinimumVersion) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("osMinimumVersion"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.osMinimumVersion = osMinimumVersion; return _x; } /** * “Indicates whether or not to block simple passcodes.” * * @return property passcodeBlockSimple */ @Property(name="passcodeBlockSimple") @JsonIgnore public Optional getPasscodeBlockSimple() { return Optional.ofNullable(passcodeBlockSimple); } /** * Returns an immutable copy of {@code this} with just the {@code * passcodeBlockSimple} 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 whether or not to block simple passcodes.” * * @param passcodeBlockSimple * new value of {@code passcodeBlockSimple} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code passcodeBlockSimple} field changed */ public IosCompliancePolicy withPasscodeBlockSimple(Boolean passcodeBlockSimple) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("passcodeBlockSimple"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.passcodeBlockSimple = passcodeBlockSimple; return _x; } /** * “Number of days before the passcode expires. Valid values 1 to 65535” * * @return property passcodeExpirationDays */ @Property(name="passcodeExpirationDays") @JsonIgnore public Optional getPasscodeExpirationDays() { return Optional.ofNullable(passcodeExpirationDays); } /** * Returns an immutable copy of {@code this} with just the {@code * passcodeExpirationDays} 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. *

* “Number of days before the passcode expires. Valid values 1 to 65535” * * @param passcodeExpirationDays * new value of {@code passcodeExpirationDays} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code passcodeExpirationDays} field changed */ public IosCompliancePolicy withPasscodeExpirationDays(Integer passcodeExpirationDays) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("passcodeExpirationDays"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.passcodeExpirationDays = passcodeExpirationDays; return _x; } /** * “The number of character sets required in the password.” * * @return property passcodeMinimumCharacterSetCount */ @Property(name="passcodeMinimumCharacterSetCount") @JsonIgnore public Optional getPasscodeMinimumCharacterSetCount() { return Optional.ofNullable(passcodeMinimumCharacterSetCount); } /** * Returns an immutable copy of {@code this} with just the {@code * passcodeMinimumCharacterSetCount} 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 character sets required in the password.” * * @param passcodeMinimumCharacterSetCount * new value of {@code passcodeMinimumCharacterSetCount} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code passcodeMinimumCharacterSetCount} field changed */ public IosCompliancePolicy withPasscodeMinimumCharacterSetCount(Integer passcodeMinimumCharacterSetCount) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("passcodeMinimumCharacterSetCount"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.passcodeMinimumCharacterSetCount = passcodeMinimumCharacterSetCount; return _x; } /** * “Minimum length of passcode. Valid values 4 to 14” * * @return property passcodeMinimumLength */ @Property(name="passcodeMinimumLength") @JsonIgnore public Optional getPasscodeMinimumLength() { return Optional.ofNullable(passcodeMinimumLength); } /** * Returns an immutable copy of {@code this} with just the {@code * passcodeMinimumLength} 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. *

* “Minimum length of passcode. Valid values 4 to 14” * * @param passcodeMinimumLength * new value of {@code passcodeMinimumLength} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code passcodeMinimumLength} field changed */ public IosCompliancePolicy withPasscodeMinimumLength(Integer passcodeMinimumLength) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("passcodeMinimumLength"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.passcodeMinimumLength = passcodeMinimumLength; return _x; } /** * “Minutes of inactivity before a passcode is required.” * * @return property passcodeMinutesOfInactivityBeforeLock */ @Property(name="passcodeMinutesOfInactivityBeforeLock") @JsonIgnore public Optional getPasscodeMinutesOfInactivityBeforeLock() { return Optional.ofNullable(passcodeMinutesOfInactivityBeforeLock); } /** * Returns an immutable copy of {@code this} with just the {@code * passcodeMinutesOfInactivityBeforeLock} 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. *

* “Minutes of inactivity before a passcode is required.” * * @param passcodeMinutesOfInactivityBeforeLock * new value of {@code passcodeMinutesOfInactivityBeforeLock} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code passcodeMinutesOfInactivityBeforeLock} field changed */ public IosCompliancePolicy withPasscodeMinutesOfInactivityBeforeLock(Integer passcodeMinutesOfInactivityBeforeLock) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("passcodeMinutesOfInactivityBeforeLock"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.passcodeMinutesOfInactivityBeforeLock = passcodeMinutesOfInactivityBeforeLock; return _x; } /** * “Number of previous passcodes to block. Valid values 1 to 24” * * @return property passcodePreviousPasscodeBlockCount */ @Property(name="passcodePreviousPasscodeBlockCount") @JsonIgnore public Optional getPasscodePreviousPasscodeBlockCount() { return Optional.ofNullable(passcodePreviousPasscodeBlockCount); } /** * Returns an immutable copy of {@code this} with just the {@code * passcodePreviousPasscodeBlockCount} 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. *

* “Number of previous passcodes to block. Valid values 1 to 24” * * @param passcodePreviousPasscodeBlockCount * new value of {@code passcodePreviousPasscodeBlockCount} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code passcodePreviousPasscodeBlockCount} field changed */ public IosCompliancePolicy withPasscodePreviousPasscodeBlockCount(Integer passcodePreviousPasscodeBlockCount) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("passcodePreviousPasscodeBlockCount"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.passcodePreviousPasscodeBlockCount = passcodePreviousPasscodeBlockCount; return _x; } /** * “Indicates whether or not to require a passcode.” * * @return property passcodeRequired */ @Property(name="passcodeRequired") @JsonIgnore public Optional getPasscodeRequired() { return Optional.ofNullable(passcodeRequired); } /** * Returns an immutable copy of {@code this} with just the {@code passcodeRequired} * 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 whether or not to require a passcode.” * * @param passcodeRequired * new value of {@code passcodeRequired} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code passcodeRequired} field changed */ public IosCompliancePolicy withPasscodeRequired(Boolean passcodeRequired) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("passcodeRequired"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.passcodeRequired = passcodeRequired; return _x; } /** * “The required passcode type.” * * @return property passcodeRequiredType */ @Property(name="passcodeRequiredType") @JsonIgnore public Optional getPasscodeRequiredType() { return Optional.ofNullable(passcodeRequiredType); } /** * Returns an immutable copy of {@code this} with just the {@code * passcodeRequiredType} 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 required passcode type.” * * @param passcodeRequiredType * new value of {@code passcodeRequiredType} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code passcodeRequiredType} field changed */ public IosCompliancePolicy withPasscodeRequiredType(RequiredPasswordType passcodeRequiredType) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("passcodeRequiredType"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.passcodeRequiredType = passcodeRequiredType; return _x; } /** * “Devices must not be jailbroken or rooted.” * * @return property securityBlockJailbrokenDevices */ @Property(name="securityBlockJailbrokenDevices") @JsonIgnore public Optional getSecurityBlockJailbrokenDevices() { return Optional.ofNullable(securityBlockJailbrokenDevices); } /** * Returns an immutable copy of {@code this} with just the {@code * securityBlockJailbrokenDevices} 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. *

* “Devices must not be jailbroken or rooted.” * * @param securityBlockJailbrokenDevices * new value of {@code securityBlockJailbrokenDevices} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code securityBlockJailbrokenDevices} field changed */ public IosCompliancePolicy withSecurityBlockJailbrokenDevices(Boolean securityBlockJailbrokenDevices) { IosCompliancePolicy _x = _copy(); _x.changedFields = changedFields.add("securityBlockJailbrokenDevices"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosCompliancePolicy"); _x.securityBlockJailbrokenDevices = securityBlockJailbrokenDevices; return _x; } public IosCompliancePolicy withUnmappedField(String name, String value) { IosCompliancePolicy _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 IosCompliancePolicy patch() { RequestHelper.patch(this, contextPath, RequestOptions.EMPTY); IosCompliancePolicy _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 IosCompliancePolicy put() { RequestHelper.put(this, contextPath, RequestOptions.EMPTY); IosCompliancePolicy _x = _copy(); _x.changedFields = null; return _x; } private IosCompliancePolicy _copy() { IosCompliancePolicy _x = new IosCompliancePolicy(); _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.deviceThreatProtectionEnabled = deviceThreatProtectionEnabled; _x.deviceThreatProtectionRequiredSecurityLevel = deviceThreatProtectionRequiredSecurityLevel; _x.managedEmailProfileRequired = managedEmailProfileRequired; _x.osMaximumVersion = osMaximumVersion; _x.osMinimumVersion = osMinimumVersion; _x.passcodeBlockSimple = passcodeBlockSimple; _x.passcodeExpirationDays = passcodeExpirationDays; _x.passcodeMinimumCharacterSetCount = passcodeMinimumCharacterSetCount; _x.passcodeMinimumLength = passcodeMinimumLength; _x.passcodeMinutesOfInactivityBeforeLock = passcodeMinutesOfInactivityBeforeLock; _x.passcodePreviousPasscodeBlockCount = passcodePreviousPasscodeBlockCount; _x.passcodeRequired = passcodeRequired; _x.passcodeRequiredType = passcodeRequiredType; _x.securityBlockJailbrokenDevices = securityBlockJailbrokenDevices; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("IosCompliancePolicy["); 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("deviceThreatProtectionEnabled="); b.append(this.deviceThreatProtectionEnabled); b.append(", "); b.append("deviceThreatProtectionRequiredSecurityLevel="); b.append(this.deviceThreatProtectionRequiredSecurityLevel); b.append(", "); b.append("managedEmailProfileRequired="); b.append(this.managedEmailProfileRequired); b.append(", "); b.append("osMaximumVersion="); b.append(this.osMaximumVersion); b.append(", "); b.append("osMinimumVersion="); b.append(this.osMinimumVersion); b.append(", "); b.append("passcodeBlockSimple="); b.append(this.passcodeBlockSimple); b.append(", "); b.append("passcodeExpirationDays="); b.append(this.passcodeExpirationDays); b.append(", "); b.append("passcodeMinimumCharacterSetCount="); b.append(this.passcodeMinimumCharacterSetCount); b.append(", "); b.append("passcodeMinimumLength="); b.append(this.passcodeMinimumLength); b.append(", "); b.append("passcodeMinutesOfInactivityBeforeLock="); b.append(this.passcodeMinutesOfInactivityBeforeLock); b.append(", "); b.append("passcodePreviousPasscodeBlockCount="); b.append(this.passcodePreviousPasscodeBlockCount); b.append(", "); b.append("passcodeRequired="); b.append(this.passcodeRequired); b.append(", "); b.append("passcodeRequiredType="); b.append(this.passcodeRequiredType); b.append(", "); b.append("securityBlockJailbrokenDevices="); b.append(this.securityBlockJailbrokenDevices); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy