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

odata.msgraph.client.beta.entity.DriveItem Maven / Gradle / Ivy

package odata.msgraph.client.beta.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.guavamini.Preconditions;
import com.github.davidmoten.odata.client.ActionRequestNoReturn;
import com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped;
import com.github.davidmoten.odata.client.ClientException;
import com.github.davidmoten.odata.client.CollectionPageNonEntityRequest;
import com.github.davidmoten.odata.client.HttpMethod;
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.StreamProvider;
import com.github.davidmoten.odata.client.StreamUploader;
import com.github.davidmoten.odata.client.StreamUploaderChunked;
import com.github.davidmoten.odata.client.StreamUploaderSingleCall;
import com.github.davidmoten.odata.client.UnmappedFields;
import com.github.davidmoten.odata.client.UploadStrategy;
import com.github.davidmoten.odata.client.Util;
import com.github.davidmoten.odata.client.annotation.Action;
import com.github.davidmoten.odata.client.annotation.Function;
import com.github.davidmoten.odata.client.annotation.NavigationProperty;
import com.github.davidmoten.odata.client.annotation.Property;
import com.github.davidmoten.odata.client.internal.ChangedFields;
import com.github.davidmoten.odata.client.internal.Checks;
import com.github.davidmoten.odata.client.internal.ParameterMap;
import com.github.davidmoten.odata.client.internal.RequestHelper;
import com.github.davidmoten.odata.client.internal.TypedObject;
import com.github.davidmoten.odata.client.internal.UnmappedFieldsImpl;

import java.lang.Boolean;
import java.lang.Double;
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.List;
import java.util.Map;
import java.util.Optional;

import odata.msgraph.client.beta.complex.Audio;
import odata.msgraph.client.beta.complex.Bundle;
import odata.msgraph.client.beta.complex.Deleted;
import odata.msgraph.client.beta.complex.DriveItemSource;
import odata.msgraph.client.beta.complex.DriveItemUploadableProperties;
import odata.msgraph.client.beta.complex.DriveRecipient;
import odata.msgraph.client.beta.complex.File;
import odata.msgraph.client.beta.complex.FileSystemInfo;
import odata.msgraph.client.beta.complex.Folder;
import odata.msgraph.client.beta.complex.GeoCoordinates;
import odata.msgraph.client.beta.complex.IdentitySet;
import odata.msgraph.client.beta.complex.Image;
import odata.msgraph.client.beta.complex.ItemPreviewInfo;
import odata.msgraph.client.beta.complex.ItemReference;
import odata.msgraph.client.beta.complex.Media;
import odata.msgraph.client.beta.complex.Package;
import odata.msgraph.client.beta.complex.PendingOperations;
import odata.msgraph.client.beta.complex.Photo;
import odata.msgraph.client.beta.complex.PublicationFacet;
import odata.msgraph.client.beta.complex.RemoteItem;
import odata.msgraph.client.beta.complex.Root;
import odata.msgraph.client.beta.complex.SearchResult;
import odata.msgraph.client.beta.complex.Shared;
import odata.msgraph.client.beta.complex.SharepointIds;
import odata.msgraph.client.beta.complex.SpecialFolder;
import odata.msgraph.client.beta.complex.UploadSession;
import odata.msgraph.client.beta.complex.Video;
import odata.msgraph.client.beta.entity.collection.request.DriveItemCollectionRequest;
import odata.msgraph.client.beta.entity.collection.request.DriveItemVersionCollectionRequest;
import odata.msgraph.client.beta.entity.collection.request.ItemActivityOLDCollectionRequest;
import odata.msgraph.client.beta.entity.collection.request.PermissionCollectionRequest;
import odata.msgraph.client.beta.entity.collection.request.SubscriptionCollectionRequest;
import odata.msgraph.client.beta.entity.collection.request.ThumbnailSetCollectionRequest;
import odata.msgraph.client.beta.entity.request.ItemAnalyticsRequest;
import odata.msgraph.client.beta.entity.request.ListItemRequest;
import odata.msgraph.client.beta.entity.request.WorkbookRequest;

@JsonPropertyOrder({
    "@odata.type", 
    "audio", 
    "bundle", 
    "content", 
    "cTag", 
    "deleted", 
    "file", 
    "fileSystemInfo", 
    "folder", 
    "image", 
    "location", 
    "media", 
    "package", 
    "pendingOperations", 
    "photo", 
    "publication", 
    "remoteItem", 
    "root", 
    "searchResult", 
    "shared", 
    "sharepointIds", 
    "size", 
    "source", 
    "specialFolder", 
    "video", 
    "webDavUrl"})
@JsonInclude(Include.NON_NULL)
public class DriveItem extends BaseItem implements ODataEntityType {

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

    @JsonProperty("audio")
    protected Audio audio;

    @JsonProperty("bundle")
    protected Bundle bundle;

    @JsonProperty("content")
    protected String content;

    @JsonProperty("cTag")
    protected String cTag;

    @JsonProperty("deleted")
    protected Deleted deleted;

    @JsonProperty("file")
    protected File file;

    @JsonProperty("fileSystemInfo")
    protected FileSystemInfo fileSystemInfo;

    @JsonProperty("folder")
    protected Folder folder;

    @JsonProperty("image")
    protected Image image;

    @JsonProperty("location")
    protected GeoCoordinates location;

    @JsonProperty("media")
    protected Media media;

    @JsonProperty("package")
    protected Package package_;

    @JsonProperty("pendingOperations")
    protected PendingOperations pendingOperations;

    @JsonProperty("photo")
    protected Photo photo;

    @JsonProperty("publication")
    protected PublicationFacet publication;

    @JsonProperty("remoteItem")
    protected RemoteItem remoteItem;

    @JsonProperty("root")
    protected Root root;

    @JsonProperty("searchResult")
    protected SearchResult searchResult;

    @JsonProperty("shared")
    protected Shared shared;

    @JsonProperty("sharepointIds")
    protected SharepointIds sharepointIds;

    @JsonProperty("size")
    protected Long size;

    @JsonProperty("source")
    protected DriveItemSource source;

    @JsonProperty("specialFolder")
    protected SpecialFolder specialFolder;

    @JsonProperty("video")
    protected Video video;

    @JsonProperty("webDavUrl")
    protected String webDavUrl;

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

    public static final class Builder {
        private String id;
        private IdentitySet createdBy;
        private OffsetDateTime createdDateTime;
        private String description;
        private String eTag;
        private IdentitySet lastModifiedBy;
        private OffsetDateTime lastModifiedDateTime;
        private String name;
        private ItemReference parentReference;
        private String webUrl;
        private Audio audio;
        private Bundle bundle;
        private String content;
        private String cTag;
        private Deleted deleted;
        private File file;
        private FileSystemInfo fileSystemInfo;
        private Folder folder;
        private Image image;
        private GeoCoordinates location;
        private Media media;
        private Package package_;
        private PendingOperations pendingOperations;
        private Photo photo;
        private PublicationFacet publication;
        private RemoteItem remoteItem;
        private Root root;
        private SearchResult searchResult;
        private Shared shared;
        private SharepointIds sharepointIds;
        private Long size;
        private DriveItemSource source;
        private SpecialFolder specialFolder;
        private Video video;
        private String webDavUrl;
        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 createdBy(IdentitySet createdBy) {
            this.createdBy = createdBy;
            this.changedFields = changedFields.add("createdBy");
            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 eTag(String eTag) {
            this.eTag = eTag;
            this.changedFields = changedFields.add("eTag");
            return this;
        }

        public Builder lastModifiedBy(IdentitySet lastModifiedBy) {
            this.lastModifiedBy = lastModifiedBy;
            this.changedFields = changedFields.add("lastModifiedBy");
            return this;
        }

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

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

        public Builder parentReference(ItemReference parentReference) {
            this.parentReference = parentReference;
            this.changedFields = changedFields.add("parentReference");
            return this;
        }

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

        public Builder audio(Audio audio) {
            this.audio = audio;
            this.changedFields = changedFields.add("audio");
            return this;
        }

        public Builder bundle(Bundle bundle) {
            this.bundle = bundle;
            this.changedFields = changedFields.add("bundle");
            return this;
        }

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

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

        public Builder deleted(Deleted deleted) {
            this.deleted = deleted;
            this.changedFields = changedFields.add("deleted");
            return this;
        }

        public Builder file(File file) {
            this.file = file;
            this.changedFields = changedFields.add("file");
            return this;
        }

        public Builder fileSystemInfo(FileSystemInfo fileSystemInfo) {
            this.fileSystemInfo = fileSystemInfo;
            this.changedFields = changedFields.add("fileSystemInfo");
            return this;
        }

        public Builder folder(Folder folder) {
            this.folder = folder;
            this.changedFields = changedFields.add("folder");
            return this;
        }

        public Builder image(Image image) {
            this.image = image;
            this.changedFields = changedFields.add("image");
            return this;
        }

        public Builder location(GeoCoordinates location) {
            this.location = location;
            this.changedFields = changedFields.add("location");
            return this;
        }

        public Builder media(Media media) {
            this.media = media;
            this.changedFields = changedFields.add("media");
            return this;
        }

        public Builder package_(Package package_) {
            this.package_ = package_;
            this.changedFields = changedFields.add("package");
            return this;
        }

        public Builder pendingOperations(PendingOperations pendingOperations) {
            this.pendingOperations = pendingOperations;
            this.changedFields = changedFields.add("pendingOperations");
            return this;
        }

        public Builder photo(Photo photo) {
            this.photo = photo;
            this.changedFields = changedFields.add("photo");
            return this;
        }

        public Builder publication(PublicationFacet publication) {
            this.publication = publication;
            this.changedFields = changedFields.add("publication");
            return this;
        }

        public Builder remoteItem(RemoteItem remoteItem) {
            this.remoteItem = remoteItem;
            this.changedFields = changedFields.add("remoteItem");
            return this;
        }

        public Builder root(Root root) {
            this.root = root;
            this.changedFields = changedFields.add("root");
            return this;
        }

        public Builder searchResult(SearchResult searchResult) {
            this.searchResult = searchResult;
            this.changedFields = changedFields.add("searchResult");
            return this;
        }

        public Builder shared(Shared shared) {
            this.shared = shared;
            this.changedFields = changedFields.add("shared");
            return this;
        }

        public Builder sharepointIds(SharepointIds sharepointIds) {
            this.sharepointIds = sharepointIds;
            this.changedFields = changedFields.add("sharepointIds");
            return this;
        }

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

        public Builder source(DriveItemSource source) {
            this.source = source;
            this.changedFields = changedFields.add("source");
            return this;
        }

        public Builder specialFolder(SpecialFolder specialFolder) {
            this.specialFolder = specialFolder;
            this.changedFields = changedFields.add("specialFolder");
            return this;
        }

        public Builder video(Video video) {
            this.video = video;
            this.changedFields = changedFields.add("video");
            return this;
        }

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

        public DriveItem build() {
            DriveItem _x = new DriveItem();
            _x.contextPath = null;
            _x.changedFields = changedFields;
            _x.unmappedFields = new UnmappedFieldsImpl();
            _x.odataType = "microsoft.graph.driveItem";
            _x.id = id;
            _x.createdBy = createdBy;
            _x.createdDateTime = createdDateTime;
            _x.description = description;
            _x.eTag = eTag;
            _x.lastModifiedBy = lastModifiedBy;
            _x.lastModifiedDateTime = lastModifiedDateTime;
            _x.name = name;
            _x.parentReference = parentReference;
            _x.webUrl = webUrl;
            _x.audio = audio;
            _x.bundle = bundle;
            _x.content = content;
            _x.cTag = cTag;
            _x.deleted = deleted;
            _x.file = file;
            _x.fileSystemInfo = fileSystemInfo;
            _x.folder = folder;
            _x.image = image;
            _x.location = location;
            _x.media = media;
            _x.package_ = package_;
            _x.pendingOperations = pendingOperations;
            _x.photo = photo;
            _x.publication = publication;
            _x.remoteItem = remoteItem;
            _x.root = root;
            _x.searchResult = searchResult;
            _x.shared = shared;
            _x.sharepointIds = sharepointIds;
            _x.size = size;
            _x.source = source;
            _x.specialFolder = specialFolder;
            _x.video = video;
            _x.webDavUrl = webDavUrl;
            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()));
        }
    }

    @Property(name="audio")
    @JsonIgnore
    public Optional




© 2015 - 2025 Weber Informatics LLC | Privacy Policy