// 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"
)

type Breezometer string

const (
	BreezometerBreezometer Breezometer = "breezometer"
)

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

type SourceBreezometer struct {
	// Your API Access Key. See <a href="https://docs.breezometer.com/api-documentation/introduction/#authentication/">here</a>.
	APIKey string `json:"api_key"`
	// Number of days to forecast. Minimum 1, maximum 3. Valid for Polen and Weather Forecast streams.
	DaysToForecast *int64 `json:"days_to_forecast,omitempty"`
	// Number of hours retireve from Air Quality History stream. Minimum 1, maximum 720.
	HistoricHours *int64 `json:"historic_hours,omitempty"`
	// Number of hours to forecast. Minimum 1, maximum 96. Valid for Air Quality Forecast stream.
	HoursToForecast *int64 `json:"hours_to_forecast,omitempty"`
	// Latitude of the monitored location.
	Latitude string `json:"latitude"`
	// Longitude of the monitored location.
	Longitude string `json:"longitude"`
	// Desired radius from the location provided. Minimum 5, maximum 100. Valid for Wildfires streams.
	Radius     *int64      `json:"radius,omitempty"`
	sourceType Breezometer `const:"breezometer" json:"sourceType"`
}

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

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

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

func (o *SourceBreezometer) GetDaysToForecast() *int64 {
	if o == nil {
		return nil
	}
	return o.DaysToForecast
}

func (o *SourceBreezometer) GetHistoricHours() *int64 {
	if o == nil {
		return nil
	}
	return o.HistoricHours
}

func (o *SourceBreezometer) GetHoursToForecast() *int64 {
	if o == nil {
		return nil
	}
	return o.HoursToForecast
}

func (o *SourceBreezometer) GetLatitude() string {
	if o == nil {
		return ""
	}
	return o.Latitude
}

func (o *SourceBreezometer) GetLongitude() string {
	if o == nil {
		return ""
	}
	return o.Longitude
}

func (o *SourceBreezometer) GetRadius() *int64 {
	if o == nil {
		return nil
	}
	return o.Radius
}

func (o *SourceBreezometer) GetSourceType() Breezometer {
	return BreezometerBreezometer
}
