code: public Observable<ServiceResponse<RoleAssignmentInner>> createByIdWithServiceResponseAsync(String roleId, RoleAssignmentCreateParameters parameters) {
          if (roleId == null) {
              throw new IllegalArgumentException("Parameter roleId 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.createById(roleId, 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 = createByIdDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Creates a role assignment by ID.
  
  @param roleId The ID of the role assignment to create.
  @param parameters Parameters for the role assignment.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the RoleAssignmentInner object