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

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

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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped;
import com.github.davidmoten.odata.client.CollectionPageEntityRequest;
import com.github.davidmoten.odata.client.ContextPath;
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.complex.Json;
import odata.msgraph.client.entity.WorkbookNamedItem;
import odata.msgraph.client.entity.request.WorkbookNamedItemRequest;

public class WorkbookNamedItemCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public WorkbookNamedItemCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, WorkbookNamedItem.class, cp -> new WorkbookNamedItemRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    @Action(name = "add")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped add(String name, Json reference, String comment) {
        Map _parameters = ParameterMap
            .put("name", "Edm.String", Checks.checkIsAscii(name))
            .put("reference", "microsoft.graph.Json", reference)
            .put("comment", "Edm.String", Checks.checkIsAscii(comment))
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.add"), WorkbookNamedItem.class, _parameters);
    }

    @Action(name = "addFormulaLocal")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped addFormulaLocal(String name, String formula, String comment) {
        Map _parameters = ParameterMap
            .put("name", "Edm.String", Checks.checkIsAscii(name))
            .put("formula", "Edm.String", Checks.checkIsAscii(formula))
            .put("comment", "Edm.String", Checks.checkIsAscii(comment))
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.addFormulaLocal"), WorkbookNamedItem.class, _parameters);
    }

}