package isapi type MotionDetection struct { Enabled string `xml:"enabled"` EnableHighlight string `xml:"enableHighlight"` SamplingInterval string `xml:"samplingInterval"` StartTriggerTime string `xml:"startTriggerTime"` EndTriggerTime string `xml:"endTriggerTime"` RegionType string `xml:"regionType"` Grid struct { RowGranularity string `xml:"rowGranularity"` ColumnGranularity string `xml:"columnGranularity"` } `xml:"Grid"` MotionDetectionLayout struct { SensitivityLevel string `xml:"sensitivityLevel"` Layout struct { GridMap string `xml:"gridMap"` RegionList struct { Text string `xml:",chardata"` Size string `xml:"size,attr"` Region struct { ID string `xml:"id"` RegionCoordinatesList struct { RegionCoordinates []struct { PositionX string `xml:"positionX"` PositionY string `xml:"positionY"` } `xml:"RegionCoordinates"` } `xml:"RegionCoordinatesList"` } `xml:"Region"` } `xml:"RegionList"` } `xml:"layout"` TargetType string `xml:"targetType"` } `xml:"MotionDetectionLayout"` } func (c *Client) GetMotionDetection() ([]byte, error) { return c.CommonGet("/ISAPI/System/Video/inputs/channels/1/motionDetection") } func (c *Client) PutMotionDetection(data []byte) ([]byte, error) { return c.CommonPut(data, "/ISAPI/System/Video/inputs/channels/1/motionDetection") }