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

odata.msgraph.client.entity.WindowsMobileMSI 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.Long;
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.complex.MimeContent;
import odata.msgraph.client.enums.MobileAppPublishingState;


/**
 * “Contains properties and inherited properties for Windows Mobile MSI Line Of
 * Business apps.”
 */@JsonPropertyOrder({
    "@odata.type", 
    "commandLine", 
    "ignoreVersionDetection", 
    "productCode", 
    "productVersion"})
@JsonInclude(Include.NON_NULL)
public class WindowsMobileMSI extends MobileLobApp implements ODataEntityType {

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

    @JsonProperty("commandLine")
    protected String commandLine;

    @JsonProperty("ignoreVersionDetection")
    protected Boolean ignoreVersionDetection;

    @JsonProperty("productCode")
    protected String productCode;

    @JsonProperty("productVersion")
    protected String productVersion;

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

    public static final class Builder {
        private String id;
        private OffsetDateTime createdDateTime;
        private String description;
        private String developer;
        private String displayName;
        private String informationUrl;
        private Boolean isFeatured;
        private MimeContent largeIcon;
        private OffsetDateTime lastModifiedDateTime;
        private String notes;
        private String owner;
        private String privacyInformationUrl;
        private String publisher;
        private MobileAppPublishingState publishingState;
        private String committedContentVersion;
        private String fileName;
        private Long size;
        private String commandLine;
        private Boolean ignoreVersionDetection;
        private String productCode;
        private String productVersion;
        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 developer(String developer) {
            this.developer = developer;
            this.changedFields = changedFields.add("developer");
            return this;
        }

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

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

        public Builder isFeatured(Boolean isFeatured) {
            this.isFeatured = isFeatured;
            this.changedFields = changedFields.add("isFeatured");
            return this;
        }

        public Builder largeIcon(MimeContent largeIcon) {
            this.largeIcon = largeIcon;
            this.changedFields = changedFields.add("largeIcon");
            return this;
        }

        public Builder lastModifiedDateTime(OffsetDateTime lastModifiedDateTime) {
            this.lastModifiedDateTime = lastModifiedDateTime;
            this.changedFields = changedFields.add("lastModifiedDateTime");
            return this;
        }

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

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

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

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

        public Builder publishingState(MobileAppPublishingState publishingState) {
            this.publishingState = publishingState;
            this.changedFields = changedFields.add("publishingState");
            return this;
        }

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

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

        public Builder size(Long size) {
            this.size = size;
            this.changedFields = changedFields.add("size");
            return this;
        }

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

        /**
         * “A boolean to control whether the app's version will be used to detect the app
         * after it is installed on a device. Set this to true for Windows Mobile MSI Line
         * of Business (LoB) apps that use a self update feature.”
         * 
         * @param ignoreVersionDetection
         *            value of {@code ignoreVersionDetection} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder ignoreVersionDetection(Boolean ignoreVersionDetection) {
            this.ignoreVersionDetection = ignoreVersionDetection;
            this.changedFields = changedFields.add("ignoreVersionDetection");
            return this;
        }

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

        /**
         * “The product version of Windows Mobile MSI Line of Business (LoB) app.”
         * 
         * @param productVersion
         *            value of {@code productVersion} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder productVersion(String productVersion) {
            this.productVersion = productVersion;
            this.changedFields = changedFields.add("productVersion");
            return this;
        }

        public WindowsMobileMSI build() {
            WindowsMobileMSI _x = new WindowsMobileMSI();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFieldsImpl();
            _x.odataType = "microsoft.graph.windowsMobileMSI";
            _x.id = id;
            _x.createdDateTime = createdDateTime;
            _x.description = description;
            _x.developer = developer;
            _x.displayName = displayName;
            _x.informationUrl = informationUrl;
            _x.isFeatured = isFeatured;
            _x.largeIcon = largeIcon;
            _x.lastModifiedDateTime = lastModifiedDateTime;
            _x.notes = notes;
            _x.owner = owner;
            _x.privacyInformationUrl = privacyInformationUrl;
            _x.publisher = publisher;
            _x.publishingState = publishingState;
            _x.committedContentVersion = committedContentVersion;
            _x.fileName = fileName;
            _x.size = size;
            _x.commandLine = commandLine;
            _x.ignoreVersionDetection = ignoreVersionDetection;
            _x.productCode = productCode;
            _x.productVersion = productVersion;
            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()));
        }
    }

    /**
     * “The command line.”
     * 
     * @return property commandLine
     */
    @Property(name="commandLine")
    @JsonIgnore
    public Optional getCommandLine() {
        return Optional.ofNullable(commandLine);
    }

