// 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 SourceYotpoUpdate struct {
	// Access token recieved as a result of API call to https://api.yotpo.com/oauth/token (Ref- https://apidocs.yotpo.com/reference/yotpo-authentication)
	AccessToken string `json:"access_token"`
	// App key found at settings (Ref- https://settings.yotpo.com/#/general_settings)
	AppKey string `json:"app_key"`
	// Email address registered with yotpo.
	Email *string `default:"example@gmail.com" json:"email"`
	// Date time filter for incremental filter, Specify which date to extract from.
	StartDate time.Time `json:"start_date"`
}

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

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

func (o *SourceYotpoUpdate) GetAccessToken() string {
	if o == nil {
		return ""
	}
	return o.AccessToken
}

func (o *SourceYotpoUpdate) GetAppKey() string {
	if o == nil {
		return ""
	}
	return o.AppKey
}

func (o *SourceYotpoUpdate) GetEmail() *string {
	if o == nil {
		return nil
	}
	return o.Email
}

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