// GetProperty returns a property for a dataset
328506
func (ds *Dataset) GetProperty(property string) (string, error) {
	out, err := exec.Command("zfs", "get", "-H",
		"-o", "value",
		property, ds.Name).Output()
	if err != nil {
		return "", err
	}
	return strings.TrimSpace(string(out)), nil
}
19907
func objectGetOwnProperty(self *_object, name string) *_property {
	// Return a _copy_ of the property
	property, exists := self._read(name)
	if !exists {
		return nil
	}
	return &property
}
488350
func (kvmsg *Kvmsg) GetProp(name string) (value string, err error) {
	if !kvmsg.present[frame_PROPS] {
		err = errors.New("No properties set")
		return
	}
	f := name + "="
	for _, prop := range kvmsg.props {
		if strings.HasPrefix(prop, f) {
			value = prop[len(f):]
			return
		}
	}
	err = errors.New("Property not set")
	return
}
463860
func GetProperties(t reflect.Type) *StructProperties {
	mutex.Lock()
	sprop := getPropertiesLocked(t)
	mutex.Unlock()
	return sprop
}
747398
func validProperty(property string, value interface{}) (bool, bool) {
	checkFunc, ok := attributeTypes[property]
	if !ok {
		return false, false
	}
	return true, checkFunc(value)
}
71057
func (obj *GenericVariable) GetProperties(ctx context.Context) (*GenericVariableProperties, error) {
	result := &struct {
		Prop *GenericVariableProperties	`json:"qProp"`
	} {}
	err := obj.rpc(ctx, "GetProperties", result)
	return result.Prop, err 
}
319007
func (p *PhysicalHashSemiJoin) matchProperty(_ *requiredProperty, childPlanInfo ...*physicalPlanInfo) *physicalPlanInfo {
	lRes, rRes := childPlanInfo[0], childPlanInfo[1]
	np := *p
	np.SetChildren(lRes.p, rRes.p)
	cost := lRes.cost + rRes.cost
	return &physicalPlanInfo{p: &np, cost: cost}
}
1013270
func getProperty(n *structs.Node, property string) (string, bool) {
	if n == nil || property == "" {
		return "", false
	}

	val, ok := resolveTarget(property, n)
	if !ok {
		return "", false
	}
	nodeValue, ok := val.(string)
	if !ok {
		return "", false
	}

	return nodeValue, true
}
419833
func (c *edgeCollection) Properties(ctx context.Context) (CollectionProperties, error) {
	result, err := c.rawCollection().Properties(ctx)
	if err != nil {
		return CollectionProperties{}, WithStack(err)
	}
	return result, nil
}
1189105
func analyticsProperties(s interface{}) map[string]interface{} {
	m := make(map[string]interface{})

	v := reflect.ValueOf(s).Elem()
	t := v.Type()

	if v.Kind() != reflect.Struct {
		return m
	}

	for i := 0; i < v.NumField(); i++ {
		field := v.Field(i)

		switch field.Kind() {
		case reflect.Ptr:
			if field.IsNil() || !field.CanInterface() {
				continue
			}

			mm := analyticsProperties(field.Interface())
			for k, v := range mm {
				m[k] = v
			}
		case reflect.Struct:
			mm := analyticsProperties(field.Addr().Interface())
			for k, v := range mm {
				m[k] = v
			}
		default:
			tag := t.Field(i).Tag.Get("analytics")
			if tag != "" {
				m[tag] = field.Interface()
			}
		}
	}

	return m
}
1288636
func (s Session) GetProperty(key string, value interface{}) (interface{}, error) {
	// Capitalize the first letter
	key = strings.Title(key)

	sessionLog.Info("getProperty", "key", key, "value", value)

	// For a map it is easy
	if reflect.TypeOf(value).Kind() == reflect.Map {
		val := reflect.ValueOf(value)
		valueOf := val.MapIndex(reflect.ValueOf(key))
		if valueOf == reflect.Zero(reflect.ValueOf(value).Type()) {
			return nil, nil
		}
		//idx := val.MapIndex(reflect.ValueOf(key))
		if !valueOf.IsValid() {
			return nil, nil
		}

		return valueOf.Interface(), nil
	}

	objValue := s.reflectValue(value)
	field := objValue.FieldByName(key)
	if !field.IsValid() {
		return nil, SESSION_VALUE_NOT_FOUND
	}

	return field.Interface(), nil
}
45886
func NewProperty(Variable node.Node, Expr node.Node, PhpDocComment string) *Property {
	return &Property{
		FreeFloating:  nil,
		PhpDocComment: PhpDocComment,
		Variable:      Variable,
		Expr:          Expr,
	}
}
779281
func (p *Union) matchProperty(_ *requiredProperty, childPlanInfo ...*physicalPlanInfo) *physicalPlanInfo {
	np := *p
	children := make([]Plan, 0, len(childPlanInfo))
	cost := float64(0)
	count := uint64(0)
	for _, res := range childPlanInfo {
		children = append(children, res.p)
		cost += res.cost
		count += res.count
	}
	np.SetChildren(children...)
	return &physicalPlanInfo{p: &np, cost: cost, count: count}
}
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
}
1095734
func (b *SampleJSONBuilder) Properties() []*SamplePropertyInfo {
	return []*SamplePropertyInfo{
		b.A,
		b.B,
		b.C,
	}
}
839367
func (c Client) GetProperties(name string) (bool, map[string]string, error) {
	nameExists, err := c.nameExists(name)
	if err != nil {
		return false, nil, err
	}

	if !nameExists {
		return false, nil, nil
	}

	properties := make(map[string]string)

	var continueToken string
	for {
		res, err := c.getHTTP("Names/"+name+"/$/GetProperties", withContinue(continueToken), withParam("IncludeValues", "true"))
		if err != nil {
			return false, nil, err
		}

		var propertiesListPage PropertiesListPage
		err = json.Unmarshal(res, &propertiesListPage)
		if err != nil {
			return false, nil, fmt.Errorf("could not deserialise JSON response: %+v", err)
		}

		for _, property := range propertiesListPage.Properties {
			if property.Value.Kind != "String" {
				continue
			}
			properties[property.Name] = property.Value.Data
		}

		continueToken = propertiesListPage.ContinuationToken
		if continueToken == "" {
			break
		}
	}

	return true, properties, nil
}
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
}