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

odata.msgraph.client.entity.IosStoreApp 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.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.IosDeviceType;
import odata.msgraph.client.complex.IosMinimumOperatingSystem;
import odata.msgraph.client.complex.MimeContent;
import odata.msgraph.client.enums.MobileAppPublishingState;


/**
 * “Contains properties and inherited properties for iOS store apps.”
 */@JsonPropertyOrder({
    "@odata.type", 
    "applicableDeviceType", 
    "appStoreUrl", 
    "bundleId", 
    "minimumSupportedOperatingSystem"})
@JsonInclude(Include.NON_NULL)
public class IosStoreApp extends MobileApp implements ODataEntityType {

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

    @JsonProperty("applicableDeviceType")
    protected IosDeviceType applicableDeviceType;

    @JsonProperty("appStoreUrl")
    protected String appStoreUrl;

    @JsonProperty("bundleId")
    protected String bundleId;

    @JsonProperty("minimumSupportedOperatingSystem")
    protected IosMinimumOperatingSystem minimumSupportedOperatingSystem;

    protected IosStoreApp() {
        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 builderIosStoreApp() {
        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 IosDeviceType applicableDeviceType;
        private String appStoreUrl;
        private String bundleId;
        private IosMinimumOperatingSystem minimumSupportedOperatingSystem;
        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;
        }

        /**
         * “The iOS architecture for which this app can run on.”
         * 
         * @param applicableDeviceType
         *            value of {@code applicableDeviceType} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder applicableDeviceType(IosDeviceType applicableDeviceType) {
            this.applicableDeviceType = applicableDeviceType;
            this.changedFields = changedFields.add("applicableDeviceType");
            return this;
        }

        /**
         * “The Apple App Store URL”
         * 
         * @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 Identity Name.”
         * 
         * @param bundleId
         *            value of {@code bundleId} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder bundleId(String bundleId) {
            this.bundleId = bundleId;
            this.changedFields = changedFields.add("bundleId");
            return this;
        }

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

        public IosStoreApp build() {
            IosStoreApp _x = new IosStoreApp();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFieldsImpl();
            _x.odataType = "microsoft.graph.iosStoreApp";
            _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.applicableDeviceType = applicableDeviceType;
            _x.appStoreUrl = appStoreUrl;
            _x.bundleId = bundleId;
            _x.minimumSupportedOperatingSystem = minimumSupportedOperatingSystem;
            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 iOS architecture for which this app can run on.”
     * 
     * @return property applicableDeviceType
     */
    @Property(name="applicableDeviceType")
    @JsonIgnore
    public Optional getApplicableDeviceType() {
        return Optional.ofNullable(applicableDeviceType);
    }

    /**
     * Returns an immutable copy of {@code this} with just the {@code
     * applicableDeviceType} 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 iOS architecture for which this app can run on.” * * @param applicableDeviceType * new value of {@code applicableDeviceType} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code applicableDeviceType} field changed */ public IosStoreApp withApplicableDeviceType(IosDeviceType applicableDeviceType) { IosStoreApp _x = _copy(); _x.changedFields = changedFields.add("applicableDeviceType"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosStoreApp"); _x.applicableDeviceType = applicableDeviceType; return _x; } /** * “The Apple App Store URL” * * @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 Apple App Store URL” * * @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 IosStoreApp withAppStoreUrl(String appStoreUrl) { IosStoreApp _x = _copy(); _x.changedFields = changedFields.add("appStoreUrl"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosStoreApp"); _x.appStoreUrl = appStoreUrl; return _x; } /** * “The Identity Name.” * * @return property bundleId */ @Property(name="bundleId") @JsonIgnore public Optional getBundleId() { return Optional.ofNullable(bundleId); } /** * Returns an immutable copy of {@code this} with just the {@code bundleId} 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 Identity Name.” * * @param bundleId * new value of {@code bundleId} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code bundleId} field changed */ public IosStoreApp withBundleId(String bundleId) { IosStoreApp _x = _copy(); _x.changedFields = changedFields.add("bundleId"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosStoreApp"); _x.bundleId = bundleId; return _x; } /** * “The value for the minimum applicable 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 applicable 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 IosStoreApp withMinimumSupportedOperatingSystem(IosMinimumOperatingSystem minimumSupportedOperatingSystem) { IosStoreApp _x = _copy(); _x.changedFields = changedFields.add("minimumSupportedOperatingSystem"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosStoreApp"); _x.minimumSupportedOperatingSystem = minimumSupportedOperatingSystem; return _x; } public IosStoreApp withUnmappedField(String name, String value) { IosStoreApp _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 IosStoreApp patch() { RequestHelper.patch(this, contextPath, RequestOptions.EMPTY); IosStoreApp _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 IosStoreApp put() { RequestHelper.put(this, contextPath, RequestOptions.EMPTY); IosStoreApp _x = _copy(); _x.changedFields = null; return _x; } private IosStoreApp _copy() { IosStoreApp _x = new IosStoreApp(); _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.applicableDeviceType = applicableDeviceType; _x.appStoreUrl = appStoreUrl; _x.bundleId = bundleId; _x.minimumSupportedOperatingSystem = minimumSupportedOperatingSystem; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("IosStoreApp["); 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("applicableDeviceType="); b.append(this.applicableDeviceType); b.append(", "); b.append("appStoreUrl="); b.append(this.appStoreUrl); b.append(", "); b.append("bundleId="); b.append(this.bundleId); b.append(", "); b.append("minimumSupportedOperatingSystem="); b.append(this.minimumSupportedOperatingSystem); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy