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

odata.msgraph.client.entity.collection.request.WorkbookTableColumnCollectionRequest 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.Checks;
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.WorkbookTableColumn;
import odata.msgraph.client.entity.request.WorkbookTableColumnRequest;

public class WorkbookTableColumnCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public WorkbookTableColumnCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, WorkbookTableColumn.class, cp -> new WorkbookTableColumnRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    @Action(name = "add")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped add(Integer index, Json values, String name) {
        Map _parameters = ParameterMap
            .put("index", "Edm.Int32", index)
            .put("values", "microsoft.graph.Json", values)
            .put("name", "Edm.String", Checks.checkIsAscii(name))
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.add"), WorkbookTableColumn.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"), WorkbookTableColumn.class, _parameters);
    }

}