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

odata.msgraph.client.entity.ManagedDeviceOverview Maven / Gradle / Ivy

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

import odata.msgraph.client.complex.DeviceExchangeAccessStateSummary;
import odata.msgraph.client.complex.DeviceOperatingSystemSummary;


/**
 * “Summary data for managed devices”
 */@JsonPropertyOrder({
    "@odata.type", 
    "deviceExchangeAccessStateSummary", 
    "deviceOperatingSystemSummary", 
    "dualEnrolledDeviceCount", 
    "enrolledDeviceCount", 
    "mdmEnrolledCount"})
@JsonInclude(Include.NON_NULL)
public class ManagedDeviceOverview extends Entity implements ODataEntityType {

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

    @JsonProperty("deviceExchangeAccessStateSummary")
    protected DeviceExchangeAccessStateSummary deviceExchangeAccessStateSummary;

    @JsonProperty("deviceOperatingSystemSummary")
    protected DeviceOperatingSystemSummary deviceOperatingSystemSummary;

    @JsonProperty("dualEnrolledDeviceCount")
    protected Integer dualEnrolledDeviceCount;

    @JsonProperty("enrolledDeviceCount")
    protected Integer enrolledDeviceCount;

    @JsonProperty("mdmEnrolledCount")
    protected Integer mdmEnrolledCount;

