// 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 SourcePardotUpdate struct {
	// The Consumer Key that can be found when viewing your app in Salesforce
	ClientID string `json:"client_id"`
	// The Consumer Secret that can be found when viewing your app in Salesforce
	ClientSecret string `json:"client_secret"`
	// Whether or not the the app is in a Salesforce sandbox. If you do not know what this, assume it is false.
	IsSandbox *bool `default:"false" json:"is_sandbox"`
	// The maximum number of records to return per request
	PageSize *string `default:"1000" json:"page_size"`
	// Pardot Business ID, can be found at Setup > Pardot > Pardot Account Setup
	PardotBusinessUnitID string `json:"pardot_business_unit_id"`
	// Salesforce Refresh Token used for Airbyte to access your Salesforce account. If you don't know what this is, follow this <a href="https://medium.com/@bpmmendis94/obtain-access-refresh-tokens-from-salesforce-rest-api-a324fe4ccd9b">guide</a> to retrieve it.
	RefreshToken string `json:"refresh_token"`
	// UTC date and time in the format 2000-01-01T00:00:00Z. Any data before this date will not be replicated. Defaults to the year Pardot was released.
	StartDate *time.Time `default:"2007-01-01T00:00:00Z" json:"start_date"`
}

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

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

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

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

func (o *SourcePardotUpdate) GetIsSandbox() *bool {
	if o == nil {
		return nil
	}
	return o.IsSandbox
}

func (o *SourcePardotUpdate) GetPageSize() *string {
	if o == nil {
		return nil
	}
	return o.PageSize
}

func (o *SourcePardotUpdate) GetPardotBusinessUnitID() string {
	if o == nil {
		return ""
	}
	return o.PardotBusinessUnitID
}

func (o *SourcePardotUpdate) GetRefreshToken() string {
	if o == nil {
		return ""
	}
	return o.RefreshToken
}

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