// StackScriptDelete maps to the 'stackscript.delete' call.
//
// https://www.linode.com/api/stackscript/stackscript.delete
16251
func (c *Client) StackScriptDelete(ssID int) error {
	args := make(map[string]interface{})
	args["StackScriptID"] = ssID

	_, err := c.apiCall("stackscript.delete", args)
	if err != nil {
		return err
	}

	return nil
}
1041916
func (c *Client) StackScriptUpdate(ssID int, label *string, description *string,
	distIDList *string, isPublic *bool, revNote *string, script *string) error {

	args := make(map[string]interface{})
	args["StackScriptID"] = ssID
	args["Label"] = label
	args["Description"] = description
	args["DistributionIDList"] = distIDList
	args["rev_note"] = revNote
	args["script"] = script

	if isPublic != nil {
		if *isPublic == true {
			args["isPublic"] = 1
		} else {
			args["isPublic"] = 0
		}
	}

	_, err := c.apiCall("stackscript.update", args)
	if err != nil {
		return err
	}

	return nil
}
592034
func (m *RemoteReleaseModule) Delete(r *release.Release, req *services.UninstallReleaseRequest, env *environment.Environment) (string, []error) {
	deleteRequest := &rudderAPI.DeleteReleaseRequest{Release: r}
	resp, err := rudder.DeleteRelease(deleteRequest)

	errs := make([]error, 0)
	result := ""

	if err != nil {
		errs = append(errs, err)
	}
	if resp != nil {
		result = resp.Release.Manifest
	}
	return result, errs
}
539373
func (db *Storage) Delete(ctxt Context, val interface{}) error {
	ctxt = debugContext(ctxt)
	t, _, err := db.findType(val, "Delete")
	if err != nil {
		return err
	}

	var buf bytes.Buffer
	var args []interface{}
	rval := reflect.ValueOf(val).Elem()

	fmt.Fprintf(&buf, "delete from %q where ", t.name)
	sep := ""
	for _, col := range t.fields {
		if !col.key {
			continue
		}
		args = append(args, rval.FieldByIndex(col.index).Interface())
		fmt.Fprintf(&buf, "%s%q = ?", sep, col.name)
		sep = " and "
	}

	_, err = ctxt.Exec(buf.String(), args...)
	return err
}
957091
func (_m *Store) DeleteNode(ctx context.Context, node *types.Node) {
	_m.Called(ctx, node)
}
311645
func (mr *MockRenderedJobListArchiveMockRecorder) Delete() *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRenderedJobListArchive)(nil).Delete))
}
917842
func (c *Client) LinodeConfigDelete(linodeID int, configID int) error {
	args := make(map[string]interface{})
	args["LinodeID"] = linodeID
	args["ConfigID"] = configID

	_, err := c.apiCall("linode.config.delete", args)
	if err != nil {
		return err
	}

	return nil
}
718191
func ProjectDelete(p project.APIProject, c *cli.Context) error {
	options := options.Delete{
		RemoveVolume: c.Bool("v"),
	}
	if !c.Bool("force") {
		stoppedContainers, err := p.Containers(context.Background(), project.Filter{
			State: project.Stopped,
		}, c.Args()...)
		if err != nil {
			return cli.NewExitError(err.Error(), 1)
		}
		if len(stoppedContainers) == 0 {
			fmt.Println("No stopped containers")
			return nil
		}
		fmt.Printf("Going to remove %v\nAre you sure? [yN]\n", strings.Join(stoppedContainers, ", "))
		var answer string
		_, err = fmt.Scanln(&answer)
		if err != nil {
			return cli.NewExitError(err.Error(), 1)
		}
		if answer != "y" && answer != "Y" {
			return nil
		}
	}
	err := p.Delete(context.Background(), options, c.Args()...)
	if err != nil {
		return cli.NewExitError(err.Error(), 1)
	}
	return nil
}
973235
func (p *JsonPointer) Delete(document interface{}) (interface{}, error) {
	is := &implStruct{mode: "DEL", inDocument: document}
	p.implementation(is)
	return document, is.outError
}
392995
func (r *RuneBuffer) Delete() {
	if r.idx == len(r.buf) {
		return
	}
	r.buf = append(r.buf[:r.idx], r.buf[r.idx+1:]...)
}
980057
func (c *FakeClusterRoleBindings) Delete(name string, options *v1.DeleteOptions) error {
	_, err := c.Fake.
		Invokes(testing.NewRootDeleteAction(clusterrolebindingsResource, name), &authorization.ClusterRoleBinding{})
	return err
}
292550
func (c *PluginCatalog) Delete(ctx context.Context, name string, pluginType consts.PluginType) error {
	c.lock.Lock()
	defer c.lock.Unlock()

	// Check the name under which the plugin exists, but if it's unfound, don't return any error.
	pluginKey := pluginType.String() + "/" + name
	out, err := c.catalogView.Get(ctx, pluginKey)
	if err != nil || out == nil {
		pluginKey = name
	}

	return c.catalogView.Delete(ctx, pluginKey)
}
143910
func (t *AvailService) StackScripts() (*StackScriptsResponse, error) {
	u := &url.Values{}
	v := StackScriptsResponse{}
	if err := t.client.do("avail.stackscripts", u, &v.Response); err != nil {
		return nil, err
	}
	v.StackScripts = make([]StackScript, 5)
	if err := json.Unmarshal(v.RawData, &v.StackScripts); err != nil {
		return nil, err
	}
	return &v, nil
}
52207
func (c *Client) StackScriptList(ssID *int) ([]StackScript, error) {
	args := make(map[string]interface{})
	args["StackScriptID"] = ssID

	data, err := c.apiCall("stackscript.list", args)
	if err != nil {
		return nil, err
	}

	var ss []StackScript
	err = unmarshalMultiMap(data, &ss)
	if err != nil {
		return nil, err
	}

	return ss, nil
}
206415
func (g *Group) Delete(m Code, key Code) *Statement {
	s := Delete(m, key)
	g.items = append(g.items, s)
	return s
}
821649
func (self *DocumentBase) Delete() error {

	if self.Id.Valid() {

		self.SetDeleted(true)

		return self.Save()
	}

	return errors.New("Invalid object id")
}
118142
func (b *Bundle) Delete() error {
	work, werr := os.Readlink(filepath.Join(b.Path, "work"))
	err := atomicDelete(b.Path)
	if err == nil {
		if werr == nil {
			return atomicDelete(work)
		}
		return nil
	}
	// error removing the bundle path; still attempt removing work dir
	var err2 error
	if werr == nil {
		err2 = atomicDelete(work)
		if err2 == nil {
			return err
		}
	}
	return errors.Wrapf(err, "failed to remove both bundle and workdir locations: %v", err2)
}