// WithStatusCode adds the status to the create user default response
544646
func (o *CreateUserDefault) WithStatusCode(code int) *CreateUserDefault {
	o._statusCode = code
	return o
}
1259880
func (rb *ResponseBuffer) StatusCodeWriter(w http.ResponseWriter) http.ResponseWriter {
	return forcedStatusCodeWriter{w, rb}
}
966538
func (s *Activity) SetStatusCode(v string) *Activity {
	s.StatusCode = &v
	return s
}
262426
func (r *httpVPackResponseElement) StatusCode() int {
	if r.statusCode == nil {
		statusCode := 200
		// Look for "error" field
		if errorFieldSlice, _ := r.slice.Get("error"); !errorFieldSlice.IsNone() {
			if hasError, err := errorFieldSlice.GetBool(); err == nil && hasError {
				// We have an error, look for code field
				statusCode = 500
				if codeFieldSlice, _ := r.slice.Get("code"); !codeFieldSlice.IsNone() {
					if code, err := codeFieldSlice.GetInt(); err == nil {
						statusCode = int(code)
					}
				}
			}
		}
		r.statusCode = &statusCode
	}
	return *r.statusCode
}
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
}
861481
func NewResponseWithStatus(s string, c int) *http.Response {
	resp := NewResponse()
	resp.Status = s
	resp.StatusCode = c
	return resp
}
387510
func (r *Response) StatusCode() int {
	if r.statusCode <= 0 {
		r.statusCode = 200
	}
	return r.statusCode
}
539566
func (s *DocumentationPartLocation) SetStatusCode(v string) *DocumentationPartLocation {
	s.StatusCode = &v
	return s
}
671579
func (s *ListJobsInput) SetStatuscode(v string) *ListJobsInput {
	s.Statuscode = &v
	return s
}
135182
func (o *GetAuthCallbackDefault) WithStatusCode(code int) *GetAuthCallbackDefault {
	o._statusCode = code
	return o
}
485586
func (o *GetIDDefault) WithStatusCode(code int) *GetIDDefault {
	o._statusCode = code
	return o
}
233966
func (e *merryErr) WithHTTPCode(code int) Error {
	if e == nil {
		return nil
	}
	return e.WithValue(httpCode, code)
}
627305
func (s *IntegrationResponse) SetStatusCode(v string) *IntegrationResponse {
	s.StatusCode = &v
	return s
}
644729
func (s *UpdateMethodResponseInput) SetStatusCode(v string) *UpdateMethodResponseInput {
	s.StatusCode = &v
	return s
}
1034773
func RespondWithStatusCode(resp *Response, req *Request, code int) (*Response, error) {
	ret := &Response{
		Data: map[string]interface{}{
			HTTPContentType: "application/json",
			HTTPStatusCode:  code,
		},
	}

	if resp != nil {
		httpResp := LogicalResponseToHTTPResponse(resp)

		if req != nil {
			httpResp.RequestID = req.ID
		}

		body, err := json.Marshal(httpResp)
		if err != nil {
			return nil, err
		}

		// We default to string here so that the value is HMAC'd via audit.
		// Since this function is always marshaling to JSON, this is
		// appropriate.
		ret.Data[HTTPRawBody] = string(body)
	}

	return ret, nil
}
956907
func (s *MetricDataResult) SetStatusCode(v string) *MetricDataResult {
	s.StatusCode = &v
	return s
}
886920
func (o *GetOrdersForItemDefault) WithStatusCode(code int) *GetOrdersForItemDefault {
	o._statusCode = code
	return o
}