code: func (o *SecretTLSOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error {
  	name, err := NameFromCommandArgs(cmd, args)
  	if err != nil {
  		return err
  	}
  
  	requiredFlags := []string{"cert", "key"}
  	for _, requiredFlag := range requiredFlags {
  		if value := cmdutil.GetFlagString(cmd, requiredFlag); len(value) == 0 {
  			return cmdutil.UsageErrorf(cmd, "flag %s is required", requiredFlag)
  		}
  	}
  	var generator generate.StructuredGenerator
  	switch generatorName := cmdutil.GetFlagString(cmd, "generator"); generatorName {
  	case generateversioned.SecretForTLSV1GeneratorName:
  		generator = &generateversioned.SecretForTLSGeneratorV1{
  			Name:       name,
  			Key:        cmdutil.GetFlagString(cmd, "key"),
  			Cert:       cmdutil.GetFlagString(cmd, "cert"),
  			AppendHash: cmdutil.GetFlagBool(cmd, "append-hash"),
  		}
  	default:
  		return errUnsupportedGenerator(cmd, generatorName)
  	}
  
  	return o.CreateSubcommandOptions.Complete(f, cmd, args, generator)
  }
docs: // Complete completes all the required options