// GetID returns the ID field if it's non-nil, zero value otherwise.
495733
func (k *Key) GetID() int64 {
	if k == nil || k.ID == nil {
		return 0
	}
	return *k.ID
}
1011652
func (l *Label) GetID() int64 {
	if l == nil || l.ID == nil {
		return 0
	}
	return *l.ID
}
911313
func (b *buildEntity) getID() string {
	s := []string{b.Master, b.Buildername, strconv.Itoa(b.Number)}
	id, err := json.Marshal(s)
	if err != nil {
		panic(err) // This can't fail.
	}
	return string(id)
}
826292
func (g *GPGKey) GetKeyID() string {
	if g == nil || g.KeyID == nil {
		return ""
	}
	return *g.KeyID
}
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
}
415592
func (p *PushEventRepository) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
1061152
func (i *IssueComment) GetID() int64 {
	if i == nil || i.ID == nil {
		return 0
	}
	return *i.ID
}
1147216
func (a *Authorization) GetID() int64 {
	if a == nil || a.ID == nil {
		return 0
	}
	return *a.ID
}
344842
func (ccpack *CDSPackage) GetId() []byte {
	//this has to be after creating a package and initializing it
	//If those steps fail, GetId() should never be called
	if ccpack.id == nil {
		panic("GetId called on uninitialized package")
	}
	return ccpack.id
}
1025752
func (p *PreReceiveHook) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
313048
func getId(dir, cmd string, params []string) (string, error) {
	args := []string{cmd}
	args = append(args, params...)
	buffer := new(bytes.Buffer)
	cmdPath, err := exec.LookPath(cmd)
	if err != nil {
		return "", nil
	}
	process := &exec.Cmd{
		Path: cmdPath,
		Args: args,
		Env: []string{
			"PATH=" + os.Getenv("PATH"),
		},
		Dir:    dir,
		Stdout: buffer,
	}
	if err := process.Run(); err != nil {
		return "", err
	}
	output := string(buffer.Bytes())
	if newline := strings.Index(output, "\n"); newline < 0 {
		return output, nil
	} else {
		return output[:newline], nil
	}
}
1159969
func (i *Idm) GetID(serial bool) (uint64, error) {
	if i.handle == nil {
		return 0, errors.New("ID set is not initialized")
	}
	ordinal, err := i.handle.SetAny(serial)
	return i.start + ordinal, err
}
18834
func (s *StatusEvent) GetID() int64 {
	if s == nil || s.ID == nil {
		return 0
	}
	return *s.ID
}
450552
func (u *UserMigration) GetID() int64 {
	if u == nil || u.ID == nil {
		return 0
	}
	return *u.ID
}
107747
func (p *ProjectColumn) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
73644
func (r *RepositoryRelease) GetID() int64 {
	if r == nil || r.ID == nil {
		return 0
	}
	return *r.ID
}
809110
func (p *Project) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}