// DeleteProduct
342333
func (s *productService) Delete(ctx context.Context, req *productpb.DeleteRequest) (*productpb.Empty, error) {

	if err := validation.Validate(req); err != nil {
		return nil, err
	}

	p := &product{
		Product: productpb.Product{
			Id: req.Id,
		},
	}

	unlock, err := locker.Handler().TryLock(p, time.Second)
	if err != nil {
		return nil, err
	}
	defer unlock()

	// remove product skus
	//
	//skus, err := sku.Service().GetProductSkus(ctx, &sku.GetProductSkusRequest{Id: product.GetId()})
	//
	//if err != nil {
	//	return nil, err
	//}
	//
	//// delete skus with best effort
	//for _, v := range skus {
	//	sku.Service().Delete(ctx, &skupb.DeleteRequest{
	//		Id: v.GetId(),
	//	})
	//}

	return &productpb.Empty{}, storage.Handler().Remove(p)

}
185500
func (t *Txn) DeletePrefix(prefix []byte) bool {
	newRoot, numDeletions := t.deletePrefix(nil, t.root, prefix)
	if newRoot != nil {
		t.root = newRoot
		t.size = t.size - numDeletions
		return true
	}
	return false

}
1279784
func (s *ListPortfoliosForProductInput) SetProductId(v string) *ListPortfoliosForProductInput {
	s.ProductId = &v
	return s
}
1303654
func (s *AwsSecurityFindingFilters) SetProductName(v []*StringFilter) *AwsSecurityFindingFilters {
	s.ProductName = v
	return s
}
1316833
func (products *Products) FindProduct(id string) (*Product, error) {
	var product *Product
	var productFound bool
	for _, product = range products.Products.Items {
		if product.ProductID == id {
			productFound = true
			break
		}
	}

	if !productFound {
		return nil, fmt.Errorf("Unable to find product: \"%s\"", id)
	}

	return product, nil
}
486945
func (s *ListLaunchPathsInput) SetProductId(v string) *ListLaunchPathsInput {
	s.ProductId = &v
	return s
}
921748
func (r Billing_Invoice_Item) GetProduct() (resp datatypes.Product_Item, err error) {
	err = r.Session.DoRequest("SoftLayer_Billing_Invoice_Item", "getProduct", nil, &r.Options, &resp)
	return
}
590180
func (s *Severity) SetProduct(v float64) *Severity {
	s.Product = &v
	return s
}
1290034
func (s *ModelPackageContainerDefinition) SetProductId(v string) *ModelPackageContainerDefinition {
	s.ProductId = &v
	return s
}
951131
func (s *ProvisionedProductDetail) SetProductId(v string) *ProvisionedProductDetail {
	s.ProductId = &v
	return s
}
425790
func (a *AuthWithRoles) DeleteProxy(name string) error {
	if err := a.action(defaults.Namespace, services.KindProxy, services.VerbDelete); err != nil {
		return trace.Wrap(err)
	}
	return a.authServer.DeleteProxy(name)
}
432523
func (c *Client) DeleteAllProxies() error {
	_, err := c.Delete(c.Endpoint("proxies"))
	if err != nil {
		return trace.Wrap(err)
	}
	return nil
}
695773
func (p pfx) Delete(ctx context.Context, path string) error {
	return p.fs.Delete(ctx, p.addPrefix(path))
}
1147559
func (r *ChannelService) Delete(appId string, label string) *ChannelDeleteCall {
	c := &ChannelDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.appId = appId
	c.label = label
	return c
}
549101
func (s *FailedServiceActionAssociation) SetProductId(v string) *FailedServiceActionAssociation {
	s.ProductId = &v
	return s
}
963241
func (m *Manager) Delete(username string, label string) (err error) {
	_, err = m.getCollection().RemoveAll(bson.M{"username": username, "label": label})
	return
}
348553
func (s *DescribeReservedDBInstancesInput) SetProductDescription(v string) *DescribeReservedDBInstancesInput {
	s.ProductDescription = &v
	return s
}