// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package shared

import (
	"github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils"
	"time"
)

type SourceCalendlyUpdate struct {
	// Go to Integrations → API & Webhooks to obtain your bearer token. https://calendly.com/integrations/api_webhooks
	APIKey string `json:"api_key"`
	// Number of days to be subtracted from the last cutoff date before starting to sync the `scheduled_events` stream.
	LookbackDays *float64  `default:"0" json:"lookback_days"`
	StartDate    time.Time `json:"start_date"`
}

func (s SourceCalendlyUpdate) MarshalJSON() ([]byte, error) {
	return utils.MarshalJSON(s, "", false)
}

func (s *SourceCalendlyUpdate) UnmarshalJSON(data []byte) error {
	if err := utils.UnmarshalJSON(data, &s, "", false, false); err != nil {
		return err
	}
	return nil
}

func (o *SourceCalendlyUpdate) GetAPIKey() string {
	if o == nil {
		return ""
	}
	return o.APIKey
}

func (o *SourceCalendlyUpdate) GetLookbackDays() *float64 {
	if o == nil {
		return nil
	}
	return o.LookbackDays
}

func (o *SourceCalendlyUpdate) GetStartDate() time.Time {
	if o == nil {
		return time.Time{}
	}
	return o.StartDate
}
