// 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 SourceCircleciUpdate struct {
	APIKey string `json:"api_key"`
	// Job Number of the workflow for `jobs` stream, Auto fetches from `workflow_jobs` stream, if not configured
	JobNumber *string `default:"2" json:"job_number"`
	// The org ID found in `https://app.circleci.com/settings/organization/circleci/xxxxx/overview`
	OrgID string `json:"org_id"`
	// Project ID found in the project settings, Visit `https://app.circleci.com/settings/project/circleci/ORG_SLUG/YYYYY`
	ProjectID string    `json:"project_id"`
	StartDate time.Time `json:"start_date"`
	// Workflow ID of a project pipeline, Could be seen in the URL of pipeline build, Example `https://app.circleci.com/pipelines/circleci/55555xxxxxx/7yyyyyyyyxxxxx/2/workflows/WORKFLOW_ID`
	WorkflowID []any `json:"workflow_id,omitempty"`
}

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

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

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

func (o *SourceCircleciUpdate) GetJobNumber() *string {
	if o == nil {
		return nil
	}
	return o.JobNumber
}

func (o *SourceCircleciUpdate) GetOrgID() string {
	if o == nil {
		return ""
	}
	return o.OrgID
}

func (o *SourceCircleciUpdate) GetProjectID() string {
	if o == nil {
		return ""
	}
	return o.ProjectID
}

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

func (o *SourceCircleciUpdate) GetWorkflowID() []any {
	if o == nil {
		return nil
	}
	return o.WorkflowID
}
