code: func (s *PodDisruptionBudgetV2Generator) validate() error {
  	if len(s.Name) == 0 {
  		return fmt.Errorf("name must be specified")
  	}
  	if len(s.Selector) == 0 {
  		return fmt.Errorf("a selector must be specified")
  	}
  	if len(s.MaxUnavailable) == 0 && len(s.MinAvailable) == 0 {
  		return fmt.Errorf("one of min-available or max-unavailable must be specified")
  	}
  	if len(s.MaxUnavailable) > 0 && len(s.MinAvailable) > 0 {
  		return fmt.Errorf("min-available and max-unavailable cannot be both specified")
  	}
  	return nil
  }
docs: // validate validates required fields are set to support structured generation.