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

odata.msgraph.client.beta.entity.collection.request.ParticipantCollectionRequest 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.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.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.InvitationParticipantInfo;
import odata.msgraph.client.beta.entity.InviteParticipantsOperation;
import odata.msgraph.client.beta.entity.MuteParticipantsOperation;
import odata.msgraph.client.beta.entity.Participant;
import odata.msgraph.client.beta.entity.request.ParticipantRequest;

public class ParticipantCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public ParticipantCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, Participant.class, cp -> new ParticipantRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

    @Action(name = "invite")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped invite(List participants, String clientContext) {
        Preconditions.checkNotNull(participants, "participants cannot be null");
        Map _parameters = ParameterMap
            .put("participants", "Collection(microsoft.graph.invitationParticipantInfo)", participants)
            .put("clientContext", "Edm.String", Checks.checkIsAscii(clientContext))
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.invite"), InviteParticipantsOperation.class, _parameters);
    }

    @Action(name = "muteAll")
    @JsonIgnore
    public ActionRequestReturningNonCollectionUnwrapped muteAll(List participants, String clientContext) {
        Map _parameters = ParameterMap
            .put("participants", "Collection(Edm.String)", Checks.checkIsAscii(participants))
            .put("clientContext", "Edm.String", Checks.checkIsAscii(clientContext))
            .build();
        return new ActionRequestReturningNonCollectionUnwrapped(this.contextPath.addActionOrFunctionSegment("microsoft.graph.muteAll"), MuteParticipantsOperation.class, _parameters);
    }

}