Enhance bindings for IDE hints

* Follow https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source
  for leading comment
* Add godoc strings for all exposed methods for IDE support
* Copy field godoc strings into generated code as function godoc string
* Remove unused/unnecessary fields from generator.go structures
* Cleanup code regarding template usage

Signed-off-by: Jhon Honce <jhonce@redhat.com>
This commit is contained in:
Jhon Honce
2021-09-13 14:29:22 -07:00
parent b603c7a4b9
commit d7256be807
110 changed files with 2060 additions and 1759 deletions

View File

@ -57,6 +57,10 @@ to interact with containers.
### Examples ### Examples
The following examples build upon the connection example from above. They are all rootful connections as well. The following examples build upon the connection example from above. They are all rootful connections as well.
Note: Optional arguments to the bindings methods are set using With*() methods on *Option structures.
Composite types are not duplicated rather the address is used. As such, you should not change an underlying
field between initializing the *Option structure and calling the bindings method.
#### Inspect a container #### Inspect a container
The following example obtains the inspect information for a container named `foorbar` and then prints The following example obtains the inspect information for a container named `foorbar` and then prints
the container's ID. Note the use of optional inspect options for size. the container's ID. Note the use of optional inspect options for size.

View File

@ -37,9 +37,9 @@ type CommitOptions struct {
//go:generate go run ../generator/generator.go AttachOptions //go:generate go run ../generator/generator.go AttachOptions
// AttachOptions are optional options for attaching to containers // AttachOptions are optional options for attaching to containers
type AttachOptions struct { type AttachOptions struct {
DetachKeys *string DetachKeys *string // Keys to detach from running container
Logs *bool Logs *bool // Flag to return all logs from container when true
Stream *bool Stream *bool // Flag only return container logs when false and Logs is true
} }
//go:generate go run ../generator/generator.go CheckpointOptions //go:generate go run ../generator/generator.go CheckpointOptions

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,64 +7,57 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *AttachOptions) Changed(fieldName string) bool { func (o *AttachOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *AttachOptions) ToParams() (url.Values, error) { func (o *AttachOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithDetachKeys // WithDetachKeys set keys to detach from running container
func (o *AttachOptions) WithDetachKeys(value string) *AttachOptions { func (o *AttachOptions) WithDetachKeys(value string) *AttachOptions {
v := &value o.DetachKeys = &value
o.DetachKeys = v
return o return o
} }
// GetDetachKeys // GetDetachKeys returns value of keys to detach from running container
func (o *AttachOptions) GetDetachKeys() string { func (o *AttachOptions) GetDetachKeys() string {
var detachKeys string
if o.DetachKeys == nil { if o.DetachKeys == nil {
return detachKeys var z string
return z
} }
return *o.DetachKeys return *o.DetachKeys
} }
// WithLogs // WithLogs set flag to return all logs from container when true
func (o *AttachOptions) WithLogs(value bool) *AttachOptions { func (o *AttachOptions) WithLogs(value bool) *AttachOptions {
v := &value o.Logs = &value
o.Logs = v
return o return o
} }
// GetLogs // GetLogs returns value of flag to return all logs from container when true
func (o *AttachOptions) GetLogs() bool { func (o *AttachOptions) GetLogs() bool {
var logs bool
if o.Logs == nil { if o.Logs == nil {
return logs var z bool
return z
} }
return *o.Logs return *o.Logs
} }
// WithStream // WithStream set flag only return container logs when false and Logs is true
func (o *AttachOptions) WithStream(value bool) *AttachOptions { func (o *AttachOptions) WithStream(value bool) *AttachOptions {
v := &value o.Stream = &value
o.Stream = v
return o return o
} }
// GetStream // GetStream returns value of flag only return container logs when false and Logs is true
func (o *AttachOptions) GetStream() bool { func (o *AttachOptions) GetStream() bool {
var stream bool
if o.Stream == nil { if o.Stream == nil {
return stream var z bool
return z
} }
return *o.Stream return *o.Stream
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,96 +7,87 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *CheckpointOptions) Changed(fieldName string) bool { func (o *CheckpointOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *CheckpointOptions) ToParams() (url.Values, error) { func (o *CheckpointOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithExport // WithExport set field Export to given value
func (o *CheckpointOptions) WithExport(value string) *CheckpointOptions { func (o *CheckpointOptions) WithExport(value string) *CheckpointOptions {
v := &value o.Export = &value
o.Export = v
return o return o
} }
// GetExport // GetExport returns value of field Export
func (o *CheckpointOptions) GetExport() string { func (o *CheckpointOptions) GetExport() string {
var export string
if o.Export == nil { if o.Export == nil {
return export var z string
return z
} }
return *o.Export return *o.Export
} }
// WithIgnoreRootfs // WithIgnoreRootfs set field IgnoreRootfs to given value
func (o *CheckpointOptions) WithIgnoreRootfs(value bool) *CheckpointOptions { func (o *CheckpointOptions) WithIgnoreRootfs(value bool) *CheckpointOptions {
v := &value o.IgnoreRootfs = &value
o.IgnoreRootfs = v
return o return o
} }
// GetIgnoreRootfs // GetIgnoreRootfs returns value of field IgnoreRootfs
func (o *CheckpointOptions) GetIgnoreRootfs() bool { func (o *CheckpointOptions) GetIgnoreRootfs() bool {
var ignoreRootfs bool
if o.IgnoreRootfs == nil { if o.IgnoreRootfs == nil {
return ignoreRootfs var z bool
return z
} }
return *o.IgnoreRootfs return *o.IgnoreRootfs
} }
// WithKeep // WithKeep set field Keep to given value
func (o *CheckpointOptions) WithKeep(value bool) *CheckpointOptions { func (o *CheckpointOptions) WithKeep(value bool) *CheckpointOptions {
v := &value o.Keep = &value
o.Keep = v
return o return o
} }
// GetKeep // GetKeep returns value of field Keep
func (o *CheckpointOptions) GetKeep() bool { func (o *CheckpointOptions) GetKeep() bool {
var keep bool
if o.Keep == nil { if o.Keep == nil {
return keep var z bool
return z
} }
return *o.Keep return *o.Keep
} }
// WithLeaveRunning // WithLeaveRunning set field LeaveRunning to given value
func (o *CheckpointOptions) WithLeaveRunning(value bool) *CheckpointOptions { func (o *CheckpointOptions) WithLeaveRunning(value bool) *CheckpointOptions {
v := &value o.LeaveRunning = &value
o.LeaveRunning = v
return o return o
} }
// GetLeaveRunning // GetLeaveRunning returns value of field LeaveRunning
func (o *CheckpointOptions) GetLeaveRunning() bool { func (o *CheckpointOptions) GetLeaveRunning() bool {
var leaveRunning bool
if o.LeaveRunning == nil { if o.LeaveRunning == nil {
return leaveRunning var z bool
return z
} }
return *o.LeaveRunning return *o.LeaveRunning
} }
// WithTCPEstablished // WithTCPEstablished set field TCPEstablished to given value
func (o *CheckpointOptions) WithTCPEstablished(value bool) *CheckpointOptions { func (o *CheckpointOptions) WithTCPEstablished(value bool) *CheckpointOptions {
v := &value o.TCPEstablished = &value
o.TCPEstablished = v
return o return o
} }
// GetTCPEstablished // GetTCPEstablished returns value of field TCPEstablished
func (o *CheckpointOptions) GetTCPEstablished() bool { func (o *CheckpointOptions) GetTCPEstablished() bool {
var tCPEstablished bool
if o.TCPEstablished == nil { if o.TCPEstablished == nil {
return tCPEstablished var z bool
return z
} }
return *o.TCPEstablished return *o.TCPEstablished
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,128 +7,117 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *CommitOptions) Changed(fieldName string) bool { func (o *CommitOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *CommitOptions) ToParams() (url.Values, error) { func (o *CommitOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAuthor // WithAuthor set field Author to given value
func (o *CommitOptions) WithAuthor(value string) *CommitOptions { func (o *CommitOptions) WithAuthor(value string) *CommitOptions {
v := &value o.Author = &value
o.Author = v
return o return o
} }
// GetAuthor // GetAuthor returns value of field Author
func (o *CommitOptions) GetAuthor() string { func (o *CommitOptions) GetAuthor() string {
var author string
if o.Author == nil { if o.Author == nil {
return author var z string
return z
} }
return *o.Author return *o.Author
} }
// WithChanges // WithChanges set field Changes to given value
func (o *CommitOptions) WithChanges(value []string) *CommitOptions { func (o *CommitOptions) WithChanges(value []string) *CommitOptions {
v := value o.Changes = value
o.Changes = v
return o return o
} }
// GetChanges // GetChanges returns value of field Changes
func (o *CommitOptions) GetChanges() []string { func (o *CommitOptions) GetChanges() []string {
var changes []string
if o.Changes == nil { if o.Changes == nil {
return changes var z []string
return z
} }
return o.Changes return o.Changes
} }
// WithComment // WithComment set field Comment to given value
func (o *CommitOptions) WithComment(value string) *CommitOptions { func (o *CommitOptions) WithComment(value string) *CommitOptions {
v := &value o.Comment = &value
o.Comment = v
return o return o
} }
// GetComment // GetComment returns value of field Comment
func (o *CommitOptions) GetComment() string { func (o *CommitOptions) GetComment() string {
var comment string
if o.Comment == nil { if o.Comment == nil {
return comment var z string
return z
} }
return *o.Comment return *o.Comment
} }
// WithFormat // WithFormat set field Format to given value
func (o *CommitOptions) WithFormat(value string) *CommitOptions { func (o *CommitOptions) WithFormat(value string) *CommitOptions {
v := &value o.Format = &value
o.Format = v
return o return o
} }
// GetFormat // GetFormat returns value of field Format
func (o *CommitOptions) GetFormat() string { func (o *CommitOptions) GetFormat() string {
var format string
if o.Format == nil { if o.Format == nil {
return format var z string
return z
} }
return *o.Format return *o.Format
} }
// WithPause // WithPause set field Pause to given value
func (o *CommitOptions) WithPause(value bool) *CommitOptions { func (o *CommitOptions) WithPause(value bool) *CommitOptions {
v := &value o.Pause = &value
o.Pause = v
return o return o
} }
// GetPause // GetPause returns value of field Pause
func (o *CommitOptions) GetPause() bool { func (o *CommitOptions) GetPause() bool {
var pause bool
if o.Pause == nil { if o.Pause == nil {
return pause var z bool
return z
} }
return *o.Pause return *o.Pause
} }
// WithRepo // WithRepo set field Repo to given value
func (o *CommitOptions) WithRepo(value string) *CommitOptions { func (o *CommitOptions) WithRepo(value string) *CommitOptions {
v := &value o.Repo = &value
o.Repo = v
return o return o
} }
// GetRepo // GetRepo returns value of field Repo
func (o *CommitOptions) GetRepo() string { func (o *CommitOptions) GetRepo() string {
var repo string
if o.Repo == nil { if o.Repo == nil {
return repo var z string
return z
} }
return *o.Repo return *o.Repo
} }
// WithTag // WithTag set field Tag to given value
func (o *CommitOptions) WithTag(value string) *CommitOptions { func (o *CommitOptions) WithTag(value string) *CommitOptions {
v := &value o.Tag = &value
o.Tag = v
return o return o
} }
// GetTag // GetTag returns value of field Tag
func (o *CommitOptions) GetTag() string { func (o *CommitOptions) GetTag() string {
var tag string
if o.Tag == nil { if o.Tag == nil {
return tag var z string
return z
} }
return *o.Tag return *o.Tag
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *CopyOptions) Changed(fieldName string) bool { func (o *CopyOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *CopyOptions) ToParams() (url.Values, error) { func (o *CopyOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithChown // WithChown set field Chown to given value
func (o *CopyOptions) WithChown(value bool) *CopyOptions { func (o *CopyOptions) WithChown(value bool) *CopyOptions {
v := &value o.Chown = &value
o.Chown = v
return o return o
} }
// GetChown // GetChown returns value of field Chown
func (o *CopyOptions) GetChown() bool { func (o *CopyOptions) GetChown() bool {
var chown bool
if o.Chown == nil { if o.Chown == nil {
return chown var z bool
return z
} }
return *o.Chown return *o.Chown
} }
// WithRename // WithRename set field Rename to given value
func (o *CopyOptions) WithRename(value map[string]string) *CopyOptions { func (o *CopyOptions) WithRename(value map[string]string) *CopyOptions {
v := value o.Rename = value
o.Rename = v
return o return o
} }
// GetRename // GetRename returns value of field Rename
func (o *CopyOptions) GetRename() map[string]string { func (o *CopyOptions) GetRename() map[string]string {
var rename map[string]string
if o.Rename == nil { if o.Rename == nil {
return rename var z map[string]string
return z
} }
return o.Rename return o.Rename
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *CreateOptions) Changed(fieldName string) bool { func (o *CreateOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *CreateOptions) ToParams() (url.Values, error) { func (o *CreateOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *DiffOptions) Changed(fieldName string) bool { func (o *DiffOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *DiffOptions) ToParams() (url.Values, error) { func (o *DiffOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithParent // WithParent set field Parent to given value
func (o *DiffOptions) WithParent(value string) *DiffOptions { func (o *DiffOptions) WithParent(value string) *DiffOptions {
v := &value o.Parent = &value
o.Parent = v
return o return o
} }
// GetParent // GetParent returns value of field Parent
func (o *DiffOptions) GetParent() string { func (o *DiffOptions) GetParent() string {
var parent string
if o.Parent == nil { if o.Parent == nil {
return parent var z string
return z
} }
return *o.Parent return *o.Parent
} }
// WithDiffType // WithDiffType set field DiffType to given value
func (o *DiffOptions) WithDiffType(value string) *DiffOptions { func (o *DiffOptions) WithDiffType(value string) *DiffOptions {
v := &value o.DiffType = &value
o.DiffType = v
return o return o
} }
// GetDiffType // GetDiffType returns value of field DiffType
func (o *DiffOptions) GetDiffType() string { func (o *DiffOptions) GetDiffType() string {
var diffType string
if o.DiffType == nil { if o.DiffType == nil {
return diffType var z string
return z
} }
return *o.DiffType return *o.DiffType
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExecInspectOptions) Changed(fieldName string) bool { func (o *ExecInspectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExecInspectOptions) ToParams() (url.Values, error) { func (o *ExecInspectOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExecStartOptions) Changed(fieldName string) bool { func (o *ExecStartOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExecStartOptions) ToParams() (url.Values, error) { func (o *ExecStartOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -8,112 +9,102 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExecStartAndAttachOptions) Changed(fieldName string) bool { func (o *ExecStartAndAttachOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExecStartAndAttachOptions) ToParams() (url.Values, error) { func (o *ExecStartAndAttachOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithOutputStream // WithOutputStream set field OutputStream to given value
func (o *ExecStartAndAttachOptions) WithOutputStream(value io.WriteCloser) *ExecStartAndAttachOptions { func (o *ExecStartAndAttachOptions) WithOutputStream(value io.WriteCloser) *ExecStartAndAttachOptions {
v := &value o.OutputStream = &value
o.OutputStream = v
return o return o
} }
// GetOutputStream // GetOutputStream returns value of field OutputStream
func (o *ExecStartAndAttachOptions) GetOutputStream() io.WriteCloser { func (o *ExecStartAndAttachOptions) GetOutputStream() io.WriteCloser {
var outputStream io.WriteCloser
if o.OutputStream == nil { if o.OutputStream == nil {
return outputStream var z io.WriteCloser
return z
} }
return *o.OutputStream return *o.OutputStream
} }
// WithErrorStream // WithErrorStream set field ErrorStream to given value
func (o *ExecStartAndAttachOptions) WithErrorStream(value io.WriteCloser) *ExecStartAndAttachOptions { func (o *ExecStartAndAttachOptions) WithErrorStream(value io.WriteCloser) *ExecStartAndAttachOptions {
v := &value o.ErrorStream = &value
o.ErrorStream = v
return o return o
} }
// GetErrorStream // GetErrorStream returns value of field ErrorStream
func (o *ExecStartAndAttachOptions) GetErrorStream() io.WriteCloser { func (o *ExecStartAndAttachOptions) GetErrorStream() io.WriteCloser {
var errorStream io.WriteCloser
if o.ErrorStream == nil { if o.ErrorStream == nil {
return errorStream var z io.WriteCloser
return z
} }
return *o.ErrorStream return *o.ErrorStream
} }
// WithInputStream // WithInputStream set field InputStream to given value
func (o *ExecStartAndAttachOptions) WithInputStream(value bufio.Reader) *ExecStartAndAttachOptions { func (o *ExecStartAndAttachOptions) WithInputStream(value bufio.Reader) *ExecStartAndAttachOptions {
v := &value o.InputStream = &value
o.InputStream = v
return o return o
} }
// GetInputStream // GetInputStream returns value of field InputStream
func (o *ExecStartAndAttachOptions) GetInputStream() bufio.Reader { func (o *ExecStartAndAttachOptions) GetInputStream() bufio.Reader {
var inputStream bufio.Reader
if o.InputStream == nil { if o.InputStream == nil {
return inputStream var z bufio.Reader
return z
} }
return *o.InputStream return *o.InputStream
} }
// WithAttachOutput // WithAttachOutput set field AttachOutput to given value
func (o *ExecStartAndAttachOptions) WithAttachOutput(value bool) *ExecStartAndAttachOptions { func (o *ExecStartAndAttachOptions) WithAttachOutput(value bool) *ExecStartAndAttachOptions {
v := &value o.AttachOutput = &value
o.AttachOutput = v
return o return o
} }
// GetAttachOutput // GetAttachOutput returns value of field AttachOutput
func (o *ExecStartAndAttachOptions) GetAttachOutput() bool { func (o *ExecStartAndAttachOptions) GetAttachOutput() bool {
var attachOutput bool
if o.AttachOutput == nil { if o.AttachOutput == nil {
return attachOutput var z bool
return z
} }
return *o.AttachOutput return *o.AttachOutput
} }
// WithAttachError // WithAttachError set field AttachError to given value
func (o *ExecStartAndAttachOptions) WithAttachError(value bool) *ExecStartAndAttachOptions { func (o *ExecStartAndAttachOptions) WithAttachError(value bool) *ExecStartAndAttachOptions {
v := &value o.AttachError = &value
o.AttachError = v
return o return o
} }
// GetAttachError // GetAttachError returns value of field AttachError
func (o *ExecStartAndAttachOptions) GetAttachError() bool { func (o *ExecStartAndAttachOptions) GetAttachError() bool {
var attachError bool
if o.AttachError == nil { if o.AttachError == nil {
return attachError var z bool
return z
} }
return *o.AttachError return *o.AttachError
} }
// WithAttachInput // WithAttachInput set field AttachInput to given value
func (o *ExecStartAndAttachOptions) WithAttachInput(value bool) *ExecStartAndAttachOptions { func (o *ExecStartAndAttachOptions) WithAttachInput(value bool) *ExecStartAndAttachOptions {
v := &value o.AttachInput = &value
o.AttachInput = v
return o return o
} }
// GetAttachInput // GetAttachInput returns value of field AttachInput
func (o *ExecStartAndAttachOptions) GetAttachInput() bool { func (o *ExecStartAndAttachOptions) GetAttachInput() bool {
var attachInput bool
if o.AttachInput == nil { if o.AttachInput == nil {
return attachInput var z bool
return z
} }
return *o.AttachInput return *o.AttachInput
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExistsOptions) Changed(fieldName string) bool { func (o *ExistsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExistsOptions) ToParams() (url.Values, error) { func (o *ExistsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithExternal // WithExternal set field External to given value
func (o *ExistsOptions) WithExternal(value bool) *ExistsOptions { func (o *ExistsOptions) WithExternal(value bool) *ExistsOptions {
v := &value o.External = &value
o.External = v
return o return o
} }
// GetExternal // GetExternal returns value of field External
func (o *ExistsOptions) GetExternal() bool { func (o *ExistsOptions) GetExternal() bool {
var external bool
if o.External == nil { if o.External == nil {
return external var z bool
return z
} }
return *o.External return *o.External
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExportOptions) Changed(fieldName string) bool { func (o *ExportOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExportOptions) ToParams() (url.Values, error) { func (o *ExportOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *HealthCheckOptions) Changed(fieldName string) bool { func (o *HealthCheckOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *HealthCheckOptions) ToParams() (url.Values, error) { func (o *HealthCheckOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *InitOptions) Changed(fieldName string) bool { func (o *InitOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *InitOptions) ToParams() (url.Values, error) { func (o *InitOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *InspectOptions) Changed(fieldName string) bool { func (o *InspectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *InspectOptions) ToParams() (url.Values, error) { func (o *InspectOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithSize // WithSize set field Size to given value
func (o *InspectOptions) WithSize(value bool) *InspectOptions { func (o *InspectOptions) WithSize(value bool) *InspectOptions {
v := &value o.Size = &value
o.Size = v
return o return o
} }
// GetSize // GetSize returns value of field Size
func (o *InspectOptions) GetSize() bool { func (o *InspectOptions) GetSize() bool {
var size bool
if o.Size == nil { if o.Size == nil {
return size var z bool
return z
} }
return *o.Size return *o.Size
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *KillOptions) Changed(fieldName string) bool { func (o *KillOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *KillOptions) ToParams() (url.Values, error) { func (o *KillOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithSignal // WithSignal set field Signal to given value
func (o *KillOptions) WithSignal(value string) *KillOptions { func (o *KillOptions) WithSignal(value string) *KillOptions {
v := &value o.Signal = &value
o.Signal = v
return o return o
} }
// GetSignal // GetSignal returns value of field Signal
func (o *KillOptions) GetSignal() string { func (o *KillOptions) GetSignal() string {
var signal string
if o.Signal == nil { if o.Signal == nil {
return signal var z string
return z
} }
return *o.Signal return *o.Signal
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,128 +7,117 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ListOptions) Changed(fieldName string) bool { func (o *ListOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ListOptions) ToParams() (url.Values, error) { func (o *ListOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAll // WithAll set field All to given value
func (o *ListOptions) WithAll(value bool) *ListOptions { func (o *ListOptions) WithAll(value bool) *ListOptions {
v := &value o.All = &value
o.All = v
return o return o
} }
// GetAll // GetAll returns value of field All
func (o *ListOptions) GetAll() bool { func (o *ListOptions) GetAll() bool {
var all bool
if o.All == nil { if o.All == nil {
return all var z bool
return z
} }
return *o.All return *o.All
} }
// WithExternal // WithExternal set field External to given value
func (o *ListOptions) WithExternal(value bool) *ListOptions { func (o *ListOptions) WithExternal(value bool) *ListOptions {
v := &value o.External = &value
o.External = v
return o return o
} }
// GetExternal // GetExternal returns value of field External
func (o *ListOptions) GetExternal() bool { func (o *ListOptions) GetExternal() bool {
var external bool
if o.External == nil { if o.External == nil {
return external var z bool
return z
} }
return *o.External return *o.External
} }
// WithFilters // WithFilters set field Filters to given value
func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions { func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *ListOptions) GetFilters() map[string][]string { func (o *ListOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }
// WithLast // WithLast set field Last to given value
func (o *ListOptions) WithLast(value int) *ListOptions { func (o *ListOptions) WithLast(value int) *ListOptions {
v := &value o.Last = &value
o.Last = v
return o return o
} }
// GetLast // GetLast returns value of field Last
func (o *ListOptions) GetLast() int { func (o *ListOptions) GetLast() int {
var last int
if o.Last == nil { if o.Last == nil {
return last var z int
return z
} }
return *o.Last return *o.Last
} }
// WithNamespace // WithNamespace set field Namespace to given value
func (o *ListOptions) WithNamespace(value bool) *ListOptions { func (o *ListOptions) WithNamespace(value bool) *ListOptions {
v := &value o.Namespace = &value
o.Namespace = v
return o return o
} }
// GetNamespace // GetNamespace returns value of field Namespace
func (o *ListOptions) GetNamespace() bool { func (o *ListOptions) GetNamespace() bool {
var namespace bool
if o.Namespace == nil { if o.Namespace == nil {
return namespace var z bool
return z
} }
return *o.Namespace return *o.Namespace
} }
// WithSize // WithSize set field Size to given value
func (o *ListOptions) WithSize(value bool) *ListOptions { func (o *ListOptions) WithSize(value bool) *ListOptions {
v := &value o.Size = &value
o.Size = v
return o return o
} }
// GetSize // GetSize returns value of field Size
func (o *ListOptions) GetSize() bool { func (o *ListOptions) GetSize() bool {
var size bool
if o.Size == nil { if o.Size == nil {
return size var z bool
return z
} }
return *o.Size return *o.Size
} }
// WithSync // WithSync set field Sync to given value
func (o *ListOptions) WithSync(value bool) *ListOptions { func (o *ListOptions) WithSync(value bool) *ListOptions {
v := &value o.Sync = &value
o.Sync = v
return o return o
} }
// GetSync // GetSync returns value of field Sync
func (o *ListOptions) GetSync() bool { func (o *ListOptions) GetSync() bool {
var sync bool
if o.Sync == nil { if o.Sync == nil {
return sync var z bool
return z
} }
return *o.Sync return *o.Sync
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,128 +7,117 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *LogOptions) Changed(fieldName string) bool { func (o *LogOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *LogOptions) ToParams() (url.Values, error) { func (o *LogOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithFollow // WithFollow set field Follow to given value
func (o *LogOptions) WithFollow(value bool) *LogOptions { func (o *LogOptions) WithFollow(value bool) *LogOptions {
v := &value o.Follow = &value
o.Follow = v
return o return o
} }
// GetFollow // GetFollow returns value of field Follow
func (o *LogOptions) GetFollow() bool { func (o *LogOptions) GetFollow() bool {
var follow bool
if o.Follow == nil { if o.Follow == nil {
return follow var z bool
return z
} }
return *o.Follow return *o.Follow
} }
// WithSince // WithSince set field Since to given value
func (o *LogOptions) WithSince(value string) *LogOptions { func (o *LogOptions) WithSince(value string) *LogOptions {
v := &value o.Since = &value
o.Since = v
return o return o
} }
// GetSince // GetSince returns value of field Since
func (o *LogOptions) GetSince() string { func (o *LogOptions) GetSince() string {
var since string
if o.Since == nil { if o.Since == nil {
return since var z string
return z
} }
return *o.Since return *o.Since
} }
// WithStderr // WithStderr set field Stderr to given value
func (o *LogOptions) WithStderr(value bool) *LogOptions { func (o *LogOptions) WithStderr(value bool) *LogOptions {
v := &value o.Stderr = &value
o.Stderr = v
return o return o
} }
// GetStderr // GetStderr returns value of field Stderr
func (o *LogOptions) GetStderr() bool { func (o *LogOptions) GetStderr() bool {
var stderr bool
if o.Stderr == nil { if o.Stderr == nil {
return stderr var z bool
return z
} }
return *o.Stderr return *o.Stderr
} }
// WithStdout // WithStdout set field Stdout to given value
func (o *LogOptions) WithStdout(value bool) *LogOptions { func (o *LogOptions) WithStdout(value bool) *LogOptions {
v := &value o.Stdout = &value
o.Stdout = v
return o return o
} }
// GetStdout // GetStdout returns value of field Stdout
func (o *LogOptions) GetStdout() bool { func (o *LogOptions) GetStdout() bool {
var stdout bool
if o.Stdout == nil { if o.Stdout == nil {
return stdout var z bool
return z
} }
return *o.Stdout return *o.Stdout
} }
// WithTail // WithTail set field Tail to given value
func (o *LogOptions) WithTail(value string) *LogOptions { func (o *LogOptions) WithTail(value string) *LogOptions {
v := &value o.Tail = &value
o.Tail = v
return o return o
} }
// GetTail // GetTail returns value of field Tail
func (o *LogOptions) GetTail() string { func (o *LogOptions) GetTail() string {
var tail string
if o.Tail == nil { if o.Tail == nil {
return tail var z string
return z
} }
return *o.Tail return *o.Tail
} }
// WithTimestamps // WithTimestamps set field Timestamps to given value
func (o *LogOptions) WithTimestamps(value bool) *LogOptions { func (o *LogOptions) WithTimestamps(value bool) *LogOptions {
v := &value o.Timestamps = &value
o.Timestamps = v
return o return o
} }
// GetTimestamps // GetTimestamps returns value of field Timestamps
func (o *LogOptions) GetTimestamps() bool { func (o *LogOptions) GetTimestamps() bool {
var timestamps bool
if o.Timestamps == nil { if o.Timestamps == nil {
return timestamps var z bool
return z
} }
return *o.Timestamps return *o.Timestamps
} }
// WithUntil // WithUntil set field Until to given value
func (o *LogOptions) WithUntil(value string) *LogOptions { func (o *LogOptions) WithUntil(value string) *LogOptions {
v := &value o.Until = &value
o.Until = v
return o return o
} }
// GetUntil // GetUntil returns value of field Until
func (o *LogOptions) GetUntil() string { func (o *LogOptions) GetUntil() string {
var until string
if o.Until == nil { if o.Until == nil {
return until var z string
return z
} }
return *o.Until return *o.Until
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *MountOptions) Changed(fieldName string) bool { func (o *MountOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *MountOptions) ToParams() (url.Values, error) { func (o *MountOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *MountedContainerPathsOptions) Changed(fieldName string) bool { func (o *MountedContainerPathsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *MountedContainerPathsOptions) ToParams() (url.Values, error) { func (o *MountedContainerPathsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PauseOptions) Changed(fieldName string) bool { func (o *PauseOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PauseOptions) ToParams() (url.Values, error) { func (o *PauseOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PruneOptions) Changed(fieldName string) bool { func (o *PruneOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PruneOptions) ToParams() (url.Values, error) { func (o *PruneOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithFilters // WithFilters set field Filters to given value
func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions { func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *PruneOptions) GetFilters() map[string][]string { func (o *PruneOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,64 +7,57 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RemoveOptions) Changed(fieldName string) bool { func (o *RemoveOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RemoveOptions) ToParams() (url.Values, error) { func (o *RemoveOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithIgnore // WithIgnore set field Ignore to given value
func (o *RemoveOptions) WithIgnore(value bool) *RemoveOptions { func (o *RemoveOptions) WithIgnore(value bool) *RemoveOptions {
v := &value o.Ignore = &value
o.Ignore = v
return o return o
} }
// GetIgnore // GetIgnore returns value of field Ignore
func (o *RemoveOptions) GetIgnore() bool { func (o *RemoveOptions) GetIgnore() bool {
var ignore bool
if o.Ignore == nil { if o.Ignore == nil {
return ignore var z bool
return z
} }
return *o.Ignore return *o.Ignore
} }
// WithForce // WithForce set field Force to given value
func (o *RemoveOptions) WithForce(value bool) *RemoveOptions { func (o *RemoveOptions) WithForce(value bool) *RemoveOptions {
v := &value o.Force = &value
o.Force = v
return o return o
} }
// GetForce // GetForce returns value of field Force
func (o *RemoveOptions) GetForce() bool { func (o *RemoveOptions) GetForce() bool {
var force bool
if o.Force == nil { if o.Force == nil {
return force var z bool
return z
} }
return *o.Force return *o.Force
} }
// WithVolumes // WithVolumes set field Volumes to given value
func (o *RemoveOptions) WithVolumes(value bool) *RemoveOptions { func (o *RemoveOptions) WithVolumes(value bool) *RemoveOptions {
v := &value o.Volumes = &value
o.Volumes = v
return o return o
} }
// GetVolumes // GetVolumes returns value of field Volumes
func (o *RemoveOptions) GetVolumes() bool { func (o *RemoveOptions) GetVolumes() bool {
var volumes bool
if o.Volumes == nil { if o.Volumes == nil {
return volumes var z bool
return z
} }
return *o.Volumes return *o.Volumes
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RenameOptions) Changed(fieldName string) bool { func (o *RenameOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RenameOptions) ToParams() (url.Values, error) { func (o *RenameOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithName // WithName set field Name to given value
func (o *RenameOptions) WithName(value string) *RenameOptions { func (o *RenameOptions) WithName(value string) *RenameOptions {
v := &value o.Name = &value
o.Name = v
return o return o
} }
// GetName // GetName returns value of field Name
func (o *RenameOptions) GetName() string { func (o *RenameOptions) GetName() string {
var name string
if o.Name == nil { if o.Name == nil {
return name var z string
return z
} }
return *o.Name return *o.Name
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ResizeExecTTYOptions) Changed(fieldName string) bool { func (o *ResizeExecTTYOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ResizeExecTTYOptions) ToParams() (url.Values, error) { func (o *ResizeExecTTYOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithHeight // WithHeight set field Height to given value
func (o *ResizeExecTTYOptions) WithHeight(value int) *ResizeExecTTYOptions { func (o *ResizeExecTTYOptions) WithHeight(value int) *ResizeExecTTYOptions {
v := &value o.Height = &value
o.Height = v
return o return o
} }
// GetHeight // GetHeight returns value of field Height
func (o *ResizeExecTTYOptions) GetHeight() int { func (o *ResizeExecTTYOptions) GetHeight() int {
var height int
if o.Height == nil { if o.Height == nil {
return height var z int
return z
} }
return *o.Height return *o.Height
} }
// WithWidth // WithWidth set field Width to given value
func (o *ResizeExecTTYOptions) WithWidth(value int) *ResizeExecTTYOptions { func (o *ResizeExecTTYOptions) WithWidth(value int) *ResizeExecTTYOptions {
v := &value o.Width = &value
o.Width = v
return o return o
} }
// GetWidth // GetWidth returns value of field Width
func (o *ResizeExecTTYOptions) GetWidth() int { func (o *ResizeExecTTYOptions) GetWidth() int {
var width int
if o.Width == nil { if o.Width == nil {
return width var z int
return z
} }
return *o.Width return *o.Width
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,64 +7,57 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ResizeTTYOptions) Changed(fieldName string) bool { func (o *ResizeTTYOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ResizeTTYOptions) ToParams() (url.Values, error) { func (o *ResizeTTYOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithHeight // WithHeight set field Height to given value
func (o *ResizeTTYOptions) WithHeight(value int) *ResizeTTYOptions { func (o *ResizeTTYOptions) WithHeight(value int) *ResizeTTYOptions {
v := &value o.Height = &value
o.Height = v
return o return o
} }
// GetHeight // GetHeight returns value of field Height
func (o *ResizeTTYOptions) GetHeight() int { func (o *ResizeTTYOptions) GetHeight() int {
var height int
if o.Height == nil { if o.Height == nil {
return height var z int
return z
} }
return *o.Height return *o.Height
} }
// WithWidth // WithWidth set field Width to given value
func (o *ResizeTTYOptions) WithWidth(value int) *ResizeTTYOptions { func (o *ResizeTTYOptions) WithWidth(value int) *ResizeTTYOptions {
v := &value o.Width = &value
o.Width = v
return o return o
} }
// GetWidth // GetWidth returns value of field Width
func (o *ResizeTTYOptions) GetWidth() int { func (o *ResizeTTYOptions) GetWidth() int {
var width int
if o.Width == nil { if o.Width == nil {
return width var z int
return z
} }
return *o.Width return *o.Width
} }
// WithRunning // WithRunning set field Running to given value
func (o *ResizeTTYOptions) WithRunning(value bool) *ResizeTTYOptions { func (o *ResizeTTYOptions) WithRunning(value bool) *ResizeTTYOptions {
v := &value o.Running = &value
o.Running = v
return o return o
} }
// GetRunning // GetRunning returns value of field Running
func (o *ResizeTTYOptions) GetRunning() bool { func (o *ResizeTTYOptions) GetRunning() bool {
var running bool
if o.Running == nil { if o.Running == nil {
return running var z bool
return z
} }
return *o.Running return *o.Running
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RestartOptions) Changed(fieldName string) bool { func (o *RestartOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RestartOptions) ToParams() (url.Values, error) { func (o *RestartOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithTimeout // WithTimeout set field Timeout to given value
func (o *RestartOptions) WithTimeout(value int) *RestartOptions { func (o *RestartOptions) WithTimeout(value int) *RestartOptions {
v := &value o.Timeout = &value
o.Timeout = v
return o return o
} }
// GetTimeout // GetTimeout returns value of field Timeout
func (o *RestartOptions) GetTimeout() int { func (o *RestartOptions) GetTimeout() int {
var timeout int
if o.Timeout == nil { if o.Timeout == nil {
return timeout var z int
return z
} }
return *o.Timeout return *o.Timeout
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,144 +7,132 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RestoreOptions) Changed(fieldName string) bool { func (o *RestoreOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RestoreOptions) ToParams() (url.Values, error) { func (o *RestoreOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithIgnoreRootfs // WithIgnoreRootfs set field IgnoreRootfs to given value
func (o *RestoreOptions) WithIgnoreRootfs(value bool) *RestoreOptions { func (o *RestoreOptions) WithIgnoreRootfs(value bool) *RestoreOptions {
v := &value o.IgnoreRootfs = &value
o.IgnoreRootfs = v
return o return o
} }
// GetIgnoreRootfs // GetIgnoreRootfs returns value of field IgnoreRootfs
func (o *RestoreOptions) GetIgnoreRootfs() bool { func (o *RestoreOptions) GetIgnoreRootfs() bool {
var ignoreRootfs bool
if o.IgnoreRootfs == nil { if o.IgnoreRootfs == nil {
return ignoreRootfs var z bool
return z
} }
return *o.IgnoreRootfs return *o.IgnoreRootfs
} }
// WithIgnoreStaticIP // WithIgnoreStaticIP set field IgnoreStaticIP to given value
func (o *RestoreOptions) WithIgnoreStaticIP(value bool) *RestoreOptions { func (o *RestoreOptions) WithIgnoreStaticIP(value bool) *RestoreOptions {
v := &value o.IgnoreStaticIP = &value
o.IgnoreStaticIP = v
return o return o
} }
// GetIgnoreStaticIP // GetIgnoreStaticIP returns value of field IgnoreStaticIP
func (o *RestoreOptions) GetIgnoreStaticIP() bool { func (o *RestoreOptions) GetIgnoreStaticIP() bool {
var ignoreStaticIP bool
if o.IgnoreStaticIP == nil { if o.IgnoreStaticIP == nil {
return ignoreStaticIP var z bool
return z
} }
return *o.IgnoreStaticIP return *o.IgnoreStaticIP
} }
// WithIgnoreStaticMAC // WithIgnoreStaticMAC set field IgnoreStaticMAC to given value
func (o *RestoreOptions) WithIgnoreStaticMAC(value bool) *RestoreOptions { func (o *RestoreOptions) WithIgnoreStaticMAC(value bool) *RestoreOptions {
v := &value o.IgnoreStaticMAC = &value
o.IgnoreStaticMAC = v
return o return o
} }
// GetIgnoreStaticMAC // GetIgnoreStaticMAC returns value of field IgnoreStaticMAC
func (o *RestoreOptions) GetIgnoreStaticMAC() bool { func (o *RestoreOptions) GetIgnoreStaticMAC() bool {
var ignoreStaticMAC bool
if o.IgnoreStaticMAC == nil { if o.IgnoreStaticMAC == nil {
return ignoreStaticMAC var z bool
return z
} }
return *o.IgnoreStaticMAC return *o.IgnoreStaticMAC
} }
// WithImportAchive // WithImportAchive set field ImportAchive to given value
func (o *RestoreOptions) WithImportAchive(value string) *RestoreOptions { func (o *RestoreOptions) WithImportAchive(value string) *RestoreOptions {
v := &value o.ImportAchive = &value
o.ImportAchive = v
return o return o
} }
// GetImportAchive // GetImportAchive returns value of field ImportAchive
func (o *RestoreOptions) GetImportAchive() string { func (o *RestoreOptions) GetImportAchive() string {
var importAchive string
if o.ImportAchive == nil { if o.ImportAchive == nil {
return importAchive var z string
return z
} }
return *o.ImportAchive return *o.ImportAchive
} }
// WithKeep // WithKeep set field Keep to given value
func (o *RestoreOptions) WithKeep(value bool) *RestoreOptions { func (o *RestoreOptions) WithKeep(value bool) *RestoreOptions {
v := &value o.Keep = &value
o.Keep = v
return o return o
} }
// GetKeep // GetKeep returns value of field Keep
func (o *RestoreOptions) GetKeep() bool { func (o *RestoreOptions) GetKeep() bool {
var keep bool
if o.Keep == nil { if o.Keep == nil {
return keep var z bool
return z
} }
return *o.Keep return *o.Keep
} }
// WithName // WithName set field Name to given value
func (o *RestoreOptions) WithName(value string) *RestoreOptions { func (o *RestoreOptions) WithName(value string) *RestoreOptions {
v := &value o.Name = &value
o.Name = v
return o return o
} }
// GetName // GetName returns value of field Name
func (o *RestoreOptions) GetName() string { func (o *RestoreOptions) GetName() string {
var name string
if o.Name == nil { if o.Name == nil {
return name var z string
return z
} }
return *o.Name return *o.Name
} }
// WithTCPEstablished // WithTCPEstablished set field TCPEstablished to given value
func (o *RestoreOptions) WithTCPEstablished(value bool) *RestoreOptions { func (o *RestoreOptions) WithTCPEstablished(value bool) *RestoreOptions {
v := &value o.TCPEstablished = &value
o.TCPEstablished = v
return o return o
} }
// GetTCPEstablished // GetTCPEstablished returns value of field TCPEstablished
func (o *RestoreOptions) GetTCPEstablished() bool { func (o *RestoreOptions) GetTCPEstablished() bool {
var tCPEstablished bool
if o.TCPEstablished == nil { if o.TCPEstablished == nil {
return tCPEstablished var z bool
return z
} }
return *o.TCPEstablished return *o.TCPEstablished
} }
// WithPod // WithPod set field Pod to given value
func (o *RestoreOptions) WithPod(value string) *RestoreOptions { func (o *RestoreOptions) WithPod(value string) *RestoreOptions {
v := &value o.Pod = &value
o.Pod = v
return o return o
} }
// GetPod // GetPod returns value of field Pod
func (o *RestoreOptions) GetPod() string { func (o *RestoreOptions) GetPod() string {
var pod string
if o.Pod == nil { if o.Pod == nil {
return pod var z string
return z
} }
return *o.Pod return *o.Pod
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ShouldRestartOptions) Changed(fieldName string) bool { func (o *ShouldRestartOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ShouldRestartOptions) ToParams() (url.Values, error) { func (o *ShouldRestartOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *StartOptions) Changed(fieldName string) bool { func (o *StartOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *StartOptions) ToParams() (url.Values, error) { func (o *StartOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithDetachKeys // WithDetachKeys set field DetachKeys to given value
func (o *StartOptions) WithDetachKeys(value string) *StartOptions { func (o *StartOptions) WithDetachKeys(value string) *StartOptions {
v := &value o.DetachKeys = &value
o.DetachKeys = v
return o return o
} }
// GetDetachKeys // GetDetachKeys returns value of field DetachKeys
func (o *StartOptions) GetDetachKeys() string { func (o *StartOptions) GetDetachKeys() string {
var detachKeys string
if o.DetachKeys == nil { if o.DetachKeys == nil {
return detachKeys var z string
return z
} }
return *o.DetachKeys return *o.DetachKeys
} }
// WithRecursive // WithRecursive set field Recursive to given value
func (o *StartOptions) WithRecursive(value bool) *StartOptions { func (o *StartOptions) WithRecursive(value bool) *StartOptions {
v := &value o.Recursive = &value
o.Recursive = v
return o return o
} }
// GetRecursive // GetRecursive returns value of field Recursive
func (o *StartOptions) GetRecursive() bool { func (o *StartOptions) GetRecursive() bool {
var recursive bool
if o.Recursive == nil { if o.Recursive == nil {
return recursive var z bool
return z
} }
return *o.Recursive return *o.Recursive
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *StatsOptions) Changed(fieldName string) bool { func (o *StatsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *StatsOptions) ToParams() (url.Values, error) { func (o *StatsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithStream // WithStream set field Stream to given value
func (o *StatsOptions) WithStream(value bool) *StatsOptions { func (o *StatsOptions) WithStream(value bool) *StatsOptions {
v := &value o.Stream = &value
o.Stream = v
return o return o
} }
// GetStream // GetStream returns value of field Stream
func (o *StatsOptions) GetStream() bool { func (o *StatsOptions) GetStream() bool {
var stream bool
if o.Stream == nil { if o.Stream == nil {
return stream var z bool
return z
} }
return *o.Stream return *o.Stream
} }
// WithInterval // WithInterval set field Interval to given value
func (o *StatsOptions) WithInterval(value int) *StatsOptions { func (o *StatsOptions) WithInterval(value int) *StatsOptions {
v := &value o.Interval = &value
o.Interval = v
return o return o
} }
// GetInterval // GetInterval returns value of field Interval
func (o *StatsOptions) GetInterval() int { func (o *StatsOptions) GetInterval() int {
var interval int
if o.Interval == nil { if o.Interval == nil {
return interval var z int
return z
} }
return *o.Interval return *o.Interval
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *StopOptions) Changed(fieldName string) bool { func (o *StopOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *StopOptions) ToParams() (url.Values, error) { func (o *StopOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithIgnore // WithIgnore set field Ignore to given value
func (o *StopOptions) WithIgnore(value bool) *StopOptions { func (o *StopOptions) WithIgnore(value bool) *StopOptions {
v := &value o.Ignore = &value
o.Ignore = v
return o return o
} }
// GetIgnore // GetIgnore returns value of field Ignore
func (o *StopOptions) GetIgnore() bool { func (o *StopOptions) GetIgnore() bool {
var ignore bool
if o.Ignore == nil { if o.Ignore == nil {
return ignore var z bool
return z
} }
return *o.Ignore return *o.Ignore
} }
// WithTimeout // WithTimeout set field Timeout to given value
func (o *StopOptions) WithTimeout(value uint) *StopOptions { func (o *StopOptions) WithTimeout(value uint) *StopOptions {
v := &value o.Timeout = &value
o.Timeout = v
return o return o
} }
// GetTimeout // GetTimeout returns value of field Timeout
func (o *StopOptions) GetTimeout() uint { func (o *StopOptions) GetTimeout() uint {
var timeout uint
if o.Timeout == nil { if o.Timeout == nil {
return timeout var z uint
return z
} }
return *o.Timeout return *o.Timeout
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *TopOptions) Changed(fieldName string) bool { func (o *TopOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *TopOptions) ToParams() (url.Values, error) { func (o *TopOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithDescriptors // WithDescriptors set field Descriptors to given value
func (o *TopOptions) WithDescriptors(value []string) *TopOptions { func (o *TopOptions) WithDescriptors(value []string) *TopOptions {
v := &value o.Descriptors = &value
o.Descriptors = v
return o return o
} }
// GetDescriptors // GetDescriptors returns value of field Descriptors
func (o *TopOptions) GetDescriptors() []string { func (o *TopOptions) GetDescriptors() []string {
var descriptors []string
if o.Descriptors == nil { if o.Descriptors == nil {
return descriptors var z []string
return z
} }
return *o.Descriptors return *o.Descriptors
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *UnmountOptions) Changed(fieldName string) bool { func (o *UnmountOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *UnmountOptions) ToParams() (url.Values, error) { func (o *UnmountOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *UnpauseOptions) Changed(fieldName string) bool { func (o *UnpauseOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *UnpauseOptions) ToParams() (url.Values, error) { func (o *UnpauseOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package containers package containers
import ( import (
@ -7,48 +8,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *WaitOptions) Changed(fieldName string) bool { func (o *WaitOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *WaitOptions) ToParams() (url.Values, error) { func (o *WaitOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithCondition // WithCondition set field Condition to given value
func (o *WaitOptions) WithCondition(value []define.ContainerStatus) *WaitOptions { func (o *WaitOptions) WithCondition(value []define.ContainerStatus) *WaitOptions {
v := value o.Condition = value
o.Condition = v
return o return o
} }
// GetCondition // GetCondition returns value of field Condition
func (o *WaitOptions) GetCondition() []define.ContainerStatus { func (o *WaitOptions) GetCondition() []define.ContainerStatus {
var condition []define.ContainerStatus
if o.Condition == nil { if o.Condition == nil {
return condition var z []define.ContainerStatus
return z
} }
return o.Condition return o.Condition
} }
// WithInterval // WithInterval set field Interval to given value
func (o *WaitOptions) WithInterval(value string) *WaitOptions { func (o *WaitOptions) WithInterval(value string) *WaitOptions {
v := &value o.Interval = &value
o.Interval = v
return o return o
} }
// GetInterval // GetInterval returns value of field Interval
func (o *WaitOptions) GetInterval() string { func (o *WaitOptions) GetInterval() string {
var interval string
if o.Interval == nil { if o.Interval == nil {
return interval var z string
return z
} }
return *o.Interval return *o.Interval
} }

5
pkg/bindings/doc.go Normal file
View File

@ -0,0 +1,5 @@
package bindings
/*
See https://github.com/containers/podman/blob/main/pkg/bindings/README.md for details.
*/

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package generate package generate
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *KubeOptions) Changed(fieldName string) bool { func (o *KubeOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *KubeOptions) ToParams() (url.Values, error) { func (o *KubeOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithService // WithService set field Service to given value
func (o *KubeOptions) WithService(value bool) *KubeOptions { func (o *KubeOptions) WithService(value bool) *KubeOptions {
v := &value o.Service = &value
o.Service = v
return o return o
} }
// GetService // GetService returns value of field Service
func (o *KubeOptions) GetService() bool { func (o *KubeOptions) GetService() bool {
var service bool
if o.Service == nil { if o.Service == nil {
return service var z bool
return z
} }
return *o.Service return *o.Service
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package generate package generate
import ( import (
@ -6,144 +7,132 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *SystemdOptions) Changed(fieldName string) bool { func (o *SystemdOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *SystemdOptions) ToParams() (url.Values, error) { func (o *SystemdOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithUseName // WithUseName set field UseName to given value
func (o *SystemdOptions) WithUseName(value bool) *SystemdOptions { func (o *SystemdOptions) WithUseName(value bool) *SystemdOptions {
v := &value o.UseName = &value
o.UseName = v
return o return o
} }
// GetUseName // GetUseName returns value of field UseName
func (o *SystemdOptions) GetUseName() bool { func (o *SystemdOptions) GetUseName() bool {
var useName bool
if o.UseName == nil { if o.UseName == nil {
return useName var z bool
return z
} }
return *o.UseName return *o.UseName
} }
// WithNew // WithNew set field New to given value
func (o *SystemdOptions) WithNew(value bool) *SystemdOptions { func (o *SystemdOptions) WithNew(value bool) *SystemdOptions {
v := &value o.New = &value
o.New = v
return o return o
} }
// GetNew // GetNew returns value of field New
func (o *SystemdOptions) GetNew() bool { func (o *SystemdOptions) GetNew() bool {
var new bool
if o.New == nil { if o.New == nil {
return new var z bool
return z
} }
return *o.New return *o.New
} }
// WithNoHeader // WithNoHeader set field NoHeader to given value
func (o *SystemdOptions) WithNoHeader(value bool) *SystemdOptions { func (o *SystemdOptions) WithNoHeader(value bool) *SystemdOptions {
v := &value o.NoHeader = &value
o.NoHeader = v
return o return o
} }
// GetNoHeader // GetNoHeader returns value of field NoHeader
func (o *SystemdOptions) GetNoHeader() bool { func (o *SystemdOptions) GetNoHeader() bool {
var noHeader bool
if o.NoHeader == nil { if o.NoHeader == nil {
return noHeader var z bool
return z
} }
return *o.NoHeader return *o.NoHeader
} }
// WithRestartPolicy // WithRestartPolicy set field RestartPolicy to given value
func (o *SystemdOptions) WithRestartPolicy(value string) *SystemdOptions { func (o *SystemdOptions) WithRestartPolicy(value string) *SystemdOptions {
v := &value o.RestartPolicy = &value
o.RestartPolicy = v
return o return o
} }
// GetRestartPolicy // GetRestartPolicy returns value of field RestartPolicy
func (o *SystemdOptions) GetRestartPolicy() string { func (o *SystemdOptions) GetRestartPolicy() string {
var restartPolicy string
if o.RestartPolicy == nil { if o.RestartPolicy == nil {
return restartPolicy var z string
return z
} }
return *o.RestartPolicy return *o.RestartPolicy
} }
// WithStopTimeout // WithStopTimeout set field StopTimeout to given value
func (o *SystemdOptions) WithStopTimeout(value uint) *SystemdOptions { func (o *SystemdOptions) WithStopTimeout(value uint) *SystemdOptions {
v := &value o.StopTimeout = &value
o.StopTimeout = v
return o return o
} }
// GetStopTimeout // GetStopTimeout returns value of field StopTimeout
func (o *SystemdOptions) GetStopTimeout() uint { func (o *SystemdOptions) GetStopTimeout() uint {
var stopTimeout uint
if o.StopTimeout == nil { if o.StopTimeout == nil {
return stopTimeout var z uint
return z
} }
return *o.StopTimeout return *o.StopTimeout
} }
// WithContainerPrefix // WithContainerPrefix set field ContainerPrefix to given value
func (o *SystemdOptions) WithContainerPrefix(value string) *SystemdOptions { func (o *SystemdOptions) WithContainerPrefix(value string) *SystemdOptions {
v := &value o.ContainerPrefix = &value
o.ContainerPrefix = v
return o return o
} }
// GetContainerPrefix // GetContainerPrefix returns value of field ContainerPrefix
func (o *SystemdOptions) GetContainerPrefix() string { func (o *SystemdOptions) GetContainerPrefix() string {
var containerPrefix string
if o.ContainerPrefix == nil { if o.ContainerPrefix == nil {
return containerPrefix var z string
return z
} }
return *o.ContainerPrefix return *o.ContainerPrefix
} }
// WithPodPrefix // WithPodPrefix set field PodPrefix to given value
func (o *SystemdOptions) WithPodPrefix(value string) *SystemdOptions { func (o *SystemdOptions) WithPodPrefix(value string) *SystemdOptions {
v := &value o.PodPrefix = &value
o.PodPrefix = v
return o return o
} }
// GetPodPrefix // GetPodPrefix returns value of field PodPrefix
func (o *SystemdOptions) GetPodPrefix() string { func (o *SystemdOptions) GetPodPrefix() string {
var podPrefix string
if o.PodPrefix == nil { if o.PodPrefix == nil {
return podPrefix var z string
return z
} }
return *o.PodPrefix return *o.PodPrefix
} }
// WithSeparator // WithSeparator set field Separator to given value
func (o *SystemdOptions) WithSeparator(value string) *SystemdOptions { func (o *SystemdOptions) WithSeparator(value string) *SystemdOptions {
v := &value o.Separator = &value
o.Separator = v
return o return o
} }
// GetSeparator // GetSeparator returns value of field Separator
func (o *SystemdOptions) GetSeparator() string { func (o *SystemdOptions) GetSeparator() string {
var separator string
if o.Separator == nil { if o.Separator == nil {
return separator var z string
return z
} }
return *o.Separator return *o.Separator
} }

View File

@ -1,5 +1,10 @@
// +build ignore
package main package main
// This program generates *_options_.go files to be used by the bindings calls to API service.
// It can be invoked by running go generate
import ( import (
"errors" "errors"
"fmt" "fmt"
@ -11,56 +16,52 @@ import (
"os/exec" "os/exec"
"strings" "strings"
"text/template" "text/template"
"time" "unicode"
"unicode/utf8"
) )
var bodyTmpl = `package {{.PackageName}} var bodyTmpl = `// Code generated by go generate; DO NOT EDIT.
package {{.PackageName}}
import ( import (
{{range $import := .Imports}} {{$import}} {{range $import := .Imports}} {{$import}}
{{end}} {{end}}
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *{{.StructName}}) Changed(fieldName string) bool { func (o *{{.StructName}}) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *{{.StructName}}) ToParams() (url.Values, error) { func (o *{{.StructName}}) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
{{range $field := .Fields}} {{range $field := .Fields}}
// With{{.Name}} // With{{.Name}} set {{if .Comment}}{{.Comment}}{{else}}field {{.Name}} to given value{{end}}
func(o *{{$field.StructName}}) With{{$field.Name}}(value {{$field.Type}}) *{{$field.StructName}} { func(o *{{.StructName}}) With{{.Name}}(value {{.Type}}) *{{.StructName}} {
v := {{$field.TypedValue}} o.{{.Name}} = {{if not .Composite}}&{{end}}value
o.{{$field.Name}} = v
return o return o
} }
// Get{{.Name}} // Get{{.Name}} returns value of {{if .Comment}}{{.Comment}}{{else}}field {{.Name}}{{end}}
func(o *{{$field.StructName}}) Get{{$field.Name}}() {{$field.Type}} { func(o *{{.StructName}}) Get{{.Name}}() {{.Type}} {
var {{$field.ZeroName}} {{$field.Type}} if o.{{.Name}} == nil {
if o.{{$field.Name}} == nil { var z {{.Type}}
return {{$field.ZeroName}} return z
} }
return {{$field.TypedName}} return {{if not .Composite}}*{{end}}o.{{.Name}}
} }
{{end}} {{end}}
` `
type fieldStruct struct { type fieldStruct struct {
Comment string
Composite bool
Name string Name string
StructName string StructName string
Type string Type string
TypedName string
TypedValue string
ZeroName string
} }
func main() { func main() {
@ -69,7 +70,6 @@ func main() {
fieldStructs []fieldStruct fieldStructs []fieldStruct
) )
srcFile := os.Getenv("GOFILE") srcFile := os.Getenv("GOFILE")
pkg := os.Getenv("GOPACKAGE")
inputStructName := os.Args[1] inputStructName := os.Args[1]
b, err := ioutil.ReadFile(srcFile) b, err := ioutil.ReadFile(srcFile)
if err != nil { if err != nil {
@ -80,6 +80,7 @@ func main() {
if err != nil { if err != nil {
panic(err) panic(err)
} }
// always add reflect // always add reflect
imports := []string{"\"reflect\"", "\"github.com/containers/podman/v3/pkg/bindings/internal/util\""} imports := []string{"\"reflect\"", "\"github.com/containers/podman/v3/pkg/bindings/internal/util\""}
for _, imp := range f.Imports { for _, imp := range f.Imports {
@ -96,95 +97,94 @@ func main() {
} }
}() }()
body := template.Must(template.New("body").Parse(bodyTmpl))
ast.Inspect(f, func(n ast.Node) bool { ast.Inspect(f, func(n ast.Node) bool {
ref, refOK := n.(*ast.TypeSpec) ref, refOK := n.(*ast.TypeSpec)
if refOK { if !(refOK && ref.Name.Name == inputStructName) {
if ref.Name.Name == inputStructName { return true
x := ref.Type.(*ast.StructType) }
for _, field := range x.Fields.List {
var (
name, zeroName, typedName, typedValue string
)
if len(field.Names) > 0 {
name = field.Names[0].Name
if len(name) < 1 {
panic(errors.New("bad name"))
}
}
for k, v := range name {
zeroName = strings.ToLower(string(v)) + name[k+1:]
break
}
//sub := "*"
typeExpr := field.Type
switch field.Type.(type) {
case *ast.MapType, *ast.StructType, *ast.ArrayType:
typedName = "o." + name
typedValue = "value"
default:
typedName = "*o." + name
typedValue = "&value"
}
start := typeExpr.Pos() - 1
end := typeExpr.End() - 1
fieldType := strings.Replace(string(b[start:end]), "*", "", 1)
fStruct := fieldStruct{
Name: name,
StructName: inputStructName,
Type: fieldType,
TypedName: typedName,
TypedValue: typedValue,
ZeroName: zeroName,
}
fieldStructs = append(fieldStructs, fStruct)
} // for
bodyStruct := struct { x := ref.Type.(*ast.StructType)
PackageName string for _, field := range x.Fields.List {
Imports []string var name string
Date string if len(field.Names) > 0 {
StructName string name = field.Names[0].Name
Fields []fieldStruct if len(name) < 1 {
}{ panic(errors.New("bad name"))
PackageName: pkg,
Imports: imports,
Date: time.Now().String(),
StructName: inputStructName,
Fields: fieldStructs,
}
body := template.Must(template.New("body").Parse(bodyTmpl))
// create the body
if err := body.Execute(out, bodyStruct); err != nil {
fmt.Println(err)
os.Exit(1)
}
// close out file
if err := out.Close(); err != nil {
fmt.Println(err)
os.Exit(1)
}
closed = true
// go fmt file
gofmt := exec.Command("go", "fmt", out.Name())
gofmt.Stderr = os.Stdout
if err := gofmt.Run(); err != nil {
fmt.Println(err)
os.Exit(1)
}
// go import file
goimport := exec.Command("goimports", "-w", out.Name())
goimport.Stderr = os.Stdout
if err := goimport.Run(); err != nil {
fmt.Println(err)
os.Exit(1)
} }
} }
var composite bool
switch field.Type.(type) {
case *ast.MapType, *ast.StructType, *ast.ArrayType:
composite = true
}
//sub := "*"
typeExpr := field.Type
start := typeExpr.Pos() - 1
end := typeExpr.End() - 1
fieldType := strings.Replace(string(b[start:end]), "*", "", 1)
fieldStructs = append(fieldStructs, fieldStruct{
Comment: fmtComment(field.Comment.Text()),
Composite: composite,
Name: name,
StructName: inputStructName,
Type: fieldType,
})
} // for
bodyStruct := struct {
PackageName string
Imports []string
StructName string
Fields []fieldStruct
}{
PackageName: os.Getenv("GOPACKAGE"),
Imports: imports,
StructName: inputStructName,
Fields: fieldStructs,
}
// create the body
if err := body.Execute(out, bodyStruct); err != nil {
fmt.Println(err)
os.Exit(1)
}
// close out file
if err := out.Close(); err != nil {
fmt.Println(err)
os.Exit(1)
}
closed = true
// go fmt file
gofmt := exec.Command("go", "fmt", out.Name())
gofmt.Stderr = os.Stdout
if err := gofmt.Run(); err != nil {
fmt.Println(err)
os.Exit(1)
}
// go import file
goimport := exec.Command("goimports", "-w", out.Name())
goimport.Stderr = os.Stdout
if err := goimport.Run(); err != nil {
fmt.Println(err)
os.Exit(1)
} }
return true return true
}) })
} }
func fmtComment(comment string) string {
r, n := utf8.DecodeRuneInString(comment)
if r != utf8.RuneError {
comment = string(unicode.ToLower(r)) + comment[n:]
}
comment = strings.TrimSpace(comment)
return comment
}

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *DiffOptions) Changed(fieldName string) bool { func (o *DiffOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *DiffOptions) ToParams() (url.Values, error) { func (o *DiffOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithParent // WithParent set field Parent to given value
func (o *DiffOptions) WithParent(value string) *DiffOptions { func (o *DiffOptions) WithParent(value string) *DiffOptions {
v := &value o.Parent = &value
o.Parent = v
return o return o
} }
// GetParent // GetParent returns value of field Parent
func (o *DiffOptions) GetParent() string { func (o *DiffOptions) GetParent() string {
var parent string
if o.Parent == nil { if o.Parent == nil {
return parent var z string
return z
} }
return *o.Parent return *o.Parent
} }
// WithDiffType // WithDiffType set field DiffType to given value
func (o *DiffOptions) WithDiffType(value string) *DiffOptions { func (o *DiffOptions) WithDiffType(value string) *DiffOptions {
v := &value o.DiffType = &value
o.DiffType = v
return o return o
} }
// GetDiffType // GetDiffType returns value of field DiffType
func (o *DiffOptions) GetDiffType() string { func (o *DiffOptions) GetDiffType() string {
var diffType string
if o.DiffType == nil { if o.DiffType == nil {
return diffType var z string
return z
} }
return *o.DiffType return *o.DiffType
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExistsOptions) Changed(fieldName string) bool { func (o *ExistsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExistsOptions) ToParams() (url.Values, error) { func (o *ExistsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExportOptions) Changed(fieldName string) bool { func (o *ExportOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExportOptions) ToParams() (url.Values, error) { func (o *ExportOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithCompress // WithCompress set field Compress to given value
func (o *ExportOptions) WithCompress(value bool) *ExportOptions { func (o *ExportOptions) WithCompress(value bool) *ExportOptions {
v := &value o.Compress = &value
o.Compress = v
return o return o
} }
// GetCompress // GetCompress returns value of field Compress
func (o *ExportOptions) GetCompress() bool { func (o *ExportOptions) GetCompress() bool {
var compress bool
if o.Compress == nil { if o.Compress == nil {
return compress var z bool
return z
} }
return *o.Compress return *o.Compress
} }
// WithFormat // WithFormat set field Format to given value
func (o *ExportOptions) WithFormat(value string) *ExportOptions { func (o *ExportOptions) WithFormat(value string) *ExportOptions {
v := &value o.Format = &value
o.Format = v
return o return o
} }
// GetFormat // GetFormat returns value of field Format
func (o *ExportOptions) GetFormat() string { func (o *ExportOptions) GetFormat() string {
var format string
if o.Format == nil { if o.Format == nil {
return format var z string
return z
} }
return *o.Format return *o.Format
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *GetOptions) Changed(fieldName string) bool { func (o *GetOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *GetOptions) ToParams() (url.Values, error) { func (o *GetOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithSize // WithSize set field Size to given value
func (o *GetOptions) WithSize(value bool) *GetOptions { func (o *GetOptions) WithSize(value bool) *GetOptions {
v := &value o.Size = &value
o.Size = v
return o return o
} }
// GetSize // GetSize returns value of field Size
func (o *GetOptions) GetSize() bool { func (o *GetOptions) GetSize() bool {
var size bool
if o.Size == nil { if o.Size == nil {
return size var z bool
return z
} }
return *o.Size return *o.Size
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *HistoryOptions) Changed(fieldName string) bool { func (o *HistoryOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *HistoryOptions) ToParams() (url.Values, error) { func (o *HistoryOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,80 +7,72 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ImportOptions) Changed(fieldName string) bool { func (o *ImportOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ImportOptions) ToParams() (url.Values, error) { func (o *ImportOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithChanges // WithChanges set field Changes to given value
func (o *ImportOptions) WithChanges(value []string) *ImportOptions { func (o *ImportOptions) WithChanges(value []string) *ImportOptions {
v := &value o.Changes = &value
o.Changes = v
return o return o
} }
// GetChanges // GetChanges returns value of field Changes
func (o *ImportOptions) GetChanges() []string { func (o *ImportOptions) GetChanges() []string {
var changes []string
if o.Changes == nil { if o.Changes == nil {
return changes var z []string
return z
} }
return *o.Changes return *o.Changes
} }
// WithMessage // WithMessage set field Message to given value
func (o *ImportOptions) WithMessage(value string) *ImportOptions { func (o *ImportOptions) WithMessage(value string) *ImportOptions {
v := &value o.Message = &value
o.Message = v
return o return o
} }
// GetMessage // GetMessage returns value of field Message
func (o *ImportOptions) GetMessage() string { func (o *ImportOptions) GetMessage() string {
var message string
if o.Message == nil { if o.Message == nil {
return message var z string
return z
} }
return *o.Message return *o.Message
} }
// WithReference // WithReference set field Reference to given value
func (o *ImportOptions) WithReference(value string) *ImportOptions { func (o *ImportOptions) WithReference(value string) *ImportOptions {
v := &value o.Reference = &value
o.Reference = v
return o return o
} }
// GetReference // GetReference returns value of field Reference
func (o *ImportOptions) GetReference() string { func (o *ImportOptions) GetReference() string {
var reference string
if o.Reference == nil { if o.Reference == nil {
return reference var z string
return z
} }
return *o.Reference return *o.Reference
} }
// WithURL // WithURL set field URL to given value
func (o *ImportOptions) WithURL(value string) *ImportOptions { func (o *ImportOptions) WithURL(value string) *ImportOptions {
v := &value o.URL = &value
o.URL = v
return o return o
} }
// GetURL // GetURL returns value of field URL
func (o *ImportOptions) GetURL() string { func (o *ImportOptions) GetURL() string {
var uRL string
if o.URL == nil { if o.URL == nil {
return uRL var z string
return z
} }
return *o.URL return *o.URL
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ListOptions) Changed(fieldName string) bool { func (o *ListOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ListOptions) ToParams() (url.Values, error) { func (o *ListOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAll // WithAll set field All to given value
func (o *ListOptions) WithAll(value bool) *ListOptions { func (o *ListOptions) WithAll(value bool) *ListOptions {
v := &value o.All = &value
o.All = v
return o return o
} }
// GetAll // GetAll returns value of field All
func (o *ListOptions) GetAll() bool { func (o *ListOptions) GetAll() bool {
var all bool
if o.All == nil { if o.All == nil {
return all var z bool
return z
} }
return *o.All return *o.All
} }
// WithFilters // WithFilters set field Filters to given value
func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions { func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *ListOptions) GetFilters() map[string][]string { func (o *ListOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *LoadOptions) Changed(fieldName string) bool { func (o *LoadOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *LoadOptions) ToParams() (url.Values, error) { func (o *LoadOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithReference // WithReference set field Reference to given value
func (o *LoadOptions) WithReference(value string) *LoadOptions { func (o *LoadOptions) WithReference(value string) *LoadOptions {
v := &value o.Reference = &value
o.Reference = v
return o return o
} }
// GetReference // GetReference returns value of field Reference
func (o *LoadOptions) GetReference() string { func (o *LoadOptions) GetReference() string {
var reference string
if o.Reference == nil { if o.Reference == nil {
return reference var z string
return z
} }
return *o.Reference return *o.Reference
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PruneOptions) Changed(fieldName string) bool { func (o *PruneOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PruneOptions) ToParams() (url.Values, error) { func (o *PruneOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAll // WithAll set field All to given value
func (o *PruneOptions) WithAll(value bool) *PruneOptions { func (o *PruneOptions) WithAll(value bool) *PruneOptions {
v := &value o.All = &value
o.All = v
return o return o
} }
// GetAll // GetAll returns value of field All
func (o *PruneOptions) GetAll() bool { func (o *PruneOptions) GetAll() bool {
var all bool
if o.All == nil { if o.All == nil {
return all var z bool
return z
} }
return *o.All return *o.All
} }
// WithFilters // WithFilters set field Filters to given value
func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions { func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *PruneOptions) GetFilters() map[string][]string { func (o *PruneOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,176 +7,162 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PullOptions) Changed(fieldName string) bool { func (o *PullOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PullOptions) ToParams() (url.Values, error) { func (o *PullOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAllTags // WithAllTags set field AllTags to given value
func (o *PullOptions) WithAllTags(value bool) *PullOptions { func (o *PullOptions) WithAllTags(value bool) *PullOptions {
v := &value o.AllTags = &value
o.AllTags = v
return o return o
} }
// GetAllTags // GetAllTags returns value of field AllTags
func (o *PullOptions) GetAllTags() bool { func (o *PullOptions) GetAllTags() bool {
var allTags bool
if o.AllTags == nil { if o.AllTags == nil {
return allTags var z bool
return z
} }
return *o.AllTags return *o.AllTags
} }
// WithArch // WithArch set field Arch to given value
func (o *PullOptions) WithArch(value string) *PullOptions { func (o *PullOptions) WithArch(value string) *PullOptions {
v := &value o.Arch = &value
o.Arch = v
return o return o
} }
// GetArch // GetArch returns value of field Arch
func (o *PullOptions) GetArch() string { func (o *PullOptions) GetArch() string {
var arch string
if o.Arch == nil { if o.Arch == nil {
return arch var z string
return z
} }
return *o.Arch return *o.Arch
} }
// WithAuthfile // WithAuthfile set field Authfile to given value
func (o *PullOptions) WithAuthfile(value string) *PullOptions { func (o *PullOptions) WithAuthfile(value string) *PullOptions {
v := &value o.Authfile = &value
o.Authfile = v
return o return o
} }
// GetAuthfile // GetAuthfile returns value of field Authfile
func (o *PullOptions) GetAuthfile() string { func (o *PullOptions) GetAuthfile() string {
var authfile string
if o.Authfile == nil { if o.Authfile == nil {
return authfile var z string
return z
} }
return *o.Authfile return *o.Authfile
} }
// WithOS // WithOS set field OS to given value
func (o *PullOptions) WithOS(value string) *PullOptions { func (o *PullOptions) WithOS(value string) *PullOptions {
v := &value o.OS = &value
o.OS = v
return o return o
} }
// GetOS // GetOS returns value of field OS
func (o *PullOptions) GetOS() string { func (o *PullOptions) GetOS() string {
var oS string
if o.OS == nil { if o.OS == nil {
return oS var z string
return z
} }
return *o.OS return *o.OS
} }
// WithPolicy // WithPolicy set field Policy to given value
func (o *PullOptions) WithPolicy(value string) *PullOptions { func (o *PullOptions) WithPolicy(value string) *PullOptions {
v := &value o.Policy = &value
o.Policy = v
return o return o
} }
// GetPolicy // GetPolicy returns value of field Policy
func (o *PullOptions) GetPolicy() string { func (o *PullOptions) GetPolicy() string {
var policy string
if o.Policy == nil { if o.Policy == nil {
return policy var z string
return z
} }
return *o.Policy return *o.Policy
} }
// WithPassword // WithPassword set field Password to given value
func (o *PullOptions) WithPassword(value string) *PullOptions { func (o *PullOptions) WithPassword(value string) *PullOptions {
v := &value o.Password = &value
o.Password = v
return o return o
} }
// GetPassword // GetPassword returns value of field Password
func (o *PullOptions) GetPassword() string { func (o *PullOptions) GetPassword() string {
var password string
if o.Password == nil { if o.Password == nil {
return password var z string
return z
} }
return *o.Password return *o.Password
} }
// WithQuiet // WithQuiet set field Quiet to given value
func (o *PullOptions) WithQuiet(value bool) *PullOptions { func (o *PullOptions) WithQuiet(value bool) *PullOptions {
v := &value o.Quiet = &value
o.Quiet = v
return o return o
} }
// GetQuiet // GetQuiet returns value of field Quiet
func (o *PullOptions) GetQuiet() bool { func (o *PullOptions) GetQuiet() bool {
var quiet bool
if o.Quiet == nil { if o.Quiet == nil {
return quiet var z bool
return z
} }
return *o.Quiet return *o.Quiet
} }
// WithSkipTLSVerify // WithSkipTLSVerify set field SkipTLSVerify to given value
func (o *PullOptions) WithSkipTLSVerify(value bool) *PullOptions { func (o *PullOptions) WithSkipTLSVerify(value bool) *PullOptions {
v := &value o.SkipTLSVerify = &value
o.SkipTLSVerify = v
return o return o
} }
// GetSkipTLSVerify // GetSkipTLSVerify returns value of field SkipTLSVerify
func (o *PullOptions) GetSkipTLSVerify() bool { func (o *PullOptions) GetSkipTLSVerify() bool {
var skipTLSVerify bool
if o.SkipTLSVerify == nil { if o.SkipTLSVerify == nil {
return skipTLSVerify var z bool
return z
} }
return *o.SkipTLSVerify return *o.SkipTLSVerify
} }
// WithUsername // WithUsername set field Username to given value
func (o *PullOptions) WithUsername(value string) *PullOptions { func (o *PullOptions) WithUsername(value string) *PullOptions {
v := &value o.Username = &value
o.Username = v
return o return o
} }
// GetUsername // GetUsername returns value of field Username
func (o *PullOptions) GetUsername() string { func (o *PullOptions) GetUsername() string {
var username string
if o.Username == nil { if o.Username == nil {
return username var z string
return z
} }
return *o.Username return *o.Username
} }
// WithVariant // WithVariant set field Variant to given value
func (o *PullOptions) WithVariant(value string) *PullOptions { func (o *PullOptions) WithVariant(value string) *PullOptions {
v := &value o.Variant = &value
o.Variant = v
return o return o
} }
// GetVariant // GetVariant returns value of field Variant
func (o *PullOptions) GetVariant() string { func (o *PullOptions) GetVariant() string {
var variant string
if o.Variant == nil { if o.Variant == nil {
return variant var z string
return z
} }
return *o.Variant return *o.Variant
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,128 +7,117 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PushOptions) Changed(fieldName string) bool { func (o *PushOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PushOptions) ToParams() (url.Values, error) { func (o *PushOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAll // WithAll set field All to given value
func (o *PushOptions) WithAll(value bool) *PushOptions { func (o *PushOptions) WithAll(value bool) *PushOptions {
v := &value o.All = &value
o.All = v
return o return o
} }
// GetAll // GetAll returns value of field All
func (o *PushOptions) GetAll() bool { func (o *PushOptions) GetAll() bool {
var all bool
if o.All == nil { if o.All == nil {
return all var z bool
return z
} }
return *o.All return *o.All
} }
// WithAuthfile // WithAuthfile set field Authfile to given value
func (o *PushOptions) WithAuthfile(value string) *PushOptions { func (o *PushOptions) WithAuthfile(value string) *PushOptions {
v := &value o.Authfile = &value
o.Authfile = v
return o return o
} }
// GetAuthfile // GetAuthfile returns value of field Authfile
func (o *PushOptions) GetAuthfile() string { func (o *PushOptions) GetAuthfile() string {
var authfile string
if o.Authfile == nil { if o.Authfile == nil {
return authfile var z string
return z
} }
return *o.Authfile return *o.Authfile
} }
// WithCompress // WithCompress set field Compress to given value
func (o *PushOptions) WithCompress(value bool) *PushOptions { func (o *PushOptions) WithCompress(value bool) *PushOptions {
v := &value o.Compress = &value
o.Compress = v
return o return o
} }
// GetCompress // GetCompress returns value of field Compress
func (o *PushOptions) GetCompress() bool { func (o *PushOptions) GetCompress() bool {
var compress bool
if o.Compress == nil { if o.Compress == nil {
return compress var z bool
return z
} }
return *o.Compress return *o.Compress
} }
// WithFormat // WithFormat set field Format to given value
func (o *PushOptions) WithFormat(value string) *PushOptions { func (o *PushOptions) WithFormat(value string) *PushOptions {
v := &value o.Format = &value
o.Format = v
return o return o
} }
// GetFormat // GetFormat returns value of field Format
func (o *PushOptions) GetFormat() string { func (o *PushOptions) GetFormat() string {
var format string
if o.Format == nil { if o.Format == nil {
return format var z string
return z
} }
return *o.Format return *o.Format
} }
// WithPassword // WithPassword set field Password to given value
func (o *PushOptions) WithPassword(value string) *PushOptions { func (o *PushOptions) WithPassword(value string) *PushOptions {
v := &value o.Password = &value
o.Password = v
return o return o
} }
// GetPassword // GetPassword returns value of field Password
func (o *PushOptions) GetPassword() string { func (o *PushOptions) GetPassword() string {
var password string
if o.Password == nil { if o.Password == nil {
return password var z string
return z
} }
return *o.Password return *o.Password
} }
// WithSkipTLSVerify // WithSkipTLSVerify set field SkipTLSVerify to given value
func (o *PushOptions) WithSkipTLSVerify(value bool) *PushOptions { func (o *PushOptions) WithSkipTLSVerify(value bool) *PushOptions {
v := &value o.SkipTLSVerify = &value
o.SkipTLSVerify = v
return o return o
} }
// GetSkipTLSVerify // GetSkipTLSVerify returns value of field SkipTLSVerify
func (o *PushOptions) GetSkipTLSVerify() bool { func (o *PushOptions) GetSkipTLSVerify() bool {
var skipTLSVerify bool
if o.SkipTLSVerify == nil { if o.SkipTLSVerify == nil {
return skipTLSVerify var z bool
return z
} }
return *o.SkipTLSVerify return *o.SkipTLSVerify
} }
// WithUsername // WithUsername set field Username to given value
func (o *PushOptions) WithUsername(value string) *PushOptions { func (o *PushOptions) WithUsername(value string) *PushOptions {
v := &value o.Username = &value
o.Username = v
return o return o
} }
// GetUsername // GetUsername returns value of field Username
func (o *PushOptions) GetUsername() string { func (o *PushOptions) GetUsername() string {
var username string
if o.Username == nil { if o.Username == nil {
return username var z string
return z
} }
return *o.Username return *o.Username
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,48 +7,42 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RemoveOptions) Changed(fieldName string) bool { func (o *RemoveOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RemoveOptions) ToParams() (url.Values, error) { func (o *RemoveOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAll // WithAll set field All to given value
func (o *RemoveOptions) WithAll(value bool) *RemoveOptions { func (o *RemoveOptions) WithAll(value bool) *RemoveOptions {
v := &value o.All = &value
o.All = v
return o return o
} }
// GetAll // GetAll returns value of field All
func (o *RemoveOptions) GetAll() bool { func (o *RemoveOptions) GetAll() bool {
var all bool
if o.All == nil { if o.All == nil {
return all var z bool
return z
} }
return *o.All return *o.All
} }
// WithForce // WithForce set field Force to given value
func (o *RemoveOptions) WithForce(value bool) *RemoveOptions { func (o *RemoveOptions) WithForce(value bool) *RemoveOptions {
v := &value o.Force = &value
o.Force = v
return o return o
} }
// GetForce // GetForce returns value of field Force
func (o *RemoveOptions) GetForce() bool { func (o *RemoveOptions) GetForce() bool {
var force bool
if o.Force == nil { if o.Force == nil {
return force var z bool
return z
} }
return *o.Force return *o.Force
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,112 +7,102 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *SearchOptions) Changed(fieldName string) bool { func (o *SearchOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *SearchOptions) ToParams() (url.Values, error) { func (o *SearchOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAuthfile // WithAuthfile set field Authfile to given value
func (o *SearchOptions) WithAuthfile(value string) *SearchOptions { func (o *SearchOptions) WithAuthfile(value string) *SearchOptions {
v := &value o.Authfile = &value
o.Authfile = v
return o return o
} }
// GetAuthfile // GetAuthfile returns value of field Authfile
func (o *SearchOptions) GetAuthfile() string { func (o *SearchOptions) GetAuthfile() string {
var authfile string
if o.Authfile == nil { if o.Authfile == nil {
return authfile var z string
return z
} }
return *o.Authfile return *o.Authfile
} }
// WithFilters // WithFilters set field Filters to given value
func (o *SearchOptions) WithFilters(value map[string][]string) *SearchOptions { func (o *SearchOptions) WithFilters(value map[string][]string) *SearchOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *SearchOptions) GetFilters() map[string][]string { func (o *SearchOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }
// WithLimit // WithLimit set field Limit to given value
func (o *SearchOptions) WithLimit(value int) *SearchOptions { func (o *SearchOptions) WithLimit(value int) *SearchOptions {
v := &value o.Limit = &value
o.Limit = v
return o return o
} }
// GetLimit // GetLimit returns value of field Limit
func (o *SearchOptions) GetLimit() int { func (o *SearchOptions) GetLimit() int {
var limit int
if o.Limit == nil { if o.Limit == nil {
return limit var z int
return z
} }
return *o.Limit return *o.Limit
} }
// WithNoTrunc // WithNoTrunc set field NoTrunc to given value
func (o *SearchOptions) WithNoTrunc(value bool) *SearchOptions { func (o *SearchOptions) WithNoTrunc(value bool) *SearchOptions {
v := &value o.NoTrunc = &value
o.NoTrunc = v
return o return o
} }
// GetNoTrunc // GetNoTrunc returns value of field NoTrunc
func (o *SearchOptions) GetNoTrunc() bool { func (o *SearchOptions) GetNoTrunc() bool {
var noTrunc bool
if o.NoTrunc == nil { if o.NoTrunc == nil {
return noTrunc var z bool
return z
} }
return *o.NoTrunc return *o.NoTrunc
} }
// WithSkipTLSVerify // WithSkipTLSVerify set field SkipTLSVerify to given value
func (o *SearchOptions) WithSkipTLSVerify(value bool) *SearchOptions { func (o *SearchOptions) WithSkipTLSVerify(value bool) *SearchOptions {
v := &value o.SkipTLSVerify = &value
o.SkipTLSVerify = v
return o return o
} }
// GetSkipTLSVerify // GetSkipTLSVerify returns value of field SkipTLSVerify
func (o *SearchOptions) GetSkipTLSVerify() bool { func (o *SearchOptions) GetSkipTLSVerify() bool {
var skipTLSVerify bool
if o.SkipTLSVerify == nil { if o.SkipTLSVerify == nil {
return skipTLSVerify var z bool
return z
} }
return *o.SkipTLSVerify return *o.SkipTLSVerify
} }
// WithListTags // WithListTags set field ListTags to given value
func (o *SearchOptions) WithListTags(value bool) *SearchOptions { func (o *SearchOptions) WithListTags(value bool) *SearchOptions {
v := &value o.ListTags = &value
o.ListTags = v
return o return o
} }
// GetListTags // GetListTags returns value of field ListTags
func (o *SearchOptions) GetListTags() bool { func (o *SearchOptions) GetListTags() bool {
var listTags bool
if o.ListTags == nil { if o.ListTags == nil {
return listTags var z bool
return z
} }
return *o.ListTags return *o.ListTags
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *TagOptions) Changed(fieldName string) bool { func (o *TagOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *TagOptions) ToParams() (url.Values, error) { func (o *TagOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *TreeOptions) Changed(fieldName string) bool { func (o *TreeOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *TreeOptions) ToParams() (url.Values, error) { func (o *TreeOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithWhatRequires // WithWhatRequires set field WhatRequires to given value
func (o *TreeOptions) WithWhatRequires(value bool) *TreeOptions { func (o *TreeOptions) WithWhatRequires(value bool) *TreeOptions {
v := &value o.WhatRequires = &value
o.WhatRequires = v
return o return o
} }
// GetWhatRequires // GetWhatRequires returns value of field WhatRequires
func (o *TreeOptions) GetWhatRequires() bool { func (o *TreeOptions) GetWhatRequires() bool {
var whatRequires bool
if o.WhatRequires == nil { if o.WhatRequires == nil {
return whatRequires var z bool
return z
} }
return *o.WhatRequires return *o.WhatRequires
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package images package images
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *UntagOptions) Changed(fieldName string) bool { func (o *UntagOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *UntagOptions) ToParams() (url.Values, error) { func (o *UntagOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package manifests package manifests
import ( import (
@ -6,144 +7,132 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *AddOptions) Changed(fieldName string) bool { func (o *AddOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *AddOptions) ToParams() (url.Values, error) { func (o *AddOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAll // WithAll set field All to given value
func (o *AddOptions) WithAll(value bool) *AddOptions { func (o *AddOptions) WithAll(value bool) *AddOptions {
v := &value o.All = &value
o.All = v
return o return o
} }
// GetAll // GetAll returns value of field All
func (o *AddOptions) GetAll() bool { func (o *AddOptions) GetAll() bool {
var all bool
if o.All == nil { if o.All == nil {
return all var z bool
return z
} }
return *o.All return *o.All
} }
// WithAnnotation // WithAnnotation set field Annotation to given value
func (o *AddOptions) WithAnnotation(value map[string]string) *AddOptions { func (o *AddOptions) WithAnnotation(value map[string]string) *AddOptions {
v := value o.Annotation = value
o.Annotation = v
return o return o
} }
// GetAnnotation // GetAnnotation returns value of field Annotation
func (o *AddOptions) GetAnnotation() map[string]string { func (o *AddOptions) GetAnnotation() map[string]string {
var annotation map[string]string
if o.Annotation == nil { if o.Annotation == nil {
return annotation var z map[string]string
return z
} }
return o.Annotation return o.Annotation
} }
// WithArch // WithArch set field Arch to given value
func (o *AddOptions) WithArch(value string) *AddOptions { func (o *AddOptions) WithArch(value string) *AddOptions {
v := &value o.Arch = &value
o.Arch = v
return o return o
} }
// GetArch // GetArch returns value of field Arch
func (o *AddOptions) GetArch() string { func (o *AddOptions) GetArch() string {
var arch string
if o.Arch == nil { if o.Arch == nil {
return arch var z string
return z
} }
return *o.Arch return *o.Arch
} }
// WithFeatures // WithFeatures set field Features to given value
func (o *AddOptions) WithFeatures(value []string) *AddOptions { func (o *AddOptions) WithFeatures(value []string) *AddOptions {
v := value o.Features = value
o.Features = v
return o return o
} }
// GetFeatures // GetFeatures returns value of field Features
func (o *AddOptions) GetFeatures() []string { func (o *AddOptions) GetFeatures() []string {
var features []string
if o.Features == nil { if o.Features == nil {
return features var z []string
return z
} }
return o.Features return o.Features
} }
// WithImages // WithImages set field Images to given value
func (o *AddOptions) WithImages(value []string) *AddOptions { func (o *AddOptions) WithImages(value []string) *AddOptions {
v := value o.Images = value
o.Images = v
return o return o
} }
// GetImages // GetImages returns value of field Images
func (o *AddOptions) GetImages() []string { func (o *AddOptions) GetImages() []string {
var images []string
if o.Images == nil { if o.Images == nil {
return images var z []string
return z
} }
return o.Images return o.Images
} }
// WithOS // WithOS set field OS to given value
func (o *AddOptions) WithOS(value string) *AddOptions { func (o *AddOptions) WithOS(value string) *AddOptions {
v := &value o.OS = &value
o.OS = v
return o return o
} }
// GetOS // GetOS returns value of field OS
func (o *AddOptions) GetOS() string { func (o *AddOptions) GetOS() string {
var oS string
if o.OS == nil { if o.OS == nil {
return oS var z string
return z
} }
return *o.OS return *o.OS
} }
// WithOSVersion // WithOSVersion set field OSVersion to given value
func (o *AddOptions) WithOSVersion(value string) *AddOptions { func (o *AddOptions) WithOSVersion(value string) *AddOptions {
v := &value o.OSVersion = &value
o.OSVersion = v
return o return o
} }
// GetOSVersion // GetOSVersion returns value of field OSVersion
func (o *AddOptions) GetOSVersion() string { func (o *AddOptions) GetOSVersion() string {
var oSVersion string
if o.OSVersion == nil { if o.OSVersion == nil {
return oSVersion var z string
return z
} }
return *o.OSVersion return *o.OSVersion
} }
// WithVariant // WithVariant set field Variant to given value
func (o *AddOptions) WithVariant(value string) *AddOptions { func (o *AddOptions) WithVariant(value string) *AddOptions {
v := &value o.Variant = &value
o.Variant = v
return o return o
} }
// GetVariant // GetVariant returns value of field Variant
func (o *AddOptions) GetVariant() string { func (o *AddOptions) GetVariant() string {
var variant string
if o.Variant == nil { if o.Variant == nil {
return variant var z string
return z
} }
return *o.Variant return *o.Variant
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package manifests package manifests
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *CreateOptions) Changed(fieldName string) bool { func (o *CreateOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *CreateOptions) ToParams() (url.Values, error) { func (o *CreateOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAll // WithAll set field All to given value
func (o *CreateOptions) WithAll(value bool) *CreateOptions { func (o *CreateOptions) WithAll(value bool) *CreateOptions {
v := &value o.All = &value
o.All = v
return o return o
} }
// GetAll // GetAll returns value of field All
func (o *CreateOptions) GetAll() bool { func (o *CreateOptions) GetAll() bool {
var all bool
if o.All == nil { if o.All == nil {
return all var z bool
return z
} }
return *o.All return *o.All
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package manifests package manifests
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExistsOptions) Changed(fieldName string) bool { func (o *ExistsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExistsOptions) ToParams() (url.Values, error) { func (o *ExistsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package manifests package manifests
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *InspectOptions) Changed(fieldName string) bool { func (o *InspectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *InspectOptions) ToParams() (url.Values, error) { func (o *InspectOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package manifests package manifests
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RemoveOptions) Changed(fieldName string) bool { func (o *RemoveOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RemoveOptions) ToParams() (url.Values, error) { func (o *RemoveOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package network package network
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ConnectOptions) Changed(fieldName string) bool { func (o *ConnectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ConnectOptions) ToParams() (url.Values, error) { func (o *ConnectOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAliases // WithAliases set field Aliases to given value
func (o *ConnectOptions) WithAliases(value []string) *ConnectOptions { func (o *ConnectOptions) WithAliases(value []string) *ConnectOptions {
v := &value o.Aliases = &value
o.Aliases = v
return o return o
} }
// GetAliases // GetAliases returns value of field Aliases
func (o *ConnectOptions) GetAliases() []string { func (o *ConnectOptions) GetAliases() []string {
var aliases []string
if o.Aliases == nil { if o.Aliases == nil {
return aliases var z []string
return z
} }
return *o.Aliases return *o.Aliases
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package network package network
import ( import (
@ -7,192 +8,177 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *CreateOptions) Changed(fieldName string) bool { func (o *CreateOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *CreateOptions) ToParams() (url.Values, error) { func (o *CreateOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithDisableDNS // WithDisableDNS set field DisableDNS to given value
func (o *CreateOptions) WithDisableDNS(value bool) *CreateOptions { func (o *CreateOptions) WithDisableDNS(value bool) *CreateOptions {
v := &value o.DisableDNS = &value
o.DisableDNS = v
return o return o
} }
// GetDisableDNS // GetDisableDNS returns value of field DisableDNS
func (o *CreateOptions) GetDisableDNS() bool { func (o *CreateOptions) GetDisableDNS() bool {
var disableDNS bool
if o.DisableDNS == nil { if o.DisableDNS == nil {
return disableDNS var z bool
return z
} }
return *o.DisableDNS return *o.DisableDNS
} }
// WithDriver // WithDriver set field Driver to given value
func (o *CreateOptions) WithDriver(value string) *CreateOptions { func (o *CreateOptions) WithDriver(value string) *CreateOptions {
v := &value o.Driver = &value
o.Driver = v
return o return o
} }
// GetDriver // GetDriver returns value of field Driver
func (o *CreateOptions) GetDriver() string { func (o *CreateOptions) GetDriver() string {
var driver string
if o.Driver == nil { if o.Driver == nil {
return driver var z string
return z
} }
return *o.Driver return *o.Driver
} }
// WithGateway // WithGateway set field Gateway to given value
func (o *CreateOptions) WithGateway(value net.IP) *CreateOptions { func (o *CreateOptions) WithGateway(value net.IP) *CreateOptions {
v := &value o.Gateway = &value
o.Gateway = v
return o return o
} }
// GetGateway // GetGateway returns value of field Gateway
func (o *CreateOptions) GetGateway() net.IP { func (o *CreateOptions) GetGateway() net.IP {
var gateway net.IP
if o.Gateway == nil { if o.Gateway == nil {
return gateway var z net.IP
return z
} }
return *o.Gateway return *o.Gateway
} }
// WithInternal // WithInternal set field Internal to given value
func (o *CreateOptions) WithInternal(value bool) *CreateOptions { func (o *CreateOptions) WithInternal(value bool) *CreateOptions {
v := &value o.Internal = &value
o.Internal = v
return o return o
} }
// GetInternal // GetInternal returns value of field Internal
func (o *CreateOptions) GetInternal() bool { func (o *CreateOptions) GetInternal() bool {
var internal bool
if o.Internal == nil { if o.Internal == nil {
return internal var z bool
return z
} }
return *o.Internal return *o.Internal
} }
// WithLabels // WithLabels set field Labels to given value
func (o *CreateOptions) WithLabels(value map[string]string) *CreateOptions { func (o *CreateOptions) WithLabels(value map[string]string) *CreateOptions {
v := value o.Labels = value
o.Labels = v
return o return o
} }
// GetLabels // GetLabels returns value of field Labels
func (o *CreateOptions) GetLabels() map[string]string { func (o *CreateOptions) GetLabels() map[string]string {
var labels map[string]string
if o.Labels == nil { if o.Labels == nil {
return labels var z map[string]string
return z
} }
return o.Labels return o.Labels
} }
// WithMacVLAN // WithMacVLAN set field MacVLAN to given value
func (o *CreateOptions) WithMacVLAN(value string) *CreateOptions { func (o *CreateOptions) WithMacVLAN(value string) *CreateOptions {
v := &value o.MacVLAN = &value
o.MacVLAN = v
return o return o
} }
// GetMacVLAN // GetMacVLAN returns value of field MacVLAN
func (o *CreateOptions) GetMacVLAN() string { func (o *CreateOptions) GetMacVLAN() string {
var macVLAN string
if o.MacVLAN == nil { if o.MacVLAN == nil {
return macVLAN var z string
return z
} }
return *o.MacVLAN return *o.MacVLAN
} }
// WithIPRange // WithIPRange set field IPRange to given value
func (o *CreateOptions) WithIPRange(value net.IPNet) *CreateOptions { func (o *CreateOptions) WithIPRange(value net.IPNet) *CreateOptions {
v := &value o.IPRange = &value
o.IPRange = v
return o return o
} }
// GetIPRange // GetIPRange returns value of field IPRange
func (o *CreateOptions) GetIPRange() net.IPNet { func (o *CreateOptions) GetIPRange() net.IPNet {
var iPRange net.IPNet
if o.IPRange == nil { if o.IPRange == nil {
return iPRange var z net.IPNet
return z
} }
return *o.IPRange return *o.IPRange
} }
// WithSubnet // WithSubnet set field Subnet to given value
func (o *CreateOptions) WithSubnet(value net.IPNet) *CreateOptions { func (o *CreateOptions) WithSubnet(value net.IPNet) *CreateOptions {
v := &value o.Subnet = &value
o.Subnet = v
return o return o
} }
// GetSubnet // GetSubnet returns value of field Subnet
func (o *CreateOptions) GetSubnet() net.IPNet { func (o *CreateOptions) GetSubnet() net.IPNet {
var subnet net.IPNet
if o.Subnet == nil { if o.Subnet == nil {
return subnet var z net.IPNet
return z
} }
return *o.Subnet return *o.Subnet
} }
// WithIPv6 // WithIPv6 set field IPv6 to given value
func (o *CreateOptions) WithIPv6(value bool) *CreateOptions { func (o *CreateOptions) WithIPv6(value bool) *CreateOptions {
v := &value o.IPv6 = &value
o.IPv6 = v
return o return o
} }
// GetIPv6 // GetIPv6 returns value of field IPv6
func (o *CreateOptions) GetIPv6() bool { func (o *CreateOptions) GetIPv6() bool {
var iPv6 bool
if o.IPv6 == nil { if o.IPv6 == nil {
return iPv6 var z bool
return z
} }
return *o.IPv6 return *o.IPv6
} }
// WithOptions // WithOptions set field Options to given value
func (o *CreateOptions) WithOptions(value map[string]string) *CreateOptions { func (o *CreateOptions) WithOptions(value map[string]string) *CreateOptions {
v := value o.Options = value
o.Options = v
return o return o
} }
// GetOptions // GetOptions returns value of field Options
func (o *CreateOptions) GetOptions() map[string]string { func (o *CreateOptions) GetOptions() map[string]string {
var options map[string]string
if o.Options == nil { if o.Options == nil {
return options var z map[string]string
return z
} }
return o.Options return o.Options
} }
// WithName // WithName set field Name to given value
func (o *CreateOptions) WithName(value string) *CreateOptions { func (o *CreateOptions) WithName(value string) *CreateOptions {
v := &value o.Name = &value
o.Name = v
return o return o
} }
// GetName // GetName returns value of field Name
func (o *CreateOptions) GetName() string { func (o *CreateOptions) GetName() string {
var name string
if o.Name == nil { if o.Name == nil {
return name var z string
return z
} }
return *o.Name return *o.Name
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package network package network
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *DisconnectOptions) Changed(fieldName string) bool { func (o *DisconnectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *DisconnectOptions) ToParams() (url.Values, error) { func (o *DisconnectOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithForce // WithForce set field Force to given value
func (o *DisconnectOptions) WithForce(value bool) *DisconnectOptions { func (o *DisconnectOptions) WithForce(value bool) *DisconnectOptions {
v := &value o.Force = &value
o.Force = v
return o return o
} }
// GetForce // GetForce returns value of field Force
func (o *DisconnectOptions) GetForce() bool { func (o *DisconnectOptions) GetForce() bool {
var force bool
if o.Force == nil { if o.Force == nil {
return force var z bool
return z
} }
return *o.Force return *o.Force
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package network package network
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExistsOptions) Changed(fieldName string) bool { func (o *ExistsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExistsOptions) ToParams() (url.Values, error) { func (o *ExistsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package network package network
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *InspectOptions) Changed(fieldName string) bool { func (o *InspectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *InspectOptions) ToParams() (url.Values, error) { func (o *InspectOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package network package network
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ListOptions) Changed(fieldName string) bool { func (o *ListOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ListOptions) ToParams() (url.Values, error) { func (o *ListOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithFilters // WithFilters set field Filters to given value
func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions { func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *ListOptions) GetFilters() map[string][]string { func (o *ListOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package network package network
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PruneOptions) Changed(fieldName string) bool { func (o *PruneOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PruneOptions) ToParams() (url.Values, error) { func (o *PruneOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithFilters // WithFilters set field Filters to given value
func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions { func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *PruneOptions) GetFilters() map[string][]string { func (o *PruneOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package network package network
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RemoveOptions) Changed(fieldName string) bool { func (o *RemoveOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RemoveOptions) ToParams() (url.Values, error) { func (o *RemoveOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithForce // WithForce set field Force to given value
func (o *RemoveOptions) WithForce(value bool) *RemoveOptions { func (o *RemoveOptions) WithForce(value bool) *RemoveOptions {
v := &value o.Force = &value
o.Force = v
return o return o
} }
// GetForce // GetForce returns value of field Force
func (o *RemoveOptions) GetForce() bool { func (o *RemoveOptions) GetForce() bool {
var force bool
if o.Force == nil { if o.Force == nil {
return force var z bool
return z
} }
return *o.Force return *o.Force
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package play package play
import ( import (
@ -7,240 +8,222 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *KubeOptions) Changed(fieldName string) bool { func (o *KubeOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *KubeOptions) ToParams() (url.Values, error) { func (o *KubeOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAuthfile // WithAuthfile set field Authfile to given value
func (o *KubeOptions) WithAuthfile(value string) *KubeOptions { func (o *KubeOptions) WithAuthfile(value string) *KubeOptions {
v := &value o.Authfile = &value
o.Authfile = v
return o return o
} }
// GetAuthfile // GetAuthfile returns value of field Authfile
func (o *KubeOptions) GetAuthfile() string { func (o *KubeOptions) GetAuthfile() string {
var authfile string
if o.Authfile == nil { if o.Authfile == nil {
return authfile var z string
return z
} }
return *o.Authfile return *o.Authfile
} }
// WithCertDir // WithCertDir set field CertDir to given value
func (o *KubeOptions) WithCertDir(value string) *KubeOptions { func (o *KubeOptions) WithCertDir(value string) *KubeOptions {
v := &value o.CertDir = &value
o.CertDir = v
return o return o
} }
// GetCertDir // GetCertDir returns value of field CertDir
func (o *KubeOptions) GetCertDir() string { func (o *KubeOptions) GetCertDir() string {
var certDir string
if o.CertDir == nil { if o.CertDir == nil {
return certDir var z string
return z
} }
return *o.CertDir return *o.CertDir
} }
// WithUsername // WithUsername set field Username to given value
func (o *KubeOptions) WithUsername(value string) *KubeOptions { func (o *KubeOptions) WithUsername(value string) *KubeOptions {
v := &value o.Username = &value
o.Username = v
return o return o
} }
// GetUsername // GetUsername returns value of field Username
func (o *KubeOptions) GetUsername() string { func (o *KubeOptions) GetUsername() string {
var username string
if o.Username == nil { if o.Username == nil {
return username var z string
return z
} }
return *o.Username return *o.Username
} }
// WithPassword // WithPassword set field Password to given value
func (o *KubeOptions) WithPassword(value string) *KubeOptions { func (o *KubeOptions) WithPassword(value string) *KubeOptions {
v := &value o.Password = &value
o.Password = v
return o return o
} }
// GetPassword // GetPassword returns value of field Password
func (o *KubeOptions) GetPassword() string { func (o *KubeOptions) GetPassword() string {
var password string
if o.Password == nil { if o.Password == nil {
return password var z string
return z
} }
return *o.Password return *o.Password
} }
// WithNetwork // WithNetwork set field Network to given value
func (o *KubeOptions) WithNetwork(value string) *KubeOptions { func (o *KubeOptions) WithNetwork(value string) *KubeOptions {
v := &value o.Network = &value
o.Network = v
return o return o
} }
// GetNetwork // GetNetwork returns value of field Network
func (o *KubeOptions) GetNetwork() string { func (o *KubeOptions) GetNetwork() string {
var network string
if o.Network == nil { if o.Network == nil {
return network var z string
return z
} }
return *o.Network return *o.Network
} }
// WithQuiet // WithQuiet set field Quiet to given value
func (o *KubeOptions) WithQuiet(value bool) *KubeOptions { func (o *KubeOptions) WithQuiet(value bool) *KubeOptions {
v := &value o.Quiet = &value
o.Quiet = v
return o return o
} }
// GetQuiet // GetQuiet returns value of field Quiet
func (o *KubeOptions) GetQuiet() bool { func (o *KubeOptions) GetQuiet() bool {
var quiet bool
if o.Quiet == nil { if o.Quiet == nil {
return quiet var z bool
return z
} }
return *o.Quiet return *o.Quiet
} }
// WithSignaturePolicy // WithSignaturePolicy set field SignaturePolicy to given value
func (o *KubeOptions) WithSignaturePolicy(value string) *KubeOptions { func (o *KubeOptions) WithSignaturePolicy(value string) *KubeOptions {
v := &value o.SignaturePolicy = &value
o.SignaturePolicy = v
return o return o
} }
// GetSignaturePolicy // GetSignaturePolicy returns value of field SignaturePolicy
func (o *KubeOptions) GetSignaturePolicy() string { func (o *KubeOptions) GetSignaturePolicy() string {
var signaturePolicy string
if o.SignaturePolicy == nil { if o.SignaturePolicy == nil {
return signaturePolicy var z string
return z
} }
return *o.SignaturePolicy return *o.SignaturePolicy
} }
// WithSkipTLSVerify // WithSkipTLSVerify set field SkipTLSVerify to given value
func (o *KubeOptions) WithSkipTLSVerify(value bool) *KubeOptions { func (o *KubeOptions) WithSkipTLSVerify(value bool) *KubeOptions {
v := &value o.SkipTLSVerify = &value
o.SkipTLSVerify = v
return o return o
} }
// GetSkipTLSVerify // GetSkipTLSVerify returns value of field SkipTLSVerify
func (o *KubeOptions) GetSkipTLSVerify() bool { func (o *KubeOptions) GetSkipTLSVerify() bool {
var skipTLSVerify bool
if o.SkipTLSVerify == nil { if o.SkipTLSVerify == nil {
return skipTLSVerify var z bool
return z
} }
return *o.SkipTLSVerify return *o.SkipTLSVerify
} }
// WithSeccompProfileRoot // WithSeccompProfileRoot set field SeccompProfileRoot to given value
func (o *KubeOptions) WithSeccompProfileRoot(value string) *KubeOptions { func (o *KubeOptions) WithSeccompProfileRoot(value string) *KubeOptions {
v := &value o.SeccompProfileRoot = &value
o.SeccompProfileRoot = v
return o return o
} }
// GetSeccompProfileRoot // GetSeccompProfileRoot returns value of field SeccompProfileRoot
func (o *KubeOptions) GetSeccompProfileRoot() string { func (o *KubeOptions) GetSeccompProfileRoot() string {
var seccompProfileRoot string
if o.SeccompProfileRoot == nil { if o.SeccompProfileRoot == nil {
return seccompProfileRoot var z string
return z
} }
return *o.SeccompProfileRoot return *o.SeccompProfileRoot
} }
// WithStaticIPs // WithStaticIPs set field StaticIPs to given value
func (o *KubeOptions) WithStaticIPs(value []net.IP) *KubeOptions { func (o *KubeOptions) WithStaticIPs(value []net.IP) *KubeOptions {
v := &value o.StaticIPs = &value
o.StaticIPs = v
return o return o
} }
// GetStaticIPs // GetStaticIPs returns value of field StaticIPs
func (o *KubeOptions) GetStaticIPs() []net.IP { func (o *KubeOptions) GetStaticIPs() []net.IP {
var staticIPs []net.IP
if o.StaticIPs == nil { if o.StaticIPs == nil {
return staticIPs var z []net.IP
return z
} }
return *o.StaticIPs return *o.StaticIPs
} }
// WithStaticMACs // WithStaticMACs set field StaticMACs to given value
func (o *KubeOptions) WithStaticMACs(value []net.HardwareAddr) *KubeOptions { func (o *KubeOptions) WithStaticMACs(value []net.HardwareAddr) *KubeOptions {
v := &value o.StaticMACs = &value
o.StaticMACs = v
return o return o
} }
// GetStaticMACs // GetStaticMACs returns value of field StaticMACs
func (o *KubeOptions) GetStaticMACs() []net.HardwareAddr { func (o *KubeOptions) GetStaticMACs() []net.HardwareAddr {
var staticMACs []net.HardwareAddr
if o.StaticMACs == nil { if o.StaticMACs == nil {
return staticMACs var z []net.HardwareAddr
return z
} }
return *o.StaticMACs return *o.StaticMACs
} }
// WithConfigMaps // WithConfigMaps set field ConfigMaps to given value
func (o *KubeOptions) WithConfigMaps(value []string) *KubeOptions { func (o *KubeOptions) WithConfigMaps(value []string) *KubeOptions {
v := &value o.ConfigMaps = &value
o.ConfigMaps = v
return o return o
} }
// GetConfigMaps // GetConfigMaps returns value of field ConfigMaps
func (o *KubeOptions) GetConfigMaps() []string { func (o *KubeOptions) GetConfigMaps() []string {
var configMaps []string
if o.ConfigMaps == nil { if o.ConfigMaps == nil {
return configMaps var z []string
return z
} }
return *o.ConfigMaps return *o.ConfigMaps
} }
// WithLogDriver // WithLogDriver set field LogDriver to given value
func (o *KubeOptions) WithLogDriver(value string) *KubeOptions { func (o *KubeOptions) WithLogDriver(value string) *KubeOptions {
v := &value o.LogDriver = &value
o.LogDriver = v
return o return o
} }
// GetLogDriver // GetLogDriver returns value of field LogDriver
func (o *KubeOptions) GetLogDriver() string { func (o *KubeOptions) GetLogDriver() string {
var logDriver string
if o.LogDriver == nil { if o.LogDriver == nil {
return logDriver var z string
return z
} }
return *o.LogDriver return *o.LogDriver
} }
// WithStart // WithStart set field Start to given value
func (o *KubeOptions) WithStart(value bool) *KubeOptions { func (o *KubeOptions) WithStart(value bool) *KubeOptions {
v := &value o.Start = &value
o.Start = v
return o return o
} }
// GetStart // GetStart returns value of field Start
func (o *KubeOptions) GetStart() bool { func (o *KubeOptions) GetStart() bool {
var start bool
if o.Start == nil { if o.Start == nil {
return start var z bool
return z
} }
return *o.Start return *o.Start
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *CreateOptions) Changed(fieldName string) bool { func (o *CreateOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *CreateOptions) ToParams() (url.Values, error) { func (o *CreateOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExistsOptions) Changed(fieldName string) bool { func (o *ExistsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExistsOptions) ToParams() (url.Values, error) { func (o *ExistsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *InspectOptions) Changed(fieldName string) bool { func (o *InspectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *InspectOptions) ToParams() (url.Values, error) { func (o *InspectOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *KillOptions) Changed(fieldName string) bool { func (o *KillOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *KillOptions) ToParams() (url.Values, error) { func (o *KillOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithSignal // WithSignal set field Signal to given value
func (o *KillOptions) WithSignal(value string) *KillOptions { func (o *KillOptions) WithSignal(value string) *KillOptions {
v := &value o.Signal = &value
o.Signal = v
return o return o
} }
// GetSignal // GetSignal returns value of field Signal
func (o *KillOptions) GetSignal() string { func (o *KillOptions) GetSignal() string {
var signal string
if o.Signal == nil { if o.Signal == nil {
return signal var z string
return z
} }
return *o.Signal return *o.Signal
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ListOptions) Changed(fieldName string) bool { func (o *ListOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ListOptions) ToParams() (url.Values, error) { func (o *ListOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithFilters // WithFilters set field Filters to given value
func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions { func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *ListOptions) GetFilters() map[string][]string { func (o *ListOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PauseOptions) Changed(fieldName string) bool { func (o *PauseOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PauseOptions) ToParams() (url.Values, error) { func (o *PauseOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PruneOptions) Changed(fieldName string) bool { func (o *PruneOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PruneOptions) ToParams() (url.Values, error) { func (o *PruneOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RemoveOptions) Changed(fieldName string) bool { func (o *RemoveOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RemoveOptions) ToParams() (url.Values, error) { func (o *RemoveOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithForce // WithForce set field Force to given value
func (o *RemoveOptions) WithForce(value bool) *RemoveOptions { func (o *RemoveOptions) WithForce(value bool) *RemoveOptions {
v := &value o.Force = &value
o.Force = v
return o return o
} }
// GetForce // GetForce returns value of field Force
func (o *RemoveOptions) GetForce() bool { func (o *RemoveOptions) GetForce() bool {
var force bool
if o.Force == nil { if o.Force == nil {
return force var z bool
return z
} }
return *o.Force return *o.Force
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RestartOptions) Changed(fieldName string) bool { func (o *RestartOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RestartOptions) ToParams() (url.Values, error) { func (o *RestartOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *StartOptions) Changed(fieldName string) bool { func (o *StartOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *StartOptions) ToParams() (url.Values, error) { func (o *StartOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *StatsOptions) Changed(fieldName string) bool { func (o *StatsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *StatsOptions) ToParams() (url.Values, error) { func (o *StatsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAll // WithAll set field All to given value
func (o *StatsOptions) WithAll(value bool) *StatsOptions { func (o *StatsOptions) WithAll(value bool) *StatsOptions {
v := &value o.All = &value
o.All = v
return o return o
} }
// GetAll // GetAll returns value of field All
func (o *StatsOptions) GetAll() bool { func (o *StatsOptions) GetAll() bool {
var all bool
if o.All == nil { if o.All == nil {
return all var z bool
return z
} }
return *o.All return *o.All
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *StopOptions) Changed(fieldName string) bool { func (o *StopOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *StopOptions) ToParams() (url.Values, error) { func (o *StopOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithTimeout // WithTimeout set field Timeout to given value
func (o *StopOptions) WithTimeout(value int) *StopOptions { func (o *StopOptions) WithTimeout(value int) *StopOptions {
v := &value o.Timeout = &value
o.Timeout = v
return o return o
} }
// GetTimeout // GetTimeout returns value of field Timeout
func (o *StopOptions) GetTimeout() int { func (o *StopOptions) GetTimeout() int {
var timeout int
if o.Timeout == nil { if o.Timeout == nil {
return timeout var z int
return z
} }
return *o.Timeout return *o.Timeout
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *TopOptions) Changed(fieldName string) bool { func (o *TopOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *TopOptions) ToParams() (url.Values, error) { func (o *TopOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithDescriptors // WithDescriptors set field Descriptors to given value
func (o *TopOptions) WithDescriptors(value []string) *TopOptions { func (o *TopOptions) WithDescriptors(value []string) *TopOptions {
v := value o.Descriptors = value
o.Descriptors = v
return o return o
} }
// GetDescriptors // GetDescriptors returns value of field Descriptors
func (o *TopOptions) GetDescriptors() []string { func (o *TopOptions) GetDescriptors() []string {
var descriptors []string
if o.Descriptors == nil { if o.Descriptors == nil {
return descriptors var z []string
return z
} }
return o.Descriptors return o.Descriptors
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package pods package pods
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *UnpauseOptions) Changed(fieldName string) bool { func (o *UnpauseOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *UnpauseOptions) ToParams() (url.Values, error) { func (o *UnpauseOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package secrets package secrets
import ( import (
@ -6,64 +7,57 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *CreateOptions) Changed(fieldName string) bool { func (o *CreateOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *CreateOptions) ToParams() (url.Values, error) { func (o *CreateOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithName // WithName set field Name to given value
func (o *CreateOptions) WithName(value string) *CreateOptions { func (o *CreateOptions) WithName(value string) *CreateOptions {
v := &value o.Name = &value
o.Name = v
return o return o
} }
// GetName // GetName returns value of field Name
func (o *CreateOptions) GetName() string { func (o *CreateOptions) GetName() string {
var name string
if o.Name == nil { if o.Name == nil {
return name var z string
return z
} }
return *o.Name return *o.Name
} }
// WithDriver // WithDriver set field Driver to given value
func (o *CreateOptions) WithDriver(value string) *CreateOptions { func (o *CreateOptions) WithDriver(value string) *CreateOptions {
v := &value o.Driver = &value
o.Driver = v
return o return o
} }
// GetDriver // GetDriver returns value of field Driver
func (o *CreateOptions) GetDriver() string { func (o *CreateOptions) GetDriver() string {
var driver string
if o.Driver == nil { if o.Driver == nil {
return driver var z string
return z
} }
return *o.Driver return *o.Driver
} }
// WithDriverOpts // WithDriverOpts set field DriverOpts to given value
func (o *CreateOptions) WithDriverOpts(value map[string]string) *CreateOptions { func (o *CreateOptions) WithDriverOpts(value map[string]string) *CreateOptions {
v := value o.DriverOpts = value
o.DriverOpts = v
return o return o
} }
// GetDriverOpts // GetDriverOpts returns value of field DriverOpts
func (o *CreateOptions) GetDriverOpts() map[string]string { func (o *CreateOptions) GetDriverOpts() map[string]string {
var driverOpts map[string]string
if o.DriverOpts == nil { if o.DriverOpts == nil {
return driverOpts var z map[string]string
return z
} }
return o.DriverOpts return o.DriverOpts
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package secrets package secrets
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *InspectOptions) Changed(fieldName string) bool { func (o *InspectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *InspectOptions) ToParams() (url.Values, error) { func (o *InspectOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package secrets package secrets
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ListOptions) Changed(fieldName string) bool { func (o *ListOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ListOptions) ToParams() (url.Values, error) { func (o *ListOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithFilters // WithFilters set field Filters to given value
func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions { func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *ListOptions) GetFilters() map[string][]string { func (o *ListOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package secrets package secrets
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *RemoveOptions) Changed(fieldName string) bool { func (o *RemoveOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *RemoveOptions) ToParams() (url.Values, error) { func (o *RemoveOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package system package system
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *DiskOptions) Changed(fieldName string) bool { func (o *DiskOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *DiskOptions) ToParams() (url.Values, error) { func (o *DiskOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package system package system
import ( import (
@ -6,80 +7,72 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *EventsOptions) Changed(fieldName string) bool { func (o *EventsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *EventsOptions) ToParams() (url.Values, error) { func (o *EventsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithFilters // WithFilters set field Filters to given value
func (o *EventsOptions) WithFilters(value map[string][]string) *EventsOptions { func (o *EventsOptions) WithFilters(value map[string][]string) *EventsOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *EventsOptions) GetFilters() map[string][]string { func (o *EventsOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }
// WithSince // WithSince set field Since to given value
func (o *EventsOptions) WithSince(value string) *EventsOptions { func (o *EventsOptions) WithSince(value string) *EventsOptions {
v := &value o.Since = &value
o.Since = v
return o return o
} }
// GetSince // GetSince returns value of field Since
func (o *EventsOptions) GetSince() string { func (o *EventsOptions) GetSince() string {
var since string
if o.Since == nil { if o.Since == nil {
return since var z string
return z
} }
return *o.Since return *o.Since
} }
// WithStream // WithStream set field Stream to given value
func (o *EventsOptions) WithStream(value bool) *EventsOptions { func (o *EventsOptions) WithStream(value bool) *EventsOptions {
v := &value o.Stream = &value
o.Stream = v
return o return o
} }
// GetStream // GetStream returns value of field Stream
func (o *EventsOptions) GetStream() bool { func (o *EventsOptions) GetStream() bool {
var stream bool
if o.Stream == nil { if o.Stream == nil {
return stream var z bool
return z
} }
return *o.Stream return *o.Stream
} }
// WithUntil // WithUntil set field Until to given value
func (o *EventsOptions) WithUntil(value string) *EventsOptions { func (o *EventsOptions) WithUntil(value string) *EventsOptions {
v := &value o.Until = &value
o.Until = v
return o return o
} }
// GetUntil // GetUntil returns value of field Until
func (o *EventsOptions) GetUntil() string { func (o *EventsOptions) GetUntil() string {
var until string
if o.Until == nil { if o.Until == nil {
return until var z string
return z
} }
return *o.Until return *o.Until
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package system package system
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *InfoOptions) Changed(fieldName string) bool { func (o *InfoOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *InfoOptions) ToParams() (url.Values, error) { func (o *InfoOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package system package system
import ( import (
@ -6,64 +7,57 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PruneOptions) Changed(fieldName string) bool { func (o *PruneOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PruneOptions) ToParams() (url.Values, error) { func (o *PruneOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithAll // WithAll set field All to given value
func (o *PruneOptions) WithAll(value bool) *PruneOptions { func (o *PruneOptions) WithAll(value bool) *PruneOptions {
v := &value o.All = &value
o.All = v
return o return o
} }
// GetAll // GetAll returns value of field All
func (o *PruneOptions) GetAll() bool { func (o *PruneOptions) GetAll() bool {
var all bool
if o.All == nil { if o.All == nil {
return all var z bool
return z
} }
return *o.All return *o.All
} }
// WithFilters // WithFilters set field Filters to given value
func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions { func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *PruneOptions) GetFilters() map[string][]string { func (o *PruneOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }
// WithVolumes // WithVolumes set field Volumes to given value
func (o *PruneOptions) WithVolumes(value bool) *PruneOptions { func (o *PruneOptions) WithVolumes(value bool) *PruneOptions {
v := &value o.Volumes = &value
o.Volumes = v
return o return o
} }
// GetVolumes // GetVolumes returns value of field Volumes
func (o *PruneOptions) GetVolumes() bool { func (o *PruneOptions) GetVolumes() bool {
var volumes bool
if o.Volumes == nil { if o.Volumes == nil {
return volumes var z bool
return z
} }
return *o.Volumes return *o.Volumes
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package system package system
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *VersionOptions) Changed(fieldName string) bool { func (o *VersionOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *VersionOptions) ToParams() (url.Values, error) { func (o *VersionOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -0,0 +1,51 @@
package test_bindings
import (
"github.com/containers/podman/v3/pkg/bindings/containers"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/gstruct"
)
var _ = Describe("Podman API Bindings", func() {
boxedTrue, boxedFalse := new(bool), new(bool)
*boxedTrue = true
*boxedFalse = false
It("verify simple setters", func() {
boxedString := new(string)
*boxedString = "Test"
actual := new(containers.AttachOptions).
WithDetachKeys("Test").WithLogs(true).WithStream(false)
Expect(*actual).To(MatchAllFields(Fields{
"DetachKeys": Equal(boxedString),
"Logs": Equal(boxedTrue),
"Stream": Equal(boxedFalse),
}))
Expect(actual.GetDetachKeys()).To(Equal("Test"))
Expect(actual.GetLogs()).To(Equal(true))
Expect(actual.GetStream()).To(Equal(false))
})
It("verify composite setters", func() {
boxedInt := new(int)
*boxedInt = 50
actual := new(containers.ListOptions).
WithFilters(map[string][]string{"Test": {"Test Filter"}}).
WithLast(50)
Expect(*actual).To(MatchAllFields(Fields{
"All": BeNil(),
"External": BeNil(),
"Filters": HaveKeyWithValue("Test", []string{"Test Filter"}),
"Last": Equal(boxedInt),
"Namespace": BeNil(),
"Size": BeNil(),
"Sync": BeNil(),
}))
})
})

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package volumes package volumes
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *CreateOptions) Changed(fieldName string) bool { func (o *CreateOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *CreateOptions) ToParams() (url.Values, error) { func (o *CreateOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package volumes package volumes
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ExistsOptions) Changed(fieldName string) bool { func (o *ExistsOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ExistsOptions) ToParams() (url.Values, error) { func (o *ExistsOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package volumes package volumes
import ( import (
@ -6,16 +7,12 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *InspectOptions) Changed(fieldName string) bool { func (o *InspectOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *InspectOptions) ToParams() (url.Values, error) { func (o *InspectOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package volumes package volumes
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *ListOptions) Changed(fieldName string) bool { func (o *ListOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *ListOptions) ToParams() (url.Values, error) { func (o *ListOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithFilters // WithFilters set field Filters to given value
func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions { func (o *ListOptions) WithFilters(value map[string][]string) *ListOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *ListOptions) GetFilters() map[string][]string { func (o *ListOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }

View File

@ -1,3 +1,4 @@
// Code generated by go generate; DO NOT EDIT.
package volumes package volumes
import ( import (
@ -6,32 +7,27 @@ import (
"github.com/containers/podman/v3/pkg/bindings/internal/util" "github.com/containers/podman/v3/pkg/bindings/internal/util"
) )
/* // Changed returns true if named field has been set
This file is generated automatically by go generate. Do not edit.
*/
// Changed
func (o *PruneOptions) Changed(fieldName string) bool { func (o *PruneOptions) Changed(fieldName string) bool {
return util.Changed(o, fieldName) return util.Changed(o, fieldName)
} }
// ToParams // ToParams formats struct fields to be passed to API service
func (o *PruneOptions) ToParams() (url.Values, error) { func (o *PruneOptions) ToParams() (url.Values, error) {
return util.ToParams(o) return util.ToParams(o)
} }
// WithFilters // WithFilters set field Filters to given value
func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions { func (o *PruneOptions) WithFilters(value map[string][]string) *PruneOptions {
v := value o.Filters = value
o.Filters = v
return o return o
} }
// GetFilters // GetFilters returns value of field Filters
func (o *PruneOptions) GetFilters() map[string][]string { func (o *PruneOptions) GetFilters() map[string][]string {
var filters map[string][]string
if o.Filters == nil { if o.Filters == nil {
return filters var z map[string][]string
return z
} }
return o.Filters return o.Filters
} }

Some files were not shown because too many files have changed in this diff Show More