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

package shared

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

type SourcePolygonStockAPIUpdate struct {
	// Determines whether or not the results are adjusted for splits. By default, results are adjusted and set to true. Set this to false to get results that are NOT adjusted for splits.
	Adjusted *string `json:"adjusted,omitempty"`
	// Your API ACCESS Key
	APIKey string `json:"apiKey"`
	// The target date for the aggregate window.
	EndDate types.Date `json:"end_date"`
	// The target date for the aggregate window.
	Limit *int64 `json:"limit,omitempty"`
	// The size of the timespan multiplier.
	Multiplier int64 `json:"multiplier"`
	// Sort the results by timestamp. asc will return results in ascending order (oldest at the top), desc will return results in descending order (newest at the top).
	Sort *string `json:"sort,omitempty"`
	// The beginning date for the aggregate window.
	StartDate types.Date `json:"start_date"`
	// The exchange symbol that this item is traded under.
	StocksTicker string `json:"stocksTicker"`
	// The size of the time window.
	Timespan string `json:"timespan"`
}

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

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

func (o *SourcePolygonStockAPIUpdate) GetAdjusted() *string {
	if o == nil {
		return nil
	}
	return o.Adjusted
}

func (o *SourcePolygonStockAPIUpdate) GetAPIKey() string {
	if o == nil {
		return ""
	}
	return o.APIKey
}

func (o *SourcePolygonStockAPIUpdate) GetEndDate() types.Date {
	if o == nil {
		return types.Date{}
	}
	return o.EndDate
}

func (o *SourcePolygonStockAPIUpdate) GetLimit() *int64 {
	if o == nil {
		return nil
	}
	return o.Limit
}

func (o *SourcePolygonStockAPIUpdate) GetMultiplier() int64 {
	if o == nil {
		return 0
	}
	return o.Multiplier
}

func (o *SourcePolygonStockAPIUpdate) GetSort() *string {
	if o == nil {
		return nil
	}
	return o.Sort
}

func (o *SourcePolygonStockAPIUpdate) GetStartDate() types.Date {
	if o == nil {
		return types.Date{}
	}
	return o.StartDate
}

func (o *SourcePolygonStockAPIUpdate) GetStocksTicker() string {
	if o == nil {
		return ""
	}
	return o.StocksTicker
}

func (o *SourcePolygonStockAPIUpdate) GetTimespan() string {
	if o == nil {
		return ""
	}
	return o.Timespan
}
