// IsNotImplemented returns whether this error is of NotImplementedError type
347670
func IsNotImplemented(e error) bool {
	type ni interface {
		IsNotImplementedError() bool
	}
	err, ok := Unwrap(e).(ni)
	return ok && err.IsNotImplementedError()
}
1291308
func (t *TopologyChange) isEmpty() bool {
	return len(t.NodeUpdates) == 0 && len(t.ChannelEdgeUpdates) == 0 &&
		len(t.ClosedChannels) == 0
}
706880
func IsUnavailable(err error) bool {
	_, ok := getImplementer(err).(ErrUnavailable)
	return ok
}
381469
func (sd *SignedData) IsDetached() bool {
	return sd.psd.EncapContentInfo.EContent.Bytes == nil
}
1040971
func (s *CatalogImportStatus) SetImportCompleted(v bool) *CatalogImportStatus {
	s.ImportCompleted = &v
	return s
}
1324178
func IsNotFound(err error) bool {
	switch {
	case err == nil:
		return false
	case strings.Contains(err.Error(), "does not exist"):
		return true
	case strings.Contains(err.Error(), "not found"):
		return true
	default:
		return false
	}
}
1176079
func IsEnded(s pb.Status) bool {
	return s&pb.Status_ENDED_MASK == pb.Status_ENDED_MASK
}
1261794
func IsMigrationComplete(db *bolt.DB, id string) (bool, error) {
	complete := false
	if err := db.View(func(tx *bolt.Tx) error {
		migration := tx.Bucket(SchemaVersionBucket).Get([]byte(id))
		if migration != nil {
			complete = true
		}
		return nil
	}); err != nil {
		return true, err
	}

	return complete, nil
}
919710
func (r Range) IsEmpty() bool {
	if r.Start == nil || r.End == nil {
		return false
	}
	return !r.Start.Less(r.End)
}
901032
func NotImplemented(message string) Responder {
	return &errorResp{http.StatusNotImplemented, message, make(http.Header)}
}
967970
func (p *Projection) IsEmpty() bool {
	return p.Binding == "" && p.Alias == "" && p.OP == lexer.ItemError && p.Modifier == lexer.ItemError
}
553350
func IsNotRegisteredError(err error) bool {
	if err == nil {
		return false
	}
	_, ok := err.(*notRegisteredErr)
	return ok
}
1213797
func notImplementedHandler(ctx json.Context, req *emptyArg) (*emptyArg, error) {
	return nil, errors.New("handler not implemented")
}
419530
func (i *ImportRestriction) isAllowed(packageToCheck string) bool {
	// if its not under our root, then its a built-in.  Everything else is under
	// github.com/openshift/origin or github.com/openshift/origin/vendor
	if !strings.HasPrefix(packageToCheck, rootPackage) {
		return true
	}
	if i.isIncludedInRestrictedPackages(packageToCheck) {
		return true
	}

	for _, forbiddenPackageRoot := range i.ForbiddenImportPackageRoots {
		if strings.HasPrefix(forbiddenPackageRoot, "vendor") {
			forbiddenPackageRoot = rootPackage + "/" + forbiddenPackageRoot
		}
		if strings.HasPrefix(packageToCheck, forbiddenPackageRoot) {
			return false
		}
	}
	for _, allowedPackage := range i.AllowedImportPackages {
		if strings.HasPrefix(allowedPackage, "vendor") {
			allowedPackage = rootPackage + "/" + allowedPackage
		}
		if packageToCheck == allowedPackage {
			return true
		}
	}
	for _, allowedPackageRoot := range i.AllowedImportPackageRoots {
		if strings.HasPrefix(allowedPackageRoot, "vendor") {
			allowedPackageRoot = rootPackage + "/" + allowedPackageRoot
		}
		if strings.HasPrefix(packageToCheck, allowedPackageRoot) {
			return true
		}
	}

	return false
}
1324141
func (d *BillDetail) IsContractEnded(t time.Time) bool {
	return d.ContractEndAt != nil && d.ContractEndAt.Before(t)
}
19256
func ignoreNotImplementedObjectResources(req *http.Request) bool {
	for name := range req.URL.Query() {
		// Enable GetObjectACL and GetObjectTagging dummy calls specifically.
		if (name == "acl" || name == "tagging") && req.Method == http.MethodGet {
			return false
		}
		if notimplementedObjectResourceNames[name] {
			return true
		}
	}
	return false
}
1339038
func (o *operationNotSupportedCache) isSupported(key operationKey) bool {
	o.lock.RLock()
	defer o.lock.RUnlock()
	return !o.m[key]
}