code: func (o *ServiceNodePortOpts) 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.ServiceNodePortGeneratorV1Name:
  		generator = &generateversioned.ServiceCommonGeneratorV1{
  			Name:      name,
  			TCP:       cmdutil.GetFlagStringSlice(cmd, "tcp"),
  			Type:      v1.ServiceTypeNodePort,
  			ClusterIP: "",
  			NodePort:  cmdutil.GetFlagInt(cmd, "node-port"),
  		}
  	default:
  		return errUnsupportedGenerator(cmd, generatorName)
  	}
  
  	return o.CreateSubcommandOptions.Complete(f, cmd, args, generator)
  }
docs: // Complete completes all the required options