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

package shared

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

type SourceOpsgenieUpdate struct {
	// API token used to access the Opsgenie platform
	APIToken string `json:"api_token"`
	// Service endpoint to use for API calls.
	Endpoint *string `default:"api.opsgenie.com" json:"endpoint"`
	// The date from which you'd like to replicate data from Opsgenie in the format of YYYY-MM-DDT00:00:00Z. All data generated after this date will be replicated. Note that it will be used only in the following incremental streams: issues.
	StartDate *string `json:"start_date,omitempty"`
}

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

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

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

func (o *SourceOpsgenieUpdate) GetEndpoint() *string {
	if o == nil {
		return nil
	}
	return o.Endpoint
}

func (o *SourceOpsgenieUpdate) GetStartDate() *string {
	if o == nil {
		return nil
	}
	return o.StartDate
}
