// NewAttachOptions creates the options for attach
540097
func NewAttachOptions(streams genericclioptions.IOStreams) *AttachOptions {
	return &AttachOptions{
		StreamOptions: exec.StreamOptions{
			IOStreams: streams,
		},
		Attach:     &DefaultRemoteAttach{},
		AttachFunc: DefaultAttachFunc,
	}
}
714296
func (s *Disk) SetAttachmentState(v string) *Disk {
	s.AttachmentState = &v
	return s
}
916530
func (m *Message) AddAttachment(filename string, attachment []byte) {
	m.attachments[filename] = attachment
}
632127
func NewOption(name string, params map[string]string) Option {
	p := Parameters{}
	for k, v := range params {
		p.Set([]byte(k), []byte(v))
	}
	return Option{
		Name:       []byte(name),
		Parameters: p,
	}
}
774479
func NewAttachToTargetArgs(targetID ID) *AttachToTargetArgs {
	args := new(AttachToTargetArgs)
	args.TargetID = targetID
	return args
}
759121
func MsgOptionAttachments(attachments ...Attachment) MsgOption {
	return func(config *sendConfig) error {
		if attachments == nil {
			return nil
		}

		attachments, err := json.Marshal(attachments)
		if err == nil {
			config.values.Set("attachments", string(attachments))
		}
		return err
	}
}
383904
func (s *AddCommunicationToCaseInput) SetAttachmentSetId(v string) *AddCommunicationToCaseInput {
	s.AttachmentSetId = &v
	return s
}
885352
func (w *Writer) CreateAttachment(h AttachmentHeader) (io.WriteCloser, error) {
	initAttachmentHeader(&h)
	return w.mw.CreatePart(h.Header)
}
1320631
func (s *GenericAttachment) SetAttachmentLinkUrl(v string) *GenericAttachment {
	s.AttachmentLinkUrl = &v
	return s
}
583813
func (c Configuration) NewOptions(iOpts instrument.Options) Options {
	opts := NewOptions().
		SetRetryOptions(c.Retry.NewOptions(iOpts.MetricsScope())).
		SetInstrumentOptions(iOpts)
	if c.KeepAliveEnabled != nil {
		opts = opts.SetTCPConnectionKeepAlive(*c.KeepAliveEnabled)
	}
	if c.KeepAlivePeriod != nil {
		opts = opts.SetTCPConnectionKeepAlivePeriod(*c.KeepAlivePeriod)
	}
	return opts
}
40957
func newOptions(options ...Option) *Options {
	opts := &Options{}
	for _, o := range options {
		o(opts)
	}
	return opts
}
1374491
func (s *GatewayAttachment) SetAttachmentType(v string) *GatewayAttachment {
	s.AttachmentType = &v
	return s
}
437278
func NewOptions() Options {
	return &opts{
		contextPoolOpts:        pool.NewObjectPoolOptions(),
		finalizerPoolOpts:      pool.NewObjectPoolOptions(),
		maxPooledFinalizerCap:  defaultMaxFinalizersCap,
		initPooledFinalizerCap: defaultInitFinalizersCap,
	}
}
217655
func Convert_v1_PodAttachOptions_To_core_PodAttachOptions(in *v1.PodAttachOptions, out *core.PodAttachOptions, s conversion.Scope) error {
	return autoConvert_v1_PodAttachOptions_To_core_PodAttachOptions(in, out, s)
}
615923
func (s *BatchListIndexResponse) SetIndexAttachments(v []*IndexAttachment) *BatchListIndexResponse {
	s.IndexAttachments = v
	return s
}
696968
func (s *ListIndexOutput) SetIndexAttachments(v []*IndexAttachment) *ListIndexOutput {
	s.IndexAttachments = v
	return s
}
1284749
func (daemon *Daemon) UpdateAttachment(networkName, networkID, containerID string, config *network.NetworkingConfig) error {
	if daemon.clusterProvider == nil {
		return fmt.Errorf("cluster provider is not initialized")
	}

	if err := daemon.clusterProvider.UpdateAttachment(networkName, containerID, config); err != nil {
		return daemon.clusterProvider.UpdateAttachment(networkID, containerID, config)
	}

	return nil
}