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

odata.msgraph.client.entity.collection.request.DirectoryRoleCollectionRequest 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.odata.client.CollectionPageEntityRequest;
import com.github.davidmoten.odata.client.CollectionPageNonEntityRequest;
import com.github.davidmoten.odata.client.ContextPath;
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.util.Map;
import java.util.Optional;

import odata.msgraph.client.entity.DirectoryRole;
import odata.msgraph.client.entity.request.DirectoryObjectRequest;
import odata.msgraph.client.entity.request.DirectoryRoleRequest;
import odata.msgraph.client.entity.request.ScopedRoleMembershipRequest;

public class DirectoryRoleCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public DirectoryRoleCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, DirectoryRole.class, cp -> new DirectoryRoleRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

    public DirectoryObjectCollectionRequest members() {
        return new DirectoryObjectCollectionRequest(contextPath.addSegment("members"), Optional.empty());
    }

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

    public ScopedRoleMembershipCollectionRequest scopedMembers() {
        return new ScopedRoleMembershipCollectionRequest(contextPath.addSegment("scopedMembers"), Optional.empty());
    }

    @Function(name = "delta")
    @JsonIgnore
    public CollectionPageNonEntityRequest delta() {
        Map _parameters = ParameterMap.empty();
        return CollectionPageNonEntityRequest.forFunction(this.contextPath.addActionOrFunctionSegment("microsoft.graph.delta"), DirectoryRole.class, _parameters);
    }

}