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

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

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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.github.davidmoten.guavamini.Preconditions;
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.FunctionRequestReturningNonCollection;
import com.github.davidmoten.odata.client.FunctionRequestReturningNonCollectionUnwrapped;
import com.github.davidmoten.odata.client.annotation.Action;
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.Integer;
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.WorkbookTableRow;
import odata.msgraph.client.entity.request.WorkbookTableRowRequest;

public class WorkbookTableRowCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public WorkbookTableRowCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, WorkbookTableRow.class, cp -> new WorkbookTableRowRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    @Action(name = "add")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped add(Integer index, Json values) {
        Map _parameters = ParameterMap
            .put("index", "Edm.Int32", index)
            .put("values", "microsoft.graph.Json", values)
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.add"), WorkbookTableRow.class, _parameters);
    }

    @Function(name = "count")
    @JsonIgnore
    public FunctionRequestReturningNonCollection count() {
        Map _parameters = ParameterMap.empty();
        return new FunctionRequestReturningNonCollection(this.contextPath.addActionOrFunctionSegment("microsoft.graph.count"), Integer.class, _parameters);
    }

    @Function(name = "itemAt")
    @JsonIgnore
    public FunctionRequestReturningNonCollectionUnwrapped itemAt(Integer index) {
        Preconditions.checkNotNull(index, "index cannot be null");
        Map _parameters = ParameterMap
            .put("index", "Edm.Int32", index)
            .build();
        return new FunctionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.itemAt"), WorkbookTableRow.class, _parameters);
    }

}