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

odata.msgraph.client.entity.IosVppEBook 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.CollectionPage;
import com.github.davidmoten.odata.client.HttpRequestOptions;
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.time.OffsetDateTime;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;

import odata.msgraph.client.complex.MimeContent;


/**
 * “A class containing the properties for iOS Vpp eBook.”
 */@JsonPropertyOrder({
    "@odata.type", 
    "appleId", 
    "genres", 
    "language", 
    "seller", 
    "totalLicenseCount", 
    "usedLicenseCount", 
    "vppOrganizationName", 
    "vppTokenId"})
@JsonInclude(Include.NON_NULL)
public class IosVppEBook extends ManagedEBook implements ODataEntityType {

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

    @JsonProperty("appleId")
    protected String appleId;

    @JsonProperty("genres")
    protected List genres;

    @JsonProperty("genres@nextLink")
    protected String genresNextLink;

    @JsonProperty("language")
    protected String language;

    @JsonProperty("seller")
    protected String seller;

    @JsonProperty("totalLicenseCount")
    protected Integer totalLicenseCount;

    @JsonProperty("usedLicenseCount")
    protected Integer usedLicenseCount;

    @JsonProperty("vppOrganizationName")
    protected String vppOrganizationName;

    @JsonProperty("vppTokenId")
    protected String vppTokenId;

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

    public static final class Builder {
        private String id;
        private OffsetDateTime createdDateTime;
        private String description;
        private String displayName;
        private String informationUrl;
        private MimeContent largeCover;
        private OffsetDateTime lastModifiedDateTime;
        private String privacyInformationUrl;
        private OffsetDateTime publishedDateTime;
        private String publisher;
        private String appleId;
        private List genres;
        private String genresNextLink;
        private String language;
        private String seller;
        private Integer totalLicenseCount;
        private Integer usedLicenseCount;
        private String vppOrganizationName;
        private String vppTokenId;
        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 informationUrl(String informationUrl) {
            this.informationUrl = informationUrl;
            this.changedFields = changedFields.add("informationUrl");
            return this;
        }

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

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

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

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

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

        /**
         * “The Apple ID associated with Vpp token.”
         * 
         * @param appleId
         *            value of {@code appleId} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder appleId(String appleId) {
            this.appleId = appleId;
            this.changedFields = changedFields.add("appleId");
            return this;
        }

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

        /**
         * “Genres.”
         * 
         * @param genres
         *            value of {@code genres} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder genres(String... genres) {
            return genres(Arrays.asList(genres));
        }

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

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

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

        /**
         * “Total license count.”
         * 
         * @param totalLicenseCount
         *            value of {@code totalLicenseCount} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder totalLicenseCount(Integer totalLicenseCount) {
            this.totalLicenseCount = totalLicenseCount;
            this.changedFields = changedFields.add("totalLicenseCount");
            return this;
        }

        /**
         * “Used license count.”
         * 
         * @param usedLicenseCount
         *            value of {@code usedLicenseCount} property (as defined in service metadata)
         * @return {@code this} (for method chaining)
         */
        public Builder usedLicenseCount(Integer usedLicenseCount) {
            this.usedLicenseCount = usedLicenseCount;
            this.changedFields = changedFields.add("usedLicenseCount");
            return this;
        }

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

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

