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

odata.msgraph.client.identitygovernance.entity.collection.request.UserProcessingResultCollectionRequest Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package odata.msgraph.client.identitygovernance.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.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.Object;
import java.lang.String;
import java.time.OffsetDateTime;
import java.util.Map;
import java.util.Optional;

import odata.msgraph.client.identitygovernance.complex.UserSummary;
import odata.msgraph.client.identitygovernance.entity.UserProcessingResult;
import odata.msgraph.client.identitygovernance.entity.request.TaskProcessingResultRequest;
import odata.msgraph.client.identitygovernance.entity.request.UserProcessingResultRequest;

public class UserProcessingResultCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public UserProcessingResultCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, UserProcessingResult.class, cp -> new UserProcessingResultRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

    public TaskProcessingResultCollectionRequest taskProcessingResults() {
        return new TaskProcessingResultCollectionRequest(contextPath.addSegment("taskProcessingResults"), Optional.empty());
    }

    @Function(name = "summary")
    @JsonIgnore
    public FunctionRequestReturningNonCollectionUnwrapped summary(OffsetDateTime startDateTime, OffsetDateTime endDateTime) {
        Preconditions.checkNotNull(startDateTime, "startDateTime cannot be null");
        Preconditions.checkNotNull(endDateTime, "endDateTime cannot be null");
        Map _parameters = ParameterMap
            .put("startDateTime", "Edm.DateTimeOffset", startDateTime)
            .put("endDateTime", "Edm.DateTimeOffset", endDateTime)
            .build();
        return new FunctionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.identityGovernance.summary"), UserSummary.class, _parameters);
    }

}