// buildJobDeleteCmd builds the command to delete job(s).
buildJobDeleteCmd builds the command to delete job(s).
// buildJobDeleteCmd builds the command to delete job ( s ) .
func buildJobDeleteCmd() *cobra.Command {
	vars := deleteJobVars{}
	cmd := &cobra.Command{
		Use:   "delete",
		Short: "Deletes a job from an application.",
		Example: `
  Delete the "report-generator" job from the my-app application.
  /code $ copilot job delete --name report-generator --app my-app
  Delete the "report-generator" job from just the prod environment.
  /code $ copilot job delete --name report-generator --env prod
  Delete the "report-generator" job without confirmation prompt.
  /code $ copilot job delete --name report-generator --yes`,
		RunE: runCmdE(func(cmd *cobra.Command, args []string) error {
			opts, err := newDeleteJobOpts(vars)
			if err != nil {
				return err
			}
			if err := opts.Validate(); err != nil {
				return err
			}
			return opts.Ask()
		}),
	}
	cmd.Flags().StringVarP(&vars.appName, appFlag, appFlagShort, tryReadingAppName(), appFlagDescription)
	cmd.Flags().StringVarP(&vars.name, nameFlag, nameFlagShort, "", jobFlagDescription)
	cmd.Flags().StringVarP(&vars.envName, envFlag, envFlagShort, "", envFlagDescription)
	cmd.Flags().BoolVar(&vars.skipConfirmation, yesFlag, false, yesFlagDescription)
	return cmd
}
func buildJobDeleteCmd ( ) * cobra . Command { vars := deleteJobVars { } cmd := & cobra . Command { Use : " " , Short : " " , Example : `
  Delete the "report-generator" job from the my-app application.
  /code $ copilot job delete --name report-generator --app my-app

  Delete the "report-generator" job from just the prod environment.
  /code $ copilot job delete --name report-generator --env prod

  Delete the "report-generator" job without confirmation prompt.
  /code $ copilot job delete --name report-generator --yes` , RunE : runCmdE ( func ( cmd * cobra . Command , args [ ] string ) error { opts , err := newDeleteJobOpts ( vars ) if err != nil { return err } if err := opts . Validate ( ) ; err != nil { return err } return opts . Ask ( ) } ) , } cmd . Flags ( ) . StringVarP ( & vars . appName , appFlag , appFlagShort , tryReadingAppName ( ) , appFlagDescription ) cmd . Flags ( ) . StringVarP ( & vars . name , nameFlag , nameFlagShort , " " , jobFlagDescription ) cmd . Flags ( ) . StringVarP ( & vars . envName , envFlag , envFlagShort , " " , envFlagDescription ) cmd . Flags ( ) . BoolVar ( & vars . skipConfirmation , yesFlag , false , yesFlagDescription ) return cmd }
buildJobDeleteCmd builds the command to delete job(s).
buildJobDeleteCmd builds the command to delete job ( s ) .