code: public static <ResultT> PollingState<ResultT> createFromPollingState(PollingState<?> other, ResultT result) {
          PollingState<ResultT> pollingState = new PollingState<>();
          pollingState.resource = result;
          pollingState.initialHttpMethod = other.initialHttpMethod();
          pollingState.status = other.status();
          pollingState.statusCode = other.statusCode();
          pollingState.azureAsyncOperationHeaderLink = other.azureAsyncOperationHeaderLink();
          pollingState.locationHeaderLink = other.locationHeaderLink();
          pollingState.putOrPatchResourceUri = other.putOrPatchResourceUri();
          pollingState.defaultRetryTimeout = other.defaultRetryTimeout;
          pollingState.retryTimeout = other.retryTimeout;
          pollingState.loggingContext = other.loggingContext;
          pollingState.finalStateVia = other.finalStateVia;
          return pollingState;
      }
docs: Creates PollingState from another polling state.
  
  @param other other polling state
  @param result the final result of the LRO
  @param <ResultT> the result that the poll operation produces
  @return the polling state