// GetID returns the ID field if it's non-nil, zero value otherwise.
765005
func (p *PullRequestComment) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
495733
func (k *Key) GetID() int64 {
	if k == nil || k.ID == nil {
		return 0
	}
	return *k.ID
}
560289
func (i *Invitation) GetID() int64 {
	if i == nil || i.ID == nil {
		return 0
	}
	return *i.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
}
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
}
1147216
func (a *Authorization) GetID() int64 {
	if a == nil || a.ID == nil {
		return 0
	}
	return *a.ID
}
1278463
func (n *NexterFrameTranslator) GetID(val interface{}) (id uint64, err error) {
	return n.n.Next(), nil
}
1117973
func (d *Domain) GetID() (uint, error) {
	var err C.virError
	id := uint(C.virDomainGetIDWrapper(d.ptr, &err))
	if id == ^uint(0) {
		return id, makeError(&err)
	}
	return id, nil
}
96822
func (n NetID) ID() []byte {
	switch n.Type() {
	case 0, 1:
		return n.getID(6)
	case 2:
		return n.getID(9)
	case 3, 4, 5, 6, 7:
		return n.getID(21)
	default:
		return nil
	}
}
801884
func (r *RepoStatus) GetID() int64 {
	if r == nil || r.ID == nil {
		return 0
	}
	return *r.ID
}
826292
func (g *GPGKey) GetKeyID() string {
	if g == nil || g.KeyID == nil {
		return ""
	}
	return *g.KeyID
}
333837
func (d *Dispatch) GetIds(names ...string) (dispid []int32, err error) {
	dispid, err = d.Object.GetIDsOfName(names)
	return
}
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
}
1150705
func (w *WebHookCommit) GetID() string {
	if w == nil || w.ID == nil {
		return ""
	}
	return *w.ID
}
488261
func (d *DeploymentStatus) GetID() int64 {
	if d == nil || d.ID == nil {
		return 0
	}
	return *d.ID
}
1122004
func (i *Installation) GetID() int64 {
	if i == nil || i.ID == nil {
		return 0
	}
	return *i.ID
}
918676
func (m *MarketplacePendingChange) GetID() int64 {
	if m == nil || m.ID == nil {
		return 0
	}
	return *m.ID
}