// Code generated by go-swagger; DO NOT EDIT.

package types

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"github.com/go-openapi/errors"
	strfmt "github.com/go-openapi/strfmt"
	"github.com/go-openapi/swag"
	"github.com/go-openapi/validate"
)

// ContainerCreateResp response returned by daemon when container create successfully
// swagger:model ContainerCreateResp
type ContainerCreateResp struct {

	// The ID of the created container
	// Required: true
	ID string `json:"Id"`

	// The name of the created container
	Name string `json:"Name,omitempty"`

	// Warnings encountered when creating the container
	// Required: true
	Warnings []string `json:"Warnings"`
}

// Validate validates this container create resp
func (m *ContainerCreateResp) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateID(formats); err != nil {
		res = append(res, err)
	}

	if err := m.validateWarnings(formats); err != nil {
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *ContainerCreateResp) validateID(formats strfmt.Registry) error {

	if err := validate.RequiredString("Id", "body", string(m.ID)); err != nil {
		return err
	}

	return nil
}

func (m *ContainerCreateResp) validateWarnings(formats strfmt.Registry) error {

	if err := validate.Required("Warnings", "body", m.Warnings); err != nil {
		return err
	}

	return nil
}

// MarshalBinary interface implementation
func (m *ContainerCreateResp) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *ContainerCreateResp) UnmarshalBinary(b []byte) error {
	var res ContainerCreateResp
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
