public Observable<ServiceResponse<RoleAssignmentInner>> createWithServiceResponseAsync(String scope, String roleAssignmentName, RoleAssignmentCreateParameters parameters) {
        if (scope == null) {
            throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
        }
        if (roleAssignmentName == null) {
            throw new IllegalArgumentException("Parameter roleAssignmentName is required and cannot be null.");
        }
        if (parameters == null) {
            throw new IllegalArgumentException("Parameter parameters is required and cannot be null.");
        }
        Validator.validate(parameters);
        final String apiVersion = "2018-09-01-preview";
        return service.create(scope, roleAssignmentName, parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
            .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<RoleAssignmentInner>>>() {
                @Override
                public Observable<ServiceResponse<RoleAssignmentInner>> call(Response<ResponseBody> response) {
                    try {
                        ServiceResponse<RoleAssignmentInner> clientResponse = createDelegate(response);
                        return Observable.just(clientResponse);
                    } catch (Throwable t) {
                        return Observable.error(t);
                    }
                }
            });
    }
public Observable < ServiceResponse < RoleAssignmentInner > > createWithServiceResponseAsync ( String scope , String roleAssignmentName , RoleAssignmentCreateParameters parameters ) { if ( scope == null ) { throw new IllegalArgumentException ( "Parameter scope is required and cannot be null." ) ; } if ( roleAssignmentName == null ) { throw new IllegalArgumentException ( "Parameter roleAssignmentName is required and cannot be null." ) ; } if ( parameters == null ) { throw new IllegalArgumentException ( "Parameter parameters is required and cannot be null." ) ; } Validator . validate ( parameters ) ; final String apiVersion = "2018-09-01-preview" ; return service . create ( scope , roleAssignmentName , parameters , apiVersion , this . client . acceptLanguage ( ) , this . client . userAgent ( ) ) . flatMap ( new Func1 < Response < ResponseBody > , Observable < ServiceResponse < RoleAssignmentInner > > > ( ) { @ Override public Observable < ServiceResponse < RoleAssignmentInner > > call ( Response < ResponseBody > response ) { try { ServiceResponse < RoleAssignmentInner > clientResponse = createDelegate ( response ) ; return Observable . just ( clientResponse ) ; } catch ( Throwable t ) { return Observable . error ( t ) ; } } } ) ; }
Creates a role assignment.

@param scope The scope of the role assignment to create. The scope can be any REST resource instance. For example, use '/subscriptions/{subscription-id}/' for a subscription, '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}' for a resource group, and '/subscriptions/{subscription-id}/resourceGroups/{resource-group-name}/providers/{resource-provider}/{resource-type}/{resource-name}' for a resource.
@param roleAssignmentName The name of the role assignment to create. It can be any valid GUID.
@param parameters Parameters for the role assignment.
@throws IllegalArgumentException thrown if parameters fail the validation
@return the observable to the RoleAssignmentInner object