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

odata.msgraph.client.beta.entity.collection.request.ConnectedOrganizationCollectionRequest Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package odata.msgraph.client.beta.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.beta.entity.ConnectedOrganization;
import odata.msgraph.client.beta.entity.request.ConnectedOrganizationRequest;
import odata.msgraph.client.beta.entity.request.DirectoryObjectRequest;

public class ConnectedOrganizationCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public ConnectedOrganizationCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, ConnectedOrganization.class, cp -> new ConnectedOrganizationRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

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

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

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

}