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

com.woorea.openstack.keystone.v3.api.ProjectRolesResource Maven / Gradle / Ivy

There is a newer version: 3.3.30-oss
Show newest version
/*******************************************************************************
 * Copyright (C) 2016 AT&T Intellectual Property. All rights reserved. This code is licensed under the Apache License, Version 2.0
 *******************************************************************************/

package com.woorea.openstack.keystone.v3.api;

import com.woorea.openstack.base.client.Entity;
import com.woorea.openstack.base.client.HttpMethod;
import com.woorea.openstack.base.client.OpenStackClient;
import com.woorea.openstack.base.client.OpenStackRequest;

public class ProjectRolesResource {
	
	private final OpenStackClient CLIENT;
	
	private final String PATH;

	public ProjectRolesResource(OpenStackClient client, String path) {
		this.CLIENT = client;
		this.PATH = path;
	}
	
	public OpenStackRequest add(String roleId) {
		return new OpenStackRequest(CLIENT, HttpMethod.PUT, new StringBuilder(PATH).append("/").append(roleId).toString(), Entity.json(""), Void.class);
	}
	
	public OpenStackRequest remove(String roleId) {
		return new OpenStackRequest(CLIENT, HttpMethod.DELETE, new StringBuilder(PATH).append("/").append(roleId).toString(), null, Void.class);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy