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

// VolumeGroupStorageDetails volume group storage details
//
// swagger:model VolumeGroupStorageDetails
type VolumeGroupStorageDetails struct {

	// The name of consistency group at storage controller level
	// Required: true
	ConsistencyGroupName *string `json:"consistencyGroupName"`

	// Indicates the minimum period in seconds between multiple cycles
	CyclePeriodSeconds int64 `json:"cyclePeriodSeconds,omitempty"`

	// Indicates the type of cycling mode used
	CyclingMode string `json:"cyclingMode,omitempty"`

	// Number of volumes in volume group
	NumOfvols int64 `json:"numOfvols,omitempty"`

	// Indicates whether master/aux volume is playing the primary role
	PrimaryRole string `json:"primaryRole,omitempty"`

	// List of remote-copy relationship names in a volume group
	RemoteCopyRelationshipNames []string `json:"remoteCopyRelationshipNames"`

	// Type of replication(metro,global)
	ReplicationType string `json:"replicationType,omitempty"`

	// Indicates the relationship state
	State string `json:"state,omitempty"`

	// Indicates whether the relationship is synchronized
	Sync string `json:"sync,omitempty"`
}

// Validate validates this volume group storage details
func (m *VolumeGroupStorageDetails) Validate(formats strfmt.Registry) error {
	var res []error

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

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

func (m *VolumeGroupStorageDetails) validateConsistencyGroupName(formats strfmt.Registry) error {

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

	return nil
}

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

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

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