code: public Observable<ServiceResponse<DeploymentExtendedInner>> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String deploymentName, DeploymentProperties properties) {
          if (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (deploymentName == null) {
              throw new IllegalArgumentException("Parameter deploymentName is required and cannot be null.");
          }
          if (this.client.subscriptionId() == null) {
              throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          if (properties == null) {
              throw new IllegalArgumentException("Parameter properties is required and cannot be null.");
          }
          Validator.validate(properties);
          DeploymentInner parameters = new DeploymentInner();
          parameters.withProperties(properties);
          Observable<Response<ResponseBody>> observable = service.createOrUpdate(resourceGroupName, deploymentName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent());
          return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<DeploymentExtendedInner>() { }.getType());
      }
docs: Deploys resources to a resource group.
  You can provide the template and parameters directly in the request or link to JSON files.
  
  @param resourceGroupName The name of the resource group to deploy the resources to. The name is case insensitive. The resource group must already exist.
  @param deploymentName The name of the deployment.
  @param properties The deployment properties.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable for the request