code: public Observable<ServiceResponse<UploadCertificateResponseInner>> uploadCertificateWithServiceResponseAsync(String deviceName, String resourceGroupName, UploadCertificateRequest parameters) {
          if (deviceName == null) {
              throw new IllegalArgumentException("Parameter deviceName 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 (resourceGroupName == null) {
              throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
          }
          if (parameters == null) {
              throw new IllegalArgumentException("Parameter parameters 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(parameters);
          return service.uploadCertificate(deviceName, this.client.subscriptionId(), resourceGroupName, parameters, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
              .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<UploadCertificateResponseInner>>>() {
                  @Override
                  public Observable<ServiceResponse<UploadCertificateResponseInner>> call(Response<ResponseBody> response) {
                      try {
                          ServiceResponse<UploadCertificateResponseInner> clientResponse = uploadCertificateDelegate(response);
                          return Observable.just(clientResponse);
                      } catch (Throwable t) {
                          return Observable.error(t);
                      }
                  }
              });
      }
docs: Uploads registration certificate for the device.
  
  @param deviceName The device name.
  @param resourceGroupName The resource group name.
  @param parameters The upload certificate request.
  @throws IllegalArgumentException thrown if parameters fail the validation
  @return the observable to the UploadCertificateResponseInner object