// Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.

package shared

import (
	"encoding/json"
	"fmt"
	"github.com/airbytehq/terraform-provider-airbyte/internal/sdk/internal/utils"
	"time"
)

// SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType - Type of the Account you're going to authorize the Airbyte application by
type SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType string

const (
	SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountTypeSeller SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType = "Seller"
	SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountTypeVendor SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType = "Vendor"
)

func (e SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType) ToPointer() *SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType {
	return &e
}
func (e *SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "Seller":
		fallthrough
	case "Vendor":
		*e = SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType: %v", v)
	}
}

type SourceAmazonSellerPartnerUpdateAuthType string

const (
	SourceAmazonSellerPartnerUpdateAuthTypeOauth20 SourceAmazonSellerPartnerUpdateAuthType = "oauth2.0"
)

func (e SourceAmazonSellerPartnerUpdateAuthType) ToPointer() *SourceAmazonSellerPartnerUpdateAuthType {
	return &e
}
func (e *SourceAmazonSellerPartnerUpdateAuthType) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "oauth2.0":
		*e = SourceAmazonSellerPartnerUpdateAuthType(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceAmazonSellerPartnerUpdateAuthType: %v", v)
	}
}

// SourceAmazonSellerPartnerUpdateAWSEnvironment - Select the AWS Environment.
type SourceAmazonSellerPartnerUpdateAWSEnvironment string

const (
	SourceAmazonSellerPartnerUpdateAWSEnvironmentProduction SourceAmazonSellerPartnerUpdateAWSEnvironment = "PRODUCTION"
	SourceAmazonSellerPartnerUpdateAWSEnvironmentSandbox    SourceAmazonSellerPartnerUpdateAWSEnvironment = "SANDBOX"
)

func (e SourceAmazonSellerPartnerUpdateAWSEnvironment) ToPointer() *SourceAmazonSellerPartnerUpdateAWSEnvironment {
	return &e
}
func (e *SourceAmazonSellerPartnerUpdateAWSEnvironment) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "PRODUCTION":
		fallthrough
	case "SANDBOX":
		*e = SourceAmazonSellerPartnerUpdateAWSEnvironment(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceAmazonSellerPartnerUpdateAWSEnvironment: %v", v)
	}
}

// SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays - The time window size (in days) for fetching financial events data in chunks. Options are 1 day, 7 days, 14 days, 30 days, 60 days, and 190 days, based on API limitations.
//
// - **Smaller step sizes (e.g., 1 day)** are better for large data volumes. They fetch smaller chunks per request, reducing the risk of timeouts or overwhelming the API, though more requests may slow syncing and increase the chance of hitting rate limits.
// - **Larger step sizes (e.g., 14 days)** are better for smaller data volumes. They fetch more data per request, speeding up syncing and reducing the number of API calls, which minimizes strain on rate limits.
//
// Select a step size that matches your data volume to optimize syncing speed and API performance.
type SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays string

const (
	SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDaysOne                 SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays = "1"
	SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDaysSeven               SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays = "7"
	SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDaysFourteen            SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays = "14"
	SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDaysThirty              SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays = "30"
	SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDaysSixty               SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays = "60"
	SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDaysNinety              SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays = "90"
	SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDaysOneHundredAndEighty SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays = "180"
)

func (e SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays) ToPointer() *SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays {
	return &e
}
func (e *SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "1":
		fallthrough
	case "7":
		fallthrough
	case "14":
		fallthrough
	case "30":
		fallthrough
	case "60":
		fallthrough
	case "90":
		fallthrough
	case "180":
		*e = SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays: %v", v)
	}
}

// SourceAmazonSellerPartnerUpdateAWSRegion - Select the AWS Region.
type SourceAmazonSellerPartnerUpdateAWSRegion string

