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

package model

// 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"
)

// DataflowDetachReplicationResp dataflow detach replication resp
//
// swagger:model dataflowDetachReplicationResp
type DataflowDetachReplicationResp struct {

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

	// replication id
	// Required: true
	ReplicationID *string `json:"replication_id"`
}

// Validate validates this dataflow detach replication resp
func (m *DataflowDetachReplicationResp) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

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

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

	return nil
}

func (m *DataflowDetachReplicationResp) validateReplicationID(formats strfmt.Registry) error {

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

	return nil
}

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

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

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