// WithRequestID returns a new context with a request ID as a value.
344601
func WithRequestID(ctx context.Context, reqid string) context.Context {
	return context.WithValue(ctx, RequestIDContextKey, reqid)
}
1268443
func PrefixRequestID(h http.Handler) http.Handler {
	return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		ctx := r.Context()

		if l, ok := logger.FromContext(ctx); ok {
			if l, ok := l.(log15.Logger); ok {
				ctx = logger.WithLogger(ctx, l.New("request_id", httpx.RequestID(ctx)))
			}
		}

		h.ServeHTTP(w, r.WithContext(ctx))
	})
}
1216135
func (o *GetEndpointIDHealthzParams) WithID(id string) *GetEndpointIDHealthzParams {
	o.SetID(id)
	return o
}
746450
func (o *UploadTaskFileParams) WithID(id int64) *UploadTaskFileParams {
	o.SetID(id)
	return o
}
527744
func BackgroundWithID(ctx context.Context) context.Context {
	id := ctx.Value(RequestIDContextKey)
	ctx = context.Background()
	if id == nil {
		return ctx
	}
	return WithRequestID(ctx, id.(string))
}
832124
func (r *Request) WithContext(ctx context.Context) *Request {
	if ctx == nil {
		panic("nil context")
	}
	r2 := new(Request)
	*r2 = *r
	r2.ctx = ctx
	r2.HTTPRequest = r2.HTTPRequest.WithContext(ctx)
	return r2
}
546830
func (s *PurchaseOfferingInput) SetRequestId(v string) *PurchaseOfferingInput {
	s.RequestId = &v
	return s
}
562560
func (o *PostLookupsIDParams) WithID(id string) *PostLookupsIDParams {
	o.ID = id
	return o
}
644043
func SetContextRequestID(ctx context.Context, reqID string) context.Context {
	return context.WithValue(ctx, reqIDKey, reqID)
}
702154
func (s *MessageBody) SetRequestID(v string) *MessageBody {
	s.RequestID = &v
	return s
}
1039254
func (s *MessageResponse) SetRequestId(v string) *MessageResponse {
	s.RequestId = &v
	return s
}
263891
func (s *DescribeEventsInput) SetRequestId(v string) *DescribeEventsInput {
	s.RequestId = &v
	return s
}
508109
func (s *DeleteGroupOutput) SetRequestId(v string) *DeleteGroupOutput {
	s.RequestId = &v
	return s
}
74899
func GetRequestID(req *http.Request) string {
	return req.Header.Get(common.RequestHeaderKey)
}
646868
func (r *Resource) WithID(id string) *Resource {
	r.u.Path += "/id:" + id
	return r
}
320131
func (s *DeleteUserOutput) SetRequestId(v string) *DeleteUserOutput {
	s.RequestId = &v
	return s
}
148896
func (s *EventDescription) SetRequestId(v string) *EventDescription {
	s.RequestId = &v
	return s
}