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

odata.msgraph.client.entity.collection.request.OnlineMeetingCollectionRequest 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.guavamini.Preconditions;
import com.github.davidmoten.odata.client.ActionRequestReturningNonCollectionUnwrapped;
import com.github.davidmoten.odata.client.CollectionPageEntityRequest;
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.time.OffsetDateTime;
import java.util.Map;
import java.util.Optional;

import odata.msgraph.client.complex.ChatInfo;
import odata.msgraph.client.complex.MeetingParticipants;
import odata.msgraph.client.entity.OnlineMeeting;
import odata.msgraph.client.entity.request.CallRecordingRequest;
import odata.msgraph.client.entity.request.CallTranscriptRequest;
import odata.msgraph.client.entity.request.OnlineMeetingRequest;

public class OnlineMeetingCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public OnlineMeetingCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, OnlineMeeting.class, cp -> new OnlineMeetingRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

    public CallRecordingCollectionRequest recordings() {
        return new CallRecordingCollectionRequest(contextPath.addSegment("recordings"), Optional.empty());
    }

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

    public CallTranscriptCollectionRequest transcripts() {
        return new CallTranscriptCollectionRequest(contextPath.addSegment("transcripts"), Optional.empty());
    }

    @Action(name = "createOrGet")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped createOrGet(ChatInfo chatInfo, OffsetDateTime endDateTime, String externalId, MeetingParticipants participants, OffsetDateTime startDateTime, String subject) {
        Preconditions.checkNotNull(externalId, "externalId cannot be null");
        Map _parameters = ParameterMap
            .put("chatInfo", "microsoft.graph.chatInfo", chatInfo)
            .put("endDateTime", "Edm.DateTimeOffset", endDateTime)
            .put("externalId", "Edm.String", Checks.checkIsAscii(externalId))
            .put("participants", "microsoft.graph.meetingParticipants", participants)
            .put("startDateTime", "Edm.DateTimeOffset", startDateTime)
            .put("subject", "Edm.String", Checks.checkIsAscii(subject))
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.createOrGet"), OnlineMeeting.class, _parameters);
    }

}