func (m *ContainerUpgradeConfig) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
MarshalBinary interface implementation
package types
import (
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/swag"
)
type ContainerUpgradeConfig struct {
	ContainerConfig
	HostConfig *HostConfig `json:"HostConfig,omitempty"`
}
func (m *ContainerUpgradeConfig) UnmarshalJSON(raw []byte) error {
	var aO0 ContainerConfig
	if err := swag.ReadJSON(raw, &aO0); err != nil {
		return err
	}
	m.ContainerConfig = aO0
	var data struct {
		HostConfig *HostConfig `json:"HostConfig,omitempty"`
	}
	if err := swag.ReadJSON(raw, &data); err != nil {
		return err
	}
	m.HostConfig = data.HostConfig
	return nil
}
func (m ContainerUpgradeConfig) MarshalJSON() ([]byte, error) {
	var _parts [][]byte
	aO0, err := swag.WriteJSON(m.ContainerConfig)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, aO0)
	var data struct {
		HostConfig *HostConfig `json:"HostConfig,omitempty"`
	}
	data.HostConfig = m.HostConfig
	jsonData, err := swag.WriteJSON(data)
	if err != nil {
		return nil, err
	}
	_parts = append(_parts, jsonData)
	return swag.ConcatJSON(_parts...), nil
}
func (m *ContainerUpgradeConfig) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.ContainerConfig.Validate(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}