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

odata.msgraph.client.entity.request.OnenoteSectionRequest Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreType;
import com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.EntityRequest;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.annotation.Action;
import com.github.davidmoten.odata.client.internal.Checks;
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.entity.OnenoteOperation;
import odata.msgraph.client.entity.OnenoteSection;
import odata.msgraph.client.entity.collection.request.OnenotePageCollectionRequest;

@JsonIgnoreType
public class OnenoteSectionRequest extends EntityRequest {

    public OnenoteSectionRequest(ContextPath contextPath, Optional value) {
        super(OnenoteSection.class, contextPath, value, false);
    }

    public OnenotePageRequest pages(String id) {
        return new OnenotePageRequest(contextPath.addSegment("pages").addKeys(new NameValue(id, String.class)), Optional.empty());
    }

    public OnenotePageCollectionRequest pages() {
        return new OnenotePageCollectionRequest(
                        contextPath.addSegment("pages"), Optional.empty());
    }

    public NotebookRequest parentNotebook() {
        return new NotebookRequest(contextPath.addSegment("parentNotebook"), Optional.empty());
    }

    public SectionGroupRequest parentSectionGroup() {
        return new SectionGroupRequest(contextPath.addSegment("parentSectionGroup"), Optional.empty());
    }

    @Action(name = "copyToNotebook")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped copyToNotebook(String id, String groupId, String renameAs, String siteCollectionId, String siteId) {
        Map _parameters = ParameterMap
            .put("id", "Edm.String", Checks.checkIsAscii(id))
            .put("groupId", "Edm.String", Checks.checkIsAscii(groupId))
            .put("renameAs", "Edm.String", Checks.checkIsAscii(renameAs))
            .put("siteCollectionId", "Edm.String", Checks.checkIsAscii(siteCollectionId))
            .put("siteId", "Edm.String", Checks.checkIsAscii(siteId))
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.copyToNotebook"), OnenoteOperation.class, _parameters);
    }

    @Action(name = "copyToSectionGroup")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped copyToSectionGroup(String id, String groupId, String renameAs, String siteCollectionId, String siteId) {
        Map _parameters = ParameterMap
            .put("id", "Edm.String", Checks.checkIsAscii(id))
            .put("groupId", "Edm.String", Checks.checkIsAscii(groupId))
            .put("renameAs", "Edm.String", Checks.checkIsAscii(renameAs))
            .put("siteCollectionId", "Edm.String", Checks.checkIsAscii(siteCollectionId))
            .put("siteId", "Edm.String", Checks.checkIsAscii(siteId))
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.copyToSectionGroup"), OnenoteOperation.class, _parameters);
    }

}