-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6252880
commit 7d45638
Showing
3 changed files
with
67 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 0 additions & 59 deletions
59
thermostats_update_request_default_climate_setting_hvac_mode_setting.go
This file was deleted.
Oops, something went wrong.