// NewGetTaskCommentsParamsWithContext creates a new GetTaskCommentsParams object
// with the default values initialized, and the ability to set a context for a request
334883
func NewGetTaskCommentsParamsWithContext(ctx context.Context) *GetTaskCommentsParams {
	var (
		pageSizeDefault = int32(20)
	)
	return &GetTaskCommentsParams{
		PageSize: &pageSizeDefault,

		Context: ctx,
	}
}
790491
func (o *FindParams) WithContext(ctx context.Context) *FindParams {
	o.SetContext(ctx)
	return o
}
1000844
func (o *GetIdentityEndpointsParams) WithContext(ctx context.Context) *GetIdentityEndpointsParams {
	o.SetContext(ctx)
	return o
}
631768
func NewListTasksParamsWithContext(ctx context.Context) *ListTasksParams {
	var (
		pageSizeDefault = int32(20)
	)
	return &ListTasksParams{
		PageSize: &pageSizeDefault,

		Context: ctx,
	}
}
410356
func NewClientWithContext(ctx context.Context) *QueryClient {
	return &QueryClient{
		ctx:    ctx,
		target: Target,
		server: Server,
	}
}
1177945
func (o *UpdateJSONWebKeyParams) WithContext(ctx context.Context) *UpdateJSONWebKeyParams {
	o.SetContext(ctx)
	return o
}
1312120
func NewListTasksParams() *ListTasksParams {
	var (
		pageSizeDefault = int32(20)
	)
	return &ListTasksParams{
		PageSize: &pageSizeDefault,

		timeout: cr.DefaultTimeout,
	}
}
767690
func (o *GetTaskCommentsURL) Build() (*url.URL, error) {
	var _result url.URL

	var _path = "/tasks/{id}/comments"

	id := swag.FormatInt64(o.ID)
	if id != "" {
		_path = strings.Replace(_path, "{id}", id, -1)
	} else {
		return nil, errors.New("id is required on GetTaskCommentsURL")
	}

	_basePath := o._basePath
	if _basePath == "" {
		_basePath = "/api"
	}
	_result.Path = golangswaggerpaths.Join(_basePath, _path)

	qs := make(url.Values)

	var pageSize string
	if o.PageSize != nil {
		pageSize = swag.FormatInt32(*o.PageSize)
	}
	if pageSize != "" {
		qs.Set("pageSize", pageSize)
	}

	var since string
	if o.Since != nil {
		since = o.Since.String()
	}
	if since != "" {
		qs.Set("since", since)
	}

	_result.RawQuery = qs.Encode()

	return &_result, nil
}
1001696
func NewContextWithContext(name string, ctx context.Context) *Context {
	return &Context{
		Context: ctx,
		Name:    name,
		Args:    []string{},
		data:    map[interface{}]interface{}{},
		moot:    &sync.Mutex{},
	}
}
1095760
func (a *Client) AddCommentToTask(params *AddCommentToTaskParams, authInfo runtime.ClientAuthInfoWriter) (*AddCommentToTaskCreated, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewAddCommentToTaskParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "addCommentToTask",
		Method:             "POST",
		PathPattern:        "/tasks/{id}/comments",
		ProducesMediaTypes: []string{"application/vnd.goswagger.examples.task-tracker.v1+json"},
		ConsumesMediaTypes: []string{"application/vnd.goswagger.examples.task-tracker.v1+json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &AddCommentToTaskReader{formats: a.formats},
		AuthInfo:           authInfo,
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*AddCommentToTaskCreated), nil

}
637991
func NewContextWith(res http.ResponseWriter, req *http.Request, loga *log.Logger) *Context {
	if loga == nil {
		loga = log.New(os.Stdout, "[Relay] ", 0)
	}

	cx := Context{
		SyncCollector: NewSyncCollector(),
		Req:           req,
		Res:           NewResponseWriter(res),
		Log:           loga,
	}
	return &cx
}
30220
func (o *GetTaskCommentsParams) WithSince(since *strfmt.DateTime) *GetTaskCommentsParams {
	o.SetSince(since)
	return o
}
747243
func (o *IntrospectOAuth2TokenParams) WithContext(ctx context.Context) *IntrospectOAuth2TokenParams {
	o.SetContext(ctx)
	return o
}
591851
func NewGetTaskCommentsParamsWithTimeout(timeout time.Duration) *GetTaskCommentsParams {
	var (
		pageSizeDefault = int32(20)
	)
	return &GetTaskCommentsParams{
		PageSize: &pageSizeDefault,

		timeout: timeout,
	}
}
789751
func (o *UploadTaskFileParams) WithContext(ctx context.Context) *UploadTaskFileParams {
	o.SetContext(ctx)
	return o
}
100717
func (s *SearchSource) FetchSourceContext(fetchSourceContext *FetchSourceContext) *SearchSource {
	s.fetchSourceContext = fetchSourceContext
	return s
}
879777
func (o *GetMapNameParams) WithContext(ctx context.Context) *GetMapNameParams {
	o.SetContext(ctx)
	return o
}