// 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 SourceEzofficeinventoryUpdate struct {
	// Your EZOfficeInventory Access Token. API Access is disabled by default. Enable API Access in Settings > Integrations > API Integration and click on Update to generate a new access token
	APIKey string `json:"api_key"`
	// Earliest date you want to sync historical streams (inventory_histories, asset_histories, asset_stock_histories) from
	StartDate time.Time `json:"start_date"`
	// The company name used in signup, also visible in the URL when logged in.
	Subdomain string `json:"subdomain"`
}

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

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

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

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

func (o *SourceEzofficeinventoryUpdate) GetSubdomain() string {
	if o == nil {
		return ""
	}
	return o.Subdomain
}
