// setLimits makes a copy of the given StoreLimits,
// validates the limits and if ok, applies the inheritance.
769662
func (gs *genericStore) setLimits(limits *StoreLimits) error {
	// Make a copy.
	gs.limits = limits.Clone()
	// Build will validate and apply inheritance if no error.
	if err := gs.limits.Build(); err != nil {
		return err
	}
	// We don't need the PerChannel map and the sublist. So replace
	// the map with the sublist instead.
	gs.sublist = util.NewSublist()
	for key, val := range gs.limits.PerChannel {
		// val is already a copy of the original limits.PerChannel[key],
		// so don't need to make a copy again, we own this.
		gs.sublist.Insert(key, val)
	}
	// Get rid of the map now.
	gs.limits.PerChannel = nil
	return nil
}
842892
func (s *ListUsersInGroupInput) SetLimit(v int64) *ListUsersInGroupInput {
	s.Limit = &v
	return s
}
735331
func (s *ListSchemaExtensionsInput) SetLimit(v int64) *ListSchemaExtensionsInput {
	s.Limit = &v
	return s
}
321583
func (s *DescribeBatchPredictionsInput) SetLimit(v int64) *DescribeBatchPredictionsInput {
	s.Limit = &v
	return s
}
794958
func (s *ListVaultsInput) SetLimit(v string) *ListVaultsInput {
	s.Limit = &v
	return s
}
552630
func (s *ListPartsInput) SetLimit(v string) *ListPartsInput {
	s.Limit = &v
	return s
}
188770
func (s *ListVolumesInput) SetLimit(v int64) *ListVolumesInput {
	s.Limit = &v
	return s
}
999428
func (s *DescribeConfigurationAggregatorsInput) SetLimit(v int64) *DescribeConfigurationAggregatorsInput {
	s.Limit = &v
	return s
}
480367
func (s *ListByteMatchSetsInput) SetLimit(v int64) *ListByteMatchSetsInput {
	s.Limit = &v
	return s
}
234683
func (s *DescribeEvaluationsInput) SetLimit(v int64) *DescribeEvaluationsInput {
	s.Limit = &v
	return s
}
682862
func (s *GetDomainNamesInput) SetLimit(v int64) *GetDomainNamesInput {
	s.Limit = &v
	return s
}
448023
func (s *InventoryRetrievalJobDescription) SetLimit(v string) *InventoryRetrievalJobDescription {
	s.Limit = &v
	return s
}
844164
func (s *SearchGameSessionsInput) SetLimit(v int64) *SearchGameSessionsInput {
	s.Limit = &v
	return s
}
979805
func (s *FilterLogEventsInput) SetLimit(v int64) *FilterLogEventsInput {
	s.Limit = &v
	return s
}
1033886
func (s *DescribeSessionsInput) SetLimit(v int64) *DescribeSessionsInput {
	s.Limit = &v
	return s
}
856734
func (s *WriteApplicationSettingsRequest) SetLimits(v *CampaignLimits) *WriteApplicationSettingsRequest {
	s.Limits = v
	return s
}
398607
func (s *DescribeTrustsInput) SetLimit(v int64) *DescribeTrustsInput {
	s.Limit = &v
	return s
}