Files

103 lines
1.9 KiB
Go

// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
package components
import (
"github.com/hanzo-fi/webhooks/pkg/client/internal/utils"
"time"
)
type Attempt struct {
ID string `json:"id"`
WebhookID string `json:"webhookID"`
CreatedAt time.Time `json:"createdAt"`
UpdatedAt time.Time `json:"updatedAt"`
Config WebhooksConfig `json:"config"`
Payload string `json:"payload"`
StatusCode int64 `json:"statusCode"`
RetryAttempt int64 `json:"retryAttempt"`
Status string `json:"status"`
NextRetryAfter *time.Time `json:"nextRetryAfter,omitempty"`
}
func (a Attempt) MarshalJSON() ([]byte, error) {
return utils.MarshalJSON(a, "", false)
}
func (a *Attempt) UnmarshalJSON(data []byte) error {
if err := utils.UnmarshalJSON(data, &a, "", false, false); err != nil {
return err
}
return nil
}
func (o *Attempt) GetID() string {
if o == nil {
return ""
}
return o.ID
}
func (o *Attempt) GetWebhookID() string {
if o == nil {
return ""
}
return o.WebhookID
}
func (o *Attempt) GetCreatedAt() time.Time {
if o == nil {
return time.Time{}
}
return o.CreatedAt
}
func (o *Attempt) GetUpdatedAt() time.Time {
if o == nil {
return time.Time{}
}
return o.UpdatedAt
}
func (o *Attempt) GetConfig() WebhooksConfig {
if o == nil {
return WebhooksConfig{}
}
return o.Config
}
func (o *Attempt) GetPayload() string {
if o == nil {
return ""
}
return o.Payload
}
func (o *Attempt) GetStatusCode() int64 {
if o == nil {
return 0
}
return o.StatusCode
}
func (o *Attempt) GetRetryAttempt() int64 {
if o == nil {
return 0
}
return o.RetryAttempt
}
func (o *Attempt) GetStatus() string {
if o == nil {
return ""
}
return o.Status
}
func (o *Attempt) GetNextRetryAfter() *time.Time {
if o == nil {
return nil
}
return o.NextRetryAfter
}