const (
	SourceAmazonSellerPartnerUpdateAWSRegionAe SourceAmazonSellerPartnerUpdateAWSRegion = "AE"
	SourceAmazonSellerPartnerUpdateAWSRegionAu SourceAmazonSellerPartnerUpdateAWSRegion = "AU"
	SourceAmazonSellerPartnerUpdateAWSRegionBe SourceAmazonSellerPartnerUpdateAWSRegion = "BE"
	SourceAmazonSellerPartnerUpdateAWSRegionBr SourceAmazonSellerPartnerUpdateAWSRegion = "BR"
	SourceAmazonSellerPartnerUpdateAWSRegionCa SourceAmazonSellerPartnerUpdateAWSRegion = "CA"
	SourceAmazonSellerPartnerUpdateAWSRegionDe SourceAmazonSellerPartnerUpdateAWSRegion = "DE"
	SourceAmazonSellerPartnerUpdateAWSRegionEg SourceAmazonSellerPartnerUpdateAWSRegion = "EG"
	SourceAmazonSellerPartnerUpdateAWSRegionEs SourceAmazonSellerPartnerUpdateAWSRegion = "ES"
	SourceAmazonSellerPartnerUpdateAWSRegionFr SourceAmazonSellerPartnerUpdateAWSRegion = "FR"
	SourceAmazonSellerPartnerUpdateAWSRegionGb SourceAmazonSellerPartnerUpdateAWSRegion = "GB"
	SourceAmazonSellerPartnerUpdateAWSRegionIn SourceAmazonSellerPartnerUpdateAWSRegion = "IN"
	SourceAmazonSellerPartnerUpdateAWSRegionIt SourceAmazonSellerPartnerUpdateAWSRegion = "IT"
	SourceAmazonSellerPartnerUpdateAWSRegionJp SourceAmazonSellerPartnerUpdateAWSRegion = "JP"
	SourceAmazonSellerPartnerUpdateAWSRegionMx SourceAmazonSellerPartnerUpdateAWSRegion = "MX"
	SourceAmazonSellerPartnerUpdateAWSRegionNl SourceAmazonSellerPartnerUpdateAWSRegion = "NL"
	SourceAmazonSellerPartnerUpdateAWSRegionPl SourceAmazonSellerPartnerUpdateAWSRegion = "PL"
	SourceAmazonSellerPartnerUpdateAWSRegionSa SourceAmazonSellerPartnerUpdateAWSRegion = "SA"
	SourceAmazonSellerPartnerUpdateAWSRegionSe SourceAmazonSellerPartnerUpdateAWSRegion = "SE"
	SourceAmazonSellerPartnerUpdateAWSRegionSg SourceAmazonSellerPartnerUpdateAWSRegion = "SG"
	SourceAmazonSellerPartnerUpdateAWSRegionTr SourceAmazonSellerPartnerUpdateAWSRegion = "TR"
	SourceAmazonSellerPartnerUpdateAWSRegionUk SourceAmazonSellerPartnerUpdateAWSRegion = "UK"
	SourceAmazonSellerPartnerUpdateAWSRegionUs SourceAmazonSellerPartnerUpdateAWSRegion = "US"
)

func (e SourceAmazonSellerPartnerUpdateAWSRegion) ToPointer() *SourceAmazonSellerPartnerUpdateAWSRegion {
	return &e
}
func (e *SourceAmazonSellerPartnerUpdateAWSRegion) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "AE":
		fallthrough
	case "AU":
		fallthrough
	case "BE":
		fallthrough
	case "BR":
		fallthrough
	case "CA":
		fallthrough
	case "DE":
		fallthrough
	case "EG":
		fallthrough
	case "ES":
		fallthrough
	case "FR":
		fallthrough
	case "GB":
		fallthrough
	case "IN":
		fallthrough
	case "IT":
		fallthrough
	case "JP":
		fallthrough
	case "MX":
		fallthrough
	case "NL":
		fallthrough
	case "PL":
		fallthrough
	case "SA":
		fallthrough
	case "SE":
		fallthrough
	case "SG":
		fallthrough
	case "TR":
		fallthrough
	case "UK":
		fallthrough
	case "US":
		*e = SourceAmazonSellerPartnerUpdateAWSRegion(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceAmazonSellerPartnerUpdateAWSRegion: %v", v)
	}
}

type SourceAmazonSellerPartnerUpdateOptionsList struct {
	OptionName  string `json:"option_name"`
	OptionValue string `json:"option_value"`
}

func (o *SourceAmazonSellerPartnerUpdateOptionsList) GetOptionName() string {
	if o == nil {
		return ""
	}
	return o.OptionName
}

func (o *SourceAmazonSellerPartnerUpdateOptionsList) GetOptionValue() string {
	if o == nil {
		return ""
	}
	return o.OptionValue
}

type SourceAmazonSellerPartnerUpdateReportName string

const (
	SourceAmazonSellerPartnerUpdateReportNameGetAfnInventoryData                              SourceAmazonSellerPartnerUpdateReportName = "GET_AFN_INVENTORY_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetAfnInventoryDataByCountry                     SourceAmazonSellerPartnerUpdateReportName = "GET_AFN_INVENTORY_DATA_BY_COUNTRY"
	SourceAmazonSellerPartnerUpdateReportNameGetAmazonFulfilledShipmentsDataGeneral           SourceAmazonSellerPartnerUpdateReportName = "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaEstimatedFbaFeesTxtData                    SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_ESTIMATED_FBA_FEES_TXT_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaFulfillmentCustomerReturnsData             SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaFulfillmentCustomerShipmentPromotionData   SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_PROMOTION_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaFulfillmentCustomerShipmentReplacementData SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_REPLACEMENT_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaFulfillmentRemovalOrderDetailData          SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_FULFILLMENT_REMOVAL_ORDER_DETAIL_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaFulfillmentRemovalShipmentDetailData       SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_FULFILLMENT_REMOVAL_SHIPMENT_DETAIL_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaInventoryPlanningData                      SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_INVENTORY_PLANNING_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaMyiUnsuppressedInventoryData               SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaReimbursementsData                         SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_REIMBURSEMENTS_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaSnsForecastData                            SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_SNS_FORECAST_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaSnsPerformanceData                         SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_SNS_PERFORMANCE_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFbaStorageFeeChargesData                      SourceAmazonSellerPartnerUpdateReportName = "GET_FBA_STORAGE_FEE_CHARGES_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFlatFileActionableOrderDataShipping           SourceAmazonSellerPartnerUpdateReportName = "GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING"
	SourceAmazonSellerPartnerUpdateReportNameGetFlatFileAllOrdersDataByLastUpdateGeneral      SourceAmazonSellerPartnerUpdateReportName = "GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL"
	SourceAmazonSellerPartnerUpdateReportNameGetFlatFileAllOrdersDataByOrderDateGeneral       SourceAmazonSellerPartnerUpdateReportName = "GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL"
	SourceAmazonSellerPartnerUpdateReportNameGetFlatFileArchivedOrdersDataByOrderDate         SourceAmazonSellerPartnerUpdateReportName = "GET_FLAT_FILE_ARCHIVED_ORDERS_DATA_BY_ORDER_DATE"
	SourceAmazonSellerPartnerUpdateReportNameGetFlatFileOpenListingsData                      SourceAmazonSellerPartnerUpdateReportName = "GET_FLAT_FILE_OPEN_LISTINGS_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetFlatFileReturnsDataByReturnDate               SourceAmazonSellerPartnerUpdateReportName = "GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE"
	SourceAmazonSellerPartnerUpdateReportNameGetLedgerDetailViewData                          SourceAmazonSellerPartnerUpdateReportName = "GET_LEDGER_DETAIL_VIEW_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetLedgerSummaryViewData                         SourceAmazonSellerPartnerUpdateReportName = "GET_LEDGER_SUMMARY_VIEW_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetMerchantCancelledListingsData                 SourceAmazonSellerPartnerUpdateReportName = "GET_MERCHANT_CANCELLED_LISTINGS_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetMerchantListingsAllData                       SourceAmazonSellerPartnerUpdateReportName = "GET_MERCHANT_LISTINGS_ALL_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetMerchantListingsData                          SourceAmazonSellerPartnerUpdateReportName = "GET_MERCHANT_LISTINGS_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetMerchantListingsDataBackCompat                SourceAmazonSellerPartnerUpdateReportName = "GET_MERCHANT_LISTINGS_DATA_BACK_COMPAT"
	SourceAmazonSellerPartnerUpdateReportNameGetMerchantListingsInactiveData                  SourceAmazonSellerPartnerUpdateReportName = "GET_MERCHANT_LISTINGS_INACTIVE_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetMerchantsListingsFypReport                    SourceAmazonSellerPartnerUpdateReportName = "GET_MERCHANTS_LISTINGS_FYP_REPORT"
	SourceAmazonSellerPartnerUpdateReportNameGetOrderReportDataShipping                       SourceAmazonSellerPartnerUpdateReportName = "GET_ORDER_REPORT_DATA_SHIPPING"
	SourceAmazonSellerPartnerUpdateReportNameGetRestockInventoryRecommendationsReport         SourceAmazonSellerPartnerUpdateReportName = "GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT"
	SourceAmazonSellerPartnerUpdateReportNameGetSellerFeedbackData                            SourceAmazonSellerPartnerUpdateReportName = "GET_SELLER_FEEDBACK_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetStrandedInventoryUIData                       SourceAmazonSellerPartnerUpdateReportName = "GET_STRANDED_INVENTORY_UI_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetV2SettlementReportDataFlatFile                SourceAmazonSellerPartnerUpdateReportName = "GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE"
	SourceAmazonSellerPartnerUpdateReportNameGetXMLAllOrdersDataByOrderDateGeneral            SourceAmazonSellerPartnerUpdateReportName = "GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL"
	SourceAmazonSellerPartnerUpdateReportNameGetXMLBrowseTreeData                             SourceAmazonSellerPartnerUpdateReportName = "GET_XML_BROWSE_TREE_DATA"
	SourceAmazonSellerPartnerUpdateReportNameGetVendorRealTimeInventoryReport                 SourceAmazonSellerPartnerUpdateReportName = "GET_VENDOR_REAL_TIME_INVENTORY_REPORT"
)

