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

odata.msgraph.client.entity.collection.request.WorkbookChartSeriesCollectionRequest 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.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.NameValue;
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.entity.WorkbookChartSeries;
import odata.msgraph.client.entity.request.WorkbookChartPointRequest;
import odata.msgraph.client.entity.request.WorkbookChartSeriesRequest;

public class WorkbookChartSeriesCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public WorkbookChartSeriesCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, WorkbookChartSeries.class, cp -> new WorkbookChartSeriesRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

    public WorkbookChartPointCollectionRequest points() {
        return new WorkbookChartPointCollectionRequest(contextPath.addSegment("points"), Optional.empty());
    }

    @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"), WorkbookChartSeries.class, _parameters);
    }

}