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

package shared

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

type SourceSonarCloudUpdate struct {
	// Comma-separated list of component keys.
	ComponentKeys []any `json:"component_keys"`
	// To retrieve issues created before the given date (inclusive).
	EndDate *types.Date `json:"end_date,omitempty"`
	// Organization key. See <a href="https://docs.sonarcloud.io/appendices/project-information/#project-and-organization-keys">here</a>.
	Organization string `json:"organization"`
	// To retrieve issues created after the given date (inclusive).
	StartDate *types.Date `json:"start_date,omitempty"`
	// Your User Token. See <a href="https://docs.sonarcloud.io/advanced-setup/user-accounts/">here</a>. The token is case sensitive.
	UserToken string `json:"user_token"`
}

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

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

func (o *SourceSonarCloudUpdate) GetComponentKeys() []any {
	if o == nil {
		return []any{}
	}
	return o.ComponentKeys
}

func (o *SourceSonarCloudUpdate) GetEndDate() *types.Date {
	if o == nil {
		return nil
	}
	return o.EndDate
}

func (o *SourceSonarCloudUpdate) GetOrganization() string {
	if o == nil {
		return ""
	}
	return o.Organization
}

func (o *SourceSonarCloudUpdate) GetStartDate() *types.Date {
	if o == nil {
		return nil
	}
	return o.StartDate
}

func (o *SourceSonarCloudUpdate) GetUserToken() string {
	if o == nil {
		return ""
	}
	return o.UserToken
}
