code: func (s SecretForDockerRegistryGeneratorV1) validate() error {
  	if len(s.Name) == 0 {
  		return fmt.Errorf("name must be specified")
  	}
  
  	if len(s.FileSources) == 0 {
  		if len(s.Username) == 0 {
  			return fmt.Errorf("username must be specified")
  		}
  		if len(s.Password) == 0 {
  			return fmt.Errorf("password must be specified")
  		}
  		if len(s.Server) == 0 {
  			return fmt.Errorf("server must be specified")
  		}
  	}
  	return nil
  }
docs: // validate validates required fields are set to support structured generation