mirror of https://github.com/vernonkeenan/lib
parent
7f54aa7811
commit
f0a768157c
|
@ -25,6 +25,9 @@ type PromptAnswerResponse struct {
|
||||||
|
|
||||||
// data
|
// data
|
||||||
Data []*PromptAnswer `json:"Data"`
|
Data []*PromptAnswer `json:"Data"`
|
||||||
|
|
||||||
|
// meta
|
||||||
|
Meta *ResponseMeta `json:"Meta,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate validates this prompt answer response
|
// Validate validates this prompt answer response
|
||||||
|
@ -35,6 +38,10 @@ func (m *PromptAnswerResponse) Validate(formats strfmt.Registry) error {
|
||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := m.validateMeta(formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
if len(res) > 0 {
|
if len(res) > 0 {
|
||||||
return errors.CompositeValidationError(res...)
|
return errors.CompositeValidationError(res...)
|
||||||
}
|
}
|
||||||
|
@ -67,6 +74,25 @@ func (m *PromptAnswerResponse) validateData(formats strfmt.Registry) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *PromptAnswerResponse) validateMeta(formats strfmt.Registry) error {
|
||||||
|
if swag.IsZero(m.Meta) { // not required
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.Validate(formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// ContextValidate validate this prompt answer response based on the context it is used
|
// ContextValidate validate this prompt answer response based on the context it is used
|
||||||
func (m *PromptAnswerResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
func (m *PromptAnswerResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||||
var res []error
|
var res []error
|
||||||
|
@ -75,6 +101,10 @@ func (m *PromptAnswerResponse) ContextValidate(ctx context.Context, formats strf
|
||||||
res = append(res, err)
|
res = append(res, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err := m.contextValidateMeta(ctx, formats); err != nil {
|
||||||
|
res = append(res, err)
|
||||||
|
}
|
||||||
|
|
||||||
if len(res) > 0 {
|
if len(res) > 0 {
|
||||||
return errors.CompositeValidationError(res...)
|
return errors.CompositeValidationError(res...)
|
||||||
}
|
}
|
||||||
|
@ -101,6 +131,22 @@ func (m *PromptAnswerResponse) contextValidateData(ctx context.Context, formats
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *PromptAnswerResponse) contextValidateMeta(ctx context.Context, formats strfmt.Registry) error {
|
||||||
|
|
||||||
|
if m.Meta != nil {
|
||||||
|
if err := m.Meta.ContextValidate(ctx, formats); err != nil {
|
||||||
|
if ve, ok := err.(*errors.Validation); ok {
|
||||||
|
return ve.ValidateName("Meta")
|
||||||
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
||||||
|
return ce.ValidateName("Meta")
|
||||||
|
}
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
// MarshalBinary interface implementation
|
||||||
func (m *PromptAnswerResponse) MarshalBinary() ([]byte, error) {
|
func (m *PromptAnswerResponse) MarshalBinary() ([]byte, error) {
|
||||||
if m == nil {
|
if m == nil {
|
||||||
|
|
|
@ -25,7 +25,7 @@ type Role struct {
|
||||||
Auth0RoleID *string `json:"Auth0RoleID,omitempty"`
|
Auth0RoleID *string `json:"Auth0RoleID,omitempty"`
|
||||||
|
|
||||||
// created by
|
// created by
|
||||||
CreatedByID *string `json:"CreatedByID:,omitempty"`
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
||||||
|
|
||||||
// created date
|
// created date
|
||||||
CreatedDate *string `json:"CreatedDate,omitempty"`
|
CreatedDate *string `json:"CreatedDate,omitempty"`
|
||||||
|
|
|
@ -4608,6 +4608,8 @@ definitions:
|
||||||
items:
|
items:
|
||||||
$ref: "../../lib/swagger/defs/prompt-answer.yaml#/PromptAnswer"
|
$ref: "../../lib/swagger/defs/prompt-answer.yaml#/PromptAnswer"
|
||||||
type: array
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
RequestMeta:
|
RequestMeta:
|
||||||
properties:
|
properties:
|
||||||
|
@ -4660,7 +4662,7 @@ definitions:
|
||||||
description: the corresponding auth0 role
|
description: the corresponding auth0 role
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
"CreatedByID:":
|
CreatedByID:
|
||||||
description: created by
|
description: created by
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
|
|
@ -4608,6 +4608,8 @@ definitions:
|
||||||
items:
|
items:
|
||||||
$ref: "../../lib/swagger/defs/prompt-answer.yaml#/PromptAnswer"
|
$ref: "../../lib/swagger/defs/prompt-answer.yaml#/PromptAnswer"
|
||||||
type: array
|
type: array
|
||||||
|
Meta:
|
||||||
|
$ref: "#/definitions/ResponseMeta"
|
||||||
type: object
|
type: object
|
||||||
RequestMeta:
|
RequestMeta:
|
||||||
properties:
|
properties:
|
||||||
|
@ -4660,7 +4662,7 @@ definitions:
|
||||||
description: the corresponding auth0 role
|
description: the corresponding auth0 role
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
"CreatedByID:":
|
CreatedByID:
|
||||||
description: created by
|
description: created by
|
||||||
type: string
|
type: string
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
|
Loading…
Reference in New Issue