public HorizontalPodAutoscalerSpecArgs build() {
            if ($.maxReplicas == null) {
                throw new MissingRequiredPropertyException("HorizontalPodAutoscalerSpecArgs", "maxReplicas");
            }
            if ($.scaleTargetRef == null) {
                throw new MissingRequiredPropertyException("HorizontalPodAutoscalerSpecArgs", "scaleTargetRef");
            }
            return $;
        }
@param scaleTargetRef scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics should be collected, as well as to actually change the replica count.

@return builder
sdk/java/src/main/java/com/pulumi/kubernetes/autoscaling/v2beta1/inputs/HorizontalPodAutoscalerSpecArgs.java