// get properties of a body
// TODO : move it to 'raml' package
494431
func getBodyPropertiesDescription(body *raml.Bodies) (map[string]interface{}, string) {
	tipStr := body.ApplicationJSON.TypeString()
	if tipStr == "" || strings.ToLower(tipStr) == "object" {
		return body.ApplicationJSON.Properties, ""
	}

	var js raml.JSONSchema

	if err := json.Unmarshal([]byte(body.ApplicationJSON.TypeString()), &js); err != nil {
		return nil, ""
	}
	return js.RAMLProperties(), js.Description

}
266102
func (c *Conn) getProperties(path dbus.ObjectPath, dbusInterface string) (map[string]interface{}, error) {
	var err error
	var props map[string]dbus.Variant

	if !path.IsValid() {
		return nil, fmt.Errorf("invalid unit name: %v", path)
	}

	obj := c.sysconn.Object("org.freedesktop.systemd1", path)
	err = obj.Call("org.freedesktop.DBus.Properties.GetAll", 0, dbusInterface).Store(&props)
	if err != nil {
		return nil, err
	}

	out := make(map[string]interface{}, len(props))
	for k, v := range props {
		out[k] = v.Value()
	}

	return out, nil
}
468443
func (d *domainClient) GetProperties(ctx context.Context, args *GetPropertiesArgs) (reply *GetPropertiesReply, err error) {
	reply = new(GetPropertiesReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Runtime.getProperties", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Runtime.getProperties", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Runtime", Op: "GetProperties", Err: err}
	}
	return
}
1246284
func (properties *Properties) GetProperties(contract *Contract, group *Group) error {
	if contract == nil {
		contract = NewContract(NewContracts())
		contract.ContractID = group.ContractIDs[0]
	}

	req, err := client.NewRequest(
		Config,
		"GET",
		fmt.Sprintf(
			"/papi/v1/properties?groupId=%s&contractId=%s",
			group.GroupID,
			contract.ContractID,
		),
		nil,
	)

	if err != nil {
		return err
	}

	res, err := client.Do(Config, req)

	if client.IsError(res) {
		return client.NewAPIError(res)
	}

	if err = client.BodyJSON(res, properties); err != nil {
		return err
	}

	return nil
}
662328
func (pr Properties) Get(row int, column string) string {
	var columnIdx int
	for i, key := range pr.Header {
		if key == column {
			columnIdx = i
		}
	}
	return pr.DataFrame[row][columnIdx]
}
1086788
func (p *Project) GetBody() string {
	if p == nil || p.Body == nil {
		return ""
	}
	return *p.Body
}
425065
func readBody(resp *http.Response) ([]byte, error) {
	defer resp.Body.Close()
	contentLength := resp.ContentLength
	if contentLength < 0 {
		// Don't know the content length, do it the slowest way
		result, err := ioutil.ReadAll(resp.Body)
		if err != nil {
			return nil, driver.WithStack(err)
		}
		return result, nil
	}
	buf := &bytes.Buffer{}
	if int64(int(contentLength)) == contentLength {
		// contentLength is an int64. If we can safely cast to int, use Grow.
		buf.Grow(int(contentLength))
	}
	if _, err := buf.ReadFrom(resp.Body); err != nil {
		return nil, driver.WithStack(err)
	}
	return buf.Bytes(), nil
}
722561
func (r *RequestConfig) Body(body string) *RequestConfig {
	r.BodyReader = strings.NewReader(body)
	return r
}
520613
func getBody(id string, actionType models.ActionType) ([]byte, error) {
	return json.Marshal(models.CallbackAlert{ActionType: actionType, Id: id})
}
250312
func (s *UpdateByQueryService) Body(body string) *UpdateByQueryService {
	s.body = body
	return s
}
1070260
func GetProperties(required bool) (*Properties, error) {
	filename := flag.String("props", "", "properties filename")
	flag.Parse()
	if *filename == "" {
		if required {
			return nil, NO_PROPS_FILE
		} else {
			return &Properties{make(map[string]string)}, nil
		}
	}
	return readPropertiesFile(*filename)
}
531084
func (n *nessusImpl) ServerProperties() (*ServerProperties, error) {
	if n.verbose {
		log.Println("Server properties...")
	}

	resp, err := n.doRequest("GET", "/server/properties", nil, []int{http.StatusOK})
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()
	reply := &ServerProperties{}
	if err = json.NewDecoder(resp.Body).Decode(&reply); err != nil {
		return nil, err
	}
	return reply, nil
}
152922
func (s *PutScriptService) BodyString(body string) *PutScriptService {
	s.bodyString = body
	return s
}
793135
func (ps *PropertiesService) Get(ctx context.Context, name string, pr *PropertyRequest) (*Properties, *APIResponse, error) {
	ps.log.WithField("endpoint", "PropertiesServices.Get").Info("Calling endpoint")
	return ps.commonPropertiesAction(ctx, fmt.Sprintf("/properties/%s/%d/%s/%d/%s/%s",
		pr.Pipeline, pr.PipelineCounter,
		pr.Stage, pr.StageCounter,
		pr.Job, name,
	), true)
}
1063930
func (p *PullRequestReview) GetBody() string {
	if p == nil || p.Body == nil {
		return ""
	}
	return *p.Body
}
799900
func (dp *Datapoint) GetProperties() map[string]interface{} {
	m, ok := dp.Meta[tsProperty].(map[string]interface{})
	if !ok {
		return nil
	}
	return m
}
197179
func (v *viewArangoSearch) Properties(ctx context.Context) (ArangoSearchViewProperties, error) {
	req, err := v.conn.NewRequest("GET", path.Join(v.relPath(), "properties"))
	if err != nil {
		return ArangoSearchViewProperties{}, WithStack(err)
	}
	applyContextSettings(ctx, req)
	resp, err := v.conn.Do(ctx, req)
	if err != nil {
		return ArangoSearchViewProperties{}, WithStack(err)
	}
	if err := resp.CheckStatus(200); err != nil {
		return ArangoSearchViewProperties{}, WithStack(err)
	}
	var data ArangoSearchViewProperties
	if err := resp.ParseBody("", &data); err != nil {
		return ArangoSearchViewProperties{}, WithStack(err)
	}
	return data, nil
}