// StatusIsNot returns a StacktracePred which will cause stacktraces to be logged
// for any status *not* in the given list.
975693
func StatusIsNot(statuses ...int) StacktracePred {
	return func(status int) bool {
		for _, s := range statuses {
			if status == s {
				return false
			}
		}
		return true
	}
}
242186
func NotFound(w http.ResponseWriter, r *http.Request) {
	handlerMu.RLock()
	f, ok := handlerMap[http.StatusNotFound]
	handlerMu.RUnlock()
	if ok {
		f.ServeHTTP(w, r)
	} else {
		defaultNotFound(w, r)
	}
}
869383
func (l *ListCheckRunsOptions) GetStatus() string {
	if l == nil || l.Status == nil {
		return ""
	}
	return *l.Status
}
1257910
func IsNotFoundError(err error) bool {
	switch err.(type) {
	case NetworkNotFoundError:
		return true
	case EndpointNotFoundError:
		return true
	case NamespaceNotFoundError:
		return true
	case LoadBalancerNotFoundError:
		return true
	}
	return false
}
21424
func (f *FilterOp) Not(filters ...*FilterOp) *FilterOp {
	if len(f.NotFilters) == 0 {
		f.NotFilters = filters[:]

	} else {
		f.NotFilters = append(f.NotFilters, filters...)
	}

	return f
}
527613
func NewNotFound(kind, name string) error {
	return &StatusError{unversioned.Status{
		Status: unversioned.StatusFailure,
		Code:   http.StatusNotFound,
		Reason: unversioned.StatusReasonNotFound,
		Details: &unversioned.StatusDetails{
			Kind: kind,
			Name: name,
		},
		Message: fmt.Sprintf("%s %q not found", kind, name),
	}}
}
1355717
func (ls *LState) Status(th *LState) string {
	status := "suspended"
	if th.Dead {
		status = "dead"
	} else if ls.G.CurrentThread == th {
		status = "running"
	} else if ls.Parent == th {
		status = "normal"
	}
	return status
}
206638
func (r *Repo) errorIfNotReady() error {
	switch r.status {
	case RepoReady:
		return nil
	case RepoNoConfig:
		return ErrNoConfig
	default:
		return NotReadyError{r.err}
	}
}
1242506
func (a *Assertion) NotContains(container, item interface{}, msg ...interface{}) *Assertion {
	NotContains(a.t, container, item, msg...)
	return a
}
1124484
func NotFound(w http.ResponseWriter, response interface{}) {
	Respond(w, http.StatusNotFound, response)
}
924838
func (resp *Response) BodyNotNil(msg ...interface{}) *Response {
	resp.assertion.NotNil(resp.body, msg...)
	return resp
}
1102607
func NotFound(message string, args ...interface{}) Error {
	if message == "" {
		message = "Not found"
	}
	return New(http.StatusNotFound, fmt.Sprintf(message, args...))
}
579012
func Not(r ReqCondition) ReqConditionFunc {
	return func(req *http.Request, ctx *ProxyCtx) bool {
		return !r.HandleReq(req, ctx)
	}
}
1010779
func not_in(needle int, haystack []int) bool {
	for _, straw := range haystack {
		if needle == straw {
			return false
		}
	}
	return true
}
1322658
func Status(serviceName string,
	serviceDescription string,
	redact bool,
	logger *logrus.Logger) error {

	awsSession := spartaAWS.NewSession(logger)
	cfSvc := cloudformation.New(awsSession)

	params := &cloudformation.DescribeStacksInput{
		StackName: aws.String(serviceName),
	}
	describeStacksResponse, describeStacksResponseErr := cfSvc.DescribeStacks(params)

	if describeStacksResponseErr != nil {
		if strings.Contains(describeStacksResponseErr.Error(), "does not exist") {
			logger.WithField("Region", *awsSession.Config.Region).Info("Stack does not exist")
			return nil
		}
		return describeStacksResponseErr
	}
	if len(describeStacksResponse.Stacks) > 1 {
		return errors.Errorf("More than 1 stack returned for %s. Count: %d",
			serviceName,
			len(describeStacksResponse.Stacks))
	}

	// What's the current accountID?
	redactor := func(stringValue string) string {
		return stringValue
	}
	if redact {
		input := &sts.GetCallerIdentityInput{}
		stsSvc := sts.New(awsSession)
		identityResponse, identityResponseErr := stsSvc.GetCallerIdentity(input)
		if identityResponseErr != nil {
			return identityResponseErr
		}
		redactedValue := strings.Repeat("*", len(*identityResponse.Account))
		redactor = func(stringValue string) string {
			return strings.Replace(stringValue,
				*identityResponse.Account,
				redactedValue,
				-1)
		}
	}

	// Report on what's up with the stack...
	logSectionHeader("Stack Summary", dividerLength, logger)
	stackInfo := describeStacksResponse.Stacks[0]
	logger.WithField("Id", redactor(*stackInfo.StackId)).Info("StackId")
	logger.WithField("Description", redactor(*stackInfo.Description)).Info("Description")
	logger.WithField("State", *stackInfo.StackStatus).Info("Status")
	if stackInfo.StackStatusReason != nil {
		logger.WithField("Reason", *stackInfo.StackStatusReason).Info("Reason")
	}
	logger.WithField("Time", stackInfo.CreationTime.UTC().String()).Info("Created")
	if stackInfo.LastUpdatedTime != nil {
		logger.WithField("Time", stackInfo.LastUpdatedTime.UTC().String()).Info("Last Update")
	}
	if stackInfo.DeletionTime != nil {
		logger.WithField("Time", stackInfo.DeletionTime.UTC().String()).Info("Deleted")
	}

	logger.Info()
	if len(stackInfo.Parameters) != 0 {
		logSectionHeader("Parameters", dividerLength, logger)
		for _, eachParam := range stackInfo.Parameters {
			logger.WithField("Value",
				redactor(*eachParam.ParameterValue)).Info(*eachParam.ParameterKey)
		}
		logger.Info()
	}
	if len(stackInfo.Tags) != 0 {
		logSectionHeader("Tags", dividerLength, logger)
		for _, eachTag := range stackInfo.Tags {
			logger.WithField("Value",
				redactor(*eachTag.Value)).Info(*eachTag.Key)
		}
		logger.Info()
	}
	if len(stackInfo.Outputs) != 0 {
		logSectionHeader("Outputs", dividerLength, logger)
		for _, eachOutput := range stackInfo.Outputs {
			statement := logger.WithField("Value",
				redactor(*eachOutput.OutputValue))
			if eachOutput.ExportName != nil {
				statement.WithField("ExportName", *eachOutput.ExportName)
			}
			statement.Info(*eachOutput.OutputKey)
		}
		logger.Info()
	}
	return nil
}
7822
func (info *RestoreInfo) Status() (RestoreStatus, error) {
	restoreInfo, closer := info.st.db().GetCollection(restoreInfoC)
	defer closer()

	var doc struct {
		Status RestoreStatus `bson:"status"`
	}
	err := restoreInfo.FindId(currentRestoreId).One(&doc)
	switch errors.Cause(err) {
	case nil:
	case mgo.ErrNotFound:
		return RestoreNotActive, nil
	default:
		return "", errors.Annotate(err, "cannot read restore info")
	}

	if err := doc.Status.Validate(); err != nil {
		return "", errors.Trace(err)
	}
	return doc.Status, nil
}
125676
func NewMethodNotSupported(qualifiedResource schema.GroupResource, action string) *StatusError {
	return &StatusError{metav1.Status{
		Status: metav1.StatusFailure,
		Code:   http.StatusMethodNotAllowed,
		Reason: metav1.StatusReasonMethodNotAllowed,
		Details: &metav1.StatusDetails{
			Group: qualifiedResource.Group,
			Kind:  qualifiedResource.Resource,
		},
		Message: fmt.Sprintf("%s is not supported on resources of kind %q", action, qualifiedResource.String()),
	}}
}