// StatusCodeColor is the ANSI color for appropriately logging http status code to a terminal.
972027
func (p *LogFormatterParams) StatusCodeColor() string {
	code := p.StatusCode

	switch {
	case code >= http.StatusOK && code < http.StatusMultipleChoices:
		return green
	case code >= http.StatusMultipleChoices && code < http.StatusBadRequest:
		return white
	case code >= http.StatusBadRequest && code < http.StatusInternalServerError:
		return yellow
	default:
		return red
	}
}
21524
func (o *GetOrderDefault) WithStatusCode(code int) *GetOrderDefault {
	o._statusCode = code
	return o
}
385034
func Status(r *http.Request, status int) {
	*r = *r.WithContext(context.WithValue(r.Context(), StatusCtxKey, status))
}
294828
func (o *GetItemsDefault) WithStatusCode(code int) *GetItemsDefault {
	o._statusCode = code
	return o
}
1353762
func FromStatusCode(statusCode int, format string, args ...interface{}) error {
	msg := fmt.Sprintf(format, args...)
	switch statusCode {
	case http.StatusNotFound:
		return NewNotFoundErrorFromString(msg)
	case http.StatusBadRequest:
		return NewBadParameterErrorFromString(msg)
	case http.StatusConflict:
		return NewVersionConflictError(msg)
	case http.StatusUnauthorized:
		return NewUnauthorizedError(msg)
	case http.StatusForbidden:
		return NewForbiddenError(msg)
	default:
		return NewInternalErrorFromString(msg)
	}
}
999438
func (p *ProxyWriter) StatusCode() int {
	if p.code == 0 {
		// per contract standard lib will set this to http.StatusOK if not set
		// by user, here we avoid the confusion by mirroring this logic
		return http.StatusOK
	}
	return p.code
}
996416
func StatusCode(err error) int {
	if err == nil {
		return http.StatusOK
	}
	if val, ok := errors.TagValueIn(statusCodeTagKey, err); ok {
		return val.(int)
	}
	return 0
}
968251
func statusText(code int) string {
	var buf bytes.Buffer
	bw := bufio.NewWriter(&buf)
	writeStatusText(bw, code)
	bw.Flush()
	return buf.String()
}
1048396
func (s *CreateCollectionOutput) SetStatusCode(v int64) *CreateCollectionOutput {
	s.StatusCode = &v
	return s
}
81077
func (s *InvokeOutput) SetStatusCode(v int64) *InvokeOutput {
	s.StatusCode = &v
	return s
}
756465
func (s *ScalingPlan) SetStatusCode(v string) *ScalingPlan {
	s.StatusCode = &v
	return s
}
313750
func (o *ListTasksDefault) WithStatusCode(code int) *ListTasksDefault {
	o._statusCode = code
	return o
}
474978
func (s *GetObjectOutput) SetStatusCode(v int64) *GetObjectOutput {
	s.StatusCode = &v
	return s
}
391527
func (o *AddOneDefault) WithStatusCode(code int) *AddOneDefault {
	o._statusCode = code
	return o
}
562235
func (s *RedirectActionConfig) SetStatusCode(v string) *RedirectActionConfig {
	s.StatusCode = &v
	return s
}
886920
func (o *GetOrdersForItemDefault) WithStatusCode(code int) *GetOrdersForItemDefault {
	o._statusCode = code
	return o
}
519930
func (o *CreateTaskDefault) WithStatusCode(code int) *CreateTaskDefault {
	o._statusCode = code
	return o
}