// 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 SourceJiraUpdate struct {
	// Jira API Token. See the <a href="https://docs.airbyte.com/integrations/sources/jira">docs</a> for more information on how to generate this key. API Token is used for Authorization to your account by BasicAuth.
	APIToken string `json:"api_token"`
	// The Domain for your Jira account, e.g. airbyteio.atlassian.net, airbyteio.jira.com, jira.your-domain.com
	Domain string `json:"domain"`
	// The user email for your Jira account which you used to generate the API token. This field is used for Authorization to your account by BasicAuth.
	Email string `json:"email"`
	// When set to N, the connector will always refresh resources created within the past N minutes. By default, updated objects that are not newly created are not incrementally synced.
	LookbackWindowMinutes *int64 `default:"0" json:"lookback_window_minutes"`
	// The number of worker threads to use for the sync.
	NumWorkers *int64 `default:"3" json:"num_workers"`
	// List of Jira project keys to replicate data for, or leave it empty if you want to replicate data for all projects.
	Projects []string `json:"projects,omitempty"`
	// The date from which you want to replicate data from Jira, use the format YYYY-MM-DDT00:00:00Z. Note that this field only applies to certain streams, and only data generated on or after the start date will be replicated. Or leave it empty if you want to replicate all data. For more information, refer to the <a href="https://docs.airbyte.com/integrations/sources/jira/">documentation</a>.
	StartDate *time.Time `json:"start_date,omitempty"`
}

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

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

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

func (o *SourceJiraUpdate) GetDomain() string {
	if o == nil {
		return ""
	}
	return o.Domain
}

func (o *SourceJiraUpdate) GetEmail() string {
	if o == nil {
		return ""
	}
	return o.Email
}

func (o *SourceJiraUpdate) GetLookbackWindowMinutes() *int64 {
	if o == nil {
		return nil
	}
	return o.LookbackWindowMinutes
}

func (o *SourceJiraUpdate) GetNumWorkers() *int64 {
	if o == nil {
		return nil
	}
	return o.NumWorkers
}

func (o *SourceJiraUpdate) GetProjects() []string {
	if o == nil {
		return nil
	}
	return o.Projects
}

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