// 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 SourceSegmentUpdate struct {
	// API token to use. Generate it in Segment's Workspace settings.
	APIToken string `json:"api_token"`
	// The region for the API, e.g., 'api' for US or 'eu1' for EU
	Region    *string   `default:"api" json:"region"`
	StartDate time.Time `json:"start_date"`
}

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

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

func (o *SourceSegmentUpdate) GetAPIToken() string {
	if o == nil {
		return ""
	}
	return o.APIToken
}

func (o *SourceSegmentUpdate) GetRegion() *string {
	if o == nil {
		return nil
	}
	return o.Region
}

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