// NewSetOverrideCertificateErrorsArgs initializes SetOverrideCertificateErrorsArgs with the required arguments.
336771
func NewSetOverrideCertificateErrorsArgs(override bool) *SetOverrideCertificateErrorsArgs {
	args := new(SetOverrideCertificateErrorsArgs)
	args.Override = override
	return args
}
344622
func NewGrantPermissionsArgs(origin string, permissions []PermissionType) *GrantPermissionsArgs {
	args := new(GrantPermissionsArgs)
	args.Origin = origin
	args.Permissions = permissions
	return args
}
200112
func (s *RunTaskInput) SetOverrides(v *TaskOverride) *RunTaskInput {
	s.Overrides = v
	return s
}
580603
func NewSsoErrorDetails(ErrorDetails *FailureDetailsLogInfo) *SsoErrorDetails {
	s := new(SsoErrorDetails)
	s.ErrorDetails = ErrorDetails
	return s
}
1067442
func applyPackageSpecOverride(packageSpecs []PackageSpec, overrides []PackageSpecOverride, osDistro string) []PackageSpec {
	var override *PackageSpecOverride
	for _, o := range overrides {
		if o.OSDistro == osDistro {
			override = &o
			break
		}
	}
	if override == nil {
		return packageSpecs
	}

	// Remove packages in the spec that matches the overrides in
	// Subtractions.
	var out []PackageSpec
	subtractions := make(map[string]bool)
	for _, spec := range override.Subtractions {
		subtractions[spec.Name] = true
	}
	for _, spec := range packageSpecs {
		if _, ok := subtractions[spec.Name]; !ok {
			out = append(out, spec)
		}
	}

	// Add packages in the spec that matches the overrides in Additions.
	return append(out, override.Additions...)
}
440507
func NewServiceRenderer(model *surface.Model) (renderer *Renderer, err error) {
	renderer = &Renderer{}
	renderer.Model = model
	return renderer, nil
}
413540
func NewStrictDecodingError(message string, data string) error {
	return &strictDecodingError{
		message: message,
		data:    data,
	}
}
964189
func NewServerTLS(addr string, group []*Config) (*ServerTLS, error) {
	s, err := NewServer(addr, group)
	if err != nil {
		return nil, err
	}

	return &ServerTLS{Server: s}, nil
}
282993
func (s *StartBuildInput) SetCertificateOverride(v string) *StartBuildInput {
	s.CertificateOverride = &v
	return s
}
532378
func overrideTLS(opts *Options) error {
	if opts.TLSCert == "" {
		return errors.New("TLS Server certificate must be present and valid")
	}
	if opts.TLSKey == "" {
		return errors.New("TLS Server private key must be present and valid")
	}

	tc := TLSConfigOpts{}
	tc.CertFile = opts.TLSCert
	tc.KeyFile = opts.TLSKey
	tc.CaFile = opts.TLSCaCert
	tc.Verify = opts.TLSVerify

	var err error
	opts.TLSConfig, err = GenTLSConfig(&tc)
	return err
}
436837
func (c *Client) SetPolicyOverride(override bool) {
	c.modifyLock.Lock()
	defer c.modifyLock.Unlock()

	c.policyOverride = override
}
171211
func NewServiceWithDefaults(name string, conf common.Conf) (*Service, error) {
	svc, err := NewService(name, conf, LibSystemdDir, NewDBusAPI, renderer.Join(paths.NixDataDir, "init"))
	return svc, errors.Trace(err)
}
633410
func configureOverrides(config *Config, opts *CliOpts) {
	if len(*opts.AdvertiseIP) > 0 {
		config.Sidecar.AdvertiseIP = *opts.AdvertiseIP
	}
	if len(*opts.ClusterIPs) > 0 {
		config.Sidecar.Seeds = *opts.ClusterIPs
	}
	if len(*opts.ClusterName) > 0 {
		config.Sidecar.ClusterName = *opts.ClusterName
	}
	if len(*opts.Discover) > 0 {
		config.Sidecar.Discovery = *opts.Discover
	}
	if len(*opts.LoggingLevel) > 0 {
		config.Sidecar.LoggingLevel = *opts.LoggingLevel
	}
}
876911
func NewSecureServingOptions() *genericoptions.SecureServingOptionsWithLoopback {
	o := genericoptions.SecureServingOptions{
		BindAddress: net.ParseIP("0.0.0.0"),
		BindPort:    6443,
		Required:    true,
		ServerCert: genericoptions.GeneratableKeyCert{
			PairName:      "apiserver",
			CertDirectory: "/var/run/kubernetes",
		},
	}
	return o.WithLoopback()
}
111605
func NewServerTLSFromCert(cert *tls.Certificate) TransportCredentials {
	return NewTLS(&tls.Config{Certificates: []tls.Certificate{*cert}})
}
1213443
func (s *CreateStackInstancesInput) SetParameterOverrides(v []*Parameter) *CreateStackInstancesInput {
	s.ParameterOverrides = v
	return s
}
1278101
func ValidateIgnorePreflightErrors(ignorePreflightErrors []string) (sets.String, error) {
	ignoreErrors := sets.NewString()
	allErrs := field.ErrorList{}

	for _, item := range ignorePreflightErrors {
		ignoreErrors.Insert(strings.ToLower(item)) // parameters are case insensitive
	}

	if ignoreErrors.Has("all") && ignoreErrors.Len() > 1 {
		allErrs = append(allErrs, field.Invalid(field.NewPath("ignore-preflight-errors"), strings.Join(ignoreErrors.List(), ","), "don't specify individual checks if 'all' is used"))
	}

	return ignoreErrors, allErrs.ToAggregate()
}