diff --git a/.changelog/1249.txt b/.changelog/1249.txt new file mode 100644 index 00000000000..362b4726b1a --- /dev/null +++ b/.changelog/1249.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +service_mode_v2: update `Mode` field to use new `ServiceMode` string type with explicit const service mode values +``` diff --git a/devices_policy.go b/devices_policy.go index 2e537757e15..2664a260c74 100644 --- a/devices_policy.go +++ b/devices_policy.go @@ -17,9 +17,19 @@ type DeviceClientCertificatesZone struct { Result Enabled } +type ServiceMode string + +const ( + oneDotOne ServiceMode = "1dot1" + warp ServiceMode = "warp" + proxy ServiceMode = "proxy" + postureOnly ServiceMode = "posture_only" + warpTunnelOnly ServiceMode = "warp_tunnel_only" +) + type ServiceModeV2 struct { - Mode string `json:"mode,omitempty"` - Port int `json:"port,omitempty"` + Mode ServiceMode `json:"mode,omitempty"` + Port int `json:"port,omitempty"` } type DeviceSettingsPolicy struct {