def _get_request_body(request_body):
 if (request_body is None):
  return ''
 if isinstance(request_body, WindowsAzureData):
  request_body = _convert_class_to_xml(request_body)
 if isinstance(request_body, bytes):
  return request_body
 if isinstance(request_body, _unicode_type):
  return request_body.encode('utf-8')
 request_body = str(request_body)
 if isinstance(request_body, _unicode_type):
  return request_body.encode('utf-8')
 return request_body

def _get_request_body ( request_body ) : if ( request_body is None ) : return '' if isinstance ( request_body , WindowsAzureData ) : request_body = _convert_class_to_xml ( request_body ) if isinstance ( request_body , bytes ) : return request_body if isinstance ( request_body , _unicode_type ) : return request_body . encode ( 'utf-8' ) request_body = str ( request_body ) if isinstance ( request_body , _unicode_type ) : return request_body . encode ( 'utf-8' ) return request_body
converts an object into a request body .