// StatusCode returns the http status code associated with the underlying error type
425268
func (e *Error) StatusCode() int {
	code, ok := errorTypeToStatusCodeMap[e.Type]
	if !ok || code == 0 {
		return 500
	}

	return code
}
1139245
func errorStatus(err error) uint32 {
	if x, ok := err.(*Status); ok {
		return x.Code
	}

	switch {
	case os.IsNotExist(err):
		return StatusNoSuchFileOrDir
	case os.IsExist(err):
		return StatusFileExists
	case os.IsPermission(err):
		return StatusOperationNotPermitted
	}

	return StatusGenericError
}
732871
func (s *DeleteIntegrationResponseInput) SetStatusCode(v string) *DeleteIntegrationResponseInput {
	s.StatusCode = &v
	return s
}
973051
func ErrorCode(err error) string {
	if err == nil {
		return ""
	}

	e, ok := err.(*Error)
	if !ok {
		return EInternal
	}

	if e == nil {
		return ""
	}

	if e.Code != "" {
		return e.Code
	}

	if e.Err != nil {
		return ErrorCode(e.Err)
	}

	return EInternal
}
1048396
func (s *CreateCollectionOutput) SetStatusCode(v int64) *CreateCollectionOutput {
	s.StatusCode = &v
	return s
}
947483
func (e JSONCliError) ExitCode() int {
	if e.resp == nil {
		return 1
	}
	code := e.resp.HTTP.StatusCode
	if code >= 100 && code < 200 {
		return 10
	} else if code >= 200 && code < 300 {
		return 20
	} else if code >= 300 && code < 400 {
		return 30
	} else if code >= 400 && code < 500 {
		return 40
	} else if code >= 500 && code < 600 {
		return 50
	}
	return 2
}
720965
func (s *PutIntegrationResponseInput) SetStatusCode(v string) *PutIntegrationResponseInput {
	s.StatusCode = &v
	return s
}
482252
func (o *FindTodosDefault) WithStatusCode(code int) *FindTodosDefault {
	o._statusCode = code
	return o
}
1199806
func (o Options) StatusCode() int {
	if o.recorder != nil {
		return o.recorder.Status()
	}

	return *o.statusCode
}
282320
func statusCode(code int) string {
	if code >= 100 {
		switch {
		case code < 200:
			return statusCodeWithTable(code-100, statusCode100[:])
		case code < 300:
			return statusCodeWithTable(code-200, statusCode200[:])
		case code < 400:
			return statusCodeWithTable(code-300, statusCode300[:])
		case code < 500:
			return statusCodeWithTable(code-400, statusCode400[:])
		case code < 600:
			return statusCodeWithTable(code-500, statusCode500[:])
		}
	}
	return strconv.Itoa(code)
}
365336
func (s *BuildNotDeleted) SetStatusCode(v string) *BuildNotDeleted {
	s.StatusCode = &v
	return s
}
671579
func (s *ListJobsInput) SetStatuscode(v string) *ListJobsInput {
	s.Statuscode = &v
	return s
}
1027818
func StatusCodeTag(code int) errors.TagValue {
	return errors.TagValue{Key: statusCodeTagKey, Value: code}
}
10113
func StatusCodeIs(status int) ResponseCondition {
	return func(res *http.Response) error {
		if res.StatusCode != status {
			return fmt.Errorf("got status code %d, wanted %d", res.StatusCode, status)
		}
		return nil
	}
}
539566
func (s *DocumentationPartLocation) SetStatusCode(v string) *DocumentationPartLocation {
	s.StatusCode = &v
	return s
}
865117
func (s *EventItemResponse) SetStatusCode(v int64) *EventItemResponse {
	s.StatusCode = &v
	return s
}
1025494
func GetStatusCode(o dhcp6.Options) (*StatusCode, error) {
	v, err := o.GetOne(dhcp6.OptionStatusCode)
	if err != nil {
		return nil, err
	}

	s := new(StatusCode)
	err = s.UnmarshalBinary(v)
	return s, err
}