// SetScalingAdjustment sets the ScalingAdjustment field's value.
518713
func (s *PutScalingPolicyInput) SetScalingAdjustment(v int64) *PutScalingPolicyInput {
	s.ScalingAdjustment = &v
	return s
}
1032165
func (a *Application) SetScale(scale int) error {
	if scale < 0 {
		return errors.NotValidf("application scale %d", scale)
	}
	buildTxn := func(attempt int) ([]txn.Op, error) {
		if attempt > 0 {
			alive, err := isAlive(a.st, applicationsC, a.doc.DocID)
			if err != nil {
				return nil, errors.Trace(err)
			} else if !alive {
				return nil, applicationNotAliveErr
			}
			if err := a.Refresh(); err != nil {
				return nil, errors.Trace(err)
			}
		}
		return []txn.Op{{
			C:  applicationsC,
			Id: a.doc.DocID,
			Assert: bson.D{{"life", Alive},
				{"charmurl", a.doc.CharmURL},
				{"unitcount", a.doc.UnitCount}},
			Update: bson.D{{"$set", bson.D{{"scale", scale}}}},
		}}, nil
	}
	if err := a.st.db().Run(buildTxn); err != nil {
		return errors.Errorf("cannot set scale for application %q to %v: %v", a, scale, onAbort(err, applicationNotAliveErr))
	}
	a.doc.DesiredScale = scale
	return nil
}
1246512
func (s *DescribeScalingPlanResourcesInput) SetScalingPlanName(v string) *DescribeScalingPlanResourcesInput {
	s.ScalingPlanName = &v
	return s
}
969853
func (s *CreateDBClusterInput) SetScalingConfiguration(v *ScalingConfiguration) *CreateDBClusterInput {
	s.ScalingConfiguration = v
	return s
}
653696
func (s *ColumnInfo) SetScale(v int64) *ColumnInfo {
	s.Scale = &v
	return s
}
333031
func (s *GetScalingPlanResourceForecastDataInput) SetScalingPlanVersion(v int64) *GetScalingPlanResourceForecastDataInput {
	s.ScalingPlanVersion = &v
	return s
}
764313
func (s *ScalingPlanResource) SetScalingPolicies(v []*ScalingPolicy) *ScalingPlanResource {
	s.ScalingPolicies = v
	return s
}
986141
func (s *DescribeScalingPoliciesInput) SetScalableDimension(v string) *DescribeScalingPoliciesInput {
	s.ScalableDimension = &v
	return s
}
785040
func (s *ColumnMetadata) SetScale(v int64) *ColumnMetadata {
	s.Scale = &v
	return s
}
740856
func (s *GetScalingPlanResourceForecastDataInput) SetScalableDimension(v string) *GetScalingPlanResourceForecastDataInput {
	s.ScalableDimension = &v
	return s
}
1256660
func (s *Cluster) SetScaleDownBehavior(v string) *Cluster {
	s.ScaleDownBehavior = &v
	return s
}
950914
func (s *DescribeScalingPlanResourcesOutput) SetScalingPlanResources(v []*ScalingPlanResource) *DescribeScalingPlanResourcesOutput {
	s.ScalingPlanResources = v
	return s
}
160368
func (s *StepScalingPolicyConfiguration) SetAdjustmentType(v string) *StepScalingPolicyConfiguration {
	s.AdjustmentType = &v
	return s
}
387920
func (s *ListAllowedNodeTypeModificationsOutput) SetScaleUpModifications(v []*string) *ListAllowedNodeTypeModificationsOutput {
	s.ScaleUpModifications = v
	return s
}
867244
func (q *Quantity) SetScaled(value int64, scale Scale) {
	if q.Amount == nil {
		q.Amount = &inf.Dec{}
	}
	q.Amount.SetUnscaled(value)
	q.Amount.SetScale(scale.infScale())
}
197423
func (s *UpdateScalingPlanInput) SetScalingPlanVersion(v int64) *UpdateScalingPlanInput {
	s.ScalingPlanVersion = &v
	return s
}
1115334
func (s *CreateTaskSetInput) SetScale(v *Scale) *CreateTaskSetInput {
	s.Scale = v
	return s
}