// DeleteTargetHTTPProxy deletes the TargetHttpProxy by name.
321481
func (g *Cloud) DeleteTargetHTTPProxy(name string) error {
	ctx, cancel := cloud.ContextWithCallTimeout()
	defer cancel()

	mc := newTargetProxyMetricContext("delete")
	return mc.Observe(g.c.TargetHttpProxies().Delete(ctx, meta.GlobalKey(name)))
}
801663
func (s *AttachVolumeInput) SetTargetName(v string) *AttachVolumeInput {
	s.TargetName = &v
	return s
}
278604
func (mg *MailgunImpl) DeleteTemplate(ctx context.Context, name string) error {
	r := newHTTPRequest(generateApiUrl(mg, templatesEndpoint) + "/" + name)
	r.setClient(mg.Client())
	r.setBasicAuth(basicAuthUser, mg.APIKey())
	_, err := makeDeleteRequest(ctx, r)
	return err
}
249949
func (gce *Cloud) SetURLMapForTargetHTTPProxy(proxy *compute.TargetHttpProxy, urlMap *compute.UrlMap) error {
	op, err := gce.service.TargetHttpProxies.SetUrlMap(gce.projectID, proxy.Name, &compute.UrlMapReference{UrlMap: urlMap.SelfLink}).Do()
	if err != nil {
		return err
	}
	return gce.waitForGlobalOp(op)
}
1269816
func (i *Instance) updateTargetNetworks(set provider.Ipset, old, new []string) error {

	deleteMap := map[string]bool{}
	for _, net := range old {
		deleteMap[net] = true
	}

	for _, net := range new {
		if _, ok := deleteMap[net]; ok {
			deleteMap[net] = false
			continue
		}
		if err := i.addToIPset(set, net); err != nil {
			return fmt.Errorf("unable to update target set: %s", err)
		}
	}

	for net, delete := range deleteMap {
		if delete {
			if err := i.delFromIPset(set, net); err != nil {
				zap.L().Debug("unable to remove network from set", zap.Error(err))
			}
		}
	}
	return nil
}
864669
func (s *CreateRouteOutput) SetTarget(v string) *CreateRouteOutput {
	s.Target = &v
	return s
}
1194556
func (s *CreateStorediSCSIVolumeInput) SetTargetName(v string) *CreateStorediSCSIVolumeInput {
	s.TargetName = &v
	return s
}
1292093
func (s *CachediSCSIVolume) SetTargetName(v string) *CachediSCSIVolume {
	s.TargetName = &v
	return s
}
1248853
func (s *LoggingEnabled) SetTargetPrefix(v string) *LoggingEnabled {
	s.TargetPrefix = &v
	return s
}
805114
func (_class HostPatchClass) Destroy(sessionID SessionRef, self HostPatchRef) (_err error) {
	_method := "host_patch.destroy"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertHostPatchRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_, _err =  _class.client.APICall(_method, _sessionIDArg, _selfArg)
	return
}
21940
func (s *SecurityProfileTargetMapping) SetTarget(v *SecurityProfileTarget) *SecurityProfileTargetMapping {
	s.Target = v
	return s
}
139333
func (g *Cloud) DeleteTargetPool(name, region string) error {
	ctx, cancel := cloud.ContextWithCallTimeout()
	defer cancel()

	mc := newTargetPoolMetricContext("delete", region)
	return mc.Observe(g.c.TargetPools().Delete(ctx, meta.RegionalKey(name, region)))
}
843834
func (l *State) RemoveProxy(id string) (*ManagedProxy, error) {
	l.Lock()
	defer l.Unlock()

	p := l.managedProxies[id]
	if p == nil {
		return nil, fmt.Errorf("Proxy %s does not exist", id)
	}
	delete(l.managedProxies, id)

	// Notify watchers of the existing proxy config that it's changed.
	close(p.WatchCh)

	// Notify
	for ch := range l.managedProxyHandlers {
		// Do not block
		select {
		case ch <- struct{}{}:
		default:
		}
	}

	// No need to trigger sync as proxy state is local only.
	return p, nil
}
566477
func (b *BigIP) DeleteHttpProfile(name string) error {
	return b.delete(uriLtm, uriProfile, uriHttp, name)
}
924527
func SetProxy(proxy func(*http.Request) (*url.URL, error)) error {
	return std.SetProxy(proxy)
}
1196508
func (c *Client) RemoveProxy() *Client {
	transport, err := c.getTransport()
	if err != nil {
		c.Log.Printf("ERROR %v", err)
		return c
	}
	c.proxyURL = nil
	transport.Proxy = nil
	return c
}
60637
func (c *Client) RemoveTarget(ctx context.Context, id influxdb.ID) error {
	err := c.db.Update(func(tx *bolt.Tx) error {
		_, pe := c.findTargetByID(ctx, tx, id)
		if pe != nil {
			return pe
		}
		encID, err := id.Encode()
		if err != nil {
			return &influxdb.Error{
				Code: influxdb.EInvalid,
				Err:  err,
			}
		}
		if err = tx.Bucket(scraperBucket).Delete(encID); err != nil {
			return nil
		}
		return c.deleteUserResourceMappings(ctx, tx, influxdb.UserResourceMappingFilter{
			ResourceID:   id,
			ResourceType: influxdb.ScraperResourceType,
		})
	})
	if err != nil {
		return &influxdb.Error{
			Err: err,
			Op:  OpPrefix + influxdb.OpRemoveTarget,
		}
	}
	return nil
}