public Snippet updateSnippet(Object projectIdOrPath, Integer snippetId, String title, String filename, String description,
            String code, Visibility visibility) throws GitLabApiException {

        GitLabApiForm formData = new GitLabApiForm()
                .withParam("title", title)
                .withParam("file_name", filename)
                .withParam("description", description)
                .withParam("code", code)
                .withParam("visibility", visibility);

        Response response = put(Response.Status.OK, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "snippets", snippetId);
        return (response.readEntity(Snippet.class));
    }
public Snippet updateSnippet ( Object projectIdOrPath , Integer snippetId , String title , String filename , String description , String code , Visibility visibility ) throws GitLabApiException { GitLabApiForm formData = new GitLabApiForm ( ) . withParam ( "title" , title ) . withParam ( "file_name" , filename ) . withParam ( "description" , description ) . withParam ( "code" , code ) . withParam ( "visibility" , visibility ) ; Response response = put ( Response . Status . OK , formData . asMap ( ) , "projects" , getProjectIdOrPath ( projectIdOrPath ) , "snippets" , snippetId ) ; return ( response . readEntity ( Snippet . class ) ) ; }
Updates an existing project snippet. The user must have permission to change an existing snippet.

<pre><code>PUT /projects/:id/snippets/:snippet_id</code></pre>

@param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required
@param snippetId the ID of a project's snippet, required
@param title the title of a snippet, optional
@param filename the name of a snippet file, optional
@param description the description of a snippet, optioptionalonal
@param code the content of a snippet, optional
@param visibility the snippet's visibility, reqoptionaluired
@return a Snippet instance with info on the updated snippet
@throws GitLabApiException if any exception occurs