// GetYearlyPriceInCents returns the YearlyPriceInCents field if it's non-nil, zero value otherwise.
3476
func (m *MarketplacePlan) GetYearlyPriceInCents() int {
	if m == nil || m.YearlyPriceInCents == nil {
		return 0
	}
	return *m.YearlyPriceInCents
}
471605
func adjustYear(y int) int {
	if y >= 0 && y <= 69 {
		y = 2000 + y
	} else if y >= 70 && y <= 99 {
		y = 1900 + y
	}
	return y
}
1229522
func (u *User) GetPrivateGists() int {
	if u == nil || u.PrivateGists == nil {
		return 0
	}
	return *u.PrivateGists
}
1058137
func GetVersionProto() *version.Version {
	return &version.Version{
		SemVer:       GetVersion(),
		GitCommit:    GitCommit,
		GitTreeState: GitTreeState,
	}
}
476089
func GetDailyHistory(symbol string, from, to time.Time) ([]PriceH, error) {
	var prices []PriceH
	// Create URL with daily frequency of data.
	data, err := loadHistoricalPrice(symbol, from, to, Daily)
	if err != nil {
		return prices, err
	}

	prices, err = parseHistorical(data)
	if err != nil {
		return prices, err
	}

	return prices, nil
}
922518
func EntireYear(year int) (term Range) {
	first := time.Date(year, 1, 1, 0, 0, 0, 0, time.UTC)
	term.End = FromTime(first.AddDate(1, 0, -1))
	term.Start = FromTime(first)
	return
}
102339
func YearEnd(dt time.Time) time.Time {
	return time.Date(dt.UTC().Year(), time.December, 31, 23, 59, 59, 999999999, time.UTC)
}
242699
func (t Term) Year(args ...interface{}) Term {
	return constructMethodTerm(t, "Year", p.Term_YEAR, args, map[string]interface{}{})
}
964492
func (r Product_Promotion) FindByPromoCode(code *string) (resp datatypes.Container_Product_Promotion, err error) {
	params := []interface{}{
		code,
	}
	err = r.Session.DoRequest("SoftLayer_Product_Promotion", "findByPromoCode", params, &r.Options, &resp)
	return
}
27378
func FindPrimary(keyset *kops.Keyset) *kops.KeysetItem {
	var primary *kops.KeysetItem
	var primaryVersion *big.Int
	for i := range keyset.Spec.Keys {
		item := &keyset.Spec.Keys[i]
		version, ok := big.NewInt(0).SetString(item.Id, 10)
		if !ok {
			glog.Warningf("Ignoring key item with non-integer version: %q", item.Id)
			continue
		}

		if primaryVersion == nil || version.Cmp(primaryVersion) > 0 {
			primary = item
			primaryVersion = version
		}
	}
	return primary
}
691677
func (prs *PolynomialRegressionSeries) GetValues(index int) (x, y float64) {
	if prs.InnerSeries == nil || prs.InnerSeries.Len() == 0 {
		return
	}

	if prs.coeffs == nil {
		coeffs, err := prs.computeCoefficients()
		if err != nil {
			panic(err)
		}
		prs.coeffs = coeffs
	}

	offset := prs.GetOffset()
	effectiveIndex := util.Math.MinInt(index+offset, prs.InnerSeries.Len())
	x, y = prs.InnerSeries.GetValues(effectiveIndex)
	y = prs.apply(x)
	return
}
548385
func NewTypPrice() (indicator *TypPrice, err error) {
	ind := TypPrice{}
	ind.TypPriceWithoutStorage, err = NewTypPriceWithoutStorage(func(dataItem float64, streamBarIndex int) {
		ind.Data = append(ind.Data, dataItem)
	})

	return &ind, err
}
293009
func (r Product_Item_Price) GetPackageReferences() (resp []datatypes.Product_Package_Item_Prices, err error) {
	err = r.Session.DoRequest("SoftLayer_Product_Item_Price", "getPackageReferences", nil, &r.Options, &resp)
	return
}
637825
func (r Auxiliary_Press_Release) GetRenderedPressReleases(resultLimit *string, year *string) (resp []datatypes.Auxiliary_Press_Release, err error) {
	params := []interface{}{
		resultLimit,
		year,
	}
	err = r.Session.DoRequest("SoftLayer_Auxiliary_Press_Release", "getRenderedPressReleases", params, &r.Options, &resp)
	return
}
607234
func (ema *EMASeries) GetValues(index int) (x, y float64) {
	if ema.InnerSeries == nil {
		return
	}
	if len(ema.cache) == 0 {
		ema.ensureCachedValues()
	}
	vx, _ := ema.InnerSeries.GetValues(index)
	x = vx
	y = ema.cache[index]
	return
}
58348
func (c *Carbon) IsLongYear() bool {
	carb := create(c.Year(), time.December, 31, 0, 0, 0, 0, c.Location())
	_, w := carb.WeekOfYear()

	return w == weeksPerLongYear
}
446962
func (i *Import) GetPercent() int {
	if i == nil || i.Percent == nil {
		return 0
	}
	return *i.Percent
}