func (m *NetworkConnect) 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 NetworkConnect struct {
	Container string `json:"Container,omitempty"`
	EndpointConfig *EndpointSettings `json:"EndpointConfig,omitempty"`
}
func (m *NetworkConnect) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateEndpointConfig(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *NetworkConnect) validateEndpointConfig(formats strfmt.Registry) error {
	if swag.IsZero(m.EndpointConfig) {  
		return nil
	}
	if m.EndpointConfig != nil {
		if err := m.EndpointConfig.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("EndpointConfig")
			}
			return err
		}
	}
	return nil
}