code: public Observable<ServiceResponse<Void>> beginScaleWithServiceResponseAsync(String resourceGroupName, String accountName, String streamingEndpointName) {
          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 (accountName == null) {
              throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
          }
          if (streamingEndpointName == null) {
              throw new IllegalArgumentException("Parameter streamingEndpointName is required and cannot be null.");
          }
          if (this.client.apiVersion() == null) {
              throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
          }
          final Integer scaleUnit = null;
          StreamingEntityScaleUnit parameters = new StreamingEntityScaleUnit();
          parameters.withScaleUnit(null);
          return service.beginScale(this.client.subscriptionId(), resourceGroupName, accountName, streamingEndpointName, this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Void>>>() {
                  @Override
                  public Observable<ServiceResponse<Void>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<Void> clientResponse = beginScaleDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Scale StreamingEndpoint.
  Scales an existing StreamingEndpoint.
  
  @param resourceGroupName The name of the resource group within the Azure subscription.
  @param accountName The Media Services account name.
  @param streamingEndpointName The name of the StreamingEndpoint.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the {@link ServiceResponse} object if successful.