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

org.graylog2.restroutes.generated.RolesResource Maven / Gradle / Ivy

The newest version!

package org.graylog2.restroutes.generated;

import org.graylog2.restroutes.PathMethod;

public class RolesResource {


    public PathMethod listAll() {
        return new PathMethod("GET", "/roles");
    }

    public PathMethod addMember(String rolename, String username) {
        return new PathMethod("PUT", "/roles/"+com.google.common.net.UrlEscapers.urlPathSegmentEscaper().escape(rolename)+"/members/"+com.google.common.net.UrlEscapers.urlPathSegmentEscaper().escape(username)+"");
    }

    public PathMethod removeMember(String rolename, String username) {
        return new PathMethod("DELETE", "/roles/"+com.google.common.net.UrlEscapers.urlPathSegmentEscaper().escape(rolename)+"/members/"+com.google.common.net.UrlEscapers.urlPathSegmentEscaper().escape(username)+"");
    }

    public PathMethod update(String rolename) {
        return new PathMethod("PUT", "/roles/"+com.google.common.net.UrlEscapers.urlPathSegmentEscaper().escape(rolename)+"");
    }

    public PathMethod read(String rolename) {
        return new PathMethod("GET", "/roles/"+com.google.common.net.UrlEscapers.urlPathSegmentEscaper().escape(rolename)+"");
    }

    public PathMethod delete(String rolename) {
        return new PathMethod("DELETE", "/roles/"+com.google.common.net.UrlEscapers.urlPathSegmentEscaper().escape(rolename)+"");
    }

    public PathMethod create() {
        return new PathMethod("POST", "/roles");
    }

    public PathMethod getMembers(String rolename) {
        return new PathMethod("GET", "/roles/"+com.google.common.net.UrlEscapers.urlPathSegmentEscaper().escape(rolename)+"/members");
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy