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

odata.msgraph.client.beta.entity.collection.request.PlannerPlanCollectionRequest Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package odata.msgraph.client.beta.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.beta.entity.PlannerPlan;
import odata.msgraph.client.beta.entity.request.PlannerBucketRequest;
import odata.msgraph.client.beta.entity.request.PlannerPlanRequest;
import odata.msgraph.client.beta.entity.request.PlannerTaskRequest;

public class PlannerPlanCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public PlannerPlanCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, PlannerPlan.class, cp -> new PlannerPlanRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    public PlannerBucketCollectionRequest buckets() {
        return new PlannerBucketCollectionRequest(contextPath.addSegment("buckets"), Optional.empty());
    }

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

    public PlannerTaskCollectionRequest tasks() {
        return new PlannerTaskCollectionRequest(contextPath.addSegment("tasks"), Optional.empty());
    }

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

}