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

// (c) 2012-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed

package research_models

import (
	"context"

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

// CompanyProductProposalSubmitRequest Optimistic submission input; lifecycle and attribution remain server-owned
//
// swagger:model CompanyProductProposalSubmitRequest
type CompanyProductProposalSubmitRequest struct {

	// expected last modified date
	// Required: true
	// Format: date-time
	ExpectedLastModifiedDate *strfmt.DateTime `json:"ExpectedLastModifiedDate"`
}

// Validate validates this company product proposal submit request
func (m *CompanyProductProposalSubmitRequest) Validate(formats strfmt.Registry) error {
	var res []error

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

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

func (m *CompanyProductProposalSubmitRequest) validateExpectedLastModifiedDate(formats strfmt.Registry) error {

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

	if err := validate.FormatOf("ExpectedLastModifiedDate", "body", "date-time", m.ExpectedLastModifiedDate.String(), formats); err != nil {
		return err
	}

	return nil
}

// ContextValidate validates this company product proposal submit request based on context it is used
func (m *CompanyProductProposalSubmitRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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