models

package
v2.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MinDeliveryWindow = 60
View Source
const MinsPerHour = 60

Variables

This section is empty.

Functions

func MMSHeadValidation

func MMSHeadValidation(sl validator.StructLevel)

func SetupValidation

func SetupValidation()

SetupValidation configures struct-level validations for all payload models. This method must be called in order for validation to work, and it is invoked automatically when models are imported.

Types

type AddEmailDomainRequest

type AddEmailDomainRequest struct {
	DomainName string `json:"domainName" validate:"required"`
}

func (*AddEmailDomainRequest) Marshal

func (a *AddEmailDomainRequest) Marshal() (*bytes.Buffer, error)

func (*AddEmailDomainRequest) Validate

func (a *AddEmailDomainRequest) Validate() error

type AddEmailDomainResponse

type AddEmailDomainResponse EmailDomain

type AudioContent

type AudioContent struct {
	MediaURL string `json:"mediaUrl" validate:"required,url,lte=2048"`
}

type BinarySMSMsg

type BinarySMSMsg struct {
	From               string                 `json:"from"`
	Destinations       []SMSDestination       `json:"destinations" validate:"min=1,dive"`
	Binary             *SMSBinary             `json:"binary"`
	IntermediateReport bool                   `json:"intermediateReport,omitempty"`
	NotifyURL          string                 `json:"notifyUrl,omitempty"`
	NotifyContentType  string                 `json:"notifyContentType,omitempty"`
	CallbackData       string                 `json:"callbackData,omitempty"`
	ValidityPeriod     int                    `json:"validityPeriod,omitempty"`
	SendAt             string                 `json:"sendAt,omitempty"`
	DeliveryTimeWindow *SMSDeliveryTimeWindow `json:"deliveryTimeWindow,omitempty"`
	Regional           *SMSRegional           `json:"regional,omitempty"`
}

func GenerateBinarySMSMsg

func GenerateBinarySMSMsg() BinarySMSMsg

func (*BinarySMSMsg) Marshal

func (b *BinarySMSMsg) Marshal() (*bytes.Buffer, error)

func (*BinarySMSMsg) Validate

func (b *BinarySMSMsg) Validate() error

type BulkWAMsgResponse

type BulkWAMsgResponse struct {
	Messages []SendWAMsgResponse `json:"messages"`
	BulkID   string              `json:"bulkId"`
}

type Contact

type Contact struct {
	Addresses []ContactAddress `json:"addresses,omitempty" validate:"omitempty,dive"`
	Birthday  string           `json:"birthday,omitempty"`
	Emails    []ContactEmail   `json:"emails,omitempty" validate:"omitempty,dive"`
	Name      ContactName      `json:"name" validate:"required"`
	Org       ContactOrg       `json:"org,omitempty"`
	Phones    []ContactPhone   `json:"phones,omitempty" validate:"omitempty,dive"`
	Urls      []ContactURL     `json:"urls,omitempty" validate:"omitempty,dive"`
}

type ContactAddress

type ContactAddress struct {
	Street      string `json:"street,omitempty"`
	City        string `json:"city,omitempty"`
	State       string `json:"state,omitempty"`
	Zip         string `json:"zip,omitempty"`
	Country     string `json:"country,omitempty"`
	CountryCode string `json:"countryCode,omitempty"`
	Type        string `json:"type,omitempty" validate:"omitempty,oneof=HOME WORK"`
}

type ContactContent

type ContactContent struct {
	Contacts []Contact `json:"contacts" validate:"required,dive"`
}

type ContactEmail

type ContactEmail struct {
	Email string `json:"email,omitempty" validate:"omitempty,email"`
	Type  string `json:"type,omitempty" validate:"omitempty,oneof=HOME WORK"`
}

type ContactName

type ContactName struct {
	FirstName     string `json:"firstName" validate:"required"`
	LastName      string `json:"lastName,omitempty"`
	MiddleName    string `json:"middleName,omitempty"`
	NameSuffix    string `json:"nameSuffix,omitempty"`
	NamePrefix    string `json:"namePrefix,omitempty"`
	FormattedName string `json:"formattedName" validate:"required"`
}

type ContactOrg

type ContactOrg struct {
	Company    string `json:"company,omitempty"`
	Department string `json:"department,omitempty"`
	Title      string `json:"title,omitempty"`
}

type ContactPhone

type ContactPhone struct {
	Phone string `json:"phone,omitempty"`
	Type  string `json:"type,omitempty" validate:"omitempty,oneof=CELL MAIN IPHONE HOME WORK"`
	WaID  string `json:"waId,omitempty"`
}

type ContactURL

type ContactURL struct {
	URL  string `json:"url,omitempty" validate:"omitempty,url"`
	Type string `json:"type,omitempty" validate:"omitempty,oneof=HOME WORK"`
}

type CreateWATemplateResponse

type CreateWATemplateResponse struct {
	ID                string            `json:"ID"`
	BusinessAccountID int64             `json:"businessAccountID"`
	Name              string            `json:"name"`
	Language          string            `json:"language"`
	Status            string            `json:"status"`
	Category          string            `json:"category"`
	Structure         TemplateStructure `json:"structure"`
}

type DeliveryTimeWindow

type DeliveryTimeWindow struct {
	Days []string `json:"days" validate:"required,gte=1,dive,oneof=MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY SUNDAY"` // nolint: lll
	From *MMSTime `json:"from,omitempty"`
	To   *MMSTime `json:"to,omitempty"`
}

type DocumentContent

type DocumentContent struct {
	MediaURL string `json:"mediaUrl" validate:"required,url,lte=2048"`
	Caption  string `json:"caption,omitempty" validate:"lte=3000"`
	Filename string `json:"filename,omitempty" validate:"lte=240"`
}

type EmailDomain

type EmailDomain struct {
	DomainID   int64  `json:"domainId"`
	DomainName string `json:"domainName"`
	Active     bool   `json:"active"`
	Tracking   struct {
		Clicks      bool `json:"clicks"`
		Opens       bool `json:"opens"`
		Unsubscribe bool `json:"unsubscribe"`
	} `json:"tracking"`
	DNSRecords []struct {
		RecordType    string `json:"recordType"`
		Name          string `json:"name"`
		ExpectedValue string `json:"expectedValue"`
		Verified      bool   `json:"verified"`
	} `json:"dnsRecords"`
	Blocked   bool   `json:"blocked"`
	CreatedAt string `json:"createdAt"`
}

type EmailMsg

type EmailMsg struct {
	From                    string `validate:"required"`
	To                      string `validate:"required"`
	Cc                      string
	Bcc                     string
	Subject                 string `validate:"required"`
	Text                    string
	BulkID                  string
	MessageID               string
	TemplateID              int
	Attachment              *os.File
	InlineImage             *os.File
	HTML                    string
	ReplyTo                 string
	DefaultPlaceholders     string
	PreserveRecipients      bool
	TrackingURL             string `validate:"omitempty,url"`
	TrackClicks             bool
	TrackOpens              bool
	Track                   bool
	CallbackData            string
	IntermediateReport      bool
	NotifyURL               string `validate:"omitempty,url"`
	NotifyContentType       string
	SendAt                  string
	LandingPagePlaceholders string
	LandingPageID           string
	// contains filtered or unexported fields
}

func GenerateEmailMsg

func GenerateEmailMsg() EmailMsg

func (*EmailMsg) GetMultipartBoundary

func (e *EmailMsg) GetMultipartBoundary() string

func (*EmailMsg) Marshal

func (e *EmailMsg) Marshal() (*bytes.Buffer, error)

func (*EmailMsg) Validate

func (e *EmailMsg) Validate() error

type ErrorDetails

type ErrorDetails struct {
	RequestError RequestError `json:"requestError"`
}

type ExternallyHostedMedia

type ExternallyHostedMedia struct {
	ContentType string `json:"contentType" validate:"required"`
	ContentID   string `json:"contentId" validate:"required"`
	ContentURL  string `json:"contentUrl" validate:"url,required"`
}

type GenerateWebRTCTokenRequest

type GenerateWebRTCTokenRequest struct {
	Identity      string                   `json:"identity" validate:"required,min=3,max=64"`
	ApplicationID string                   `json:"applicationId"`
	DisplayName   string                   `json:"displayName"`
	Capabilities  *WebRTCTokenCapabilities `json:"capabilities"`
	TimeToLive    int64                    `json:"timeToLive"`
}

func (*GenerateWebRTCTokenRequest) Marshal

func (g *GenerateWebRTCTokenRequest) Marshal() (*bytes.Buffer, error)

func (*GenerateWebRTCTokenRequest) Validate

func (g *GenerateWebRTCTokenRequest) Validate() error

type GenerateWebRTCTokenResponse

type GenerateWebRTCTokenResponse struct {
	Token          string `json:"token"`
	ExpirationTime string `json:"expirationTime"`
}

type GetEmailDeliveryReportsParams

type GetEmailDeliveryReportsParams struct {
	BulkID    string
	MessageID string
	Limit     int
}

type GetEmailDeliveryReportsResponse

type GetEmailDeliveryReportsResponse struct {
	Results []struct {
		BulkID       string `json:"bulkId"`
		MessageID    string `json:"messageId"`
		To           string `json:"to"`
		SentAt       string `json:"sentAt"`
		DoneAt       string `json:"doneAt"`
		MessageCount int    `json:"messageCount"`
		Price        struct {
			PricePerMessage float64 `json:"pricePerMessage"`
			Currency        string  `json:"currency"`
		} `json:"price"`
		Status struct {
			GroupID     int    `json:"groupId"`
			GroupName   string `json:"groupName"`
			ID          int    `json:"id"`
			Name        string `json:"name"`
			Description string `json:"description"`
			Action      string `json:"action"`
		} `json:"status"`
		Error struct {
			GroupID     int    `json:"groupId"`
			GroupName   string `json:"groupName"`
			ID          int    `json:"id"`
			Name        string `json:"name"`
			Description string `json:"description"`
			Permanent   bool   `json:"permanent"`
		} `json:"error"`
		Channel string `json:"channel"`
	} `json:"results"`
}

type GetEmailDomainResponse

type GetEmailDomainResponse EmailDomain

type GetEmailDomainsParams

type GetEmailDomainsParams struct {
	Size int `validate:"omitempty,min=1,max=20"`
	Page int `validate:"omitempty,min=0"`
}

type GetEmailDomainsResponse

type GetEmailDomainsResponse struct {
	Paging struct {
		Page         int `json:"page"`
		Size         int `json:"size"`
		TotalPages   int `json:"totalPages"`
		TotalResults int `json:"totalResults"`
	} `json:"paging"`
	Results []EmailDomain `json:"results"`
}

type GetEmailLogsParams

type GetEmailLogsParams struct {
	MessageID     string
	From          string
	To            string
	BulkID        string
	GeneralStatus string
	SentSince     string
	SentUntil     string
	Limit         int
}

type GetEmailLogsResponse

type GetEmailLogsResponse struct {
	Results []struct {
		MessageID    string `json:"messageId"`
		To           string `json:"to"`
		From         string `json:"from"`
		Text         string `json:"text"`
		SentAt       string `json:"sentAt"`
		DoneAt       string `json:"doneAt"`
		MessageCount int    `json:"messageCount"`
		Price        struct {
			PricePerMessage float64 `json:"pricePerMessage"`
			Currency        string  `json:"currency"`
		} `json:"price"`
		Status struct {
			GroupID     int    `json:"groupId"`
			GroupName   string `json:"groupName"`
			ID          int    `json:"id"`
			Name        string `json:"name"`
			Description string `json:"description"`
			Action      string `json:"action"`
		} `json:"status"`
		BulkID  string `json:"bulkId"`
		Channel string `json:"channel"`
	} `json:"results"`
}

type GetInboundMMSParams

type GetInboundMMSParams struct {
	Limit int
}

type GetInboundMMSResponse

type GetInboundMMSResponse struct {
	Results []InboundMMSResult `json:"results"`
}

type GetInboundSMSParams

type GetInboundSMSParams struct {
	Limit int `validate:"omitempty,min=1,max=1000"`
}

func (*GetInboundSMSParams) Validate

func (g *GetInboundSMSParams) Validate() error

type GetInboundSMSResponse

type GetInboundSMSResponse struct {
	MessageCount        int `json:"messageCount"`
	PendingMessageCount int `json:"pendingMessageCount"`
	Results             []struct {
		CallbackData string   `json:"callbackData"`
		CleanText    string   `json:"cleanText"`
		From         string   `json:"from"`
		Keyword      string   `json:"keyword"`
		MessageID    string   `json:"messageId"`
		Price        SMSPrice `json:"price"`
		ReceivedAt   string   `json:"receivedAt"`
		SmsCount     int      `json:"smsCount"`
		Text         string   `json:"text"`
		To           string   `json:"to"`
	} `json:"results"`
}

type GetMMSDeliveryReportsParams

type GetMMSDeliveryReportsParams struct {
	BulkID    string
	MessageID string
	Limit     int
}

type GetMMSDeliveryReportsResponse

type GetMMSDeliveryReportsResponse struct {
	Results []OutboundMMSDeliveryResult `json:"results"`
}

type GetSMSDeliveryReportsParams

type GetSMSDeliveryReportsParams struct {
	BulkID    string
	MessageID string
	Limit     int
}

func (*GetSMSDeliveryReportsParams) Validate

func (g *GetSMSDeliveryReportsParams) Validate() error

type GetSMSDeliveryReportsResponse

type GetSMSDeliveryReportsResponse struct {
	Results []struct {
		BulkID       string    `json:"bulkId"`
		CallbackData string    `json:"callbackData"`
		DoneAt       string    `json:"doneAt"`
		Error        SMSError  `json:"error"`
		From         string    `json:"from"`
		MccMnc       string    `json:"mccMnc"`
		MessageID    string    `json:"messageId"`
		Price        SMSPrice  `json:"price"`
		SentAt       string    `json:"sentAt"`
		SmsCount     int       `json:"smsCount"`
		Status       SMSStatus `json:"status"`
		To           string    `json:"to"`
	} `json:"results"`
}

type GetSMSLogsParams

type GetSMSLogsParams struct {
	From          string
	To            string
	BulkID        []string
	MessageID     []string
	GeneralStatus string `validate:"omitempty,oneof=ACCEPTED PENDING UNDELIVERABLE DELIVERED REJECTED EXPIRED"`
	SentSince     string
	SentUntil     string
	Limit         int `validate:"omitempty,min=1,max=1000"`
	MCC           string
	MNC           string
}

func (*GetSMSLogsParams) Validate

func (g *GetSMSLogsParams) Validate() error

type GetSMSLogsResponse

type GetSMSLogsResponse struct {
	Results []struct {
		BulkID    string    `json:"bulkId"`
		MessageID string    `json:"messageId"`
		To        string    `json:"to"`
		From      string    `json:"from"`
		Text      string    `json:"text"`
		SentAt    string    `json:"sentAt"`
		DoneAt    string    `json:"doneAt"`
		SmsCount  int       `json:"smsCount"`
		MccMnc    string    `json:"mccMnc"`
		Price     SMSPrice  `json:"price"`
		Status    SMSStatus `json:"status"`
		Error     SMSError  `json:"error"`
	} `json:"results"`
}

type GetScheduledSMSParams

type GetScheduledSMSParams struct {
	BulkID string `validate:"required"`
}

func (*GetScheduledSMSParams) Validate

func (g *GetScheduledSMSParams) Validate() error

type GetScheduledSMSResponse

type GetScheduledSMSResponse struct {
	BulkID string `json:"bulkId"`
	SendAt string `json:"sendAt"`
}

type GetScheduledSMSStatusParams

type GetScheduledSMSStatusParams struct {
	BulkID string `json:"bulkId" validate:"required"`
}

func (*GetScheduledSMSStatusParams) Validate

func (g *GetScheduledSMSStatusParams) Validate() error

type GetScheduledSMSStatusResponse

type GetScheduledSMSStatusResponse struct {
	BulkID string `json:"bulkId"`
	Status string `json:"status"`
}

type GetSentEmailBulksParams

type GetSentEmailBulksParams struct {
	BulkID string `validate:"required"`
}

func (*GetSentEmailBulksParams) Validate

func (o *GetSentEmailBulksParams) Validate() error

type GetSentEmailBulksStatusParams

type GetSentEmailBulksStatusParams struct {
	BulkID string `validate:"required"`
}

func (*GetSentEmailBulksStatusParams) Validate

func (o *GetSentEmailBulksStatusParams) Validate() error

type GetWATemplatesResponse

type GetWATemplatesResponse struct {
	Templates []CreateWATemplateResponse `json:"templates"`
}

type GetWebRTCApplicationResponse

type GetWebRTCApplicationResponse WebRTCApplication

type GetWebRTCApplicationsResponse

type GetWebRTCApplicationsResponse []WebRTCApplication

type ImageContent

type ImageContent struct {
	MediaURL string `json:"mediaUrl" validate:"required,url,lte=2048"`
	Caption  string `json:"caption,omitempty" validate:"lte=3000"`
}

type InboundMMSResult

type InboundMMSResult struct {
	MessageID    string   `json:"messageId"`
	To           string   `json:"to"`
	From         string   `json:"from"`
	Message      string   `json:"message"`
	ReceivedAt   string   `json:"receivedAt"`
	MMSCount     int32    `json:"mmsCount"`
	CallbackData string   `json:"callbackData"`
	Price        MMSPrice `json:"price"`
}

type IndiaDLT

type IndiaDLT struct {
	ContentTemplateID string `json:"contentTemplateId"`
	PrincipalEntityID string `json:"principalEntityId" validate:"required"`
}

type InteractiveButton

type InteractiveButton struct {
	Type  string `json:"type" validate:"required,oneof=REPLY"`
	ID    string `json:"id" validate:"required,lte=256"`
	Title string `json:"title" validate:"required,lte=20"`
}

type InteractiveButtons

type InteractiveButtons struct {
	Buttons []InteractiveButton `json:"buttons" validate:"required,min=1,max=3,dive"`
}

type InteractiveButtonsBody

type InteractiveButtonsBody struct {
	Text string `json:"text" validate:"required,lte=1024"`
}

type InteractiveButtonsContent

type InteractiveButtonsContent struct {
	Body   InteractiveButtonsBody    `json:"body" validate:"required"`
	Action InteractiveButtons        `json:"action" validate:"required"`
	Header *InteractiveButtonsHeader `json:"header,omitempty" validate:"omitempty"`
	Footer *InteractiveButtonsFooter `json:"footer,omitempty"`
}

type InteractiveButtonsFooter

type InteractiveButtonsFooter struct {
	Text string `json:"text" validate:"required,lte=60"`
}

type InteractiveButtonsHeader

type InteractiveButtonsHeader struct {
	Type     string `json:"type" validate:"required,oneof=TEXT VIDEO IMAGE DOCUMENT"`
	Text     string `json:"text,omitempty" validate:"lte=60"`
	MediaURL string `json:"mediaUrl,omitempty" validate:"omitempty,url,lte=2048"`
	Filename string `json:"filename,omitempty" validate:"lte=240"`
}

type InteractiveListAction

type InteractiveListAction struct {
	Title    string                   `json:"title" validate:"required,lte=20"`
	Sections []InteractiveListSection `json:"sections" validate:"required,min=1,max=10,dive"`
}

type InteractiveListBody

type InteractiveListBody struct {
	Text string `json:"text" validate:"required,lte=1024"`
}

type InteractiveListContent

type InteractiveListContent struct {
	Body   InteractiveListBody    `json:"body" validate:"required"`
	Action InteractiveListAction  `json:"action" validate:"required"`
	Header *InteractiveListHeader `json:"header,omitempty" validate:"omitempty"`
	Footer *InteractiveListFooter `json:"footer,omitempty"`
}

type InteractiveListFooter

type InteractiveListFooter struct {
	Text string `json:"text" validate:"required,lte=60"`
}

type InteractiveListHeader

type InteractiveListHeader struct {
	Type string `json:"type" validate:"required,oneof=TEXT"`
	Text string `json:"text" validate:"required,lte=60"`
}

type InteractiveListSection

type InteractiveListSection struct {
	Title string       `json:"title,omitempty" validate:"lte=24"`
	Rows  []SectionRow `json:"rows" validate:"required,min=1,max=10,dive"`
}

type InteractiveMultiproductAction

type InteractiveMultiproductAction struct {
	CatalogID string                           `json:"catalogId" validate:"required"`
	Sections  []InteractiveMultiproductSection `json:"sections" validate:"required,min=1,max=10,dive"`
}

type InteractiveMultiproductBody

type InteractiveMultiproductBody struct {
	Text string `json:"text" validate:"required,lte=1024"`
}

type InteractiveMultiproductContent

type InteractiveMultiproductContent struct {
	Header InteractiveMultiproductHeader  `json:"header" validate:"required"`
	Body   InteractiveMultiproductBody    `json:"body" validate:"required"`
	Action InteractiveMultiproductAction  `json:"action" validate:"required"`
	Footer *InteractiveMultiproductFooter `json:"footer,omitempty"`
}

type InteractiveMultiproductFooter

type InteractiveMultiproductFooter struct {
	Text string `json:"text" validate:"required,lte=60"`
}

type InteractiveMultiproductHeader

type InteractiveMultiproductHeader struct {
	Type string `json:"type" validate:"required,oneof=TEXT"`
	Text string `json:"text" validate:"required,lte=60"`
}

type InteractiveMultiproductSection

type InteractiveMultiproductSection struct {
	Title              string   `json:"title,omitempty" validate:"lte=24"`
	ProductRetailerIDs []string `json:"productRetailerIds" validate:"required,min=1"`
}

type InteractiveProductAction

type InteractiveProductAction struct {
	CatalogID         string `json:"catalogId" validate:"required"`
	ProductRetailerID string `json:"productRetailerId" validate:"required"`
}

type InteractiveProductBody

type InteractiveProductBody struct {
	Text string `json:"text" validate:"required,lte=1024"`
}

type InteractiveProductContent

type InteractiveProductContent struct {
	Action InteractiveProductAction  `json:"action" validate:"required"`
	Body   *InteractiveProductBody   `json:"body,omitempty"`
	Footer *InteractiveProductFooter `json:"footer,omitempty"`
}

type InteractiveProductFooter

type InteractiveProductFooter struct {
	Text string `json:"text" validate:"required,lte=60"`
}

type LocationContent

type LocationContent struct {
	Latitude  *float32 `json:"latitude" validate:"required,latitude"`
	Longitude *float32 `json:"longitude" validate:"required,longitude"`
	Name      string   `json:"name" validate:"lte=1000"`
	Address   string   `json:"address" validate:"lte=1000"`
}

type MMSHead

type MMSHead struct {
	From                  string              `json:"from" validate:"required"`
	To                    string              `json:"to" validate:"required"`
	ID                    string              `json:"id,omitempty"`
	Subject               string              `json:"subject,omitempty"`
	ValidityPeriodMinutes int32               `json:"validityPeriodMinutes,omitempty"`
	CallbackData          string              `json:"callbackData,omitempty" validate:"lte=200"`
	NotifyURL             string              `json:"notifyUrl,omitempty" validate:"omitempty,url"`
	SendAt                string              `json:"sendAt,omitempty"`
	IntermediateReport    *bool               `json:"intermediateReport,omitempty"`
	DeliveryTimeWindow    *DeliveryTimeWindow `json:"deliveryTimeWindow,omitempty"`
}

type MMSMsg

type MMSMsg struct {
	Head                  MMSHead `validate:"required"`
	Text                  string
	Media                 *os.File
	ExternallyHostedMedia []ExternallyHostedMedia `validate:"dive"`
	SMIL                  string
	// contains filtered or unexported fields
}

func (*MMSMsg) GetMultipartBoundary

func (t *MMSMsg) GetMultipartBoundary() string

func (*MMSMsg) Marshal

func (t *MMSMsg) Marshal() (*bytes.Buffer, error)

func (*MMSMsg) Validate

func (t *MMSMsg) Validate() error

type MMSPrice

type MMSPrice struct {
	PricePerMessage float64 `json:"pricePerMessage"`
	Currency        string  `json:"currency"`
}

type MMSStatus

type MMSStatus struct {
	GroupID     int32  `json:"groupId"`
	GroupName   string `json:"groupName"`
	ID          int32  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type MMSTime

type MMSTime struct {
	Hour   int32 `json:"hour" validate:"lte=23"`
	Minute int32 `json:"minute" validate:"lte=59"`
}

type MsgCommon

type MsgCommon struct {
	From         string `json:"from" validate:"required,lte=24"`
	To           string `json:"to" validate:"required,lte=24"`
	MessageID    string `json:"messageId,omitempty" validate:"lte=50"`
	CallbackData string `json:"callbackData,omitempty" validate:"lte=4000"`
	NotifyURL    string `json:"notifyUrl,omitempty" validate:"omitempty,url,lte=2048"`
}

func GenerateTestMsgCommon

func GenerateTestMsgCommon() MsgCommon

type MultipartValidatable

type MultipartValidatable interface {
	Validatable
	GetMultipartBoundary() string
}

type OutboundMMSDeliveryResult

type OutboundMMSDeliveryResult struct {
	BulkID       string    `json:"bulkId"`
	MessageID    string    `json:"messageId"`
	To           string    `json:"to"`
	From         string    `json:"from"`
	SentAt       string    `json:"sentAt"`
	DoneAt       string    `json:"doneAt"`
	MMSCount     int32     `json:"mmsCount"`
	MCCMNC       string    `json:"mccMnc"`
	CallbackData string    `json:"callbackData"`
	Price        MMSPrice  `json:"price"`
	Status       MMSStatus `json:"status"`
	Error        MMSStatus `json:"error"`
}

type PreviewSMSRequest

type PreviewSMSRequest struct {
	LanguageCode    string `json:"languageCode,omitempty" validate:"omitempty,oneof=TR ES PT AUTODETECT"`
	Text            string `json:"text" validate:"required"`
	Transliteration string `` //nolint:lll
	/* 135-byte string literal not displayed */
}

func GeneratePreviewSMSRequest

func GeneratePreviewSMSRequest() PreviewSMSRequest

func (*PreviewSMSRequest) Marshal

func (r *PreviewSMSRequest) Marshal() (*bytes.Buffer, error)

func (*PreviewSMSRequest) Validate

func (r *PreviewSMSRequest) Validate() error

type PreviewSMSResponse

type PreviewSMSResponse struct {
	OriginalText string `json:"originalText"`
	Previews     []struct {
		CharactersRemaining int `json:"charactersRemaining"`
		Configuration       struct {
			Language        SMSLanguage `json:"language"`
			Transliteration string      `json:"transliteration"`
		} `json:"configuration"`
		MessageCount int    `json:"messageCount"`
		TextPreview  string `json:"textPreview"`
	} `json:"previews"`
}

type RCSCardContent

type RCSCardContent struct {
	Title       string               `json:"title" validate:"omitempty,min=1,max=200"`
	Description string               `json:"description" validate:"omitempty,min=1,max=2000"`
	Media       *RCSCardContentMedia `json:"media,omitempty"`
	Suggestions []RCSSuggestion      `json:"suggestions,omitempty" validate:"omitempty,max=4,dive"`
}

func GenerateRCSCardContent

func GenerateRCSCardContent() *RCSCardContent

func (*RCSCardContent) Marshal

func (r *RCSCardContent) Marshal() (*bytes.Buffer, error)

func (*RCSCardContent) Validate

func (r *RCSCardContent) Validate() error

type RCSCardContentMedia

type RCSCardContentMedia struct {
	File      *RCSFile      `json:"file" validate:"required"`
	Thumbnail *RCSThumbnail `json:"thumbnail"`
	Height    string        `json:"height" validate:"required,oneof=SHORT MEDIUM TALL"`
}

type RCSContent

type RCSContent struct {
	Type        string           `json:"type" validate:"oneof=TEXT FILE CARD CAROUSEL"`
	File        *RCSFile         `json:"file,omitempty" validate:"required_if=Type FILE,omitempty"`
	Thumbnail   *RCSThumbnail    `json:"thumbnail,omitempty"`
	Text        string           `json:"text,omitempty" validator:"required_if=Type TEXT,omitempty,min=1,max=2048"`
	Suggestions []RCSSuggestion  `json:"suggestions,omitempty" validate:"omitempty,dive"`
	Orientation string           `json:"orientation,omitempty" validate:"required_if=Type CARD,omitempty,oneof=HORIZONTAL VERTICAL"` //nolint:lll
	Alignment   string           `json:"alignment,omitempty" validate:"required_if=Type CARD,omitempty,oneof=LEFT RIGHT"`            //nolint:lll
	CardWidth   string           `json:"cardWidth,omitempty" validate:"required_if=Type CAROUSEL,omitempty,oneof=SMALL MEDIUM"`      //nolint:lll
	Content     *RCSCardContent  `json:"content,omitempty" validate:"required_if=Type CARD"`
	Contents    []RCSCardContent `json:"contents,omitempty" validate:"required_if=Type CAROUSEL,omitempty,min=2,max=10,dive"` //nolint:lll
}

type RCSFile

type RCSFile struct {
	URL string `json:"url" validate:"required,min=1,max=1000"`
}

type RCSMsg

type RCSMsg struct {
	From                   string          `json:"from,omitempty"`
	To                     string          `json:"to" validate:"required"`
	ValidityPeriod         int             `json:"validityPeriod,omitempty"`
	ValidityPeriodTimeUnit string          `json:"validityPeriodTimeUnit,omitempty" validate:"omitempty,oneof=SECONDS MINUTES HOURS DAYS"` //nolint:lll
	Content                *RCSContent     `json:"content,omitempty" validate:"required"`
	SMSFailover            *RCSSMSFailover `json:"smsFailover,omitempty"`
	NotifyURL              string          `json:"notifyUrl,omitempty"`
	CallbackData           string          `json:"callbackData,omitempty"`
	MessageID              string          `json:"messageId,omitempty"`
}

func GenerateRCSFileMsg

func GenerateRCSFileMsg() RCSMsg

func (*RCSMsg) Marshal

func (r *RCSMsg) Marshal() (*bytes.Buffer, error)

func (*RCSMsg) Validate

func (r *RCSMsg) Validate() error

type RCSSMSFailover

type RCSSMSFailover struct {
	From                   string `json:"from" validate:"required"`
	Text                   string `json:"text" validate:"required"`
	ValidityPeriod         int    `json:"validityPeriod,omitempty"`
	ValidityPeriodTimeUnit string `json:"validityPeriodTimeUnit,omitempty" validate:"omitempty,oneof=SECONDS MINUTES HOURS DAYS"` //nolint:lll
}

type RCSSuggestion

type RCSSuggestion struct {
	Text         string  `json:"text" validate:"min=1,max=25"`
	PostbackData string  `json:"postbackData" validate:"min=1,max=2048"`
	Type         string  `json:"type" validate:"oneof=REPLY OPEN_URL DIAL_PHONE SHOW_LOCATION REQUEST_LOCATION"`
	URL          string  `json:"url,omitempty" validate:"required_if=Type OPEN_URL"`
	PhoneNumber  string  `json:"phoneNumber,omitempty"`
	Latitude     float64 `json:"latitude,omitempty" validate:"min=-90,max=90,required_if=Type SHOW_LOCATION"`
	Longitude    float64 `json:"longitude,omitempty" validate:"min=-180,max=180,required_if=Type SHOW_LOCATION"`
	Label        string  `json:"label,omitempty" validate:"omitempty,min=1,max=100"`
}

func GenerateDialPhoneRCSSuggestion

func GenerateDialPhoneRCSSuggestion() RCSSuggestion

func GenerateOpenURLRCSSuggestion

func GenerateOpenURLRCSSuggestion() RCSSuggestion

func GenerateReplyRCSSuggestion

func GenerateReplyRCSSuggestion() RCSSuggestion

func GenerateShowLocationRCSSuggestion

func GenerateShowLocationRCSSuggestion() RCSSuggestion

func (*RCSSuggestion) Marshal

func (r *RCSSuggestion) Marshal() (*bytes.Buffer, error)

func (*RCSSuggestion) Validate

func (r *RCSSuggestion) Validate() error

type RCSThumbnail

type RCSThumbnail struct {
	URL string `json:"url" validate:"required,min=1,max=1000"`
}

type RequestError

type RequestError struct {
	ServiceException ServiceException `json:"serviceException"`
}

type RescheduleEmailParams

type RescheduleEmailParams struct {
	BulkID string `validate:"required"`
}

func (*RescheduleEmailParams) Validate

func (o *RescheduleEmailParams) Validate() error

type RescheduleEmailRequest

type RescheduleEmailRequest struct {
	SendAt string `json:"sendAt"`
}

func (*RescheduleEmailRequest) Marshal

func (r *RescheduleEmailRequest) Marshal() (*bytes.Buffer, error)

func (*RescheduleEmailRequest) Validate

func (r *RescheduleEmailRequest) Validate() error

type RescheduleEmailResponse

type RescheduleEmailResponse struct {
	BulkID string `json:"bulkId"`
	SendAt int64  `json:"sendAt"`
}

type RescheduleSMSParams

type RescheduleSMSParams struct {
	BulkID string `json:"bulkId" validate:"required"`
}

func (*RescheduleSMSParams) Validate

func (r *RescheduleSMSParams) Validate() error

type RescheduleSMSRequest

type RescheduleSMSRequest struct {
	SendAt string `json:"sendAt" validate:"required"`
}

func (*RescheduleSMSRequest) Marshal

func (r *RescheduleSMSRequest) Marshal() (*bytes.Buffer, error)

func (*RescheduleSMSRequest) Validate

func (r *RescheduleSMSRequest) Validate() error

type RescheduleSMSResponse

type RescheduleSMSResponse struct {
	BulkID string `json:"bulkId"`
	SendAt string `json:"sendAt"`
}

type ResponseDetails

type ResponseDetails struct {
	ErrorResponse ErrorDetails
	HTTPResponse  http.Response
}

type SMSBinary

type SMSBinary struct {
	Hex        string `json:"hex" validate:"required"`
	DataCoding int    `json:"dataCoding"`
	EsmClass   int    `json:"esmClass"`
}

type SMSDeliveryTimeWindow

type SMSDeliveryTimeWindow struct {
	Days []string `json:"days" validate:"required,min=1"`
	From SMSTime  `json:"from,omitempty"`
	To   SMSTime  `json:"to,omitempty"`
}

type SMSDestination

type SMSDestination struct {
	MessageID string `json:"messageId"`
	To        string `json:"to" validate:"required"`
}

type SMSError

type SMSError struct {
	Description string `json:"description"`
	GroupID     int    `json:"groupId"`
	GroupName   string `json:"groupName"`
	ID          int    `json:"id"`
	Name        string `json:"name"`
	Permanent   bool   `json:"permanent"`
}

type SMSFailover

type SMSFailover struct {
	From string `json:"from" validate:"required,lte=24"`
	Text string `json:"text" validate:"required,lte=4096"`
}

type SMSLanguage

type SMSLanguage struct {
	LanguageCode string `json:"languageCode"`
}

type SMSMsg

type SMSMsg struct {
	CallbackData       string                 `json:"callbackData,omitempty"`
	DeliveryTimeWindow *SMSDeliveryTimeWindow `json:"deliveryTimeWindow,omitempty"`
	Destinations       []SMSDestination       `json:"destinations" validate:"required,min=1,dive"`
	Flash              bool                   `json:"flash,omitempty"`
	From               string                 `json:"from"`
	IntermediateReport bool                   `json:"intermediateReport,omitempty"`
	Language           *SMSLanguage           `json:"language,omitempty"`
	NotifyContentType  string                 `json:"notifyContentType,omitempty"`
	NotifyURL          string                 `json:"notifyUrl,omitempty"`
	Regional           *SMSRegional           `json:"regional,omitempty"`
	SendAt             string                 `json:"sendAt,omitempty"`
	Text               string                 `json:"text"`
	Transliteration    string                 `json:"transliteration,omitempty"`
	ValidityPeriod     int                    `json:"validityPeriod,omitempty"`
}

func GenerateSMSMsg

func GenerateSMSMsg() SMSMsg

func (*SMSMsg) Marshal

func (s *SMSMsg) Marshal() (*bytes.Buffer, error)

func (*SMSMsg) Validate

func (s *SMSMsg) Validate() error

type SMSPrice

type SMSPrice struct {
	PricePerMessage float64 `json:"pricePerMessage"`
	Currency        string  `json:"currency"`
}

type SMSRegional

type SMSRegional struct {
	IndiaDLT `json:"indiaDlt"`
}

type SMSSendingSpeedLimit

type SMSSendingSpeedLimit struct {
	Amount   int    `json:"amount" validate:"required"`
	TimeUnit string `json:"timeUnit" validate:"oneof=MINUTE HOUR DAY"`
}

type SMSStatus

type SMSStatus struct {
	Action      string `json:"action"`
	Description string `json:"description"`
	GroupID     int    `json:"groupId"`
	GroupName   string `json:"groupName"`
	ID          int    `json:"id"`
	Name        string `json:"name"`
}

type SMSTime

type SMSTime struct {
	Hour   int `json:"hour"`
	Minute int `json:"minute"`
}

type SMSTracking

type SMSTracking struct {
	BaseURL    string `json:"baseUrl"`
	Track      string `json:"track"`
	Type       string `json:"type" validate:"oneof=ONE_TIME_PIN SOCIAL_INVITES"`
	ProcessKey string `json:"processKey"`
}

type SaveWebRTCApplicationResponse

type SaveWebRTCApplicationResponse WebRTCApplication

type SectionRow

type SectionRow struct {
	ID          string `json:"id" validate:"required,lte=200"`
	Title       string `json:"title" validate:"required,lte=24"`
	Description string `json:"description,omitempty" validate:"lte=72"`
}

type SendBinarySMSRequest

type SendBinarySMSRequest struct {
	BulkID                string         `json:"bulkId"`
	Messages              []BinarySMSMsg `json:"messages" validate:"required,min=1,dive"`
	*SMSSendingSpeedLimit `json:"sendingSpeedLimit,omitempty"`
}

func GenerateSendBinarySMSRequest

func GenerateSendBinarySMSRequest() SendBinarySMSRequest

func (*SendBinarySMSRequest) Marshal

func (s *SendBinarySMSRequest) Marshal() (*bytes.Buffer, error)

func (*SendBinarySMSRequest) Validate

func (s *SendBinarySMSRequest) Validate() error

type SendBinarySMSResponse

type SendBinarySMSResponse struct {
	BulkID   string `json:"bulkId"`
	Messages []struct {
		To        string    `json:"to"`
		Status    SMSStatus `json:"status"`
		MessageID string    `json:"messageId"`
	} `json:"messages"`
}

type SendEmailResponse

type SendEmailResponse struct {
	BulkID   string `json:"bulkId"`
	Messages []struct {
		To           string `json:"to"`
		MessageCount int    `json:"messageCount"`
		MessageID    string `json:"messageId"`
		Status       struct {
			GroupID     int    `json:"groupId"`
			GroupName   string `json:"groupName"`
			ID          int    `json:"id"`
			Name        string `json:"name"`
			Description string `json:"description"`
		} `json:"status"`
	} `json:"messages"`
}

type SendMMSResponse

type SendMMSResponse struct {
	BulkID       string    `json:"bulkId"`
	Messages     []SentMMS `json:"messages"`
	ErrorMessage string    `json:"errorMessage"`
}

type SendRCSBulkRequest

type SendRCSBulkRequest struct {
	Messages []RCSMsg `json:"messages" validate:"dive"`
}

func (*SendRCSBulkRequest) Marshal

func (s *SendRCSBulkRequest) Marshal() (*bytes.Buffer, error)

func (*SendRCSBulkRequest) Validate

func (s *SendRCSBulkRequest) Validate() error

type SendRCSBulkResponse

type SendRCSBulkResponse []SendRCSResponse

type SendRCSResponse

type SendRCSResponse struct {
	Messages []struct {
		To           string `json:"to"`
		MessageCount int    `json:"messageCount"`
		MessageID    string `json:"messageId"`
		Status       struct {
			GroupID     int    `json:"groupId"`
			GroupName   string `json:"groupName"`
			ID          int    `json:"id"`
			Name        string `json:"name"`
			Description string `json:"description"`
			Action      string `json:"action"`
		} `json:"status"`
	} `json:"messages"`
}

type SendSMSOverQueryParamsParams

type SendSMSOverQueryParamsParams struct {
	Username                  string `validate:"required"`
	Password                  string `validate:"required"`
	BulkID                    string
	From                      string
	To                        []string `validate:"required"`
	Text                      string
	Flash                     bool
	Transliteration           string
	LanguageCode              string
	IntermediateReport        bool
	NotifyURL                 string
	NotifyContentType         string
	CallbackData              string
	ValidityPeriod            int
	SendAt                    string
	Track                     string
	ProcessKey                string
	TrackingType              string
	IndiaDLTContentTemplateID string
	IndiaDLTPrincipalEntityID string
}

func (*SendSMSOverQueryParamsParams) Validate

func (s *SendSMSOverQueryParamsParams) Validate() error

type SendSMSOverQueryParamsResponse

type SendSMSOverQueryParamsResponse struct {
	BulkID   string `json:"bulkId"`
	Messages []struct {
		MessageID string    `json:"messageId"`
		Status    SMSStatus `json:"status,omitempty"`
		To        string    `json:"to"`
	} `json:"messages"`
}

type SendSMSRequest

type SendSMSRequest struct {
	BulkID            string                `json:"bulkId"`
	Messages          []SMSMsg              `json:"messages" validate:"required,min=1,dive"`
	SendingSpeedLimit *SMSSendingSpeedLimit `json:"sendingSpeedLimit,omitempty"`
	Tracking          *SMSTracking          `json:"tracking,omitempty"`
}

func GenerateSendSMSRequest

func GenerateSendSMSRequest() SendSMSRequest

func (*SendSMSRequest) Marshal

func (s *SendSMSRequest) Marshal() (*bytes.Buffer, error)

func (*SendSMSRequest) Validate

func (s *SendSMSRequest) Validate() error

type SendSMSResponse

type SendSMSResponse struct {
	BulkID   string `json:"bulkId"`
	Messages []struct {
		MessageID string     `json:"messageId"`
		Status    *SMSStatus `json:"status"`
		To        string     `json:"to"`
	} `json:"messages"`
}

type SendWAMsgResponse

type SendWAMsgResponse struct {
	To           string `json:"to"`
	MessageCount int32  `json:"messageCount"`
	MessageID    string `json:"messageId"`
	Status       Status `json:"status"`
}

type SentEmailBulksResponse

type SentEmailBulksResponse struct {
	ExternalBulkID string `json:"externalBulkId"`
	Bulks          []struct {
		BulkID string `json:"bulkId"`
		SendAt int64  `json:"sendAt"`
	} `json:"bulks"`
}

type SentEmailBulksStatusResponse

type SentEmailBulksStatusResponse struct {
	ExternalBulkID string `json:"externalBulkId"`
	Bulks          []struct {
		BulkID string `json:"bulkId"`
		Status string `json:"status"`
	} `json:"bulks"`
}

type SentMMS

type SentMMS struct {
	To        string    `json:"to"`
	Status    MMSStatus `json:"status"`
	MessageID string    `json:"messageId"`
}

type ServiceException

type ServiceException struct {
	MessageID        string                 `json:"messageId"`
	Text             string                 `json:"text"`
	ValidationErrors map[string]interface{} `json:"validationErrors"`
}

type Status

type Status struct {
	GroupID     int32  `json:"groupId"`
	GroupName   string `json:"groupName"`
	ID          int32  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Action      string `json:"action"`
}

type StickerContent

type StickerContent struct {
	MediaURL string `json:"mediaUrl" validate:"required,url,lte=2048"`
}

type TemplateBody

type TemplateBody struct {
	Placeholders []string `json:"placeholders" validate:"required,dive,gte=1"`
}

type TemplateButton

type TemplateButton struct {
	Type        string `json:"type" validate:"required,oneof=PHONE_NUMBER URL QUICK_REPLY"`
	Text        string `json:"text" validate:"required,lte=200"`
	PhoneNumber string `json:"phoneNumber,omitempty"`
	URL         string `json:"url,omitempty" validate:"omitempty,url"`
}

type TemplateCreate

type TemplateCreate struct {
	Name      string            `json:"name" validate:"required"`
	Language  string            `json:"language" validate:"required"`
	Category  string            `json:"category" validate:"required"`
	Structure TemplateStructure `json:"structure" validate:"required"`
}

func (*TemplateCreate) Marshal

func (t *TemplateCreate) Marshal() (*bytes.Buffer, error)

func (*TemplateCreate) Validate

func (t *TemplateCreate) Validate() error

type TemplateData

type TemplateData struct {
	Body    TemplateBody        `json:"body" validate:"required"`
	Header  *TemplateMsgHeader  `json:"header,omitempty"`
	Buttons []TemplateMsgButton `json:"buttons,omitempty" validate:"omitempty,max=3,dive"`
}

type TemplateHeader

type TemplateHeader struct {
	Format string `json:"format,omitempty" validate:"oneof=TEXT IMAGE VIDEO DOCUMENT LOCATION"`
	Text   string `json:"text" validate:"lte=60"`
}

type TemplateMsg

type TemplateMsg struct {
	MsgCommon
	Content     TemplateMsgContent `json:"content" validate:"required"`
	SMSFailover *SMSFailover       `json:"smsFailover,omitempty"`
}

type TemplateMsgButton

type TemplateMsgButton struct {
	Type      string `json:"type" validate:"required,oneof=QUICK_REPLY URL"`
	Parameter string `json:"parameter" validate:"required"`
}

type TemplateMsgContent

type TemplateMsgContent struct {
	TemplateName string       `json:"templateName" validate:"required,lte=512"`
	TemplateData TemplateData `json:"templateData" validate:"required"`
	Language     string       `json:"language" validate:"required"`
}

type TemplateMsgHeader

type TemplateMsgHeader struct {
	Type        string   `json:"type" validate:"required,oneof=TEXT DOCUMENT IMAGE VIDEO LOCATION"`
	Placeholder string   `json:"placeholder,omitempty"`
	MediaURL    string   `json:"mediaUrl,omitempty" validate:"omitempty,url,lte=2048"`
	Filename    string   `json:"filename,omitempty" validate:"lte=240"`
	Latitude    *float32 `json:"latitude,omitempty" validate:"omitempty,latitude"`
	Longitude   *float32 `json:"longitude,omitempty" validate:"omitempty,longitude"`
}

type TemplateStructure

type TemplateStructure struct {
	Header  *TemplateHeader  `json:"header,omitempty"`
	Body    string           `json:"body" validate:"required"`
	Footer  string           `json:"footer,omitempty" validate:"lte=60"`
	Buttons []TemplateButton `json:"buttons,omitempty" validate:"omitempty,min=1,max=3,dive"`
	Type    string           `json:"type,omitempty" validate:"oneof=TEXT MEDIA UNSUPPORTED"`
}

type TextContent

type TextContent struct {
	Text       string `json:"text" validate:"required,gte=1,lte=4096"`
	PreviewURL bool   `json:"previewURL,omitempty"`
}

type UpdateEmailDomainTrackingRequest

type UpdateEmailDomainTrackingRequest struct {
	Opens       bool `json:"open"`
	Clicks      bool `json:"clicks"`
	Unsubscribe bool `json:"unsubscribe"`
}

func (*UpdateEmailDomainTrackingRequest) Marshal

func (*UpdateEmailDomainTrackingRequest) Validate

type UpdateEmailDomainTrackingResponse

type UpdateEmailDomainTrackingResponse EmailDomain

type UpdateScheduledEmailStatusParams

type UpdateScheduledEmailStatusParams struct {
	BulkID string `validate:"required"`
}

func (*UpdateScheduledEmailStatusParams) Validate

type UpdateScheduledEmailStatusRequest

type UpdateScheduledEmailStatusRequest struct {
	Status string `json:"status" validate:"required,oneof=PENDING PAUSED PROCESSING CANCELED FINISHED FAILED"`
}

func (*UpdateScheduledEmailStatusRequest) Marshal

func (*UpdateScheduledEmailStatusRequest) Validate

type UpdateScheduledSMSStatusParams

type UpdateScheduledSMSStatusParams struct {
	BulkID string `json:"bulkId" validate:"required"`
}

func (*UpdateScheduledSMSStatusParams) Validate

func (u *UpdateScheduledSMSStatusParams) Validate() error

type UpdateScheduledSMSStatusRequest

type UpdateScheduledSMSStatusRequest struct {
	Status string `json:"status" validate:"required,oneof=PENDING PAUSED PROCESSING CANCELED FINISHED FAILED"`
}

func (*UpdateScheduledSMSStatusRequest) Marshal

func (*UpdateScheduledSMSStatusRequest) Validate

func (u *UpdateScheduledSMSStatusRequest) Validate() error

type UpdateScheduledSMSStatusResponse

type UpdateScheduledSMSStatusResponse struct {
	BulkID string `json:"bulkId"`
	Status string `json:"status"`
}

type UpdateScheduledStatusResponse

type UpdateScheduledStatusResponse struct {
	BulkID string `json:"bulkId"`
	Status string `json:"status"`
}

type UpdateWebRTCApplicationResponse

type UpdateWebRTCApplicationResponse WebRTCApplication

type Validatable

type Validatable interface {
	Validate() error
	Marshal() (*bytes.Buffer, error)
}

Validatable should be implemented by all models which represent request payloads. It will be called before a request is made.

type ValidateEmailAddressesRequest

type ValidateEmailAddressesRequest struct {
	To string `json:"to" validate:"required,min=1,max=2147483647"`
}

func (*ValidateEmailAddressesRequest) Marshal

func (*ValidateEmailAddressesRequest) Validate

func (v *ValidateEmailAddressesRequest) Validate() error

type ValidateEmailAddressesResponse

type ValidateEmailAddressesResponse struct {
	To           string `json:"to"`
	ValidMailbox string `json:"validMailbox"`
	ValidSyntax  bool   `json:"validSyntax"`
	CatchAll     bool   `json:"catchAll"`
	Disposable   bool   `json:"disposable"`
	RoleBased    bool   `json:"roleBased"`
}

type VideoContent

type VideoContent struct {
	MediaURL string `json:"mediaUrl" validate:"required,url,lte=2048"`
	Caption  string `json:"caption,omitempty" validate:"lte=3000"`
}

type WAAudioMsg

type WAAudioMsg struct {
	MsgCommon
	Content AudioContent `json:"content" validate:"required"`
}

func (*WAAudioMsg) Marshal

func (t *WAAudioMsg) Marshal() (*bytes.Buffer, error)

func (*WAAudioMsg) Validate

func (t *WAAudioMsg) Validate() error

type WAContactMsg

type WAContactMsg struct {
	MsgCommon
	Content ContactContent `json:"content" validate:"required"`
}

func (*WAContactMsg) Marshal

func (t *WAContactMsg) Marshal() (*bytes.Buffer, error)

func (*WAContactMsg) Validate

func (t *WAContactMsg) Validate() error

type WADocumentMsg

type WADocumentMsg struct {
	MsgCommon
	Content DocumentContent `json:"content" validate:"required"`
}

func (*WADocumentMsg) Marshal

func (t *WADocumentMsg) Marshal() (*bytes.Buffer, error)

func (*WADocumentMsg) Validate

func (t *WADocumentMsg) Validate() error

type WAImageMsg

type WAImageMsg struct {
	MsgCommon
	Content ImageContent `json:"content" validate:"required"`
}

func (*WAImageMsg) Marshal

func (t *WAImageMsg) Marshal() (*bytes.Buffer, error)

func (*WAImageMsg) Validate

func (t *WAImageMsg) Validate() error

type WAInteractiveButtonsMsg

type WAInteractiveButtonsMsg struct {
	MsgCommon
	Content InteractiveButtonsContent `json:"content" validate:"required"`
}

func (*WAInteractiveButtonsMsg) Marshal

func (t *WAInteractiveButtonsMsg) Marshal() (*bytes.Buffer, error)

func (*WAInteractiveButtonsMsg) Validate

func (t *WAInteractiveButtonsMsg) Validate() error

type WAInteractiveListMsg

type WAInteractiveListMsg struct {
	MsgCommon
	Content InteractiveListContent `json:"content" validate:"required"`
}

func (*WAInteractiveListMsg) Marshal

func (t *WAInteractiveListMsg) Marshal() (*bytes.Buffer, error)

func (*WAInteractiveListMsg) Validate

func (t *WAInteractiveListMsg) Validate() error

type WAInteractiveMultiproductMsg

type WAInteractiveMultiproductMsg struct {
	MsgCommon
	Content InteractiveMultiproductContent `json:"content" validate:"required"`
}

func (*WAInteractiveMultiproductMsg) Marshal

func (*WAInteractiveMultiproductMsg) Validate

func (t *WAInteractiveMultiproductMsg) Validate() error

type WAInteractiveProductMsg

type WAInteractiveProductMsg struct {
	MsgCommon
	Content InteractiveProductContent `json:"content" validate:"required"`
}

func (*WAInteractiveProductMsg) Marshal

func (t *WAInteractiveProductMsg) Marshal() (*bytes.Buffer, error)

func (*WAInteractiveProductMsg) Validate

func (t *WAInteractiveProductMsg) Validate() error

type WALocationMsg

type WALocationMsg struct {
	MsgCommon
	Content LocationContent `json:"content" validate:"required"`
}

func (*WALocationMsg) Marshal

func (t *WALocationMsg) Marshal() (*bytes.Buffer, error)

func (*WALocationMsg) Validate

func (t *WALocationMsg) Validate() error

type WAStickerMsg

type WAStickerMsg struct {
	MsgCommon
	Content StickerContent `json:"content" validate:"required"`
}

func (*WAStickerMsg) Marshal

func (t *WAStickerMsg) Marshal() (*bytes.Buffer, error)

func (*WAStickerMsg) Validate

func (t *WAStickerMsg) Validate() error

type WATemplateMsgs

type WATemplateMsgs struct {
	Messages []TemplateMsg `json:"messages" validate:"required,min=1,dive"`
	BulkID   string        `json:"bulkId,omitempty" validate:"lte=100"`
}

func (*WATemplateMsgs) Marshal

func (t *WATemplateMsgs) Marshal() (*bytes.Buffer, error)

func (*WATemplateMsgs) Validate

func (t *WATemplateMsgs) Validate() error

type WATextMsg

type WATextMsg struct {
	MsgCommon
	Content TextContent `json:"content" validate:"required"`
}

func (*WATextMsg) Marshal

func (t *WATextMsg) Marshal() (*bytes.Buffer, error)

func (*WATextMsg) Validate

func (t *WATextMsg) Validate() error

type WAVideoMsg

type WAVideoMsg struct {
	MsgCommon
	Content VideoContent `json:"content" validate:"required"`
}

func (*WAVideoMsg) Marshal

func (t *WAVideoMsg) Marshal() (*bytes.Buffer, error)

func (*WAVideoMsg) Validate

func (t *WAVideoMsg) Validate() error

type WebRTCAndroid

type WebRTCAndroid struct {
	FcmServerKey string `json:"fcmServerKey" validate:"required"`
}

type WebRTCApplication

type WebRTCApplication struct {
	ID                 string         `json:"id"`
	Name               string         `json:"name" validate:"required"`
	Description        string         `json:"description"`
	IOS                *WebRTCIOS     `json:"ios,omitempty"`
	Android            *WebRTCAndroid `json:"android,omitempty"`
	AppToApp           bool           `json:"appToApp"`
	AppToConversations bool           `json:"appToConversations"`
	AppToPhone         bool           `json:"appToPhone"`
}

func GenerateWebRTCApplication

func GenerateWebRTCApplication() WebRTCApplication

func (*WebRTCApplication) Marshal

func (w *WebRTCApplication) Marshal() (*bytes.Buffer, error)

func (*WebRTCApplication) Validate

func (w *WebRTCApplication) Validate() error

type WebRTCIOS

type WebRTCIOS struct {
	ApnsCertificateFileName    string `json:"apnsCertificateFileName" validate:"required"`
	ApnsCertificateFileContent string `json:"apnsCertificateFileContent" validate:"required"`
	ApnsCertificatePassword    string `json:"apnsCertificatePassword"`
}

type WebRTCTokenCapabilities

type WebRTCTokenCapabilities struct {
	Recording string `json:"recording" validate:"omitempty,oneof=ALWAYS ON_DEMAND DISABLED"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL