// SetScrubFields sets the regular expression to match keys in the item payload for scrubbing.
// The default vlaue is regexp.MustCompile("password|secret|token"),
13802
func (c *Client) SetScrubFields(fields *regexp.Regexp) {
	c.configuration.scrubFields = fields
}
920613
func SetClusterFields(fields []string, cluster *api.Cluster, instanceGroups []*api.InstanceGroup) error {
	for _, field := range fields {
		kv := strings.SplitN(field, "=", 2)
		if len(kv) != 2 {
			return fmt.Errorf("unhandled field: %q", field)
		}

		// For now we have hard-code the values we want to support; we'll get test coverage and then do this properly...
		switch kv[0] {
		case "spec.kubelet.authorizationMode":
			cluster.Spec.Kubelet.AuthorizationMode = kv[1]
		case "spec.kubelet.authenticationTokenWebhook":
			v, err := strconv.ParseBool(kv[1])
			if err != nil {
				return fmt.Errorf("unknown boolean value: %q", kv[1])
			}
			cluster.Spec.Kubelet.AuthenticationTokenWebhook = &v
		case "cluster.spec.nodePortAccess":
			cluster.Spec.NodePortAccess = append(cluster.Spec.NodePortAccess, kv[1])
		case "spec.kubernetesVersion":
			cluster.Spec.KubernetesVersion = kv[1]

		case "cluster.spec.etcdClusters[*].enableEtcdTLS":
			v, err := strconv.ParseBool(kv[1])
			if err != nil {
				return fmt.Errorf("unknown boolean value: %q", kv[1])
			}
			for _, c := range cluster.Spec.EtcdClusters {
				c.EnableEtcdTLS = v
			}

		case "cluster.spec.etcdClusters[*].enableTLSAuth":
			v, err := strconv.ParseBool(kv[1])
			if err != nil {
				return fmt.Errorf("unknown boolean value: %q", kv[1])
			}
			for _, c := range cluster.Spec.EtcdClusters {
				c.EnableTLSAuth = v
			}

		case "cluster.spec.etcdClusters[*].version":
			for _, c := range cluster.Spec.EtcdClusters {
				c.Version = kv[1]
			}
		case "cluster.spec.etcdClusters[*].provider":
			p, err := toEtcdProviderType(kv[1])
			if err != nil {
				return err
			}
			for _, etcd := range cluster.Spec.EtcdClusters {
				etcd.Provider = p
			}
		case "cluster.spec.etcdClusters[*].manager.image":
			for _, etcd := range cluster.Spec.EtcdClusters {
				if etcd.Manager == nil {
					etcd.Manager = &api.EtcdManagerSpec{}
				}
				etcd.Manager.Image = kv[1]
			}
		default:
			return fmt.Errorf("unhandled field: %q", field)
		}
	}
	return nil
}
522044
func (s *SubscriptionDefinitionVersion) SetSubscriptions(v []*Subscription) *SubscriptionDefinitionVersion {
	s.Subscriptions = v
	return s
}
1263361
func (s *AwsSecurityFindingFilters) SetProductFields(v []*MapFilter) *AwsSecurityFindingFilters {
	s.ProductFields = v
	return s
}
1056366
func (s *DoubleArrayOptions) SetSourceFields(v string) *DoubleArrayOptions {
	s.SourceFields = &v
	return s
}
1299696
func (s *AttachLoadBalancerToSubnetsInput) SetSubnets(v []*string) *AttachLoadBalancerToSubnetsInput {
	s.Subnets = v
	return s
}
510810
func (s *EncryptionEntity) SetFieldPatterns(v *FieldPatterns) *EncryptionEntity {
	s.FieldPatterns = v
	return s
}
390004
func (s *ConfigurationOptionDescription) SetRegex(v *OptionRestrictionRegex) *ConfigurationOptionDescription {
	s.Regex = v
	return s
}
601251
func (s *DefaultMessage) SetSubstitutions(v map[string][]*string) *DefaultMessage {
	s.Substitutions = v
	return s
}
1012054
func (s *EmailMessage) SetSubstitutions(v map[string][]*string) *EmailMessage {
	s.Substitutions = v
	return s
}
842617
func (s *AwsSecurityFinding) SetUserDefinedFields(v map[string]*string) *AwsSecurityFinding {
	s.UserDefinedFields = v
	return s
}
589570
func (s *LoggingConfiguration) SetRedactedFields(v []*FieldToMatch) *LoggingConfiguration {
	s.RedactedFields = v
	return s
}
200355
func (s *DescribeSubscriptionFiltersOutput) SetSubscriptionFilters(v []*SubscriptionFilter) *DescribeSubscriptionFiltersOutput {
	s.SubscriptionFilters = v
	return s
}
34065
func (s *IndexDocumentsOutput) SetFieldNames(v []*string) *IndexDocumentsOutput {
	s.FieldNames = v
	return s
}
183838
func (s *DateArrayOptions) SetSourceFields(v string) *DateArrayOptions {
	s.SourceFields = &v
	return s
}
1182058
func (s *SslPolicy) SetSslProtocols(v []*string) *SslPolicy {
	s.SslProtocols = v
	return s
}
854525
func (s *AwsVpcConfiguration) SetSubnets(v []*string) *AwsVpcConfiguration {
	s.Subnets = v
	return s
}