func (m *ProviderAO1Target) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateLabel(formats); err != nil {
		res = append(res, err)
	}
	if err := m.validateName(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
Validate validates this provider a o1 target
package models
import (
	"bytes"
	"encoding/json"
	strfmt "github.com/go-openapi/strfmt"
	"github.com/manifoldco/go-manifold"
	"github.com/go-openapi/errors"
	"github.com/go-openapi/validate"
)
type Provider struct {
	Target *ProviderAO1Target `json:"target"`
}
func (m *Provider) Type() string {
	return "provider"
}
func (m *Provider) SetType(val string) {
}
func (m *Provider) UnmarshalJSON(raw []byte) error {
	var data struct {
		Type string `json:"type"`
		Target *ProviderAO1Target `json:"target"`
	}
	buf := bytes.NewBuffer(raw)
	dec := json.NewDecoder(buf)
	dec.UseNumber()
	if err := dec.Decode(&data); err != nil {
		return err
	}
	m.Target = data.Target
	return nil
}
func (m Provider) MarshalJSON() ([]byte, error) {
	var data struct {
		Type string `json:"type"`
		Target *ProviderAO1Target `json:"target"`
	}
	data.Target = m.Target
	data.Type = "provider"
	return json.Marshal(data)
}
func (m *Provider) Validate(formats strfmt.Registry) error {
	var res []error
	if err := m.validateTarget(formats); err != nil {
		res = append(res, err)
	}
	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}
func (m *Provider) validateTarget(formats strfmt.Registry) error {
	if err := validate.Required("target", "body", m.Target); err != nil {
		return err
	}
	if m.Target != nil {
		if err := m.Target.Validate(formats); err != nil {
			if ve, ok := err.(*errors.Validation); ok {
				return ve.ValidateName("target")
			}
			return err
		}
	}
	return nil
}
type ProviderAO1Target struct {
	Label manifold.Label `json:"label"`
	Name manifold.Name `json:"name"`
}