code: public static RetrySettings mergeToSettings(RetrySettings settings, RetryOption... options) {
      if (options.length <= 0) {
        return settings;
      }
      RetrySettings.Builder builder = settings.toBuilder();
      for (RetryOption option : options) {
        switch (option.type) {
          case TOTAL_TIMEOUT:
            builder.setTotalTimeout((Duration) option.value);
            break;
          case INITIAL_RETRY_DELAY:
            builder.setInitialRetryDelay((Duration) option.value);
            break;
          case RETRY_DELAY_MULTIPLIER:
            builder.setRetryDelayMultiplier((Double) option.value);
            break;
          case MAX_RETRY_DELAY:
            builder.setMaxRetryDelay((Duration) option.value);
            break;
          case MAX_ATTEMPTS:
            builder.setMaxAttempts((Integer) option.value);
            break;
          case JITTERED:
            builder.setJittered((Boolean) option.value);
            break;
          default:
            throw new IllegalArgumentException("Unknown option type: " + option.type);
        }
      }
      return builder.build();
    }
docs: Creates a new {@code RetrySettings} instance, merging provided settings and multiple {@code
  RetryOptions}, each of which represents a single property in {@code RetrySettings}. It is an
  alternative way of initializing {@link RetrySettings} instances.
  
  @param settings retry settings
  @param options zero or more Retry
  @return new {@code RetrySettings} instance, which is a result of merging {@code options} into
  {@code settings}, i.e. each element in {@code options}, if present, overrides corresponding
  property in {@code settings}