code: public Observable<ServiceResponse<DomainInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String domainName, DomainInner domainInfo) {
          if (this.client.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
          }
          if (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (domainName == null) {
              throw new IllegalArgumentException("Parameter domainName is required and cannot be null.");
          }
          if (domainInfo == null) {
              throw new IllegalArgumentException("Parameter domainInfo is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          Validator.validate(domainInfo);
          Observable<Response<ResponseBody>> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, domainName, domainInfo, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
          return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<DomainInner>() { }.getType());
      }
docs: Create a domain.
  Asynchronously creates a new domain with the specified parameters.
  
  @param resourceGroupName The name of the resource group within the user's subscription.
  @param domainName Name of the domain
  @param domainInfo Domain information
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable for the request