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

microsoft.graph.externalconnectors.collection.request.ExternalGroupCollectionRequest Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package microsoft.graph.externalconnectors.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 microsoft.graph.externalconnectors.entity.ExternalGroup;
import microsoft.graph.externalconnectors.entity.request.ExternalGroupEntityRequest;
import microsoft.graph.externalconnectors.entity.request.ExternalGroupMemberEntityRequest;

public class ExternalGroupCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public ExternalGroupCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, ExternalGroup.class, cp -> new ExternalGroupEntityRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

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

}