    protected ManagedDeviceOverview() {
        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 builderManagedDeviceOverview() {
        return new Builder();
    }

    public static final class Builder {
        private String id;
        private DeviceExchangeAccessStateSummary deviceExchangeAccessStateSummary;
        private DeviceOperatingSystemSummary deviceOperatingSystemSummary;
        private Integer dualEnrolledDeviceCount;
        private Integer enrolledDeviceCount;
        private Integer mdmEnrolledCount;
        private ChangedFields changedFields = ChangedFields.EMPTY;

        Builder() {
            // prevent instantiation
        }

        public Builder id(String id) {
            this.id = id;
            this.changedFields = changedFields.add("id");
            return this;
        }

        /**
         * “Distribution of Exchange Access State in Intune”
         * 
         * @param deviceExchangeAccessStateSummary
         *            value of {@code deviceExchangeAccessStateSummary} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder deviceExchangeAccessStateSummary(DeviceExchangeAccessStateSummary deviceExchangeAccessStateSummary) {
            this.deviceExchangeAccessStateSummary = deviceExchangeAccessStateSummary;
            this.changedFields = changedFields.add("deviceExchangeAccessStateSummary");
            return this;
        }

        /**
         * “Device operating system summary.”
         * 
         * @param deviceOperatingSystemSummary
         *            value of {@code deviceOperatingSystemSummary} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder deviceOperatingSystemSummary(DeviceOperatingSystemSummary deviceOperatingSystemSummary) {
            this.deviceOperatingSystemSummary = deviceOperatingSystemSummary;
            this.changedFields = changedFields.add("deviceOperatingSystemSummary");
            return this;
        }

        /**
         * “The number of devices enrolled in both MDM and EAS”
         * 
         * @param dualEnrolledDeviceCount
         *            value of {@code dualEnrolledDeviceCount} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder dualEnrolledDeviceCount(Integer dualEnrolledDeviceCount) {
            this.dualEnrolledDeviceCount = dualEnrolledDeviceCount;
            this.changedFields = changedFields.add("dualEnrolledDeviceCount");
            return this;
        }

        /**
         * “Total enrolled device count. Does not include PC devices managed via Intune PC
         * Agent”
         * 
         * @param enrolledDeviceCount
         *            value of {@code enrolledDeviceCount} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder enrolledDeviceCount(Integer enrolledDeviceCount) {
            this.enrolledDeviceCount = enrolledDeviceCount;
            this.changedFields = changedFields.add("enrolledDeviceCount");
            return this;
        }

        /**
         * “The number of devices enrolled in MDM”
         * 
         * @param mdmEnrolledCount
         *            value of {@code mdmEnrolledCount} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder mdmEnrolledCount(Integer mdmEnrolledCount) {
            this.mdmEnrolledCount = mdmEnrolledCount;
            this.changedFields = changedFields.add("mdmEnrolledCount");
            return this;
        }

        public ManagedDeviceOverview build() {
            ManagedDeviceOverview _x = new ManagedDeviceOverview();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFieldsImpl();
            _x.odataType = "microsoft.graph.managedDeviceOverview";
            _x.id = id;
            _x.deviceExchangeAccessStateSummary = deviceExchangeAccessStateSummary;
            _x.deviceOperatingSystemSummary = deviceOperatingSystemSummary;
            _x.dualEnrolledDeviceCount = dualEnrolledDeviceCount;
            _x.enrolledDeviceCount = enrolledDeviceCount;
            _x.mdmEnrolledCount = mdmEnrolledCount;
            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, String.class));
        }
    }

    /**
     * “Distribution of Exchange Access State in Intune”
     * 
     * @return property deviceExchangeAccessStateSummary
     */
    @Property(name="deviceExchangeAccessStateSummary")
    @JsonIgnore
    public Optional getDeviceExchangeAccessStateSummary() {
        return Optional.ofNullable(deviceExchangeAccessStateSummary);
    }

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

* “Distribution of Exchange Access State in Intune” * * @param deviceExchangeAccessStateSummary * new value of {@code deviceExchangeAccessStateSummary} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code deviceExchangeAccessStateSummary} field changed */ public ManagedDeviceOverview withDeviceExchangeAccessStateSummary(DeviceExchangeAccessStateSummary deviceExchangeAccessStateSummary) { ManagedDeviceOverview _x = _copy(); _x.changedFields = changedFields.add("deviceExchangeAccessStateSummary"); _x.odataType = Util.nvl(odataType, "microsoft.graph.managedDeviceOverview"); _x.deviceExchangeAccessStateSummary = deviceExchangeAccessStateSummary; return _x; } /** * “Device operating system summary.” * * @return property deviceOperatingSystemSummary */ @Property(name="deviceOperatingSystemSummary") @JsonIgnore public Optional getDeviceOperatingSystemSummary() { return Optional.ofNullable(deviceOperatingSystemSummary); } /** * Returns an immutable copy of {@code this} with just the {@code * deviceOperatingSystemSummary} 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. *

* “Device operating system summary.” * * @param deviceOperatingSystemSummary * new value of {@code deviceOperatingSystemSummary} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code deviceOperatingSystemSummary} field changed */ public ManagedDeviceOverview withDeviceOperatingSystemSummary(DeviceOperatingSystemSummary deviceOperatingSystemSummary) { ManagedDeviceOverview _x = _copy(); _x.changedFields = changedFields.add("deviceOperatingSystemSummary"); _x.odataType = Util.nvl(odataType, "microsoft.graph.managedDeviceOverview"); _x.deviceOperatingSystemSummary = deviceOperatingSystemSummary; return _x; } /** * “The number of devices enrolled in both MDM and EAS” * * @return property dualEnrolledDeviceCount */ @Property(name="dualEnrolledDeviceCount") @JsonIgnore public Optional getDualEnrolledDeviceCount() { return Optional.ofNullable(dualEnrolledDeviceCount); } /** * Returns an immutable copy of {@code this} with just the {@code * dualEnrolledDeviceCount} 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 devices enrolled in both MDM and EAS” * * @param dualEnrolledDeviceCount * new value of {@code dualEnrolledDeviceCount} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code dualEnrolledDeviceCount} field changed */ public ManagedDeviceOverview withDualEnrolledDeviceCount(Integer dualEnrolledDeviceCount) { ManagedDeviceOverview _x = _copy(); _x.changedFields = changedFields.add("dualEnrolledDeviceCount"); _x.odataType = Util.nvl(odataType, "microsoft.graph.managedDeviceOverview"); _x.dualEnrolledDeviceCount = dualEnrolledDeviceCount; return _x; } /** * “Total enrolled device count. Does not include PC devices managed via Intune PC * Agent” * * @return property enrolledDeviceCount */ @Property(name="enrolledDeviceCount") @JsonIgnore public Optional getEnrolledDeviceCount() { return Optional.ofNullable(enrolledDeviceCount); } /** * Returns an immutable copy of {@code this} with just the {@code * enrolledDeviceCount} 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. *

* “Total enrolled device count. Does not include PC devices managed via Intune PC * Agent” * * @param enrolledDeviceCount * new value of {@code enrolledDeviceCount} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code enrolledDeviceCount} field changed */ public ManagedDeviceOverview withEnrolledDeviceCount(Integer enrolledDeviceCount) { ManagedDeviceOverview _x = _copy(); _x.changedFields = changedFields.add("enrolledDeviceCount"); _x.odataType = Util.nvl(odataType, "microsoft.graph.managedDeviceOverview"); _x.enrolledDeviceCount = enrolledDeviceCount; return _x; } /** * “The number of devices enrolled in MDM” * * @return property mdmEnrolledCount */ @Property(name="mdmEnrolledCount") @JsonIgnore public Optional getMdmEnrolledCount() { return Optional.ofNullable(mdmEnrolledCount); } /** * Returns an immutable copy of {@code this} with just the {@code mdmEnrolledCount} * 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 devices enrolled in MDM” * * @param mdmEnrolledCount * new value of {@code mdmEnrolledCount} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code mdmEnrolledCount} field changed */ public ManagedDeviceOverview withMdmEnrolledCount(Integer mdmEnrolledCount) { ManagedDeviceOverview _x = _copy(); _x.changedFields = changedFields.add("mdmEnrolledCount"); _x.odataType = Util.nvl(odataType, "microsoft.graph.managedDeviceOverview"); _x.mdmEnrolledCount = mdmEnrolledCount; return _x; } public ManagedDeviceOverview withUnmappedField(String name, Object value) { ManagedDeviceOverview _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 ManagedDeviceOverview patch() { RequestHelper.patch(this, contextPath, RequestOptions.EMPTY); ManagedDeviceOverview _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 ManagedDeviceOverview put() { RequestHelper.put(this, contextPath, RequestOptions.EMPTY); ManagedDeviceOverview _x = _copy(); _x.changedFields = null; return _x; } private ManagedDeviceOverview _copy() { ManagedDeviceOverview _x = new ManagedDeviceOverview(); _x.contextPath = contextPath; _x.changedFields = changedFields; _x.unmappedFields = unmappedFields.copy(); _x.odataType = odataType; _x.id = id; _x.deviceExchangeAccessStateSummary = deviceExchangeAccessStateSummary; _x.deviceOperatingSystemSummary = deviceOperatingSystemSummary; _x.dualEnrolledDeviceCount = dualEnrolledDeviceCount; _x.enrolledDeviceCount = enrolledDeviceCount; _x.mdmEnrolledCount = mdmEnrolledCount; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("ManagedDeviceOverview["); b.append("id="); b.append(this.id); b.append(", "); b.append("deviceExchangeAccessStateSummary="); b.append(this.deviceExchangeAccessStateSummary); b.append(", "); b.append("deviceOperatingSystemSummary="); b.append(this.deviceOperatingSystemSummary); b.append(", "); b.append("dualEnrolledDeviceCount="); b.append(this.dualEnrolledDeviceCount); b.append(", "); b.append("enrolledDeviceCount="); b.append(this.enrolledDeviceCount); b.append(", "); b.append("mdmEnrolledCount="); b.append(this.mdmEnrolledCount); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy