2023-04-17 22:11:43 +00:00
|
|
|
// 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 members_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"
|
|
|
|
)
|
|
|
|
|
|
|
|
// OutgoingEmailMessage A new email message to be sent
|
|
|
|
//
|
|
|
|
// swagger:model OutgoingEmailMessage
|
|
|
|
type OutgoingEmailMessage struct {
|
|
|
|
|
|
|
|
// b c c address
|
|
|
|
BCCAddress *string `json:"BCCAddress,omitempty"`
|
|
|
|
|
2023-04-30 02:07:31 +00:00
|
|
|
// bounced
|
|
|
|
Bounced *bool `json:"Bounced,omitempty"`
|
|
|
|
|
2023-04-17 22:11:43 +00:00
|
|
|
// c c address
|
|
|
|
CCAddress *string `json:"CCAddress,omitempty"`
|
|
|
|
|
2023-04-30 02:07:31 +00:00
|
|
|
// created by ID
|
|
|
|
CreatedByID *string `json:"CreatedByID,omitempty"`
|
|
|
|
|
|
|
|
// created date
|
|
|
|
CreatedDate *string `json:"CreatedDate,omitempty"`
|
|
|
|
|
2023-04-17 22:11:43 +00:00
|
|
|
// email message ID
|
|
|
|
EmailMessageID *string `json:"EmailMessageID,omitempty"`
|
|
|
|
|
|
|
|
// external ID
|
|
|
|
ExternalID *string `json:"ExternalID,omitempty"`
|
|
|
|
|
2023-04-30 02:07:31 +00:00
|
|
|
// from address
|
|
|
|
FromAddress *string `json:"FromAddress,omitempty"`
|
|
|
|
|
2023-04-17 22:11:43 +00:00
|
|
|
// from contact ID
|
|
|
|
FromContactID *string `json:"FromContactID,omitempty"`
|
|
|
|
|
|
|
|
// from name
|
|
|
|
FromName *string `json:"FromName,omitempty"`
|
|
|
|
|
|
|
|
// HTML
|
|
|
|
HTML *string `json:"HTML,omitempty"`
|
|
|
|
|
|
|
|
// headers
|
|
|
|
Headers *Headers `json:"Headers,omitempty"`
|
|
|
|
|
|
|
|
// ID
|
|
|
|
ID string `json:"ID,omitempty"`
|
|
|
|
|
2023-04-30 02:07:31 +00:00
|
|
|
// last modified by ID
|
|
|
|
LastModifiedByID *string `json:"LastModifiedByID,omitempty"`
|
|
|
|
|
|
|
|
// last modified date
|
|
|
|
LastModifiedDate *string `json:"LastModifiedDate,omitempty"`
|
|
|
|
|
|
|
|
// object ID
|
|
|
|
ObjectID *string `json:"ObjectID,omitempty"`
|
|
|
|
|
|
|
|
// object type
|
|
|
|
ObjectType *string `json:"ObjectType,omitempty"`
|
|
|
|
|
|
|
|
// queued
|
|
|
|
Queued *bool `json:"Queued,omitempty"`
|
|
|
|
|
|
|
|
// queued date
|
|
|
|
QueuedDate *string `json:"QueuedDate,omitempty"`
|
|
|
|
|
|
|
|
// sent
|
|
|
|
Sent *bool `json:"Sent,omitempty"`
|
|
|
|
|
|
|
|
// sent date
|
|
|
|
SentDate *string `json:"SentDate,omitempty"`
|
|
|
|
|
2023-04-17 22:11:43 +00:00
|
|
|
// subject
|
|
|
|
Subject *string `json:"Subject,omitempty"`
|
|
|
|
|
2023-04-30 02:07:31 +00:00
|
|
|
// template ID
|
|
|
|
TemplateID *string `json:"TemplateID,omitempty"`
|
|
|
|
|
|
|
|
// text body
|
|
|
|
TextBody *string `json:"TextBody,omitempty"`
|
2023-04-17 22:11:43 +00:00
|
|
|
|
|
|
|
// to address
|
|
|
|
ToAddress *string `json:"ToAddress,omitempty"`
|
|
|
|
|
|
|
|
// to name
|
|
|
|
ToName *string `json:"ToName,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// Validate validates this outgoing email message
|
|
|
|
func (m *OutgoingEmailMessage) Validate(formats strfmt.Registry) error {
|
|
|
|
var res []error
|
|
|
|
|
|
|
|
if err := m.validateHeaders(formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(res) > 0 {
|
|
|
|
return errors.CompositeValidationError(res...)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OutgoingEmailMessage) validateHeaders(formats strfmt.Registry) error {
|
|
|
|
if swag.IsZero(m.Headers) { // not required
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
if m.Headers != nil {
|
|
|
|
if err := m.Headers.Validate(formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("Headers")
|
|
|
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
|
|
return ce.ValidateName("Headers")
|
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// ContextValidate validate this outgoing email message based on the context it is used
|
|
|
|
func (m *OutgoingEmailMessage) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
|
|
var res []error
|
|
|
|
|
|
|
|
if err := m.contextValidateHeaders(ctx, formats); err != nil {
|
|
|
|
res = append(res, err)
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(res) > 0 {
|
|
|
|
return errors.CompositeValidationError(res...)
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (m *OutgoingEmailMessage) contextValidateHeaders(ctx context.Context, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
if m.Headers != nil {
|
|
|
|
if err := m.Headers.ContextValidate(ctx, formats); err != nil {
|
|
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
|
|
return ve.ValidateName("Headers")
|
|
|
|
} else if ce, ok := err.(*errors.CompositeError); ok {
|
|
|
|
return ce.ValidateName("Headers")
|
|
|
|
}
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// MarshalBinary interface implementation
|
|
|
|
func (m *OutgoingEmailMessage) MarshalBinary() ([]byte, error) {
|
|
|
|
if m == nil {
|
|
|
|
return nil, nil
|
|
|
|
}
|
|
|
|
return swag.WriteJSON(m)
|
|
|
|
}
|
|
|
|
|
|
|
|
// UnmarshalBinary interface implementation
|
|
|
|
func (m *OutgoingEmailMessage) UnmarshalBinary(b []byte) error {
|
|
|
|
var res OutgoingEmailMessage
|
|
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
*m = res
|
|
|
|
return nil
|
|
|
|
}
|