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

odata.msgraph.client.entity.collection.request.SharedDriveItemCollectionRequest Maven / Gradle / Ivy

package odata.msgraph.client.entity.collection.request;

import com.github.davidmoten.odata.client.CollectionPageEntityRequest;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.NameValue;

import java.lang.Object;
import java.lang.String;
import java.util.Optional;

import odata.msgraph.client.entity.SharedDriveItem;
import odata.msgraph.client.entity.request.DriveItemRequest;
import odata.msgraph.client.entity.request.SharedDriveItemRequest;

public class SharedDriveItemCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public SharedDriveItemCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, SharedDriveItem.class, cp -> new SharedDriveItemRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    public DriveItemRequest items(String id) {
        return new DriveItemRequest(contextPath.addSegment("items").addKeys(new NameValue(id.toString())), Optional.empty());
    }

    public DriveItemCollectionRequest items() {
        return new DriveItemCollectionRequest(contextPath.addSegment("items"), Optional.empty());
    }

}