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

odata.msgraph.client.beta.entity.request.GroupPolicyUploadedDefinitionFileRequest Maven / Gradle / Ivy

There is a newer version: 0.2.2
Show newest version
package odata.msgraph.client.beta.entity.request;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreType;
import com.github.davidmoten.guavamini.Preconditions;
import com.github.davidmoten.odata.client.ActionRequestNoReturn;
import com.github.davidmoten.odata.client.ContextPath;
import com.github.davidmoten.odata.client.EntityRequest;
import com.github.davidmoten.odata.client.NameValue;
import com.github.davidmoten.odata.client.annotation.Action;
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.GroupPolicyUploadedLanguageFile;
import odata.msgraph.client.beta.entity.GroupPolicyUploadedDefinitionFile;
import odata.msgraph.client.beta.entity.collection.request.GroupPolicyOperationCollectionRequest;

@JsonIgnoreType
public class GroupPolicyUploadedDefinitionFileRequest extends EntityRequest {

    public GroupPolicyUploadedDefinitionFileRequest(ContextPath contextPath, Optional value) {
        super(GroupPolicyUploadedDefinitionFile.class, contextPath, value, false);
    }

    public GroupPolicyOperationCollectionRequest groupPolicyOperations() {
        return new GroupPolicyOperationCollectionRequest(
                        contextPath.addSegment("groupPolicyOperations"), Optional.empty());
    }

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

    @Action(name = "remove")
    @JsonIgnore
    public ActionRequestNoReturn remove() {
        Map _parameters = ParameterMap.empty();
        return new ActionRequestNoReturn(this.contextPath.addActionOrFunctionSegment("microsoft.graph.remove"), _parameters);
    }

    @Action(name = "addLanguageFiles")
    @JsonIgnore
    public ActionRequestNoReturn addLanguageFiles(List groupPolicyUploadedLanguageFiles) {
        Map _parameters = ParameterMap
            .put("groupPolicyUploadedLanguageFiles", "Collection(microsoft.graph.groupPolicyUploadedLanguageFile)", groupPolicyUploadedLanguageFiles)
            .build();
        return new ActionRequestNoReturn(this.contextPath.addActionOrFunctionSegment("microsoft.graph.addLanguageFiles"), _parameters);
    }

    @Action(name = "removeLanguageFiles")
    @JsonIgnore
    public ActionRequestNoReturn removeLanguageFiles(List groupPolicyUploadedLanguageFiles) {
        Map _parameters = ParameterMap
            .put("groupPolicyUploadedLanguageFiles", "Collection(microsoft.graph.groupPolicyUploadedLanguageFile)", groupPolicyUploadedLanguageFiles)
            .build();
        return new ActionRequestNoReturn(this.contextPath.addActionOrFunctionSegment("microsoft.graph.removeLanguageFiles"), _parameters);
    }

    @Action(name = "updateLanguageFiles")
    @JsonIgnore
    public ActionRequestNoReturn updateLanguageFiles(List groupPolicyUploadedLanguageFiles) {
        Map _parameters = ParameterMap
            .put("groupPolicyUploadedLanguageFiles", "Collection(microsoft.graph.groupPolicyUploadedLanguageFile)", groupPolicyUploadedLanguageFiles)
            .build();
        return new ActionRequestNoReturn(this.contextPath.addActionOrFunctionSegment("microsoft.graph.updateLanguageFiles"), _parameters);
    }

    @Action(name = "uploadNewVersion")
    @JsonIgnore
    public ActionRequestNoReturn uploadNewVersion(byte[] content, List groupPolicyUploadedLanguageFiles) {
        Preconditions.checkNotNull(content, "content cannot be null");
        Map _parameters = ParameterMap
            .put("content", "Edm.Binary", content)
            .put("groupPolicyUploadedLanguageFiles", "Collection(microsoft.graph.groupPolicyUploadedLanguageFile)", groupPolicyUploadedLanguageFiles)
            .build();
        return new ActionRequestNoReturn(this.contextPath.addActionOrFunctionSegment("microsoft.graph.uploadNewVersion"), _parameters);
    }

}