Skip to content

Commit

Permalink
Release v0.1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Oct 9, 2023
1 parent 6252880 commit 7d45638
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 67 deletions.
59 changes: 59 additions & 0 deletions hvac_mode_setting.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// This file was auto-generated by Fern from our API Definition.

package api

import (
json "encoding/json"
fmt "fmt"
strconv "strconv"
)

type HvacModeSetting uint8

const (
HvacModeSettingOff HvacModeSetting = iota + 1
HvacModeSettingHeat
HvacModeSettingCool
HvacModeSettingHeatcool
)

func (h HvacModeSetting) String() string {
switch h {
default:
return strconv.Itoa(int(h))
case HvacModeSettingOff:
return "off"
case HvacModeSettingHeat:
return "heat"
case HvacModeSettingCool:
return "cool"
case HvacModeSettingHeatcool:
return "heatcool"
}
}

func (h HvacModeSetting) MarshalJSON() ([]byte, error) {
return []byte(fmt.Sprintf("%q", h.String())), nil
}

func (h *HvacModeSetting) UnmarshalJSON(data []byte) error {
var raw string
if err := json.Unmarshal(data, &raw); err != nil {
return err
}
switch raw {
case "off":
value := HvacModeSettingOff
*h = value
case "heat":
value := HvacModeSettingHeat
*h = value
case "cool":
value := HvacModeSettingCool
*h = value
case "heatcool":
value := HvacModeSettingHeatcool
*h = value
}
return nil
}
16 changes: 8 additions & 8 deletions thermostats_update_request_default_climate_setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
package api

type ThermostatsUpdateRequestDefaultClimateSetting struct {
AutomaticHeatingEnabled *bool `json:"automatic_heating_enabled,omitempty"`
AutomaticCoolingEnabled *bool `json:"automatic_cooling_enabled,omitempty"`
HvacModeSetting *ThermostatsUpdateRequestDefaultClimateSettingHvacModeSetting `json:"hvac_mode_setting,omitempty"`
CoolingSetPointCelsius *float64 `json:"cooling_set_point_celsius,omitempty"`
HeatingSetPointCelsius *float64 `json:"heating_set_point_celsius,omitempty"`
CoolingSetPointFahrenheit *float64 `json:"cooling_set_point_fahrenheit,omitempty"`
HeatingSetPointFahrenheit *float64 `json:"heating_set_point_fahrenheit,omitempty"`
ManualOverrideAllowed *bool `json:"manual_override_allowed,omitempty"`
AutomaticHeatingEnabled *bool `json:"automatic_heating_enabled,omitempty"`
AutomaticCoolingEnabled *bool `json:"automatic_cooling_enabled,omitempty"`
HvacModeSetting *HvacModeSetting `json:"hvac_mode_setting,omitempty"`
CoolingSetPointCelsius *float64 `json:"cooling_set_point_celsius,omitempty"`
HeatingSetPointCelsius *float64 `json:"heating_set_point_celsius,omitempty"`
CoolingSetPointFahrenheit *float64 `json:"cooling_set_point_fahrenheit,omitempty"`
HeatingSetPointFahrenheit *float64 `json:"heating_set_point_fahrenheit,omitempty"`
ManualOverrideAllowed *bool `json:"manual_override_allowed,omitempty"`
}

This file was deleted.

0 comments on commit 7d45638

Please sign in to comment.