func (o *svcStopTaskOpts) Validate() error {
	if o.name != "" {
		if _, err := o.store.GetService(o.appName, o.name); err != nil {
			return err
		}
	}
	if o.envName != "" {
		_, err := o.store.GetEnvironment(o.appName, o.envName)
		if err != nil {
			return fmt.Errorf("get environment %s from config store: %w", o.envName, err)
		}
	}
	if !o.all && o.taskIDs == nil && len(o.taskIDs) == 0 {
		return fmt.Errorf(`any one of the following arguments are required "--all" or  "--tasks"`)
	}
	if o.all && o.taskIDs != nil && len(o.taskIDs) > 0 {
		return fmt.Errorf(`only one of "-all" or "--tasks" may be used`)
	}
	return nil
}
// Validate returns an error if the user inputs are invalid.
Validate returns an error if the user inputs are invalid.
// Validate returns an error if the user inputs are invalid .
func (o *svcStopTaskOpts) Validate() error {
	if o.name != "" {
		if _, err := o.store.GetService(o.appName, o.name); err != nil {
			return err
		}
	}
	if o.envName != "" {
		_, err := o.store.GetEnvironment(o.appName, o.envName)
		if err != nil {
			return fmt.Errorf("get environment %s from config store: %w", o.envName, err)
		}
	}
	if !o.all && o.taskIDs == nil && len(o.taskIDs) == 0 {
		return fmt.Errorf(`any one of the following arguments are required "--all" or  "--tasks"`)
	}
	if o.all && o.taskIDs != nil && len(o.taskIDs) > 0 {
		return fmt.Errorf(`only one of "-all" or "--tasks" may be used`)
	}
	return nil
}
func ( o * svcStopTaskOpts ) Validate ( ) error { if o . name != " " { if _ , err := o . store . GetService ( o . appName , o . name ) ; err != nil { return err } } if o . envName != " " { _ , err := o . store . GetEnvironment ( o . appName , o . envName ) if err != nil { return fmt . Errorf ( " " , o . envName , err ) } } if ! o . all && o . taskIDs == nil && len ( o . taskIDs ) == 0 { return fmt . Errorf ( `any one of the following arguments are required "--all" or  "--tasks"` ) } if o . all && o . taskIDs != nil && len ( o . taskIDs ) > 0 { return fmt . Errorf ( `only one of "-all" or "--tasks" may be used` ) } return nil }
Validate returns an error if the user inputs are invalid.
Validate returns an error if the user inputs are invalid .