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

package models

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

import (
	strfmt "github.com/go-openapi/strfmt"

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

// GetOpportunitiesTasksTaskIDOKBody get_opportunities_tasks_task_id_ok
//
// 200 ok object
// swagger:model getOpportunitiesTasksTaskIdOKBody

type GetOpportunitiesTasksTaskIDOKBody struct {

	// get_opportunities_tasks_task_id_description
	//
	// description string
	// Required: true
	Description *string `json:"description"`

	// get_opportunities_tasks_task_id_name
	//
	// name string
	// Required: true
	Name *string `json:"name"`

	// get_opportunities_tasks_task_id_notification
	//
	// notification string
	// Required: true
	Notification *string `json:"notification"`

	// get_opportunities_tasks_task_id_task_id
	//
	// task_id integer
	// Required: true
	TaskID *int32 `json:"task_id"`
}

/* polymorph getOpportunitiesTasksTaskIdOKBody description false */

/* polymorph getOpportunitiesTasksTaskIdOKBody name false */

/* polymorph getOpportunitiesTasksTaskIdOKBody notification false */

/* polymorph getOpportunitiesTasksTaskIdOKBody task_id false */

// Validate validates this get opportunities tasks task Id o k body
func (m *GetOpportunitiesTasksTaskIDOKBody) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

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

func (m *GetOpportunitiesTasksTaskIDOKBody) validateDescription(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetOpportunitiesTasksTaskIDOKBody) validateName(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetOpportunitiesTasksTaskIDOKBody) validateNotification(formats strfmt.Registry) error {

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

	return nil
}

func (m *GetOpportunitiesTasksTaskIDOKBody) validateTaskID(formats strfmt.Registry) error {

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

	return nil
}

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

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