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

package shared

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

type SourceAppsflyerUpdate struct {
	// Pull API token for authentication. If you change the account admin, the token changes, and you must update scripts with the new token. <a href="https://support.appsflyer.com/hc/en-us/articles/360004562377">Get the API token in the Dashboard</a>.
	APIToken string `json:"api_token"`
	// App identifier as found in AppsFlyer.
	AppID string `json:"app_id"`
	// The default value to use if no bookmark exists for an endpoint. Raw Reports historical lookback is limited to 90 days.
	StartDate string `json:"start_date"`
	// Time zone in which date times are stored. The project timezone may be found in the App settings in the AppsFlyer console.
	Timezone *string `default:"UTC" json:"timezone"`
}

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

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

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

func (o *SourceAppsflyerUpdate) GetAppID() string {
	if o == nil {
		return ""
	}
	return o.AppID
}

func (o *SourceAppsflyerUpdate) GetStartDate() string {
	if o == nil {
		return ""
	}
	return o.StartDate
}

func (o *SourceAppsflyerUpdate) GetTimezone() *string {
	if o == nil {
		return nil
	}
	return o.Timezone
}
