// 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 SourceMergeUpdate struct {
	// Link your other integrations with account credentials on accounts section to get account token (ref - https://app.merge.dev/linked-accounts/accounts)
	AccountToken string `json:"account_token"`
	// API token can be seen at  https://app.merge.dev/keys
	APIToken string `json:"api_token"`
	// Date time filter for incremental filter, Specify which date to extract from.
	StartDate time.Time `json:"start_date"`
}

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

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

func (o *SourceMergeUpdate) GetAccountToken() string {
	if o == nil {
		return ""
	}
	return o.AccountToken
}

func (o *SourceMergeUpdate) GetAPIToken() string {
	if o == nil {
		return ""
	}
	return o.APIToken
}

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