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

odata.msgraph.client.beta.termStore.entity.request.TermRequest Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonIgnoreType;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.EntityRequest;
import com.github.davidmoten.odata.client.NameValue;

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

import odata.msgraph.client.beta.termStore.entity.Term;
import odata.msgraph.client.beta.termStore.entity.collection.request.RelationCollectionRequest;
import odata.msgraph.client.beta.termStore.entity.collection.request.TermCollectionRequest;

@JsonIgnoreType
public class TermRequest extends EntityRequest {

    public TermRequest(ContextPath contextPath, Optional value) {
        super(Term.class, contextPath, value, false);
    }

    public TermCollectionRequest children() {
        return new TermCollectionRequest(
                        contextPath.addSegment("children"), Optional.empty());
    }

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

    public RelationCollectionRequest relations() {
        return new RelationCollectionRequest(
                        contextPath.addSegment("relations"), Optional.empty());
    }

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

    public SetRequest set() {
        return new SetRequest(contextPath.addSegment("set"), Optional.empty());
    }

}