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

odata.msgraph.client.entity.collection.request.ServiceUpdateMessageCollectionRequest 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.ActionRequestReturningNonCollection;
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.Boolean;
import java.lang.Object;
import java.lang.String;
import java.util.List;
import java.util.Map;
import java.util.Optional;

import odata.msgraph.client.entity.ServiceUpdateMessage;
import odata.msgraph.client.entity.request.ServiceAnnouncementAttachmentRequest;
import odata.msgraph.client.entity.request.ServiceUpdateMessageRequest;

public class ServiceUpdateMessageCollectionRequest extends CollectionPageEntityRequest{

    protected ContextPath contextPath;

    public ServiceUpdateMessageCollectionRequest(ContextPath contextPath, Optional value) {
        super(contextPath, ServiceUpdateMessage.class, cp -> new ServiceUpdateMessageRequest(cp, Optional.empty()), value);
        this.contextPath = contextPath;
    }

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

    public ServiceAnnouncementAttachmentCollectionRequest attachments() {
        return new ServiceAnnouncementAttachmentCollectionRequest(contextPath.addSegment("attachments"), Optional.empty());
    }

    @Action(name = "archive")
    @JsonIgnore
    public ActionRequestReturningNonCollection archive(List messageIds) {
        Map _parameters = ParameterMap
            .put("messageIds", "Collection(Edm.String)", Checks.checkIsAscii(messageIds))
            .build();
        return new ActionRequestReturningNonCollection(this.contextPath.addActionOrFunctionSegment("microsoft.graph.archive"), Boolean.class, _parameters);
    }

    @Action(name = "favorite")
    @JsonIgnore
    public ActionRequestReturningNonCollection favorite(List messageIds) {
        Map _parameters = ParameterMap
            .put("messageIds", "Collection(Edm.String)", Checks.checkIsAscii(messageIds))
            .build();
        return new ActionRequestReturningNonCollection(this.contextPath.addActionOrFunctionSegment("microsoft.graph.favorite"), Boolean.class, _parameters);
    }

    @Action(name = "markRead")
    @JsonIgnore
    public ActionRequestReturningNonCollection markRead(List messageIds) {
        Map _parameters = ParameterMap
            .put("messageIds", "Collection(Edm.String)", Checks.checkIsAscii(messageIds))
            .build();
        return new ActionRequestReturningNonCollection(this.contextPath.addActionOrFunctionSegment("microsoft.graph.markRead"), Boolean.class, _parameters);
    }

    @Action(name = "markUnread")
    @JsonIgnore
    public ActionRequestReturningNonCollection markUnread(List messageIds) {
        Map _parameters = ParameterMap
            .put("messageIds", "Collection(Edm.String)", Checks.checkIsAscii(messageIds))
            .build();
        return new ActionRequestReturningNonCollection(this.contextPath.addActionOrFunctionSegment("microsoft.graph.markUnread"), Boolean.class, _parameters);
    }

    @Action(name = "unarchive")
    @JsonIgnore
    public ActionRequestReturningNonCollection unarchive(List messageIds) {
        Map _parameters = ParameterMap
            .put("messageIds", "Collection(Edm.String)", Checks.checkIsAscii(messageIds))
            .build();
        return new ActionRequestReturningNonCollection(this.contextPath.addActionOrFunctionSegment("microsoft.graph.unarchive"), Boolean.class, _parameters);
    }

    @Action(name = "unfavorite")
    @JsonIgnore
    public ActionRequestReturningNonCollection unfavorite(List messageIds) {
        Map _parameters = ParameterMap
            .put("messageIds", "Collection(Edm.String)", Checks.checkIsAscii(messageIds))
            .build();
        return new ActionRequestReturningNonCollection(this.contextPath.addActionOrFunctionSegment("microsoft.graph.unfavorite"), Boolean.class, _parameters);
    }

}