// SetRecommendedNormalizedUnitsToPurchase sets the RecommendedNormalizedUnitsToPurchase field's value.
327290
func (s *ReservationPurchaseRecommendationDetail) SetRecommendedNormalizedUnitsToPurchase(v string) *ReservationPurchaseRecommendationDetail {
	s.RecommendedNormalizedUnitsToPurchase = &v
	return s
}
1145854
func (a *HorizontalController) stabilizeRecommendation(key string, prenormalizedDesiredReplicas int32) int32 {
	maxRecommendation := prenormalizedDesiredReplicas
	foundOldSample := false
	oldSampleIndex := 0
	cutoff := time.Now().Add(-a.downscaleStabilisationWindow)
	for i, rec := range a.recommendations[key] {
		if rec.timestamp.Before(cutoff) {
			foundOldSample = true
			oldSampleIndex = i
		} else if rec.recommendation > maxRecommendation {
			maxRecommendation = rec.recommendation
		}
	}
	if foundOldSample {
		a.recommendations[key][oldSampleIndex] = timestampedRecommendation{prenormalizedDesiredReplicas, time.Now()}
	} else {
		a.recommendations[key] = append(a.recommendations[key], timestampedRecommendation{prenormalizedDesiredReplicas, time.Now()})
	}
	return maxRecommendation
}
550312
func (s *AccountModification) SetDedicatedTenancySupport(v string) *AccountModification {
	s.DedicatedTenancySupport = &v
	return s
}
293240
func (s *AccountLimit) SetUnreservedConcurrentExecutions(v int64) *AccountLimit {
	s.UnreservedConcurrentExecutions = &v
	return s
}
834820
func (s *ClusterSummary) SetNormalizedInstanceHours(v int64) *ClusterSummary {
	s.NormalizedInstanceHours = &v
	return s
}
454059
func (s *UpdateBandwidthRateLimitInput) SetAverageDownloadRateLimitInBitsPerSec(v int64) *UpdateBandwidthRateLimitInput {
	s.AverageDownloadRateLimitInBitsPerSec = &v
	return s
}
648205
func (s *CopyObjectInput) SetCopySourceIfUnmodifiedSince(v time.Time) *CopyObjectInput {
	s.CopySourceIfUnmodifiedSince = &v
	return s
}
996748
func (s *ReservationPurchaseRecommendationDetail) SetMaximumNormalizedUnitsUsedPerHour(v string) *ReservationPurchaseRecommendationDetail {
	s.MaximumNormalizedUnitsUsedPerHour = &v
	return s
}
1011840
func (s *CreateCacheClusterInput) SetPreferredAvailabilityZones(v []*string) *CreateCacheClusterInput {
	s.PreferredAvailabilityZones = v
	return s
}
495490
func (p ResourcePersistence) SetUnitResource(unitID string, res resource.Resource) error {
	if res.PendingID != "" {
		return errors.Errorf("pending resources not allowed")
	}
	return p.setUnitResource(unitID, res, nil)
}
859893
func (s *ReservationAggregates) SetPurchasedHours(v string) *ReservationAggregates {
	s.PurchasedHours = &v
	return s
}
331859
func (s *Scte35DeliveryRestrictions) SetNoRegionalBlackoutFlag(v string) *Scte35DeliveryRestrictions {
	s.NoRegionalBlackoutFlag = &v
	return s
}
892451
func (s *ReservationPurchaseRecommendationDetail) SetMinimumNormalizedUnitsUsedPerHour(v string) *ReservationPurchaseRecommendationDetail {
	s.MinimumNormalizedUnitsUsedPerHour = &v
	return s
}
800094
func (s *ReservationAggregates) SetPurchasedUnits(v string) *ReservationAggregates {
	s.PurchasedUnits = &v
	return s
}
752387
func (c *Client) SetUnitResource(modelUUID, unit string, res resource.Resource) error {
	args := makeResourceArgs(res)
	args.Add("unit", unit)
	err := c.resourcePost(modelUUID, args, nil)
	return errors.Trace(err)
}
890146
func (s *ReplicaSettingsDescription) SetReplicaProvisionedReadCapacityUnits(v int64) *ReplicaSettingsDescription {
	s.ReplicaProvisionedReadCapacityUnits = &v
	return s
}
1114674
func (s *UploadPartCopyInput) SetCopySourceIfUnmodifiedSince(v time.Time) *UploadPartCopyInput {
	s.CopySourceIfUnmodifiedSince = &v
	return s
}