// 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 SourceRedditUpdate struct {
	APIKey string `json:"api_key"`
	// Specifies exact keyword and reduces distractions
	Exact *bool `json:"exact,omitempty"`
	// Includes mature content
	IncludeOver18 *bool `default:"false" json:"include_over_18"`
	// Max records per page limit
	Limit *float64 `default:"1000" json:"limit"`
	// Specifies the query for searching in reddits and subreddits
	Query     *string   `default:"airbyte" json:"query"`
	StartDate time.Time `json:"start_date"`
	// Subreddits for exploration
	Subreddits []any `json:"subreddits,omitempty"`
}

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

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

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

func (o *SourceRedditUpdate) GetExact() *bool {
	if o == nil {
		return nil
	}
	return o.Exact
}

func (o *SourceRedditUpdate) GetIncludeOver18() *bool {
	if o == nil {
		return nil
	}
	return o.IncludeOver18
}

func (o *SourceRedditUpdate) GetLimit() *float64 {
	if o == nil {
		return nil
	}
	return o.Limit
}

func (o *SourceRedditUpdate) GetQuery() *string {
	if o == nil {
		return nil
	}
	return o.Query
}

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

func (o *SourceRedditUpdate) GetSubreddits() []any {
	if o == nil {
		return nil
	}
	return o.Subreddits
}