func (e SourceAmazonSellerPartnerUpdateReportName) ToPointer() *SourceAmazonSellerPartnerUpdateReportName {
	return &e
}
func (e *SourceAmazonSellerPartnerUpdateReportName) UnmarshalJSON(data []byte) error {
	var v string
	if err := json.Unmarshal(data, &v); err != nil {
		return err
	}
	switch v {
	case "GET_AFN_INVENTORY_DATA":
		fallthrough
	case "GET_AFN_INVENTORY_DATA_BY_COUNTRY":
		fallthrough
	case "GET_AMAZON_FULFILLED_SHIPMENTS_DATA_GENERAL":
		fallthrough
	case "GET_FBA_ESTIMATED_FBA_FEES_TXT_DATA":
		fallthrough
	case "GET_FBA_FULFILLMENT_CUSTOMER_RETURNS_DATA":
		fallthrough
	case "GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_PROMOTION_DATA":
		fallthrough
	case "GET_FBA_FULFILLMENT_CUSTOMER_SHIPMENT_REPLACEMENT_DATA":
		fallthrough
	case "GET_FBA_FULFILLMENT_REMOVAL_ORDER_DETAIL_DATA":
		fallthrough
	case "GET_FBA_FULFILLMENT_REMOVAL_SHIPMENT_DETAIL_DATA":
		fallthrough
	case "GET_FBA_INVENTORY_PLANNING_DATA":
		fallthrough
	case "GET_FBA_MYI_UNSUPPRESSED_INVENTORY_DATA":
		fallthrough
	case "GET_FBA_REIMBURSEMENTS_DATA":
		fallthrough
	case "GET_FBA_SNS_FORECAST_DATA":
		fallthrough
	case "GET_FBA_SNS_PERFORMANCE_DATA":
		fallthrough
	case "GET_FBA_STORAGE_FEE_CHARGES_DATA":
		fallthrough
	case "GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_SHIPPING":
		fallthrough
	case "GET_FLAT_FILE_ALL_ORDERS_DATA_BY_LAST_UPDATE_GENERAL":
		fallthrough
	case "GET_FLAT_FILE_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL":
		fallthrough
	case "GET_FLAT_FILE_ARCHIVED_ORDERS_DATA_BY_ORDER_DATE":
		fallthrough
	case "GET_FLAT_FILE_OPEN_LISTINGS_DATA":
		fallthrough
	case "GET_FLAT_FILE_RETURNS_DATA_BY_RETURN_DATE":
		fallthrough
	case "GET_LEDGER_DETAIL_VIEW_DATA":
		fallthrough
	case "GET_LEDGER_SUMMARY_VIEW_DATA":
		fallthrough
	case "GET_MERCHANT_CANCELLED_LISTINGS_DATA":
		fallthrough
	case "GET_MERCHANT_LISTINGS_ALL_DATA":
		fallthrough
	case "GET_MERCHANT_LISTINGS_DATA":
		fallthrough
	case "GET_MERCHANT_LISTINGS_DATA_BACK_COMPAT":
		fallthrough
	case "GET_MERCHANT_LISTINGS_INACTIVE_DATA":
		fallthrough
	case "GET_MERCHANTS_LISTINGS_FYP_REPORT":
		fallthrough
	case "GET_ORDER_REPORT_DATA_SHIPPING":
		fallthrough
	case "GET_RESTOCK_INVENTORY_RECOMMENDATIONS_REPORT":
		fallthrough
	case "GET_SELLER_FEEDBACK_DATA":
		fallthrough
	case "GET_STRANDED_INVENTORY_UI_DATA":
		fallthrough
	case "GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE":
		fallthrough
	case "GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_GENERAL":
		fallthrough
	case "GET_XML_BROWSE_TREE_DATA":
		fallthrough
	case "GET_VENDOR_REAL_TIME_INVENTORY_REPORT":
		*e = SourceAmazonSellerPartnerUpdateReportName(v)
		return nil
	default:
		return fmt.Errorf("invalid value for SourceAmazonSellerPartnerUpdateReportName: %v", v)
	}
}

type SourceAmazonSellerPartnerUpdateReportOptions struct {
	// List of options
	OptionsList []SourceAmazonSellerPartnerUpdateOptionsList `json:"options_list"`
	ReportName  SourceAmazonSellerPartnerUpdateReportName    `json:"report_name"`
	StreamName  string                                       `json:"stream_name"`
}

func (o *SourceAmazonSellerPartnerUpdateReportOptions) GetOptionsList() []SourceAmazonSellerPartnerUpdateOptionsList {
	if o == nil {
		return []SourceAmazonSellerPartnerUpdateOptionsList{}
	}
	return o.OptionsList
}

func (o *SourceAmazonSellerPartnerUpdateReportOptions) GetReportName() SourceAmazonSellerPartnerUpdateReportName {
	if o == nil {
		return SourceAmazonSellerPartnerUpdateReportName("")
	}
	return o.ReportName
}

func (o *SourceAmazonSellerPartnerUpdateReportOptions) GetStreamName() string {
	if o == nil {
		return ""
	}
	return o.StreamName
}

type SourceAmazonSellerPartnerUpdate struct {
	// Type of the Account you're going to authorize the Airbyte application by
	AccountType *SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType `default:"Seller" json:"account_type"`
	// Your Amazon Application ID.
	AppID    *string                                  `json:"app_id,omitempty"`
	authType *SourceAmazonSellerPartnerUpdateAuthType `const:"oauth2.0" json:"auth_type,omitempty"`
	// Select the AWS Environment.
	AwsEnvironment *SourceAmazonSellerPartnerUpdateAWSEnvironment `default:"PRODUCTION" json:"aws_environment"`
	// The time window size (in days) for fetching financial events data in chunks. Options are 1 day, 7 days, 14 days, 30 days, 60 days, and 190 days, based on API limitations.
	//
	// - **Smaller step sizes (e.g., 1 day)** are better for large data volumes. They fetch smaller chunks per request, reducing the risk of timeouts or overwhelming the API, though more requests may slow syncing and increase the chance of hitting rate limits.
	// - **Larger step sizes (e.g., 14 days)** are better for smaller data volumes. They fetch more data per request, speeding up syncing and reducing the number of API calls, which minimizes strain on rate limits.
	//
	// Select a step size that matches your data volume to optimize syncing speed and API performance.
	FinancialEventsStep *SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays `default:"180" json:"financial_events_step"`
	// Your Login with Amazon Client ID.
	LwaAppID string `json:"lwa_app_id"`
	// Your Login with Amazon Client Secret.
	LwaClientSecret string `json:"lwa_client_secret"`
	// For syncs spanning a large date range, this option is used to request data in a smaller fixed window to improve sync reliability. This time window can be configured granularly by day.
	PeriodInDays *int64 `default:"90" json:"period_in_days"`
	// The Refresh Token obtained via OAuth flow authorization.
	RefreshToken string `json:"refresh_token"`
	// Select the AWS Region.
	Region *SourceAmazonSellerPartnerUpdateAWSRegion `default:"US" json:"region"`
	// UTC date and time in the format 2017-01-25T00:00:00Z. Any data after this date will not be replicated.
	ReplicationEndDate *time.Time `json:"replication_end_date,omitempty"`
	// UTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated. If start date is not provided or older than 2 years ago from today, the date 2 years ago from today will be used.
	ReplicationStartDate *time.Time `json:"replication_start_date,omitempty"`
	// Additional information passed to reports. This varies by report type.
	ReportOptionsList []SourceAmazonSellerPartnerUpdateReportOptions `json:"report_options_list,omitempty"`
	// For report based streams with known amount of requests per time period, this option will use waiting time between requests to avoid fatal statuses in reports. See <a href="https://docs.airbyte.com/integrations/sources/amazon-seller-partner#limitations--troubleshooting" target="_blank">Troubleshooting</a> section for more details
	WaitToAvoidFatalErrors *bool `default:"false" json:"wait_to_avoid_fatal_errors"`
}

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

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

func (o *SourceAmazonSellerPartnerUpdate) GetAccountType() *SourceAmazonSellerPartnerUpdateAWSSellerPartnerAccountType {
	if o == nil {
		return nil
	}
	return o.AccountType
}

func (o *SourceAmazonSellerPartnerUpdate) GetAppID() *string {
	if o == nil {
		return nil
	}
	return o.AppID
}

func (o *SourceAmazonSellerPartnerUpdate) GetAuthType() *SourceAmazonSellerPartnerUpdateAuthType {
	return SourceAmazonSellerPartnerUpdateAuthTypeOauth20.ToPointer()
}

func (o *SourceAmazonSellerPartnerUpdate) GetAwsEnvironment() *SourceAmazonSellerPartnerUpdateAWSEnvironment {
	if o == nil {
		return nil
	}
	return o.AwsEnvironment
}

func (o *SourceAmazonSellerPartnerUpdate) GetFinancialEventsStep() *SourceAmazonSellerPartnerUpdateFinancialEventsStepSizeInDays {
	if o == nil {
		return nil
	}
	return o.FinancialEventsStep
}

func (o *SourceAmazonSellerPartnerUpdate) GetLwaAppID() string {
	if o == nil {
		return ""
	}
	return o.LwaAppID
}

func (o *SourceAmazonSellerPartnerUpdate) GetLwaClientSecret() string {
	if o == nil {
		return ""
	}
	return o.LwaClientSecret
}

func (o *SourceAmazonSellerPartnerUpdate) GetPeriodInDays() *int64 {
	if o == nil {
		return nil
	}
	return o.PeriodInDays
}

func (o *SourceAmazonSellerPartnerUpdate) GetRefreshToken() string {
	if o == nil {
		return ""
	}
	return o.RefreshToken
}

func (o *SourceAmazonSellerPartnerUpdate) GetRegion() *SourceAmazonSellerPartnerUpdateAWSRegion {
	if o == nil {
		return nil
	}
	return o.Region
}

func (o *SourceAmazonSellerPartnerUpdate) GetReplicationEndDate() *time.Time {
	if o == nil {
		return nil
	}
	return o.ReplicationEndDate
}

func (o *SourceAmazonSellerPartnerUpdate) GetReplicationStartDate() *time.Time {
	if o == nil {
		return nil
	}
	return o.ReplicationStartDate
}

func (o *SourceAmazonSellerPartnerUpdate) GetReportOptionsList() []SourceAmazonSellerPartnerUpdateReportOptions {
	if o == nil {
		return nil
	}
	return o.ReportOptionsList
}

func (o *SourceAmazonSellerPartnerUpdate) GetWaitToAvoidFatalErrors() *bool {
	if o == nil {
		return nil
	}
	return o.WaitToAvoidFatalErrors
}
