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

odata.msgraph.client.entity.ManagedAndroidStoreApp 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.Boolean;
import java.lang.Object;
import java.lang.Override;
import java.lang.String;
import java.lang.StringBuilder;
import java.time.OffsetDateTime;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;

import odata.msgraph.client.complex.AndroidMinimumOperatingSystem;
import odata.msgraph.client.complex.MimeContent;
import odata.msgraph.client.enums.ManagedAppAvailability;
import odata.msgraph.client.enums.MobileAppPublishingState;


/**
 * “Contains properties and inherited properties for Android store apps that you can
 * manage with an Intune app protection policy.”
 */@JsonPropertyOrder({
    "@odata.type", 
    "appStoreUrl", 
    "minimumSupportedOperatingSystem", 
    "packageId"})
@JsonInclude(Include.NON_NULL)
public class ManagedAndroidStoreApp extends ManagedApp implements ODataEntityType {

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

    @JsonProperty("appStoreUrl")
    protected String appStoreUrl;

    @JsonProperty("minimumSupportedOperatingSystem")
    protected AndroidMinimumOperatingSystem minimumSupportedOperatingSystem;

    @JsonProperty("packageId")
    protected String packageId;

    protected ManagedAndroidStoreApp() {
        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 builderManagedAndroidStoreApp() {
        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 List assignments;
        private ManagedAppAvailability appAvailability;
        private String version;
        private String appStoreUrl;
        private AndroidMinimumOperatingSystem minimumSupportedOperatingSystem;
        private String packageId;
        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 assignments(List assignments) {
            this.assignments = assignments;
            this.changedFields = changedFields.add("assignments");
            return this;
        }

        public Builder assignments(MobileAppAssignment... assignments) {
            return assignments(Arrays.asList(assignments));
        }

        public Builder appAvailability(ManagedAppAvailability appAvailability) {
            this.appAvailability = appAvailability;
            this.changedFields = changedFields.add("appAvailability");
            return this;
        }

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

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

        /**
         * “The value for the minimum supported operating system.”
         * 
         * @param minimumSupportedOperatingSystem
         *            value of {@code minimumSupportedOperatingSystem} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder minimumSupportedOperatingSystem(AndroidMinimumOperatingSystem minimumSupportedOperatingSystem) {
            this.minimumSupportedOperatingSystem = minimumSupportedOperatingSystem;
            this.changedFields = changedFields.add("minimumSupportedOperatingSystem");
            return this;
        }

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

        public ManagedAndroidStoreApp build() {
            ManagedAndroidStoreApp _x = new ManagedAndroidStoreApp();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFieldsImpl();
            _x.odataType = "microsoft.graph.managedAndroidStoreApp";
            _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.assignments = assignments;
            _x.appAvailability = appAvailability;
            _x.version = version;
            _x.appStoreUrl = appStoreUrl;
            _x.minimumSupportedOperatingSystem = minimumSupportedOperatingSystem;
            _x.packageId = packageId;
            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));
        }
    }

    /**
     * “The Android AppStoreUrl.”
     * 
     * @return property appStoreUrl
     */
    @Property(name="appStoreUrl")
    @JsonIgnore
    public Optional getAppStoreUrl() {
        return Optional.ofNullable(appStoreUrl);
    }

    /**
     * Returns an immutable copy of {@code this} with just the {@code appStoreUrl}
     * 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 Android AppStoreUrl.” * * @param appStoreUrl * new value of {@code appStoreUrl} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code appStoreUrl} field changed */ public ManagedAndroidStoreApp withAppStoreUrl(String appStoreUrl) { ManagedAndroidStoreApp _x = _copy(); _x.changedFields = changedFields.add("appStoreUrl"); _x.odataType = Util.nvl(odataType, "microsoft.graph.managedAndroidStoreApp"); _x.appStoreUrl = appStoreUrl; return _x; } /** * “The value for the minimum supported operating system.” * * @return property minimumSupportedOperatingSystem */ @Property(name="minimumSupportedOperatingSystem") @JsonIgnore public Optional getMinimumSupportedOperatingSystem() { return Optional.ofNullable(minimumSupportedOperatingSystem); } /** * Returns an immutable copy of {@code this} with just the {@code * minimumSupportedOperatingSystem} 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 value for the minimum supported operating system.” * * @param minimumSupportedOperatingSystem * new value of {@code minimumSupportedOperatingSystem} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code minimumSupportedOperatingSystem} field changed */ public ManagedAndroidStoreApp withMinimumSupportedOperatingSystem(AndroidMinimumOperatingSystem minimumSupportedOperatingSystem) { ManagedAndroidStoreApp _x = _copy(); _x.changedFields = changedFields.add("minimumSupportedOperatingSystem"); _x.odataType = Util.nvl(odataType, "microsoft.graph.managedAndroidStoreApp"); _x.minimumSupportedOperatingSystem = minimumSupportedOperatingSystem; return _x; } /** * “The app's package ID.” * * @return property packageId */ @Property(name="packageId") @JsonIgnore public Optional getPackageId() { return Optional.ofNullable(packageId); } /** * Returns an immutable copy of {@code this} with just the {@code packageId} 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 app's package ID.” * * @param packageId * new value of {@code packageId} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code packageId} field changed */ public ManagedAndroidStoreApp withPackageId(String packageId) { ManagedAndroidStoreApp _x = _copy(); _x.changedFields = changedFields.add("packageId"); _x.odataType = Util.nvl(odataType, "microsoft.graph.managedAndroidStoreApp"); _x.packageId = packageId; return _x; } public ManagedAndroidStoreApp withUnmappedField(String name, Object value) { ManagedAndroidStoreApp _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 ManagedAndroidStoreApp patch() { RequestHelper.patch(this, contextPath, RequestOptions.EMPTY); ManagedAndroidStoreApp _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 ManagedAndroidStoreApp put() { RequestHelper.put(this, contextPath, RequestOptions.EMPTY); ManagedAndroidStoreApp _x = _copy(); _x.changedFields = null; return _x; } private ManagedAndroidStoreApp _copy() { ManagedAndroidStoreApp _x = new ManagedAndroidStoreApp(); _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.assignments = assignments; _x.appAvailability = appAvailability; _x.version = version; _x.appStoreUrl = appStoreUrl; _x.minimumSupportedOperatingSystem = minimumSupportedOperatingSystem; _x.packageId = packageId; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("ManagedAndroidStoreApp["); 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("assignments="); b.append(this.assignments); b.append(", "); b.append("appAvailability="); b.append(this.appAvailability); b.append(", "); b.append("version="); b.append(this.version); b.append(", "); b.append("appStoreUrl="); b.append(this.appStoreUrl); b.append(", "); b.append("minimumSupportedOperatingSystem="); b.append(this.minimumSupportedOperatingSystem); b.append(", "); b.append("packageId="); b.append(this.packageId); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy