// 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 SourceYandexMetricaUpdate struct {
	// Your Yandex Metrica API access token
	AuthToken string `json:"auth_token"`
	// Counter ID
	CounterID string `json:"counter_id"`
	// Starting point for your data replication, in format of "YYYY-MM-DD". If not provided will sync till most recent date.
	EndDate *types.Date `json:"end_date,omitempty"`
	// Starting point for your data replication, in format of "YYYY-MM-DD".
	StartDate types.Date `json:"start_date"`
}

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

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

func (o *SourceYandexMetricaUpdate) GetAuthToken() string {
	if o == nil {
		return ""
	}
	return o.AuthToken
}

func (o *SourceYandexMetricaUpdate) GetCounterID() string {
	if o == nil {
		return ""
	}
	return o.CounterID
}

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

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