// 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 SourceOuraUpdate struct {
	// API Key
	APIKey string `json:"api_key"`
	// End datetime to sync until. Default is current UTC datetime.
	EndDatetime *time.Time `json:"end_datetime,omitempty"`
	// Start datetime to sync from. Default is current UTC datetime minus 1
	// day.
	//
	StartDatetime *time.Time `json:"start_datetime,omitempty"`
}

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

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

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

func (o *SourceOuraUpdate) GetEndDatetime() *time.Time {
	if o == nil {
		return nil
	}
	return o.EndDatetime
}

func (o *SourceOuraUpdate) GetStartDatetime() *time.Time {
	if o == nil {
		return nil
	}
	return o.StartDatetime
}
