// Code generated by go generate; DO NOT EDIT.
package containers

import (
	"net/url"

	"github.com/containers/podman/v4/pkg/bindings/internal/util"
)

// Changed returns true if named field has been set
func (o *AttachOptions) Changed(fieldName string) bool {
	return util.Changed(o, fieldName)
}

// ToParams formats struct fields to be passed to API service
func (o *AttachOptions) ToParams() (url.Values, error) {
	return util.ToParams(o)
}

// WithDetachKeys set keys to detach from running container
func (o *AttachOptions) WithDetachKeys(value string) *AttachOptions {
	o.DetachKeys = &value
	return o
}

// GetDetachKeys returns value of keys to detach from running container
func (o *AttachOptions) GetDetachKeys() string {
	if o.DetachKeys == nil {
		var z string
		return z
	}
	return *o.DetachKeys
}

// WithLogs set flag to return all logs from container when true
func (o *AttachOptions) WithLogs(value bool) *AttachOptions {
	o.Logs = &value
	return o
}

// GetLogs returns value of flag to return all logs from container when true
func (o *AttachOptions) GetLogs() bool {
	if o.Logs == nil {
		var z bool
		return z
	}
	return *o.Logs
}

// WithStream set flag only return container logs when false and Logs is true
func (o *AttachOptions) WithStream(value bool) *AttachOptions {
	o.Stream = &value
	return o
}

// GetStream returns value of flag only return container logs when false and Logs is true
func (o *AttachOptions) GetStream() bool {
	if o.Stream == nil {
		var z bool
		return z
	}
	return *o.Stream
}
