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

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

The newest version!
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.Metric;
import microsoft.dynamics.crm.entity.request.AsyncoperationRequest;
import microsoft.dynamics.crm.entity.request.GoalRequest;
import microsoft.dynamics.crm.entity.request.MetricRequest;
import microsoft.dynamics.crm.entity.request.ProcesssessionRequest;
import microsoft.dynamics.crm.entity.request.RollupfieldRequest;
import microsoft.dynamics.crm.entity.request.SyncerrorRequest;

public class MetricCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public MetricCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, Metric.class, cp -> new MetricRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    public GoalRequest metric_goal(UUID goalid) {
        return new GoalRequest(contextPath.addSegment("metric_goal").addKeys(new NameValue(goalid, UUID.class)), Optional.empty());
    }

    public GoalCollectionRequest metric_goal() {
        return new GoalCollectionRequest(contextPath.addSegment("metric_goal"), Optional.empty());
    }

    public RollupfieldRequest metric_rollupfield(UUID rollupfieldid) {
        return new RollupfieldRequest(contextPath.addSegment("metric_rollupfield").addKeys(new NameValue(rollupfieldid, UUID.class)), Optional.empty());
    }

    public RollupfieldCollectionRequest metric_rollupfield() {
        return new RollupfieldCollectionRequest(contextPath.addSegment("metric_rollupfield"), Optional.empty());
    }

    public ProcesssessionRequest metric_ProcessSessions(UUID processsessionid) {
        return new ProcesssessionRequest(contextPath.addSegment("metric_ProcessSessions").addKeys(new NameValue(processsessionid, UUID.class)), Optional.empty());
    }

    public ProcesssessionCollectionRequest metric_ProcessSessions() {
        return new ProcesssessionCollectionRequest(contextPath.addSegment("metric_ProcessSessions"), Optional.empty());
    }

    public AsyncoperationRequest metric_AsyncOperations(UUID asyncoperationid) {
        return new AsyncoperationRequest(contextPath.addSegment("metric_AsyncOperations").addKeys(new NameValue(asyncoperationid, UUID.class)), Optional.empty());
    }

    public AsyncoperationCollectionRequest metric_AsyncOperations() {
        return new AsyncoperationCollectionRequest(contextPath.addSegment("metric_AsyncOperations"), Optional.empty());
    }

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

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

}