code: func (o *PriorityClassOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error {
  	name, err := NameFromCommandArgs(cmd, args)
  	if err != nil {
  		return err
  	}
  
  	var generator generate.StructuredGenerator
  	switch generatorName := cmdutil.GetFlagString(cmd, "generator"); generatorName {
  	case generateversioned.PriorityClassV1Alpha1GeneratorName:
  		generator = &generateversioned.PriorityClassV1Generator{
  			Name:          name,
  			Value:         cmdutil.GetFlagInt32(cmd, "value"),
  			GlobalDefault: cmdutil.GetFlagBool(cmd, "global-default"),
  			Description:   cmdutil.GetFlagString(cmd, "description"),
  		}
  	default:
  		return errUnsupportedGenerator(cmd, generatorName)
  	}
  
  	return o.CreateSubcommandOptions.Complete(f, cmd, args, generator)
  }
docs: // Complete completes all the required options