// WithBody adds the body to the update one params
481949
func (o *UpdateOneParams) WithBody(body *models.Item) *UpdateOneParams {
	o.SetBody(body)
	return o
}
533730
func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
	s.Body = v
	return s
}
612376
func (s *InvokeEndpointOutput) SetBody(v []byte) *InvokeEndpointOutput {
	s.Body = v
	return s
}
935832
func (s *ImportDocumentationPartsInput) SetBody(v []byte) *ImportDocumentationPartsInput {
	s.Body = v
	return s
}
764347
func (s *DeleteByQueryService) Body(body string) *DeleteByQueryService {
	s.body = body
	return s
}
395841
func (s *ImportApiKeysInput) SetBody(v []byte) *ImportApiKeysInput {
	s.Body = v
	return s
}
739460
func (b *UpdateService) body() (interface{}, error) {
	source := make(map[string]interface{})

	if b.script != "" {
		source["script"] = b.script
	}
	if b.scriptId != "" {
		source["script_id"] = b.scriptId
	}
	if b.scriptFile != "" {
		source["script_file"] = b.scriptFile
	}
	if b.scriptLang != "" {
		source["lang"] = b.scriptLang
	}
	if len(b.scriptParams) > 0 {
		source["params"] = b.scriptParams
	}
	if b.scriptedUpsert != nil {
		source["scripted_upsert"] = *b.scriptedUpsert
	}

	if b.upsert != nil {
		source["upsert"] = b.upsert
	}

	if b.doc != nil {
		source["doc"] = b.doc
	}
	if b.docAsUpsert != nil {
		source["doc_as_upsert"] = *b.docAsUpsert
	}
	if b.detectNoop != nil {
		source["detect_noop"] = *b.detectNoop
	}

	return source, nil
}
350587
func (rc *RequestConfig) SetBody(body string) *RequestConfig {
	if len(body) > 0 {
		rc.Body = body
	}

	return rc
}
1247987
func (s *GetExportOutput) SetBody(v []byte) *GetExportOutput {
	s.Body = v
	return s
}
419441
func (s *InvokeEndpointInput) SetBody(v []byte) *InvokeEndpointInput {
	s.Body = v
	return s
}
500516
func (p *Flow) SetBody(b interface{}) *Flow {
	if p.err != nil {
		return p
	}
	p.message.SetBody(b)
	return p
}
490427
func NewResponseWithBodyAndStatus(body *Body, c int, s string) *http.Response {
	resp := NewResponse()
	resp.Body = body
	resp.ContentLength = body.Length()
	resp.Status = s
	resp.StatusCode = c
	return resp
}
207477
func (s *TestInvokeAuthorizerInput) SetBody(v string) *TestInvokeAuthorizerInput {
	s.Body = &v
	return s
}
570495
func (o *FlushInactiveOAuth2TokensParams) WithBody(body *models.FlushInactiveOAuth2TokensRequest) *FlushInactiveOAuth2TokensParams {
	o.SetBody(body)
	return o
}
152672
func (s *GetJobOutputOutput) SetBody(v io.ReadCloser) *GetJobOutputOutput {
	s.Body = v
	return s
}
821524
func (c goramldir) doReqWithBody(method, urlStr string, data interface{}, headers, queryParams map[string]interface{}) (*http.Response, error) {
	body, err := encodeBody(data)
	if err != nil {
		return nil, err
	}
	return c.doReq(method, urlStr, body, headers, queryParams)
}
749315
func (c *Network) GetResponseBodyWithParams(v *NetworkGetResponseBodyParams) (string, bool, error) {
	resp, err := gcdmessage.SendCustomReturn(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Network.getResponseBody", Params: v})
	if err != nil {
		return "", false, err
	}

	var chromeData struct {
		Result struct {
			Body          string
			Base64Encoded bool
		}
	}

	if resp == nil {
		return "", false, &gcdmessage.ChromeEmptyResponseErr{}
	}

	// test if error first
	cerr := &gcdmessage.ChromeErrorResponse{}
	json.Unmarshal(resp.Data, cerr)
	if cerr != nil && cerr.Error != nil {
		return "", false, &gcdmessage.ChromeRequestErr{Resp: cerr}
	}

	if err := json.Unmarshal(resp.Data, &chromeData); err != nil {
		return "", false, err
	}

	return chromeData.Result.Body, chromeData.Result.Base64Encoded, nil
}