// newStatusCodeRecoder returns an initialized statusCodeRecoder.
430151
func newStatusCodeRecoder(rw http.ResponseWriter, status int) statusCodeRecoder {
	recorder := &statusCodeWithoutCloseNotify{rw, status}
	if _, ok := rw.(http.CloseNotifier); ok {
		return &statusCodeWithCloseNotify{recorder}
	}
	return recorder
}
1356298
func (s *PutGatewayResponseInput) SetStatusCode(v string) *PutGatewayResponseInput {
	s.StatusCode = &v
	return s
}
1232706
func (r Response) StatusCode() int {
	if 0 == r.statusCode {
		// no status code has been written yet; assume OK
		return http.StatusOK
	}
	return r.statusCode
}
1336976
func (s *JobDescription) SetStatusCode(v string) *JobDescription {
	s.StatusCode = &v
	return s
}
582418
func (s *EndpointMessageResult) SetStatusCode(v int64) *EndpointMessageResult {
	s.StatusCode = &v
	return s
}
365336
func (s *BuildNotDeleted) SetStatusCode(v string) *BuildNotDeleted {
	s.StatusCode = &v
	return s
}
844230
func (r *Response) StatusCode() int {
	if r.RawResponse == nil {
		return 0
	}

	return r.RawResponse.StatusCode
}
327256
func (s *UpdateGatewayResponseOutput) SetStatusCode(v string) *UpdateGatewayResponseOutput {
	s.StatusCode = &v
	return s
}
966538
func (s *Activity) SetStatusCode(v string) *Activity {
	s.StatusCode = &v
	return s
}
810600
func (s *DeleteCollectionOutput) SetStatusCode(v int64) *DeleteCollectionOutput {
	s.StatusCode = &v
	return s
}
45406
func reportStatus(t status.Type, op Op, msg string) error {
	if !op.reportsStatus {
		log.Printf("Status '%s' not reported for operation '%v' (by design)", t, op.name)
		return nil
	}
	dir := handlerEnv.HandlerEnvironment.StatusFolder
	m := msg
	if m == "" {
		m = op.name
		if t == status.StatusSuccess {
			m += " succeeded"
		}
	}
	if t == status.StatusError {
		m = fmt.Sprintf("%s failed: %s", op.name, m)
	}
	s := status.NewStatus(t, op.name, m)
	return s.Save(dir, seqNum)
}
1360784
func NewServerCodec(conn io.ReadWriteCloser) core.ServerCodec {
	return NewCodec(true, true, conn)
}
756465
func (s *ScalingPlan) SetStatusCode(v string) *ScalingPlan {
	s.StatusCode = &v
	return s
}
9235
func NewStatusCheck(Name string, Tags []string) *StatusCheck {
	return &StatusCheck{InterMetric{Name: Name, Tags: Tags}}
}
155959
func NewServerCodecContext(ctx context.Context, conn io.ReadWriteCloser, srv *rpc.Server) rpc.ServerCodec {
	codec := NewServerCodec(conn, srv)
	codec.(*serverCodec).ctx = ctx
	return codec
}
1233592
func GetStatusCode(err error) (code int, ok bool) {
	e, ok := err.(arangoError)
	if !ok || e.statusCode == 0 {
		return 0, false
	}
	return e.statusCode, true
}
997145
func GetStatusCode(err error, default_code int) int {
	rv := errors.GetData(err, statusCode)
	sc, ok := rv.(int)
	if ok {
		return sc
	}
	return default_code
}