// 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 (
	"context"

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

// DataflowConnectorID dataflow connector ID
//
// swagger:model dataflowConnectorID
type DataflowConnectorID struct {

	// cluster id
	// Required: true
	ClusterID *string `json:"cluster_id"`

	// connector id
	// Required: true
	ConnectorID *string `json:"connector_id"`

	// org id
	// Required: true
	OrgID *string `json:"org_id"`

	// project id
	// Required: true
	ProjectID *string `json:"project_id"`
}

// Validate validates this dataflow connector ID
func (m *DataflowConnectorID) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

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

func (m *DataflowConnectorID) validateClusterID(formats strfmt.Registry) error {

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

	return nil
}

func (m *DataflowConnectorID) validateConnectorID(formats strfmt.Registry) error {

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

	return nil
}

func (m *DataflowConnectorID) validateOrgID(formats strfmt.Registry) error {

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

	return nil
}

func (m *DataflowConnectorID) validateProjectID(formats strfmt.Registry) error {

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

	return nil
}

// ContextValidate validates this dataflow connector ID based on context it is used
func (m *DataflowConnectorID) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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