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

odata.msgraph.client.entity.collection.request.PrinterShareCollectionRequest Maven / Gradle / Ivy

package odata.msgraph.client.entity.collection.request;

import com.github.davidmoten.odata.client.CollectionPageEntityRequest;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.NameValue;

import java.lang.Object;
import java.lang.String;
import java.util.Optional;

import odata.msgraph.client.entity.PrinterShare;
import odata.msgraph.client.entity.request.GroupRequest;
import odata.msgraph.client.entity.request.PrinterShareRequest;
import odata.msgraph.client.entity.request.UserRequest;

public class PrinterShareCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public PrinterShareCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, PrinterShare.class, cp -> new PrinterShareRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    public GroupRequest allowedGroups(String id) {
        return new GroupRequest(contextPath.addSegment("allowedGroups").addKeys(new NameValue(id.toString())), Optional.empty());
    }

    public GroupCollectionRequest allowedGroups() {
        return new GroupCollectionRequest(contextPath.addSegment("allowedGroups"), Optional.empty());
    }

    public UserRequest allowedUsers(String id) {
        return new UserRequest(contextPath.addSegment("allowedUsers").addKeys(new NameValue(id.toString())), Optional.empty());
    }

    public UserCollectionRequest allowedUsers() {
        return new UserCollectionRequest(contextPath.addSegment("allowedUsers"), Optional.empty());
    }

}