// SetRegexPatternSetId sets the RegexPatternSetId field's value.
191001
func (s *RegexPatternSetSummary) SetRegexPatternSetId(v string) *RegexPatternSetSummary {
	s.RegexPatternSetId = &v
	return s
}
1168281
func (s *ReplicationRuleFilter) SetPrefix(v string) *ReplicationRuleFilter {
	s.Prefix = &v
	return s
}
1145287
func (s *RuleCondition) SetPathPatternConfig(v *PathPatternConditionConfig) *RuleCondition {
	s.PathPatternConfig = v
	return s
}
1196602
func (a *Attempt_ID) SetDMEncoded(val string) error {
	toks := strings.SplitN(val, "|", 2)
	if len(toks) != 2 {
		return fmt.Errorf("unable to parse Attempt id: %q", val)
	}
	an, err := strconv.ParseUint(toks[1], 16, 32)
	if err != nil {
		return err
	}

	a.Quest = toks[0]
	a.Id = flipMask ^ uint32(an)
	return nil
}
1216980
func (l *Logger) SetFormat(v string) {
	switch v {
	case "text":
		l.Formatter = &logrus.TextFormatter{}
	case "json":
		l.Formatter = &logrus.JSONFormatter{}
	}
}
494213
func (s *StepExecution) SetValidNextSteps(v []*string) *StepExecution {
	s.ValidNextSteps = v
	return s
}
48588
func (s *CreateAlgorithmInput) SetValidationSpecification(v *AlgorithmValidationSpecification) *CreateAlgorithmInput {
	s.ValidationSpecification = v
	return s
}
488810
func (s *MetricsFilter) SetPrefix(v string) *MetricsFilter {
	s.Prefix = &v
	return s
}
413925
func (s *RejectedLogEventsInfo) SetTooNewLogEventStartIndex(v int64) *RejectedLogEventsInfo {
	s.TooNewLogEventStartIndex = &v
	return s
}
769886
func (s *StepExecution) SetStepExecutionId(v string) *StepExecution {
	s.StepExecutionId = &v
	return s
}
1082457
func (s *S3DestinationConfiguration) SetPrefix(v string) *S3DestinationConfiguration {
	s.Prefix = &v
	return s
}
837434
func (s *GrokClassifier) SetCustomPatterns(v string) *GrokClassifier {
	s.CustomPatterns = &v
	return s
}
611853
func (s *DescribeAutomationStepExecutionsOutput) SetStepExecutions(v []*StepExecution) *DescribeAutomationStepExecutionsOutput {
	s.StepExecutions = v
	return s
}
607249
func (s *PutMetricFilterInput) SetFilterPattern(v string) *PutMetricFilterInput {
	s.FilterPattern = &v
	return s
}
753374
func (s *Logging) SetFormat(format string) error {
	s.mutex.Lock()
	defer s.mutex.Unlock()
	if format == "" {
		format = defaultFormat
	}

	if format == "json" {
		s.encoding = JSON
		return nil
	}

	if format == "logfmt" {
		s.encoding = LOGFMT
		return nil
	}

	formatters, err := fabenc.ParseFormat(format)
	if err != nil {
		return err
	}
	s.multiFormatter.SetFormatters(formatters)
	s.encoding = CONSOLE

	return nil
}
1369871
func isValidRegexPattern(rewriteFrom, rewriteTo string) (*regexp.Regexp, error) {
	rewriteFromPattern, err := regexp.Compile(rewriteFrom)
	if err != nil {
		return nil, fmt.Errorf("invalid regex matching pattern: %s", rewriteFrom)
	}
	if getSubExprUsage(rewriteTo) > rewriteFromPattern.NumSubexp() {
		return nil, fmt.Errorf("the rewrite regex pattern (%s) uses more subexpressions than its corresponding matching regex pattern (%s)", rewriteTo, rewriteFrom)
	}
	return rewriteFromPattern, nil
}
209451
func (s *UpdateRegexMatchSetInput) SetRegexMatchSetId(v string) *UpdateRegexMatchSetInput {
	s.RegexMatchSetId = &v
	return s
}