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

// WebsiteGroupData website group data
//
// swagger:model WebsiteGroupData
type WebsiteGroupData struct {

	// The name of the group for which member website status should be displayed
	// Required: true
	WebsiteGroupName *string `json:"websiteGroupName"`

	// The name of the website status should be displayed
	// Required: true
	WebsiteName *string `json:"websiteName"`
}

// Validate validates this website group data
func (m *WebsiteGroupData) Validate(formats strfmt.Registry) error {
	var res []error

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

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

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

func (m *WebsiteGroupData) validateWebsiteGroupName(formats strfmt.Registry) error {

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

	return nil
}

func (m *WebsiteGroupData) validateWebsiteName(formats strfmt.Registry) error {

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

	return nil
}

// ContextValidate validates this website group data based on context it is used
func (m *WebsiteGroupData) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
	return nil
}

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

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