// SetOption sets an option.  We have none, so just ErrBadOption.
549776
func (o options) set(name string, val interface{}) error {
	switch name {
	case mangos.OptionNoDelay:
		fallthrough
	case mangos.OptionKeepAlive:
		switch v := val.(type) {
		case bool:
			o[name] = v
			return nil
		default:
			return mangos.ErrBadValue
		}
	case mangos.OptionTLSConfig:
		switch v := val.(type) {
		case *tls.Config:
			o[name] = v
			return nil
		default:
			return mangos.ErrBadValue
		}
	case OptionWebSocketCheckOrigin:
		switch v := val.(type) {
		case bool:
			o[name] = v
			return nil
		default:
			return mangos.ErrBadValue
		}
	}
	return mangos.ErrBadOption
}
1357863
func setBrokerOption(k, v interface{}) broker.Option {
	return func(o *broker.Options) {
		if o.Context == nil {
			o.Context = context.Background()
		}
		o.Context = context.WithValue(o.Context, k, v)
	}
}
254791
func (r *PURuntime) SetOptions(options OptionsType) {
	r.Lock()
	defer r.Unlock()

	r.options = &options
}
1244766
func (s *DescribeOptionGroupOptionsOutput) SetOptionGroupOptions(v []*OptionGroupOption) *DescribeOptionGroupOptionsOutput {
	s.OptionGroupOptions = v
	return s
}
256071
func (us *unionStore) SetOption(opt Option, val interface{}) {
	us.opts[opt] = val
}
1175486
func (s *SuggesterStatus) SetOptions(v *Suggester) *SuggesterStatus {
	s.Options = v
	return s
}
1078470
func (s *CertificateDetail) SetOptions(v *CertificateOptions) *CertificateDetail {
	s.Options = v
	return s
}
1293234
func (s *LogPublishingOptionsStatus) SetOptions(v map[string]*LogPublishingOption) *LogPublishingOptionsStatus {
	s.Options = v
	return s
}
247520
func (p *protocol) SetOption(option interface{}) *tcpip.Error {
	switch v := option.(type) {
	case SACKEnabled:
		p.mu.Lock()
		p.sackEnabled = bool(v)
		p.mu.Unlock()
		return nil

	case SendBufferSizeOption:
		if v.Min <= 0 || v.Default < v.Min || v.Default > v.Max {
			return tcpip.ErrInvalidOptionValue
		}
		p.mu.Lock()
		p.sendBufferSize = v
		p.mu.Unlock()
		return nil

	case ReceiveBufferSizeOption:
		if v.Min <= 0 || v.Default < v.Min || v.Default > v.Max {
			return tcpip.ErrInvalidOptionValue
		}
		p.mu.Lock()
		p.recvBufferSize = v
		p.mu.Unlock()
		return nil

	case CongestionControlOption:
		for _, c := range p.availableCongestionControl {
			if string(v) == c {
				p.mu.Lock()
				p.congestionControl = string(v)
				p.mu.Unlock()
				return nil
			}
		}
		return tcpip.ErrInvalidOptionValue
	default:
		return tcpip.ErrUnknownProtocolOption
	}
}
745247
func (s *AnalysisScheme) SetAnalysisOptions(v *AnalysisOptions) *AnalysisScheme {
	s.AnalysisOptions = v
	return s
}
853283
func (s *DescribeAvailabilityOptionsOutput) SetAvailabilityOptions(v *AvailabilityOptionsStatus) *DescribeAvailabilityOptionsOutput {
	s.AvailabilityOptions = v
	return s
}
607080
func (a *StartArgs) SetOptions(options string) *StartArgs {
	a.Options = &options
	return a
}
945511
func (spark *Sparkline) SetOption(key string, value string) {
	if spark.Data == nil {
		spark.Options = make(map[string]string)
	}
	spark.Options[key] = value
}
717324
func (s *ModifyOptionGroupOutput) SetOptionGroup(v *OptionGroup) *ModifyOptionGroupOutput {
	s.OptionGroup = v
	return s
}
1184037
func (s *CreateDBClusterInput) SetOptionGroupName(v string) *CreateDBClusterInput {
	s.OptionGroupName = &v
	return s
}
561161
func (c *Conn) SetConfigOption(option, value string) error {
	c_opt, c_val := C.CString(option), C.CString(value)
	defer C.free(unsafe.Pointer(c_opt))
	defer C.free(unsafe.Pointer(c_val))
	ret := C.rados_conf_set(c.cluster, c_opt, c_val)
	if ret < 0 {
		return RadosError(int(ret))
	} else {
		return nil
	}
}
1141940
func (s *EncryptionAtRestOptionsStatus) SetOptions(v *EncryptionAtRestOptions) *EncryptionAtRestOptionsStatus {
	s.Options = v
	return s
}