// BuildOptions generates the configurations used to create etcd manager manifest
773448
func (b *EtcdManagerOptionsBuilder) BuildOptions(o interface{}) error {
	clusterSpec := o.(*kops.ClusterSpec)

	for _, etcdCluster := range clusterSpec.EtcdClusters {
		if etcdCluster.Provider != kops.EtcdProviderTypeManager {
			continue
		}

		if etcdCluster.Manager == nil {
			etcdCluster.Manager = &kops.EtcdManagerSpec{}
		}

		if etcdCluster.Backups == nil {
			etcdCluster.Backups = &kops.EtcdBackupSpec{}
		}
		if etcdCluster.Backups.BackupStore == "" {
			base := clusterSpec.ConfigBase
			etcdCluster.Backups.BackupStore = urls.Join(base, "backups", "etcd", etcdCluster.Name)
		}

		if etcdCluster.Version == "" {
			if b.IsKubernetesGTE("1.11") {
				etcdCluster.Version = "3.2.18"
			} else {
				// Preserve existing default etcd version
				etcdCluster.Version = "2.2.1"
			}
		}
	}

	return nil
}
252272
func Convert_v1_BuildDefaultsConfig_To_config_BuildDefaultsConfig(in *v1.BuildDefaultsConfig, out *config.BuildDefaultsConfig, s conversion.Scope) error {
	return autoConvert_v1_BuildDefaultsConfig_To_config_BuildDefaultsConfig(in, out, s)
}
351416
func (s *DescribeTaskOutput) SetOptions(v *Options) *DescribeTaskOutput {
	s.Options = v
	return s
}
1063441
func DefaultOptions() EncoderOptions {
	opt := EncoderOptions{}
	opt.Eol = "\n"
	opt.BracesSameLine = false
	opt.EmitRootBraces = true
	opt.QuoteAlways = false
	opt.IndentBy = "  "
	opt.AllowMinusZero = false
	opt.UnknownAsNull = false
	return opt
}
40957
func newOptions(options ...Option) *Options {
	opts := &Options{}
	for _, o := range options {
		o(opts)
	}
	return opts
}
1175486
func (s *SuggesterStatus) SetOptions(v *Suggester) *SuggesterStatus {
	s.Options = v
	return s
}
1194341
func (s *ElasticsearchVersionStatus) SetOptions(v string) *ElasticsearchVersionStatus {
	s.Options = &v
	return s
}
804462
func (b *EtcdManagerTLSBuilder) Build(ctx *fi.ModelBuilderContext) error {
	if !b.IsMaster {
		return nil
	}

	for _, k := range []string{"main", "events"} {
		d := "/etc/kubernetes/pki/etcd-manager-" + k

		keys := make(map[string]string)
		keys["etcd-manager-ca"] = "etcd-manager-ca-" + k
		keys["etcd-peers-ca"] = "etcd-peers-ca-" + k
		// Because API server can only have a single client-cert, we need to share a client CA
		keys["etcd-clients-ca"] = "etcd-clients-ca"

		for fileName, keystoreName := range keys {
			cert, err := b.KeyStore.FindCert(keystoreName)
			if err != nil {
				return err
			}
			if cert == nil {
				glog.Warningf("keypair %q not found, won't configure", keystoreName)
				continue
			}

			if err := b.BuildCertificateTask(ctx, keystoreName, d+"/"+fileName+".crt"); err != nil {
				return err
			}
			if err := b.BuildPrivateKeyTask(ctx, keystoreName, d+"/"+fileName+".key"); err != nil {
				return err
			}
		}
	}

	// We also dynamically generate the client keypair for apiserver
	if err := b.buildKubeAPIServerKeypair(); err != nil {
		return err
	}
	return nil
}
820455
func BuildConfigEndpointFromOptions(opts ...interface{}) (fab.EndpointConfig, error) {
	// build a new EndpointConfig with overridden function implementations
	c := &EndpointConfigOptions{}
	for i, option := range opts {
		logger.Debugf("option %d: %#v", i, option)
		err := setEndpointConfigWithOptionInterface(c, option)
		if err != nil {
			return nil, err
		}
	}

	return c, nil
}
543051
func (s *CreateTaskInput) SetOptions(v *Options) *CreateTaskInput {
	s.Options = v
	return s
}
1134195
func (s *RequestCertificateInput) SetOptions(v *CertificateOptions) *RequestCertificateInput {
	s.Options = v
	return s
}
457578
func (m *mountConfig) getOptions() string {
	var opts []string
	for k, v := range m.options {
		k = escapeComma(k)
		if v != "" {
			k += "=" + escapeComma(v)
		}
		opts = append(opts, k)
	}
	return strings.Join(opts, ",")
}
460241
func (c Configuration) NewOptions() Options {
	opts := NewOptions()
	if c.MaxPositiveSkew != 0 {
		opts = opts.SetMaxPositiveSkew(c.MaxPositiveSkew)
	}
	if c.MaxNegativeSkew != 0 {
		opts = opts.SetMaxNegativeSkew(c.MaxNegativeSkew)
	}
	return opts
}
58665
func Convert_v1_BuildConfigList_To_build_BuildConfigList(in *v1.BuildConfigList, out *build.BuildConfigList, s conversion.Scope) error {
	return autoConvert_v1_BuildConfigList_To_build_BuildConfigList(in, out, s)
}
331315
func (r *REST) NewGetOptions() (runtime.Object, bool, string) {
	return &buildapi.BuildLogOptions{}, false, ""
}
682085
func (s *ScalingParametersStatus) SetOptions(v *ScalingParameters) *ScalingParametersStatus {
	s.Options = v
	return s
}
956381
func (s *UpdateCertificateOptionsInput) SetOptions(v *CertificateOptions) *UpdateCertificateOptionsInput {
	s.Options = v
	return s
}