    /**
     * Returns an immutable copy of {@code this} with just the {@code commandLine}
     * 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 command line.” * * @param commandLine * new value of {@code commandLine} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code commandLine} field changed */ public WindowsMobileMSI withCommandLine(String commandLine) { WindowsMobileMSI _x = _copy(); _x.changedFields = changedFields.add("commandLine"); _x.odataType = Util.nvl(odataType, "microsoft.graph.windowsMobileMSI"); _x.commandLine = commandLine; return _x; } /** * “A boolean to control whether the app's version will be used to detect the app * after it is installed on a device. Set this to true for Windows Mobile MSI Line * of Business (LoB) apps that use a self update feature.” * * @return property ignoreVersionDetection */ @Property(name="ignoreVersionDetection") @JsonIgnore public Optional getIgnoreVersionDetection() { return Optional.ofNullable(ignoreVersionDetection); } /** * Returns an immutable copy of {@code this} with just the {@code * ignoreVersionDetection} 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. *

* “A boolean to control whether the app's version will be used to detect the app * after it is installed on a device. Set this to true for Windows Mobile MSI Line * of Business (LoB) apps that use a self update feature.” * * @param ignoreVersionDetection * new value of {@code ignoreVersionDetection} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code ignoreVersionDetection} field changed */ public WindowsMobileMSI withIgnoreVersionDetection(Boolean ignoreVersionDetection) { WindowsMobileMSI _x = _copy(); _x.changedFields = changedFields.add("ignoreVersionDetection"); _x.odataType = Util.nvl(odataType, "microsoft.graph.windowsMobileMSI"); _x.ignoreVersionDetection = ignoreVersionDetection; return _x; } /** * “The product code.” * * @return property productCode */ @Property(name="productCode") @JsonIgnore public Optional getProductCode() { return Optional.ofNullable(productCode); } /** * Returns an immutable copy of {@code this} with just the {@code productCode} * 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 product code.” * * @param productCode * new value of {@code productCode} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code productCode} field changed */ public WindowsMobileMSI withProductCode(String productCode) { WindowsMobileMSI _x = _copy(); _x.changedFields = changedFields.add("productCode"); _x.odataType = Util.nvl(odataType, "microsoft.graph.windowsMobileMSI"); _x.productCode = productCode; return _x; } /** * “The product version of Windows Mobile MSI Line of Business (LoB) app.” * * @return property productVersion */ @Property(name="productVersion") @JsonIgnore public Optional getProductVersion() { return Optional.ofNullable(productVersion); } /** * Returns an immutable copy of {@code this} with just the {@code productVersion} * 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 product version of Windows Mobile MSI Line of Business (LoB) app.” * * @param productVersion * new value of {@code productVersion} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code productVersion} field changed */ public WindowsMobileMSI withProductVersion(String productVersion) { WindowsMobileMSI _x = _copy(); _x.changedFields = changedFields.add("productVersion"); _x.odataType = Util.nvl(odataType, "microsoft.graph.windowsMobileMSI"); _x.productVersion = productVersion; return _x; } public WindowsMobileMSI withUnmappedField(String name, String value) { WindowsMobileMSI _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 WindowsMobileMSI patch() { RequestHelper.patch(this, contextPath, RequestOptions.EMPTY); WindowsMobileMSI _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 WindowsMobileMSI put() { RequestHelper.put(this, contextPath, RequestOptions.EMPTY); WindowsMobileMSI _x = _copy(); _x.changedFields = null; return _x; } private WindowsMobileMSI _copy() { WindowsMobileMSI _x = new WindowsMobileMSI(); _x.contextPath = contextPath; _x.changedFields = changedFields; _x.unmappedFields = unmappedFields.copy(); _x.odataType = odataType; _x.id = id; _x.createdDateTime = createdDateTime; _x.description = description; _x.developer = developer; _x.displayName = displayName; _x.informationUrl = informationUrl; _x.isFeatured = isFeatured; _x.largeIcon = largeIcon; _x.lastModifiedDateTime = lastModifiedDateTime; _x.notes = notes; _x.owner = owner; _x.privacyInformationUrl = privacyInformationUrl; _x.publisher = publisher; _x.publishingState = publishingState; _x.committedContentVersion = committedContentVersion; _x.fileName = fileName; _x.size = size; _x.commandLine = commandLine; _x.ignoreVersionDetection = ignoreVersionDetection; _x.productCode = productCode; _x.productVersion = productVersion; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("WindowsMobileMSI["); 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("developer="); b.append(this.developer); b.append(", "); b.append("displayName="); b.append(this.displayName); b.append(", "); b.append("informationUrl="); b.append(this.informationUrl); b.append(", "); b.append("isFeatured="); b.append(this.isFeatured); b.append(", "); b.append("largeIcon="); b.append(this.largeIcon); b.append(", "); b.append("lastModifiedDateTime="); b.append(this.lastModifiedDateTime); b.append(", "); b.append("notes="); b.append(this.notes); b.append(", "); b.append("owner="); b.append(this.owner); b.append(", "); b.append("privacyInformationUrl="); b.append(this.privacyInformationUrl); b.append(", "); b.append("publisher="); b.append(this.publisher); b.append(", "); b.append("publishingState="); b.append(this.publishingState); b.append(", "); b.append("committedContentVersion="); b.append(this.committedContentVersion); b.append(", "); b.append("fileName="); b.append(this.fileName); b.append(", "); b.append("size="); b.append(this.size); b.append(", "); b.append("commandLine="); b.append(this.commandLine); b.append(", "); b.append("ignoreVersionDetection="); b.append(this.ignoreVersionDetection); b.append(", "); b.append("productCode="); b.append(this.productCode); b.append(", "); b.append("productVersion="); b.append(this.productVersion); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy