code: func (precondition *ScalePrecondition) ValidateDeployment(deployment *extensions.Deployment) error {
  	if precondition.Size != -1 && deployment.Spec.Replicas != precondition.Size {
  		return PreconditionError{"replicas", strconv.Itoa(precondition.Size), strconv.Itoa(deployment.Spec.Replicas)}
  	}
  	if len(precondition.ResourceVersion) != 0 && deployment.ResourceVersion != precondition.ResourceVersion {
  		return PreconditionError{"resource version", precondition.ResourceVersion, deployment.ResourceVersion}
  	}
  	return nil
  }
docs: // ValidateDeployment ensures that the preconditions match.  Returns nil if they are valid, an error otherwise.