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

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

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.Channel;
import odata.msgraph.client.entity.ChatMessage;
import odata.msgraph.client.entity.request.ChannelRequest;
import odata.msgraph.client.entity.request.ChatMessageRequest;
import odata.msgraph.client.entity.request.ConversationMemberRequest;
import odata.msgraph.client.entity.request.SharedWithChannelTeamInfoRequest;
import odata.msgraph.client.entity.request.TeamsTabRequest;

public class ChannelCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public ChannelCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, Channel.class, cp -> new ChannelRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    public ConversationMemberRequest members(String id) {
        return new ConversationMemberRequest(contextPath.addSegment("members").addKeys(new NameValue(id.toString())), 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.toString())), Optional.empty());
    }

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

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

    public SharedWithChannelTeamInfoCollectionRequest sharedWithTeams() {
        return new SharedWithChannelTeamInfoCollectionRequest(contextPath.addSegment("sharedWithTeams"), Optional.empty());
    }

    public TeamsTabRequest tabs(String id) {
        return new TeamsTabRequest(contextPath.addSegment("tabs").addKeys(new NameValue(id.toString())), 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);
    }

}