// GetID returns the ID field if it's non-nil, zero value otherwise.
161608
func (r *Repository) GetID() int64 {
	if r == nil || r.ID == nil {
		return 0
	}
	return *r.ID
}
302088
func (m *Milestone) GetID() int64 {
	if m == nil || m.ID == nil {
		return 0
	}
	return *m.ID
}
31411
func getIds(u *user.User) (C.int, C.int, error) {
	uid, err := strconv.Atoi(u.Uid)
	if err != nil {
		return -1, -1, fmt.Errorf("invalid uid: %v", err)
	}

	gid, err := strconv.Atoi(u.Gid)
	if err != nil {
		return -1, -1, fmt.Errorf("invalid gid: %v", err)
	}
	return C.int(uid), C.int(gid), nil
}
844082
func GetID(pkt Generic) (ID, bool) {
	switch pkt.Type() {
	case PUBLISH:
		return pkt.(*Publish).ID, true
	case PUBACK:
		return pkt.(*Puback).ID, true
	case PUBREC:
		return pkt.(*Pubrec).ID, true
	case PUBREL:
		return pkt.(*Pubrel).ID, true
	case PUBCOMP:
		return pkt.(*Pubcomp).ID, true
	case SUBSCRIBE:
		return pkt.(*Subscribe).ID, true
	case SUBACK:
		return pkt.(*Suback).ID, true
	case UNSUBSCRIBE:
		return pkt.(*Unsubscribe).ID, true
	case UNSUBACK:
		return pkt.(*Unsuback).ID, true
	}

	return 0, false
}
666701
func (r Resource_Metadata) GetId() (resp int, err error) {
	err = r.Session.DoRequest("SoftLayer_Resource_Metadata", "getId", nil, &r.Options, &resp)
	return
}
767158
func (r *RepositoryComment) GetID() int64 {
	if r == nil || r.ID == nil {
		return 0
	}
	return *r.ID
}
264860
func (m *MapFieldTranslator) GetID(val interface{}) (id uint64, err error) {
	// We make everything a string before mapping it. There are some subtle
	// issues that can occur with the map because it stores type information as
	// well as the actual value.
	valMap, valSlice := fmt.Sprintf("%s", val), val
	if idv, ok := m.m.Load(valMap); ok {
		if id, ok = idv.(uint64); !ok {
			return 0, errors.Errorf("Got non uint64 value back from MapTranslator: %v", idv)
		}
		return id, nil
	}
	m.l.Lock()
	if idv, ok := m.m.Load(valMap); ok {
		m.l.Unlock()
		if id, ok = idv.(uint64); !ok {
			return 0, errors.Errorf("Got non uint64 value back from MapTranslator: %v", idv)
		}
		return id, nil
	}
	nextid := m.n.Next()
	m.s = append(m.s, valSlice)
	if uint64(len(m.s)) != nextid+1 {
		panic(fmt.Sprintf("unexpected length of slice, nextid: %d, len: %d", nextid, len(m.s)))
	}
	m.m.Store(valMap, nextid)
	m.l.Unlock()
	return nextid, nil
}
217007
func (m *MapTranslator) GetID(field string, val interface{}) (id uint64, err error) {
	return m.getFieldTranslator(field).GetID(val)
}
403869
func (n *Notification) GetID() string {
	if n == nil || n.ID == nil {
		return ""
	}
	return *n.ID
}
40242
func (i *IssueEvent) GetID() int64 {
	if i == nil || i.ID == nil {
		return 0
	}
	return *i.ID
}
869436
func (s *GetService) Id(id string) *GetService {
	s.id = id
	return s
}
276702
func (g *GPGKey) GetID() int64 {
	if g == nil || g.ID == nil {
		return 0
	}
	return *g.ID
}
914839
func (p *PushEventCommit) GetID() string {
	if p == nil || p.ID == nil {
		return ""
	}
	return *p.ID
}
708496
func (m *MarketplacePlan) GetID() int64 {
	if m == nil || m.ID == nil {
		return 0
	}
	return *m.ID
}
801884
func (r *RepoStatus) GetID() int64 {
	if r == nil || r.ID == nil {
		return 0
	}
	return *r.ID
}
984492
func getID(url, base string) (int, error) {
	// Strip API prefix.
	if !strings.HasPrefix(url, base) {
		return 0, fmt.Errorf("bad url prefix for %v", url)
	}
	idStr := url[len(base):]

	i, err := strconv.Atoi(idStr)
	if err != nil {
		return 0, fmt.Errorf("bad listener id %v", idStr)
	}
	return i, nil
}
1011652
func (l *Label) GetID() int64 {
	if l == nil || l.ID == nil {
		return 0
	}
	return *l.ID
}