// Return the Properties object for the x[0]'th field of the structure.
345218
func propByIndex(t reflect.Type, x []int) *Properties {
	if len(x) != 1 {
		fmt.Fprintf(os.Stderr, "proto: field index dimension %d (not 1) for type %s\n", len(x), t)
		return nil
	}
	prop := GetProperties(t)
	return prop.Prop[x[0]]
}
1080148
func (b *TodoJSONBuilder) Properties() []*TodoPropertyInfo {
	return []*TodoPropertyInfo{
		b.ID,
		b.Text,
		b.Done,
		b.UpdatedAt,
		b.CreatedAt,
	}
}
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
}
507320
func structFieldByName(st reflect.Type, name string) (int, *Properties, bool) {
	sprops := GetProperties(st)
	i, ok := sprops.decoderOrigNames[name]
	if ok {
		return i, sprops.Prop[i], true
	}
	return -1, nil, false
}
712586
func (t *Type) GetProperty(name string) Property {
	propInterface, ok := t.Properties[name]
	if !ok {
		panic(fmt.Errorf("property %v not exist", name))
	}

	prop := toProperty(name, propInterface)
	prop._type = t

	return prop
}
354851
func (b *FooJSONBuilder) Properties() []*FooPropertyInfo {
	return []*FooPropertyInfo{
		b.Tmp,
		b.Bar,
		b.Buzz,
		b.Hoge,
		b.Fuga,
	}
}
1075650
func (group *Group) GetProperties(contract *Contract) (*Properties, error) {
	return GetProperties(contract, group)
}
93486
func (r Network_Storage_Schedule) GetProperties() (resp []datatypes.Network_Storage_Schedule_Property, err error) {
	err = r.Session.DoRequest("SoftLayer_Network_Storage_Schedule", "getProperties", nil, &r.Options, &resp)
	return
}
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

}
349505
func (obj *Variable) GetNxProperties(ctx context.Context) (*NxVariableProperties, error) {
	result := &struct {
		Properties *NxVariableProperties	`json:"qProperties"`
	} {}
	err := obj.rpc(ctx, "GetNxProperties", result)
	return result.Properties, err 
}
455939
func (f paramFiller) paramsStructStruct(value map[string]interface{}, shape *Shape) string {
	out := "&" + f.typeName(shape)[1:] + "{\n"
	for _, n := range shape.MemberNames() {
		ref := shape.MemberRefs[n]
		name := findParamMember(value, n)

		if val := f.paramsStructAny(value[name], ref.Shape); val != "" {
			out += fmt.Sprintf("%s: %s,\n", n, val)
		}
	}
	out += "}"
	return out
}
63482
func (m *GenericParser) getProperty(mapKey reflect.Value) (Property, error) {
	properteerType := reflect.TypeOf(new(Properteer)).Elem()
	stringerType := reflect.TypeOf(new(fmt.Stringer)).Elem()

	// if mapKey implements the pdk.Properteer interface, use that.
	if k2, ok := anyImplements(mapKey, properteerType); ok {
		return k2.Interface().(Properteer).Property(), nil
	}
	// if mapKey implements fmt.Stringer, use that.
	if k2, ok := anyImplements(mapKey, stringerType); ok {
		return Property(k2.Interface().(fmt.Stringer).String()), nil
	}

	// Otherwise, handle all comparable types (see https://golang.org/ref/spec#Comparison_operators):
	mapKey = deref(mapKey)
	switch k := mapKey.Kind(); k {
	case reflect.Bool, reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64, reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Float32, reflect.Float64, reflect.String:
		return Property(fmt.Sprintf("%v", mapKey)), nil
	case reflect.Chan:
		m.Stats.Count("parser.getProperty.Chan", 1, 1)
		return "", errors.New("channel cannot be converted to property")
	case reflect.Array:
		m.Stats.Count("parser.getProperty."+k.String(), 1, 1)
		return "", errors.New("array cannot be converted to property")
	case reflect.Struct:
		m.Stats.Count("parser.getProperty."+k.String(), 1, 1)
		return "", errors.New("struct cannot be converted to property")
	case reflect.Complex128, reflect.Complex64:
		m.Stats.Count("parser.getProperty."+k.String(), 1, 1)
		return "", errors.New("complex value cannot be converted to property")
	default:
		m.Stats.Count("parser.getProperty."+k.String(), 1, 1)
		return "", errors.Errorf("unexpected kind: %v mapKey: %v", mapKey.Kind(), mapKey)
	}
}
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
}
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
}
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
}
436115
func (f Form) Properties(s []byte) Properties {
	if f == NFC || f == NFD {
		return compInfo(nfcData.lookup(s))
	}
	return compInfo(nfkcData.lookup(s))
}
864118
func getTagValues(f reflect.StructField, tag string) string {
	return f.Tag.Get(tag)
}