public Observable<RoleInner> createOrUpdateAsync(String deviceName, String name, String resourceGroupName, RoleInner role) {
        return createOrUpdateWithServiceResponseAsync(deviceName, name, resourceGroupName, role).map(new Func1<ServiceResponse<RoleInner>, RoleInner>() {
            @Override
            public RoleInner call(ServiceResponse<RoleInner> response) {
                return response.body();
            }
        });
    }
public Observable < RoleInner > createOrUpdateAsync ( String deviceName , String name , String resourceGroupName , RoleInner role ) { return createOrUpdateWithServiceResponseAsync ( deviceName , name , resourceGroupName , role ) . map ( new Func1 < ServiceResponse < RoleInner > , RoleInner > ( ) { @ Override public RoleInner call ( ServiceResponse < RoleInner > response ) { return response . body ( ) ; } } ) ; }
Create or update a role.

@param deviceName The device name.
@param name The role name.
@param resourceGroupName The resource group name.
@param role The role properties.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable for the request