// 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 SourceFreshbooksUpdate struct {
	AccountID          string `json:"account_id"`
	BusinessUUID       string `json:"business_uuid"`
	ClientID           string `json:"client_id"`
	ClientRefreshToken string `json:"client_refresh_token"`
	ClientSecret       string `json:"client_secret"`
	// The current access token. This field might be overridden by the connector based on the token refresh endpoint response.
	OauthAccessToken *string `json:"oauth_access_token,omitempty"`
	// The date the current access token expires in. This field might be overridden by the connector based on the token refresh endpoint response.
	OauthTokenExpiryDate *time.Time `json:"oauth_token_expiry_date,omitempty"`
	RedirectURI          string     `json:"redirect_uri"`
}

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

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

func (o *SourceFreshbooksUpdate) GetAccountID() string {
	if o == nil {
		return ""
	}
	return o.AccountID
}

func (o *SourceFreshbooksUpdate) GetBusinessUUID() string {
	if o == nil {
		return ""
	}
	return o.BusinessUUID
}

func (o *SourceFreshbooksUpdate) GetClientID() string {
	if o == nil {
		return ""
	}
	return o.ClientID
}

func (o *SourceFreshbooksUpdate) GetClientRefreshToken() string {
	if o == nil {
		return ""
	}
	return o.ClientRefreshToken
}

func (o *SourceFreshbooksUpdate) GetClientSecret() string {
	if o == nil {
		return ""
	}
	return o.ClientSecret
}

func (o *SourceFreshbooksUpdate) GetOauthAccessToken() *string {
	if o == nil {
		return nil
	}
	return o.OauthAccessToken
}

func (o *SourceFreshbooksUpdate) GetOauthTokenExpiryDate() *time.Time {
	if o == nil {
		return nil
	}
	return o.OauthTokenExpiryDate
}

func (o *SourceFreshbooksUpdate) GetRedirectURI() string {
	if o == nil {
		return ""
	}
	return o.RedirectURI
}
