// FromProperty implements datastore.PropertyConverter.
194647
func (cfg *Config) FromProperty(p datastore.Property) error {
	return proto.UnmarshalText(p.Value().(string), cfg)
}
271512
func (group *Group) NewProperty(contract *Contract) (*Property, error) {
	property := NewProperty(NewProperties())
	property.Contract = contract
	property.Group = group
	return property, nil
}
337430
func (bf *BitField) FromProperty(p datastore.Property) error {
	bin, ok := p.Value().([]byte)
	if !ok {
		return fmt.Errorf("expected %s, got %s", datastore.PTBytes, p.Type())
	}
	return bf.UnmarshalBinary(bin)
}
769710
func (s *SearchService) From(from int) *SearchService {
	s.searchSource = s.searchSource.From(from)
	return s
}
475337
func GetProperty(xu *xgbutil.XUtil, win xproto.Window, atom string) (
	*xproto.GetPropertyReply, error) {

	atomId, err := Atm(xu, atom)
	if err != nil {
		return nil, err
	}

	reply, err := xproto.GetProperty(xu.Conn(), false, win, atomId,
		xproto.GetPropertyTypeAny, 0, (1<<32)-1).Reply()

	if err != nil {
		return nil, fmt.Errorf("GetProperty: Error retrieving property '%s' "+
			"on window %x: %s", atom, win, err)
	}

	if reply.Format == 0 {
		return nil, fmt.Errorf("GetProperty: No such property '%s' on "+
			"window %x.", atom, win)
	}

	return reply, nil
}
1083610
func (b *SampleJSONBuilder) Properties() []*SamplePropertyInfo {
	return []*SamplePropertyInfo{
		b.A1,
		b.A2,
		b.As1,
		b.As2,
		b.As3,
		b.As4,
	}
}
25517
func (r Account_Regional_Registry_Detail_Property) GetPropertyType() (resp datatypes.Account_Regional_Registry_Detail_Property_Type, err error) {
	err = r.Session.DoRequest("SoftLayer_Account_Regional_Registry_Detail_Property", "getPropertyType", nil, &r.Options, &resp)
	return
}
1095734
func (b *SampleJSONBuilder) Properties() []*SamplePropertyInfo {
	return []*SamplePropertyInfo{
		b.A,
		b.B,
		b.C,
	}
}
1287724
func (v *ViewModel) FromJS(obj *js.Object) *ViewModel {
	for _, key := range js.Keys(obj) {
		// skip internal or unexported field
		if strings.HasPrefix(key, "$") || strings.HasPrefix(key, "_") {
			continue
		}
		v.Object.Set(key, obj.Get(key))
	}
	return v
}
664228
func (e *containerByIDIndexer) FromObject(obj interface{}) (bool, []byte, error) {
	c, ok := obj.(*Container)
	if !ok {
		return false, nil, fmt.Errorf("%T is not a Container", obj)
	}
	// Add the null character as a terminator
	v := c.ID + "\x00"
	return true, []byte(v), nil
}
1361713
func (r *Request) StringProperty(k string) string {
	if r.Properties == nil {
		return ""
	}
	prop := r.Properties.Fields[k]
	if prop == nil {
		return ""
	}
	return prop.GetStringValue()
}
1273531
func (o *Object) SetProperty(p string, v interface{}) error {
	idx := strings.LastIndex(p, ".")
	if idx == -1 || idx+1 == len(p) {
		return errors.New("dbus: invalid property " + p)
	}

	iface := p[:idx]
	prop := p[idx+1:]

	return o.Call("org.freedesktop.DBus.Properties.Set", 0, iface, prop, v).Err
}
44285
func FromJSON(from string) (types.Config, error) {
	c := newConfig()
	m := map[string]interface{}{}
	if err := json.Unmarshal([]byte(from), &m); err != nil {
		return nil, err
	}
	for k, v := range m {
		c.v.Set(k, v)
	}
	return c, nil
}
1188378
func (dc *DeepCopier) From(src interface{}) error {
	dc.dst = dc.src
	dc.src = src
	return process(dc.dst, dc.src, Options{Context: dc.ctx, Reversed: true})
}
219388
func (b *SelectBuilder) From(table string) *SelectBuilder {
	b.table = table
	return b
}
710451
func FromObject(obj runtime.Object) error {
	switch t := obj.(type) {
	case *metav1.Status:
		return &StatusError{ErrStatus: *t}
	case runtime.Unstructured:
		var status metav1.Status
		obj := t.UnstructuredContent()
		if !reflect.DeepEqual(obj["kind"], "Status") {
			break
		}
		if err := runtime.DefaultUnstructuredConverter.FromUnstructured(t.UnstructuredContent(), &status); err != nil {
			return err
		}
		if status.APIVersion != "v1" && status.APIVersion != "meta.k8s.io/v1" {
			break
		}
		return &StatusError{ErrStatus: status}
	}
	return &UnexpectedObjectError{obj}
}
714152
func (s *Schema) AddProperty(name string, property *Schema) {
	*s.Properties = append(*s.Properties, NewNamedSchema(name, property))
}