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

odata.msgraph.client.entity.request.SearchEntityRequest Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreType;
import com.github.davidmoten.guavamini.Preconditions;
import com.github.davidmoten.odata.client.CollectionPageNonEntityRequest;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.EntityRequest;
import com.github.davidmoten.odata.client.annotation.Action;
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.List;
import java.util.Map;
import java.util.Optional;

import odata.msgraph.client.complex.SearchRequest;
import odata.msgraph.client.complex.SearchResponse;
import odata.msgraph.client.entity.SearchEntity;

@JsonIgnoreType
public class SearchEntityRequest extends EntityRequest {

    public SearchEntityRequest(ContextPath contextPath, Optional value) {
        super(SearchEntity.class, contextPath, value, false);
    }

    @Action(name = "query")
    @JsonIgnore
    public CollectionPageNonEntityRequest query(List requests) {
        Preconditions.checkNotNull(requests, "requests cannot be null");
        Map _parameters = ParameterMap
            .put("requests", "Collection(microsoft.graph.searchRequest)", requests)
            .build();
        return CollectionPageNonEntityRequest.forAction(this.contextPath.addActionOrFunctionSegment("microsoft.graph.query"), SearchResponse.class, _parameters);
    }

}