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

microsoft.dynamics.crm.entity.collection.request.AttachmentCollectionRequest Maven / Gradle / Ivy

package microsoft.dynamics.crm.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.util.Optional;
import java.util.UUID;

import microsoft.dynamics.crm.entity.Attachment;
import microsoft.dynamics.crm.entity.request.ActivitymimeattachmentRequest;
import microsoft.dynamics.crm.entity.request.AttachmentRequest;
import microsoft.dynamics.crm.entity.request.SyncerrorRequest;

public class AttachmentCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public AttachmentCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, Attachment.class, cp -> new AttachmentRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    public SyncerrorRequest attachment_SyncErrors(UUID syncerrorid) {
        return new SyncerrorRequest(contextPath.addSegment("Attachment_SyncErrors").addKeys(new NameValue(syncerrorid, UUID.class)), Optional.empty());
    }

    public SyncerrorCollectionRequest attachment_SyncErrors() {
        return new SyncerrorCollectionRequest(contextPath.addSegment("Attachment_SyncErrors"), Optional.empty());
    }

    public ActivitymimeattachmentRequest attachment_activity_mime_attachments(UUID activitymimeattachmentid) {
        return new ActivitymimeattachmentRequest(contextPath.addSegment("attachment_activity_mime_attachments").addKeys(new NameValue(activitymimeattachmentid, UUID.class)), Optional.empty());
    }

    public ActivitymimeattachmentCollectionRequest attachment_activity_mime_attachments() {
        return new ActivitymimeattachmentCollectionRequest(contextPath.addSegment("attachment_activity_mime_attachments"), Optional.empty());
    }

}