code: private <T> Observable<PollingState<T>> updateStateFromAzureAsyncOperationHeaderOnPutAsync(final PollingState<T> pollingState) {
          return pollAsync(pollingState.azureAsyncOperationHeaderLink(), pollingState.loggingContext())
                  .flatMap(new Func1<Response<ResponseBody>, Observable<PollingState<T>>>() {
                      @Override
                      public Observable<PollingState<T>> call(Response<ResponseBody> response) {
                          final AzureAsyncOperation asyncOperation;
                          try {
                              asyncOperation = AzureAsyncOperation.fromResponse(restClient().serializerAdapter(), response);
                          } catch (CloudException exception) {
                              return Observable.error(exception);
                          }
                          pollingState.withStatus(asyncOperation.status());
                          pollingState.withErrorBody(asyncOperation.getError());
                          pollingState.withResponse(response);
                          pollingState.withResource(null);
                          return Observable.just(pollingState);
                      }
                  });
      }
docs: Polls from the 'Azure-AsyncOperation' header and updates the polling
  state with the polling response.
  
  @param pollingState the polling state for the current operation.
  @param <T> the return type of the caller.