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

odata.msgraph.client.entity.request.AccessPackageResourceRequest Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonIgnoreType;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.EntityRequest;
import com.github.davidmoten.odata.client.NameValue;

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

import odata.msgraph.client.entity.AccessPackageResource;
import odata.msgraph.client.entity.collection.request.AccessPackageResourceRoleCollectionRequest;
import odata.msgraph.client.entity.collection.request.AccessPackageResourceScopeCollectionRequest;

@JsonIgnoreType
public class AccessPackageResourceRequest extends EntityRequest {

    public AccessPackageResourceRequest(ContextPath contextPath, Optional value) {
        super(AccessPackageResource.class, contextPath, value, false);
    }

    public AccessPackageResourceEnvironmentRequest environment() {
        return new AccessPackageResourceEnvironmentRequest(contextPath.addSegment("environment"), Optional.empty());
    }

    public AccessPackageResourceRoleRequest roles(String id) {
        return new AccessPackageResourceRoleRequest(contextPath.addSegment("roles").addKeys(new NameValue(id, String.class)), Optional.empty());
    }

    public AccessPackageResourceRoleCollectionRequest roles() {
        return new AccessPackageResourceRoleCollectionRequest(
                        contextPath.addSegment("roles"), Optional.empty());
    }

    public AccessPackageResourceScopeRequest scopes(String id) {
        return new AccessPackageResourceScopeRequest(contextPath.addSegment("scopes").addKeys(new NameValue(id, String.class)), Optional.empty());
    }

    public AccessPackageResourceScopeCollectionRequest scopes() {
        return new AccessPackageResourceScopeCollectionRequest(
                        contextPath.addSegment("scopes"), Optional.empty());
    }

}