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

odata.msgraph.client.entity.collection.request.ChatCollectionRequest Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package odata.msgraph.client.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.Function;
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.Map;
import java.util.Optional;

import odata.msgraph.client.entity.Chat;
import odata.msgraph.client.entity.ChatMessage;
import odata.msgraph.client.entity.request.ChatMessageRequest;
import odata.msgraph.client.entity.request.ChatRequest;
import odata.msgraph.client.entity.request.ConversationMemberRequest;
import odata.msgraph.client.entity.request.PinnedChatMessageInfoRequest;
import odata.msgraph.client.entity.request.ResourceSpecificPermissionGrantRequest;
import odata.msgraph.client.entity.request.TeamsAppInstallationRequest;
import odata.msgraph.client.entity.request.TeamsTabRequest;

public class ChatCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public ChatCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, Chat.class, cp -> new ChatRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

    public TeamsAppInstallationCollectionRequest installedApps() {
        return new TeamsAppInstallationCollectionRequest(contextPath.addSegment("installedApps"), Optional.empty());
    }

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

    public ConversationMemberCollectionRequest members() {
        return new ConversationMemberCollectionRequest(contextPath.addSegment("members"), Optional.empty());
    }

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

    public ChatMessageCollectionRequest messages() {
        return new ChatMessageCollectionRequest(contextPath.addSegment("messages"), Optional.empty());
    }

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

    public ResourceSpecificPermissionGrantCollectionRequest permissionGrants() {
        return new ResourceSpecificPermissionGrantCollectionRequest(contextPath.addSegment("permissionGrants"), Optional.empty());
    }

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

    public PinnedChatMessageInfoCollectionRequest pinnedMessages() {
        return new PinnedChatMessageInfoCollectionRequest(contextPath.addSegment("pinnedMessages"), Optional.empty());
    }

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

    public TeamsTabCollectionRequest tabs() {
        return new TeamsTabCollectionRequest(contextPath.addSegment("tabs"), Optional.empty());
    }

    @Function(name = "getAllMessages")
    @JsonIgnore
    public CollectionPageNonEntityRequest getAllMessages() {
        Map _parameters = ParameterMap.empty();
        return CollectionPageNonEntityRequest.forFunction(this.contextPath.addActionOrFunctionSegment("microsoft.graph.getAllMessages"), ChatMessage.class, _parameters);
    }

}