code: public Observable<ServiceResponse<RoleDefinitionInner>> createOrUpdateWithServiceResponseAsync(String scope, String roleDefinitionId, RoleDefinitionInner roleDefinition) {
          if (scope == null) {
              throw new IllegalArgumentException("Parameter scope is required and cannot be null.");
          }
          if (roleDefinitionId == null) {
              throw new IllegalArgumentException("Parameter roleDefinitionId is required and cannot be null.");
          }
          if (roleDefinition == null) {
              throw new IllegalArgumentException("Parameter roleDefinition is required and cannot be null.");
          }
          Validator.validate(roleDefinition);
          final String apiVersion = "2018-01-01-preview";
          return service.createOrUpdate(scope, roleDefinitionId, roleDefinition, apiVersion, this.client.acceptLanguage(), this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<RoleDefinitionInner>>>() {
                  @Override
                  public Observable<ServiceResponse<RoleDefinitionInner>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<RoleDefinitionInner> clientResponse = createOrUpdateDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Creates or updates a role definition.
  
  @param scope The scope of the role definition.
  @param roleDefinitionId The ID of the role definition.
  @param roleDefinition The values for the role definition.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the RoleDefinitionInner object