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

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

There is a newer version: 0.2.2
Show newest version
package odata.msgraph.client.beta.entity.collection.request;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.github.davidmoten.odata.client.CollectionPageEntityRequest;
import com.github.davidmoten.odata.client.CollectionPageNonEntityRequest;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.annotation.Function;
import com.github.davidmoten.odata.client.internal.ParameterMap;
import com.github.davidmoten.odata.client.internal.TypedObject;

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

import odata.msgraph.client.beta.entity.EducationSchool;
import odata.msgraph.client.beta.entity.request.EducationClassRequest;
import odata.msgraph.client.beta.entity.request.EducationSchoolRequest;
import odata.msgraph.client.beta.entity.request.EducationUserRequest;

public class EducationSchoolCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public EducationSchoolCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, EducationSchool.class, cp -> new EducationSchoolRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    public EducationClassCollectionRequest classes() {
        return new EducationClassCollectionRequest(contextPath.addSegment("classes"), Optional.empty());
    }

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

    public EducationUserCollectionRequest users() {
        return new EducationUserCollectionRequest(contextPath.addSegment("users"), Optional.empty());
    }

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

    @Function(name = "delta")
    @JsonIgnore
    public CollectionPageNonEntityRequest delta() {
        Map _parameters = ParameterMap.empty();
        return CollectionPageNonEntityRequest.forFunction(this.contextPath.addActionOrFunctionSegment("microsoft.graph.delta"), EducationSchool.class, _parameters);
    }

}