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

odata.msgraph.client.entity.collection.request.PostCollectionRequest 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.Post;
import odata.msgraph.client.entity.request.AttachmentRequest;
import odata.msgraph.client.entity.request.ExtensionRequest;
import odata.msgraph.client.entity.request.MultiValueLegacyExtendedPropertyRequest;
import odata.msgraph.client.entity.request.PostRequest;
import odata.msgraph.client.entity.request.SingleValueLegacyExtendedPropertyRequest;

public class PostCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public PostCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, Post.class, cp -> new PostRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

    public AttachmentCollectionRequest attachments() {
        return new AttachmentCollectionRequest(contextPath.addSegment("attachments"), Optional.empty());
    }

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

    public ExtensionCollectionRequest extensions() {
        return new ExtensionCollectionRequest(contextPath.addSegment("extensions"), Optional.empty());
    }

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

    public MultiValueLegacyExtendedPropertyCollectionRequest multiValueExtendedProperties() {
        return new MultiValueLegacyExtendedPropertyCollectionRequest(contextPath.addSegment("multiValueExtendedProperties"), Optional.empty());
    }

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

    public SingleValueLegacyExtendedPropertyCollectionRequest singleValueExtendedProperties() {
        return new SingleValueLegacyExtendedPropertyCollectionRequest(contextPath.addSegment("singleValueExtendedProperties"), Optional.empty());
    }

}