// Gets application by Id only if there is exactly 1 matching application.
423584
func (api *API) ApplicationGetById(id string) (res *Application, err error) {
	apps, err := api.ApplicationsGet(Params{"applicationids": id})
	if err != nil {
		return
	}

	if len(apps) == 1 {
		res = &apps[0]
	} else {
		e := ExpectedOneResult(len(apps))
		err = &e
	}
	return
}
488261
func (d *DeploymentStatus) GetID() int64 {
	if d == nil || d.ID == nil {
		return 0
	}
	return *d.ID
}
401972
func (r *GroupService) Get(appId string, id string) *GroupGetCall {
	c := &GroupGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
	c.appId = appId
	c.id = id
	return c
}
918676
func (m *MarketplacePendingChange) GetID() int64 {
	if m == nil || m.ID == nil {
		return 0
	}
	return *m.ID
}
774973
func (a *App) GetID() int64 {
	if a == nil || a.ID == nil {
		return 0
	}
	return *a.ID
}
1025752
func (p *PreReceiveHook) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
1110200
func (r *EchoRequest) VerifyAppID(myAppID string) bool {
	if r.Session.Application.ApplicationID == myAppID ||
		r.Context.System.Application.ApplicationID == myAppID {
		return true
	}

	return false
}
889975
func (t *TeamLDAPMapping) GetID() int64 {
	if t == nil || t.ID == nil {
		return 0
	}
	return *t.ID
}
610539
func Get(c *deis.Client, appID string) (api.App, error) {
	u := fmt.Sprintf("/v2/apps/%s/", appID)

	res, reqErr := c.Request("GET", u, nil)
	if reqErr != nil && !deis.IsErrAPIMismatch(reqErr) {
		return api.App{}, reqErr
	}
	defer res.Body.Close()

	app := api.App{}

	if err := json.NewDecoder(res.Body).Decode(&app); err != nil {
		return api.App{}, err
	}

	return app, reqErr
}
1075512
func (r *ReleaseAsset) GetID() int64 {
	if r == nil || r.ID == nil {
		return 0
	}
	return *r.ID
}
219821
func Get(c *deis.Client, appID string, version int) (api.Release, error) {
	u := fmt.Sprintf("/v2/apps/%s/releases/v%d/", appID, version)

	res, reqErr := c.Request("GET", u, nil)
	if reqErr != nil && !deis.IsErrAPIMismatch(reqErr) {
		return api.Release{}, reqErr
	}
	defer res.Body.Close()

	release := api.Release{}
	if err := json.NewDecoder(res.Body).Decode(&release); err != nil {
		return api.Release{}, err
	}

	return release, reqErr
}
1097398
func Get(id string, params *stripe.ApplicationFeeParams) (*stripe.ApplicationFee, error) {
	return getC().Get(id, params)
}
524581
func (actor Actor) GetApplicationByNameAndSpace(appName string, spaceGUID string) (Application, Warnings, error) {
	apps, warnings, err := actor.GetApplicationsByNamesAndSpace([]string{appName}, spaceGUID)

	if err != nil {
		if _, ok := err.(actionerror.ApplicationsNotFoundError); ok {
			return Application{}, warnings, actionerror.ApplicationNotFoundError{Name: appName}
		}
		return Application{}, warnings, err
	}

	return apps[0], warnings, nil
}
461589
func (c *Client) GetApplications() ([]Application, error) {
	var appMap map[string]Application
	if err := c.get(`app/list`, &appMap); err != nil {
		return nil, err
	}

	var appList []Application
	for _, app := range appMap {
		appList = append(appList, app)
	}
	sort.Sort(applications(appList))
	return appList, nil
}
809110
func (p *Project) GetID() int64 {
	if p == nil || p.ID == nil {
		return 0
	}
	return *p.ID
}
423417
func (s *Source) GetID() int64 {
	if s == nil || s.ID == nil {
		return 0
	}
	return *s.ID
}
737893
func (m *FileManager) GetById(id string) (*file.File, error) {
	f, err := m.grid.OpenId(id)
	if err != nil {
		return nil, stackerr.Wrap(err)
	}
	meta := &file.Meta{}
	if err = f.GetMeta(meta); err != nil {
		return nil, stackerr.Wrap(err)
	}
	meta.MD5 = f.MD5()
	return &file.File{Meta: meta, ReadCloser: f}, nil
}