// SetBody sets the Body field's value.
348616
func (s *UploadMultipartPartInput) SetBody(v io.ReadSeeker) *UploadMultipartPartInput {
	s.Body = v
	return s
}
533730
func (s *GetObjectTorrentOutput) SetBody(v io.ReadCloser) *GetObjectTorrentOutput {
	s.Body = v
	return s
}
1362285
func (s *AddressConfiguration) SetBodyOverride(v string) *AddressConfiguration {
	s.BodyOverride = &v
	return s
}
824415
func (s *Message) SetBody(v string) *Message {
	s.Body = &v
	return s
}
229872
func (s *ServerCertificate) SetCertificateBody(v string) *ServerCertificate {
	s.CertificateBody = &v
	return s
}
1109345
func (r *httpVPackRequest) SetBody(body ...interface{}) (driver.Request, error) {
	switch len(body) {
	case 0:
		return r, driver.WithStack(fmt.Errorf("Must provide at least 1 body"))
	case 1:
		if data, err := velocypack.Marshal(body[0]); err != nil {
			return r, driver.WithStack(err)
		} else {
			r.body = data
		}
		return r, nil
	case 2:
		mo := mergeObject{Object: body[1], Merge: body[0]}
		if data, err := velocypack.Marshal(mo); err != nil {
			return r, driver.WithStack(err)
		} else {
			r.body = data
		}
		return r, nil
	default:
		return r, driver.WithStack(fmt.Errorf("Must provide at most 2 bodies"))
	}

}
475590
func (r *Request) setBodyString(body string) error {
	return r.setBodyReader(strings.NewReader(body))
}
1283332
func (s *Section) SetBody(body string) {
	if !s.isRawSection {
		return
	}
	s.rawBody = body
}
288149
func (s *TestInvokeMethodOutput) SetBody(v string) *TestInvokeMethodOutput {
	s.Body = &v
	return s
}
541479
func (s *SetStackPolicyInput) SetStackPolicyBody(v string) *SetStackPolicyInput {
	s.StackPolicyBody = &v
	return s
}
17283
func (s *UpdateStackSetInput) SetTemplateBody(v string) *UpdateStackSetInput {
	s.TemplateBody = &v
	return s
}
1184030
func (s *EndpointSendConfiguration) SetBodyOverride(v string) *EndpointSendConfiguration {
	s.BodyOverride = &v
	return s
}
1101701
func (s *CreateMatchmakingRuleSetInput) SetRuleSetBody(v string) *CreateMatchmakingRuleSetInput {
	s.RuleSetBody = &v
	return s
}
181901
func (r *Request) SetBody(body interface{}, gzipCompress bool) error {
	switch b := body.(type) {
	case string:
		if gzipCompress {
			return r.setBodyGzip(b)
		}
		return r.setBodyString(b)
	default:
		if gzipCompress {
			return r.setBodyGzip(body)
		}
		return r.setBodyJson(body)
	}
}
1127
func (s *CreateApplicationRequest) SetTemplateBody(v string) *CreateApplicationRequest {
	s.TemplateBody = &v
	return s
}
832559
func (s *ImportRestApiInput) SetBody(v []byte) *ImportRestApiInput {
	s.Body = v
	return s
}
1148608
func (r Request) SetBody(body io.ReadSeeker) error {
	size, err := body.Seek(0, io.SeekEnd)
	if err != nil {
		return err
	}

	body.Seek(0, io.SeekStart)
	r.ContentLength = size
	r.Header["Content-Length"] = []string{strconv.FormatInt(size, 10)}

	if size != 0 {
		r.Body = &retryableRequestBody{body: body}
		r.GetBody = func() (io.ReadCloser, error) {
			_, err := body.Seek(0, io.SeekStart)
			if err != nil {
				return nil, err
			}
			return r.Body, nil
		}
	} else {
		// in case the body is an empty stream, we need to use http.NoBody to explicitly provide no content
		r.Body = http.NoBody
		r.GetBody = func() (io.ReadCloser, error) {
			return http.NoBody, nil
		}

		// close the user-provided empty body
		if c, ok := body.(io.Closer); ok {
			c.Close()
		}
	}

	return nil
}