cloud/azure/subscriptions/models/tenant_list_result.go
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 (
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/errors"
"github.com/go-openapi/validate"
)
// TenantListResult Tenant Ids information.
// swagger:model TenantListResult
type TenantListResult struct {
// The URL to use for getting the next set of results.
// Required: true
NextLink *string `json:"nextLink"`
// An array of tenants.
Value []*TenantIDDescription `json:"value"`
}
// Validate validates this tenant list result
func (m *TenantListResult) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateNextLink(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateValue(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *TenantListResult) validateNextLink(formats strfmt.Registry) error {
if err := validate.Required("nextLink", "body", m.NextLink); err != nil {
return err
}
return nil
}
func (m *TenantListResult) validateValue(formats strfmt.Registry) error {
if swag.IsZero(m.Value) { // not required
return nil
}
for i := 0; i < len(m.Value); i++ {
if swag.IsZero(m.Value[i]) { // not required
continue
}
if m.Value[i] != nil {
if err := m.Value[i].Validate(formats); err != nil {
return err
}
}
}
return nil
}