// SetDefaultCodeRepositoryContains sets the DefaultCodeRepositoryContains field's value.
18683
func (s *ListNotebookInstancesInput) SetDefaultCodeRepositoryContains(v string) *ListNotebookInstancesInput {
	s.DefaultCodeRepositoryContains = &v
	return s
}
405275
func SetDefaults_SCC(scc *v1.SecurityContextConstraints) {
	if len(scc.FSGroup.Type) == 0 {
		scc.FSGroup.Type = v1.FSGroupStrategyRunAsAny
	}
	if len(scc.SupplementalGroups.Type) == 0 {
		scc.SupplementalGroups.Type = v1.SupplementalGroupsStrategyRunAsAny
	}

	if scc.Users == nil {
		scc.Users = []string{}
	}
	if scc.Groups == nil {
		scc.Groups = []string{}
	}

	var defaultAllowedVolumes sets.String
	switch {
	case scc.Volumes == nil:
		// assume a nil volume slice is allowing everything for backwards compatibility
		defaultAllowedVolumes = sets.NewString(string(v1.FSTypeAll))

	case len(scc.Volumes) == 0 && scc.AllowHostDirVolumePlugin:
		// an empty volume slice means "allow no volumes", but the boolean fields will always take precedence.
		defaultAllowedVolumes = sets.NewString(string(v1.FSTypeHostPath))

	case len(scc.Volumes) == 0 && !scc.AllowHostDirVolumePlugin:
		// an empty volume slice means "allow no volumes", but cannot be persisted in protobuf.
		// convert this to volumes:["none"]
		defaultAllowedVolumes = sets.NewString(string(v1.FSTypeNone))

	default:
		// defaults the volume slice of the SCC.
		// In order to support old clients the boolean fields will always take precedence.
		defaultAllowedVolumes = fsTypeToStringSet(scc.Volumes)
	}

	if scc.AllowHostDirVolumePlugin {
		// if already allowing all then there is no reason to add
		if !defaultAllowedVolumes.Has(string(v1.FSTypeAll)) {
			defaultAllowedVolumes.Insert(string(v1.FSTypeHostPath))
		}
	} else {
		// we should only default all volumes if the SCC came in with FSTypeAll or we defaulted it
		// otherwise we should only change the volumes slice to ensure that it does not conflict with
		// the AllowHostDirVolumePlugin setting
		shouldDefaultAllVolumes := defaultAllowedVolumes.Has(string(v1.FSTypeAll))

		// remove anything from volumes that conflicts with AllowHostDirVolumePlugin = false
		defaultAllowedVolumes.Delete(string(v1.FSTypeAll))
		defaultAllowedVolumes.Delete(string(v1.FSTypeHostPath))

		if shouldDefaultAllVolumes {
			allVolumes := sccutil.GetAllFSTypesExcept(string(v1.FSTypeHostPath))
			defaultAllowedVolumes.Insert(allVolumes.List()...)
		}
	}

	scc.Volumes = StringSetToFSType(defaultAllowedVolumes)

	// Constraints that do not include this field must remain as permissive as
	// they were prior to the introduction of this field.
	if scc.AllowPrivilegeEscalation == nil {
		t := true
		scc.AllowPrivilegeEscalation = &t
	}

}
1241553
func (s *CreateNotebookInstanceInput) SetAdditionalCodeRepositories(v []*string) *CreateNotebookInstanceInput {
	s.AdditionalCodeRepositories = v
	return s
}
823469
func (s *PatchBaselineIdentity) SetDefaultBaseline(v bool) *PatchBaselineIdentity {
	s.DefaultBaseline = &v
	return s
}
591191
func (s *UpdateNotebookInstanceInput) SetDefaultCodeRepository(v string) *UpdateNotebookInstanceInput {
	s.DefaultCodeRepository = &v
	return s
}
1148563
func setDefaults() {
	formats = defaultFormats()
	tests = defaultTests()
	codecs = defaultCodecs()
	paths = defaultPaths()
	globs = []string{"*.txt", "*.bin"}
	levels = []int{1, 6, 9}
	sizes = []int{1e4, 1e5, 1e6}
}
221862
func (s *MetricTransformation) SetDefaultValue(v float64) *MetricTransformation {
	s.DefaultValue = &v
	return s
}
947650
func (s *UpdateNotebookInstanceInput) SetAdditionalCodeRepositories(v []*string) *UpdateNotebookInstanceInput {
	s.AdditionalCodeRepositories = v
	return s
}
368976
func DefaultDecode(data []byte, value interface{}) error {
	var buff bytes.Buffer
	de := gob.NewDecoder(&buff)

	_, err := buff.Write(data)
	if err != nil {
		return err
	}

	return de.Decode(value)
}
1189934
func setDefaults(o *plugin.Options) *plugin.Options {
	d := &plugin.Options{}
	if o != nil {
		*d = *o
	}
	if d.Writer == nil {
		d.Writer = oswriter{}
	}
	if d.Flagset == nil {
		d.Flagset = &GoFlags{}
	}
	if d.Obj == nil {
		d.Obj = &binutils.Binutils{}
	}
	if d.UI == nil {
		d.UI = &stdUI{r: bufio.NewReader(os.Stdin)}
	}
	if d.HTTPTransport == nil {
		d.HTTPTransport = transport.New(d.Flagset)
	}
	if d.Sym == nil {
		d.Sym = &symbolizer.Symbolizer{Obj: d.Obj, UI: d.UI, Transport: d.HTTPTransport}
	}
	return d
}
42422
func (c *Config) setDefaults() bool {
	if c.ServerURL == "" {
		c.ServerURL = DefaultServerURL
	}
	if len(c.ThreatLists) == 0 {
		c.ThreatLists = DefaultThreatLists
	}
	if c.UpdatePeriod <= 0 {
		c.UpdatePeriod = DefaultUpdatePeriod
	}
	if c.RequestTimeout <= 0 {
		c.RequestTimeout = DefaultRequestTimeout
	}
	if c.compressionTypes == nil {
		c.compressionTypes = []pb.CompressionType{pb.CompressionType_RAW, pb.CompressionType_RICE}
	}
	return true
}
1139428
func SetDefaultCert(cert, key string) error {
	if cert == "" || key == "" {
		return fmt.Errorf("Default certificate cannot be empty")
	}

	c, err := tls.X509KeyPair([]byte(cert), []byte(key))
	if err != nil {
		return fmt.Errorf("Failed to create cert from provided info - %s", err.Error())
	}
	defaultCert = c

	certMutex.Lock()
	cfgCerts.Certificates = append([]tls.Certificate{defaultCert}, certificates...)
	cfgCerts.BuildNameToCertificate()
	certMutex.Unlock()
	return nil
}
35342
func (s *Policy) SetDefaultVersionId(v string) *Policy {
	s.DefaultVersionId = &v
	return s
}
78784
func (s *DoubleOptions) SetDefaultValue(v float64) *DoubleOptions {
	s.DefaultValue = &v
	return s
}
417853
func (s *ParameterDeclaration) SetDefaultValue(v string) *ParameterDeclaration {
	s.DefaultValue = &v
	return s
}
528541
func (s *JobUpdate) SetDefaultArguments(v map[string]*string) *JobUpdate {
	s.DefaultArguments = v
	return s
}
1093118
func (s *DescribeNotebookInstanceOutput) SetAdditionalCodeRepositories(v []*string) *DescribeNotebookInstanceOutput {
	s.AdditionalCodeRepositories = v
	return s
}