mirror of https://github.com/vernonkeenan/lib
179 lines
5.5 KiB
Go
179 lines
5.5 KiB
Go
|
|
// Code generated by go-swagger; DO NOT EDIT.
|
||
|
|
|
||
|
|
// (c) 2012-2020 by Taxnexus, Inc.
|
||
|
|
// All rights reserved worldwide.
|
||
|
|
// Proprietary product; unlicensed use is not allowed
|
||
|
|
|
||
|
|
package research_models
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
"encoding/json"
|
||
|
|
|
||
|
|
"github.com/go-openapi/errors"
|
||
|
|
"github.com/go-openapi/strfmt"
|
||
|
|
"github.com/go-openapi/swag/jsonutils"
|
||
|
|
"github.com/go-openapi/validate"
|
||
|
|
)
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelection One operator-selected value bound to an immutable field in the completed portfolio enrichment run; Research revalidates the field identity, name, value, and entity-specific bounds
|
||
|
|
//
|
||
|
|
// swagger:model PortfolioReconciliationFieldSelection
|
||
|
|
type PortfolioReconciliationFieldSelection struct {
|
||
|
|
|
||
|
|
// candidate field ID
|
||
|
|
// Required: true
|
||
|
|
// Format: uuid
|
||
|
|
CandidateFieldID *strfmt.UUID `json:"CandidateFieldID"`
|
||
|
|
|
||
|
|
// field name
|
||
|
|
// Required: true
|
||
|
|
// Enum: ["description","fulldescription","imagealttext","imageurl","logo","name","slug","tagline","url"]
|
||
|
|
FieldName *string `json:"FieldName"`
|
||
|
|
|
||
|
|
// value
|
||
|
|
// Required: true
|
||
|
|
// Max Length: 20000
|
||
|
|
// Min Length: 1
|
||
|
|
Value *string `json:"Value"`
|
||
|
|
}
|
||
|
|
|
||
|
|
// Validate validates this portfolio reconciliation field selection
|
||
|
|
func (m *PortfolioReconciliationFieldSelection) Validate(formats strfmt.Registry) error {
|
||
|
|
var res []error
|
||
|
|
|
||
|
|
if err := m.validateCandidateFieldID(formats); err != nil {
|
||
|
|
res = append(res, err)
|
||
|
|
}
|
||
|
|
|
||
|
|
if err := m.validateFieldName(formats); err != nil {
|
||
|
|
res = append(res, err)
|
||
|
|
}
|
||
|
|
|
||
|
|
if err := m.validateValue(formats); err != nil {
|
||
|
|
res = append(res, err)
|
||
|
|
}
|
||
|
|
|
||
|
|
if len(res) > 0 {
|
||
|
|
return errors.CompositeValidationError(res...)
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *PortfolioReconciliationFieldSelection) validateCandidateFieldID(formats strfmt.Registry) error {
|
||
|
|
|
||
|
|
if err := validate.Required("CandidateFieldID", "body", m.CandidateFieldID); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
|
||
|
|
if err := validate.FormatOf("CandidateFieldID", "body", "uuid", m.CandidateFieldID.String(), formats); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
var portfolioReconciliationFieldSelectionTypeFieldNamePropEnum []any
|
||
|
|
|
||
|
|
func init() {
|
||
|
|
var res []string
|
||
|
|
if err := json.Unmarshal([]byte(`["description","fulldescription","imagealttext","imageurl","logo","name","slug","tagline","url"]`), &res); err != nil {
|
||
|
|
panic(err)
|
||
|
|
}
|
||
|
|
for _, v := range res {
|
||
|
|
portfolioReconciliationFieldSelectionTypeFieldNamePropEnum = append(portfolioReconciliationFieldSelectionTypeFieldNamePropEnum, v)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
const (
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelectionFieldNameDescription captures enum value "description"
|
||
|
|
PortfolioReconciliationFieldSelectionFieldNameDescription string = "description"
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelectionFieldNameFulldescription captures enum value "fulldescription"
|
||
|
|
PortfolioReconciliationFieldSelectionFieldNameFulldescription string = "fulldescription"
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelectionFieldNameImagealttext captures enum value "imagealttext"
|
||
|
|
PortfolioReconciliationFieldSelectionFieldNameImagealttext string = "imagealttext"
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelectionFieldNameImageurl captures enum value "imageurl"
|
||
|
|
PortfolioReconciliationFieldSelectionFieldNameImageurl string = "imageurl"
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelectionFieldNameLogo captures enum value "logo"
|
||
|
|
PortfolioReconciliationFieldSelectionFieldNameLogo string = "logo"
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelectionFieldNameName captures enum value "name"
|
||
|
|
PortfolioReconciliationFieldSelectionFieldNameName string = "name"
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelectionFieldNameSlug captures enum value "slug"
|
||
|
|
PortfolioReconciliationFieldSelectionFieldNameSlug string = "slug"
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelectionFieldNameTagline captures enum value "tagline"
|
||
|
|
PortfolioReconciliationFieldSelectionFieldNameTagline string = "tagline"
|
||
|
|
|
||
|
|
// PortfolioReconciliationFieldSelectionFieldNameURL captures enum value "url"
|
||
|
|
PortfolioReconciliationFieldSelectionFieldNameURL string = "url"
|
||
|
|
)
|
||
|
|
|
||
|
|
// prop value enum
|
||
|
|
func (m *PortfolioReconciliationFieldSelection) validateFieldNameEnum(path, location string, value string) error {
|
||
|
|
if err := validate.EnumCase(path, location, value, portfolioReconciliationFieldSelectionTypeFieldNamePropEnum, true); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *PortfolioReconciliationFieldSelection) validateFieldName(formats strfmt.Registry) error {
|
||
|
|
|
||
|
|
if err := validate.Required("FieldName", "body", m.FieldName); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
|
||
|
|
// value enum
|
||
|
|
if err := m.validateFieldNameEnum("FieldName", "body", *m.FieldName); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
func (m *PortfolioReconciliationFieldSelection) validateValue(formats strfmt.Registry) error {
|
||
|
|
|
||
|
|
if err := validate.Required("Value", "body", m.Value); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
|
||
|
|
if err := validate.MinLength("Value", "body", *m.Value, 1); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
|
||
|
|
if err := validate.MaxLength("Value", "body", *m.Value, 20000); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
// ContextValidate validates this portfolio reconciliation field selection based on context it is used
|
||
|
|
func (m *PortfolioReconciliationFieldSelection) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||
|
|
return nil
|
||
|
|
}
|
||
|
|
|
||
|
|
// MarshalBinary interface implementation
|
||
|
|
func (m *PortfolioReconciliationFieldSelection) MarshalBinary() ([]byte, error) {
|
||
|
|
if m == nil {
|
||
|
|
return nil, nil
|
||
|
|
}
|
||
|
|
return jsonutils.WriteJSON(m)
|
||
|
|
}
|
||
|
|
|
||
|
|
// UnmarshalBinary interface implementation
|
||
|
|
func (m *PortfolioReconciliationFieldSelection) UnmarshalBinary(b []byte) error {
|
||
|
|
var res PortfolioReconciliationFieldSelection
|
||
|
|
if err := jsonutils.ReadJSON(b, &res); err != nil {
|
||
|
|
return err
|
||
|
|
}
|
||
|
|
*m = res
|
||
|
|
return nil
|
||
|
|
}
|