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

odata.msgraph.client.entity.collection.request.ServiceHealthCollectionRequest 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.ServiceHealth;
import odata.msgraph.client.entity.request.ServiceHealthIssueRequest;
import odata.msgraph.client.entity.request.ServiceHealthRequest;

public class ServiceHealthCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public ServiceHealthCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, ServiceHealth.class, cp -> new ServiceHealthRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

    public ServiceHealthIssueCollectionRequest issues() {
        return new ServiceHealthIssueCollectionRequest(contextPath.addSegment("issues"), Optional.empty());
    }

}