class LegacyRollableScalableResourceOperation<T extends HasMetadata, L extends KubernetesResourceList<T>, R extends Resource<T>>
    extends RollableScalableResourceOperation<T, L, R> {

  protected LegacyRollableScalableResourceOperation(PodOperationContext context, OperationContext superContext, Class<T> type,
      Class<L> listType) {
    super(context, superContext, type, listType);
  }

  @Override
  public Scale scale(Scale scaleParam) {
    return scale(scaleParam, this);
  }

  public static Scale scale(Scale scaleParam, HasMetadataOperation<?, ?, ?> operation) {<FILL_FUNCTION_BODY>}

}

    // handles the conversion back in forth between v1beta1.scale and v1.scale
    // the sticking point is mostly the conversion of the selector from a map to a single string
    GenericKubernetesResource scale = operation.handleScale(
        Optional.ofNullable(scaleParam)
            .map(s -> operation.getKubernetesSerialization().unmarshal(operation.getKubernetesSerialization().asYaml(s),
                GenericKubernetesResource.class))
            .map(g -> {
              g.getAdditionalProperties().put("status", null);
              // could explicitly set the apiVersion, but that doesn't seem to be required
              return g;
            }).orElse(null),
        GenericKubernetesResource.class);
    return Optional.ofNullable(scale).map(s -> {
      Optional.ofNullable((Map) s.getAdditionalProperties().get("status"))
          .ifPresent(status -> Optional.ofNullable((Map<String, Object>) status.get("selector"))
              .ifPresent(selector -> status.put("selector",
                  selector.entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.joining(";")))));
      return s;
    }).map(s -> operation.getKubernetesSerialization().unmarshal(operation.getKubernetesSerialization().asYaml(s), Scale.class))
        .orElse(null);
  
<methods>public T edit(UnaryOperator<T>) ,public java.lang.String getLog() ,public io.fabric8.kubernetes.client.dsl.Loggable inContainer(java.lang.String) ,public abstract RollableScalableResourceOperation<T,L,R> newInstance(io.fabric8.kubernetes.client.dsl.internal.PodOperationContext, io.fabric8.kubernetes.client.dsl.internal.OperationContext) ,public T pause() ,public T restart() ,public T resume() ,public TimeoutImageEditReplacePatchable<T> rolling() ,public T undo() ,public T updateImage(java.lang.String) ,public T updateImage(Map<java.lang.String,java.lang.String>) ,public io.fabric8.kubernetes.client.dsl.LogWatch watchLog() ,public io.fabric8.kubernetes.client.dsl.Loggable withLogWaitTimeout(java.lang.Integer) ,public io.fabric8.kubernetes.client.dsl.Loggable withReadyWaitTimeout(java.lang.Integer) ,public RollableScalableResourceOperation<T,L,R> withTimeout(long, java.util.concurrent.TimeUnit) ,public RollableScalableResourceOperation<T,L,R> withTimeoutInMillis(long) <variables>protected final non-sealed io.fabric8.kubernetes.client.dsl.internal.PodOperationContext rollingOperationContext