code: public static final Controller.ScalingPolicy decode(final ScalingPolicy policyModel) {
          Preconditions.checkNotNull(policyModel, "policyModel");
          return Controller.ScalingPolicy.newBuilder()
                  .setScaleType(Controller.ScalingPolicy.ScalingPolicyType.valueOf(policyModel.getScaleType().name()))
                  .setTargetRate(policyModel.getTargetRate())
                  .setScaleFactor(policyModel.getScaleFactor())
                  .setMinNumSegments(policyModel.getMinNumSegments())
                  .build();
      }
docs: Decodes ScalingPolicy and returns an instance of Scaling Policy impl.
  
  @param policyModel The Scaling Policy.
  @return Instance of Scaling Policy Impl.