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

odata.msgraph.client.beta.entity.collection.request.DeviceManagementScriptCollectionRequest Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package odata.msgraph.client.beta.entity.collection.request;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.github.davidmoten.odata.client.CollectionPageEntityRequest;
import com.github.davidmoten.odata.client.CollectionPageNonEntityRequest;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.annotation.Action;
import com.github.davidmoten.odata.client.internal.Checks;
import com.github.davidmoten.odata.client.internal.ParameterMap;
import com.github.davidmoten.odata.client.internal.TypedObject;

import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;

import odata.msgraph.client.beta.complex.HasPayloadLinkResultItem;
import odata.msgraph.client.beta.entity.DeviceManagementScript;
import odata.msgraph.client.beta.entity.request.DeviceManagementScriptAssignmentRequest;
import odata.msgraph.client.beta.entity.request.DeviceManagementScriptDeviceStateRequest;
import odata.msgraph.client.beta.entity.request.DeviceManagementScriptGroupAssignmentRequest;
import odata.msgraph.client.beta.entity.request.DeviceManagementScriptRequest;
import odata.msgraph.client.beta.entity.request.DeviceManagementScriptUserStateRequest;

public class DeviceManagementScriptCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public DeviceManagementScriptCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, DeviceManagementScript.class, cp -> new DeviceManagementScriptRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    public DeviceManagementScriptAssignmentCollectionRequest assignments() {
        return new DeviceManagementScriptAssignmentCollectionRequest(contextPath.addSegment("assignments"), Optional.empty());
    }

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

    public DeviceManagementScriptDeviceStateCollectionRequest deviceRunStates() {
        return new DeviceManagementScriptDeviceStateCollectionRequest(contextPath.addSegment("deviceRunStates"), Optional.empty());
    }

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

    public DeviceManagementScriptGroupAssignmentCollectionRequest groupAssignments() {
        return new DeviceManagementScriptGroupAssignmentCollectionRequest(contextPath.addSegment("groupAssignments"), Optional.empty());
    }

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

    public DeviceManagementScriptUserStateCollectionRequest userRunStates() {
        return new DeviceManagementScriptUserStateCollectionRequest(contextPath.addSegment("userRunStates"), Optional.empty());
    }

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

    @Action(name = "hasPayloadLinks")
    @JsonIgnore
    public CollectionPageNonEntityRequest hasPayloadLinks(List payloadIds) {
        Map _parameters = ParameterMap
            .put("payloadIds", "Collection(Edm.String)", Checks.checkIsAscii(payloadIds))
            .build();
        return CollectionPageNonEntityRequest.forAction(this.contextPath.addActionOrFunctionSegment("microsoft.graph.hasPayloadLinks"), HasPayloadLinkResultItem.class, _parameters);
    }

}