        public IosVppEBook build() {
            IosVppEBook _x = new IosVppEBook();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFieldsImpl();
            _x.odataType = "microsoft.graph.iosVppEBook";
            _x.id = id;
            _x.createdDateTime = createdDateTime;
            _x.description = description;
            _x.displayName = displayName;
            _x.informationUrl = informationUrl;
            _x.largeCover = largeCover;
            _x.lastModifiedDateTime = lastModifiedDateTime;
            _x.privacyInformationUrl = privacyInformationUrl;
            _x.publishedDateTime = publishedDateTime;
            _x.publisher = publisher;
            _x.appleId = appleId;
            _x.genres = genres;
            _x.genresNextLink = genresNextLink;
            _x.language = language;
            _x.seller = seller;
            _x.totalLicenseCount = totalLicenseCount;
            _x.usedLicenseCount = usedLicenseCount;
            _x.vppOrganizationName = vppOrganizationName;
            _x.vppTokenId = vppTokenId;
            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 Apple ID associated with Vpp token.”
     * 
     * @return property appleId
     */
    @Property(name="appleId")
    @JsonIgnore
    public Optional getAppleId() {
        return Optional.ofNullable(appleId);
    }

    /**
     * Returns an immutable copy of {@code this} with just the {@code appleId} 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 ID associated with Vpp token.” * * @param appleId * new value of {@code appleId} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code appleId} field changed */ public IosVppEBook withAppleId(String appleId) { IosVppEBook _x = _copy(); _x.changedFields = changedFields.add("appleId"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosVppEBook"); _x.appleId = appleId; return _x; } /** * “Genres.” * * @return property genres */ @Property(name="genres") @JsonIgnore public CollectionPage getGenres() { return new CollectionPage(contextPath, String.class, this.genres, Optional.ofNullable(genresNextLink), Collections.emptyList(), HttpRequestOptions.EMPTY); } /** * Returns an immutable copy of {@code this} with just the {@code genres} 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. *

* “Genres.” * * @param genres * new value of {@code genres} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code genres} field changed */ public IosVppEBook withGenres(List genres) { IosVppEBook _x = _copy(); _x.changedFields = changedFields.add("genres"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosVppEBook"); _x.genres = genres; return _x; } /** * “Genres.” * * @param options * specify connect and read timeouts * @return property genres */ @Property(name="genres") @JsonIgnore public CollectionPage getGenres(HttpRequestOptions options) { return new CollectionPage(contextPath, String.class, this.genres, Optional.ofNullable(genresNextLink), Collections.emptyList(), options); } /** * “Language.” * * @return property language */ @Property(name="language") @JsonIgnore public Optional getLanguage() { return Optional.ofNullable(language); } /** * Returns an immutable copy of {@code this} with just the {@code language} 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. *

* “Language.” * * @param language * new value of {@code language} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code language} field changed */ public IosVppEBook withLanguage(String language) { IosVppEBook _x = _copy(); _x.changedFields = changedFields.add("language"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosVppEBook"); _x.language = language; return _x; } /** * “Seller.” * * @return property seller */ @Property(name="seller") @JsonIgnore public Optional getSeller() { return Optional.ofNullable(seller); } /** * Returns an immutable copy of {@code this} with just the {@code seller} 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. *

* “Seller.” * * @param seller * new value of {@code seller} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code seller} field changed */ public IosVppEBook withSeller(String seller) { IosVppEBook _x = _copy(); _x.changedFields = changedFields.add("seller"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosVppEBook"); _x.seller = seller; return _x; } /** * “Total license count.” * * @return property totalLicenseCount */ @Property(name="totalLicenseCount") @JsonIgnore public Optional getTotalLicenseCount() { return Optional.ofNullable(totalLicenseCount); } /** * Returns an immutable copy of {@code this} with just the {@code totalLicenseCount * } 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 license count.” * * @param totalLicenseCount * new value of {@code totalLicenseCount} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code totalLicenseCount} field changed */ public IosVppEBook withTotalLicenseCount(Integer totalLicenseCount) { IosVppEBook _x = _copy(); _x.changedFields = changedFields.add("totalLicenseCount"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosVppEBook"); _x.totalLicenseCount = totalLicenseCount; return _x; } /** * “Used license count.” * * @return property usedLicenseCount */ @Property(name="usedLicenseCount") @JsonIgnore public Optional getUsedLicenseCount() { return Optional.ofNullable(usedLicenseCount); } /** * Returns an immutable copy of {@code this} with just the {@code usedLicenseCount} * 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. *

* “Used license count.” * * @param usedLicenseCount * new value of {@code usedLicenseCount} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code usedLicenseCount} field changed */ public IosVppEBook withUsedLicenseCount(Integer usedLicenseCount) { IosVppEBook _x = _copy(); _x.changedFields = changedFields.add("usedLicenseCount"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosVppEBook"); _x.usedLicenseCount = usedLicenseCount; return _x; } /** * “The Vpp token's organization name.” * * @return property vppOrganizationName */ @Property(name="vppOrganizationName") @JsonIgnore public Optional getVppOrganizationName() { return Optional.ofNullable(vppOrganizationName); } /** * Returns an immutable copy of {@code this} with just the {@code * vppOrganizationName} 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 Vpp token's organization name.” * * @param vppOrganizationName * new value of {@code vppOrganizationName} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code vppOrganizationName} field changed */ public IosVppEBook withVppOrganizationName(String vppOrganizationName) { IosVppEBook _x = _copy(); _x.changedFields = changedFields.add("vppOrganizationName"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosVppEBook"); _x.vppOrganizationName = vppOrganizationName; return _x; } /** * “The Vpp token ID.” * * @return property vppTokenId */ @Property(name="vppTokenId") @JsonIgnore public Optional getVppTokenId() { return Optional.ofNullable(vppTokenId); } /** * Returns an immutable copy of {@code this} with just the {@code vppTokenId} 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 Vpp token ID.” * * @param vppTokenId * new value of {@code vppTokenId} field (as defined in service metadata) * @return immutable copy of {@code this} with just the {@code vppTokenId} field changed */ public IosVppEBook withVppTokenId(String vppTokenId) { IosVppEBook _x = _copy(); _x.changedFields = changedFields.add("vppTokenId"); _x.odataType = Util.nvl(odataType, "microsoft.graph.iosVppEBook"); _x.vppTokenId = vppTokenId; return _x; } public IosVppEBook withUnmappedField(String name, String value) { IosVppEBook _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 IosVppEBook patch() { RequestHelper.patch(this, contextPath, RequestOptions.EMPTY); IosVppEBook _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 IosVppEBook put() { RequestHelper.put(this, contextPath, RequestOptions.EMPTY); IosVppEBook _x = _copy(); _x.changedFields = null; return _x; } private IosVppEBook _copy() { IosVppEBook _x = new IosVppEBook(); _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.informationUrl = informationUrl; _x.largeCover = largeCover; _x.lastModifiedDateTime = lastModifiedDateTime; _x.privacyInformationUrl = privacyInformationUrl; _x.publishedDateTime = publishedDateTime; _x.publisher = publisher; _x.appleId = appleId; _x.genres = genres; _x.language = language; _x.seller = seller; _x.totalLicenseCount = totalLicenseCount; _x.usedLicenseCount = usedLicenseCount; _x.vppOrganizationName = vppOrganizationName; _x.vppTokenId = vppTokenId; return _x; } @Override public String toString() { StringBuilder b = new StringBuilder(); b.append("IosVppEBook["); 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("informationUrl="); b.append(this.informationUrl); b.append(", "); b.append("largeCover="); b.append(this.largeCover); b.append(", "); b.append("lastModifiedDateTime="); b.append(this.lastModifiedDateTime); b.append(", "); b.append("privacyInformationUrl="); b.append(this.privacyInformationUrl); b.append(", "); b.append("publishedDateTime="); b.append(this.publishedDateTime); b.append(", "); b.append("publisher="); b.append(this.publisher); b.append(", "); b.append("appleId="); b.append(this.appleId); b.append(", "); b.append("genres="); b.append(this.genres); b.append(", "); b.append("language="); b.append(this.language); b.append(", "); b.append("seller="); b.append(this.seller); b.append(", "); b.append("totalLicenseCount="); b.append(this.totalLicenseCount); b.append(", "); b.append("usedLicenseCount="); b.append(this.usedLicenseCount); b.append(", "); b.append("vppOrganizationName="); b.append(this.vppOrganizationName); b.append(", "); b.append("vppTokenId="); b.append(this.vppTokenId); b.append("]"); b.append(",unmappedFields="); b.append(unmappedFields); b.append(",odataType="); b.append(odataType); return b.toString(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy