// OnCSVCMsg_GetCvarValue registers a callback for SVC_Messages_svc_GetCvarValue
179970
func (c *Callbacks) OnCSVCMsg_GetCvarValue(fn func(*dota.CSVCMsg_GetCvarValue) error) {
	c.onCSVCMsg_GetCvarValue = append(c.onCSVCMsg_GetCvarValue, fn)
}
170912
func (v *Vdc) GetVDCOrg() (Org, error) {

	for _, av := range v.Vdc.Link {
		if av.Rel == "up" && av.Type == "application/vnd.vmware.vcloud.org+xml" {
			u, err := url.ParseRequestURI(av.HREF)

			if err != nil {
				return Org{}, fmt.Errorf("error decoding vdc response: %s", err)
			}

			req := v.c.NewRequest(map[string]string{}, "GET", *u, nil)

			resp, err := checkResp(v.c.Http.Do(req))
			if err != nil {
				return Org{}, fmt.Errorf("error retreiving org: %s", err)
			}

			org := NewOrg(v.c)

			if err = decodeBody(resp, org.Org); err != nil {
				return Org{}, fmt.Errorf("error decoding org response: %s", err)
			}

			// The request was successful
			return *org, nil

		}
	}
	return Org{}, fmt.Errorf("can't find VDC Org")
}
1001368
func getCgroupParamKeyValue(t string) (string, uint64, error) {
	parts := strings.Fields(t)
	switch len(parts) {
	case 2:
		value, err := parseUint(parts[1], 10, 64)
		if err != nil {
			return "", 0, fmt.Errorf("unable to convert param value (%q) to uint64: %v", parts[1], err)
		}

		return parts[0], value, nil
	default:
		return "", 0, ErrNotValidFormat
	}
}
976228
func (c *BaseCredential) GetValue() *CredentialValue {
	if c.Value.cvtype == unsetCV {
		return nil
	}

	return c.Value
}
296374
func (ev *ChangeResp) GetValue(val proto.Message) (err error) {
	return ev.CurrVal.GetValue(val)
}
181647
func (db *ProtoBrokerWrapper) GetValue(key string, reqObj proto.Message) (bool, int64, error) {
	found, revision, err := db.ProtoBroker.GetValue(key, reqObj)
	if !found || err != nil {
		return found, revision, err
	}

	_, err = db.decrypter.Decrypt(reqObj, db.decryptFunc)
	return found, revision, err
}
1219901
func (_class VUSBClass) GetVM(sessionID SessionRef, self VUSBRef) (_retval VMRef, _err error) {
	_method := "VUSB.get_VM"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVUSBRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertVMRefToGo(_method + " -> ", _result.Value)
	return
}
839318
func (i *Import) GetVCSPassword() string {
	if i == nil || i.VCSPassword == nil {
		return ""
	}
	return *i.VCSPassword
}
1088134
func GetStringMapValue(mapVal, keyVal interface{}) (interface{}, error) {
	key, ok := keyVal.(string)
	if !ok {
		return nil, trace.BadParameter("only string keys are supported")
	}
	switch m := mapVal.(type) {
	case map[string][]string:
		if len(m) == 0 {
			// to return nil with a proper type
			var n []string
			return n, nil
		}
		return m[key], nil
	case Traits:
		if len(m) == 0 {
			// to return nil with a proper type
			var n []string
			return n, nil
		}
		return m[key], nil
	case map[string]string:
		if len(m) == 0 {
			return "", nil
		}
		return m[key], nil
	default:
		_, ok := mapVal.(map[string][]string)
		return nil, trace.BadParameter("type %T is not supported, but %v %#v", m, ok, mapVal)
	}
}
932628
func (_class VIFClass) GetVM(sessionID SessionRef, self VIFRef) (_retval VMRef, _err error) {
	_method := "VIF.get_VM"
	_sessionIDArg, _err := convertSessionRefToXen(fmt.Sprintf("%s(%s)", _method, "session_id"), sessionID)
	if _err != nil {
		return
	}
	_selfArg, _err := convertVIFRefToXen(fmt.Sprintf("%s(%s)", _method, "self"), self)
	if _err != nil {
		return
	}
	_result, _err := _class.client.APICall(_method, _sessionIDArg, _selfArg)
	if _err != nil {
		return
	}
	_retval, _err = convertVMRefToGo(_method + " -> ", _result.Value)
	return
}
1283440
func (cm *ProtoConsumerMessage) GetPrevValue(msg proto.Message) (prevValueExist bool, err error) {
	prevVal := cm.ConsumerMessage.GetPrevValue()
	if prevVal == nil {
		return false, nil
	}
	err = cm.serializer.Unmarshal(prevVal, msg)
	if err != nil {
		return true, err
	}
	return true, nil
}
1234670
func (ctx *Context) GetVar(k string) (string, bool) {
	for i := len(ctx.scopes) - 1; i >= 0; i-- {
		if v, ok := ctx.scopes[i][k]; ok {
			return v, true
		}
	}

	return "", false
}
1281040
func (c *Callbacks) OnCSVCMsg_ClearAllStringTables(fn func(*dota.CSVCMsg_ClearAllStringTables) error) {
	c.onCSVCMsg_ClearAllStringTables = append(c.onCSVCMsg_ClearAllStringTables, fn)
}
1059564
func (c *Client) GetISvcsHealth(IServiceNames []string) ([]isvcs.IServiceHealthResult, error) {
	results := []isvcs.IServiceHealthResult{}
	if err := c.call("GetISvcsHealth", IServiceNames, &results); err != nil {
		return nil, err
	}
	return results, nil
}
952545
func (c *Callbacks) OnCSVCMsg_PeerList(fn func(*dota.CSVCMsg_PeerList) error) {
	c.onCSVCMsg_PeerList = append(c.onCSVCMsg_PeerList, fn)
}
42344
func (p *Parser) onCSVCMsg_PacketEntities(m *dota.CSVCMsg_PacketEntities) error {
	r := newReader(m.GetEntityData())

	var index = int32(-1)
	var updates = int(m.GetUpdatedEntries())
	var cmd uint32
	var classId int32
	var serial int32
	var e *Entity
	var op EntityOp

	if !m.GetIsDelta() {
		if p.entityFullPackets > 0 {
			return nil
		}
		p.entityFullPackets++
	}

	type tuple struct {
		e  *Entity
		op EntityOp
	}
	tuples := make([]tuple, 0, updates)

	for ; updates > 0; updates-- {
		index += int32(r.readUBitVar()) + 1
		op = EntityOpNone

		cmd = r.readBits(2)
		if cmd&0x01 == 0 {
			if cmd&0x02 != 0 {
				classId = int32(r.readBits(p.classIdSize))
				serial = int32(r.readBits(17))
				r.readVarUint32()

				class := p.classesById[classId]
				if class == nil {
					_panicf("unable to find new class %d", classId)
				}

				baseline := p.classBaselines[classId]
				if baseline == nil {
					_panicf("unable to find new baseline %d", classId)
				}

				e = newEntity(index, serial, class)
				p.entities[index] = e
				readFields(newReader(baseline), class.serializer, e.state)
				readFields(r, class.serializer, e.state)
				op = EntityOpCreated | EntityOpEntered

			} else {
				if e = p.entities[index]; e == nil {
					_panicf("unable to find existing entity %d", index)
				}

				op = EntityOpUpdated
				if !e.active {
					e.active = true
					op |= EntityOpEntered
				}

				readFields(r, e.class.serializer, e.state)
			}

		} else {
			if e = p.entities[index]; e == nil {
				_panicf("unable to find existing entity %d", index)
			}

			if !e.active {
				_panicf("entity %d (%s) ordered to leave, already inactive", e.class.classId, e.class.name)
			}

			op = EntityOpLeft
			if cmd&0x02 != 0 {
				op |= EntityOpDeleted
				p.entities[index] = nil
			}
		}

		tuples = append(tuples, tuple{e, op})
	}

	for _, h := range p.entityHandlers {
		for _, t := range tuples {
			if err := h(t.e, t.op); err != nil {
				return err
			}
		}
	}

	return nil
}
1295129
func (c *Callbacks) OnCSVCMsg_ServerSteamID(fn func(*dota.CSVCMsg_ServerSteamID) error) {
	c.onCSVCMsg_ServerSteamID = append(c.onCSVCMsg_ServerSteamID, fn)
}