diff --git a/Device.go b/Device.go
index 191c32eb..1801ab77 100644
--- a/Device.go
+++ b/Device.go
@@ -3,7 +3,6 @@ package onvif
import (
"encoding/xml"
"errors"
- "fmt"
"io/ioutil"
"net/http"
"net/url"
@@ -108,65 +107,65 @@ func readResponse(resp *http.Response) string {
}
//GetAvailableDevicesAtSpecificEthernetInterface ...
-func GetAvailableDevicesAtSpecificEthernetInterface(interfaceName string) []Device {
- /*
- Call an ws-discovery Probe Message to Discover NVT type Devices
- */
- devices := wsdiscovery.SendProbe(interfaceName, nil, []string{"dn:" + NVT.String()}, map[string]string{"dn": "http://www.onvif.org/ver10/network/wsdl"})
+func GetAvailableDevicesAtSpecificEthernetInterface(interfaceName string) ([]Device, error) {
+ // Call a ws-discovery Probe Message to Discover NVT type Devices
+ devices, err := wsdiscovery.SendProbe(interfaceName, nil, []string{"dn:" + NVT.String()}, map[string]string{"dn": "http://www.onvif.org/ver10/network/wsdl"})
+ if err != nil {
+ return nil, err
+ }
+
+ nvtDevicesSeen := make(map[string]bool)
nvtDevices := make([]Device, 0)
for _, j := range devices {
doc := etree.NewDocument()
if err := doc.ReadFromString(j); err != nil {
- fmt.Errorf("%s", err.Error())
- return nil
+ return nil, err
}
- endpoints := doc.Root().FindElements("./Body/ProbeMatches/ProbeMatch/XAddrs")
- for _, xaddr := range endpoints {
+ for _, xaddr := range doc.Root().FindElements("./Body/ProbeMatches/ProbeMatch/XAddrs") {
xaddr := strings.Split(strings.Split(xaddr.Text(), " ")[0], "/")[2]
- fmt.Println(xaddr)
- c := 0
-
- for c = 0; c < len(nvtDevices); c++ {
- if nvtDevices[c].params.Xaddr == xaddr {
- fmt.Println(nvtDevices[c].params.Xaddr, "==", xaddr)
- break
+ if !nvtDevicesSeen[xaddr] {
+ dev, err := NewDevice(DeviceParams{Xaddr: strings.Split(xaddr, " ")[0]})
+ if err != nil {
+ // TODO(jfsmig) print a warning
+ } else {
+ nvtDevicesSeen[xaddr] = true
+ nvtDevices = append(nvtDevices, *dev)
}
}
-
- if c < len(nvtDevices) {
- continue
- }
-
- dev, err := NewDevice(DeviceParams{Xaddr: strings.Split(xaddr, " ")[0]})
-
- if err != nil {
- fmt.Println("Error", xaddr)
- fmt.Println(err)
- continue
- } else {
- nvtDevices = append(nvtDevices, *dev)
- }
}
}
- return nvtDevices
+ return nvtDevices, nil
}
-func (dev *Device) getSupportedServices(resp *http.Response) {
+func (dev *Device) getSupportedServices(resp *http.Response) error {
doc := etree.NewDocument()
- data, _ := ioutil.ReadAll(resp.Body)
+ data, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return err
+ }
+
+ resp.Body.Close()
if err := doc.ReadFromBytes(data); err != nil {
//log.Println(err.Error())
- return
+ return err
}
+
services := doc.FindElements("./Envelope/Body/GetCapabilitiesResponse/Capabilities/*/XAddr")
for _, j := range services {
dev.addEndpoint(j.Parent().Tag, j.Text())
}
+
+ extension_services := doc.FindElements("./Envelope/Body/GetCapabilitiesResponse/Capabilities/Extension/*/XAddr")
+ for _, j := range extension_services {
+ dev.addEndpoint(j.Parent().Tag, j.Text())
+ }
+
+ return nil
}
//NewDevice function construct a ONVIF Device entity
@@ -188,7 +187,11 @@ func NewDevice(params DeviceParams) (*Device, error) {
return nil, errors.New("camera is not available at " + dev.params.Xaddr + " or it does not support ONVIF services")
}
- dev.getSupportedServices(resp)
+ err = dev.getSupportedServices(resp)
+ if err != nil {
+ return nil, err
+ }
+
return dev, nil
}
diff --git a/api/api.go b/api/api.go
index 397fa260..af591265 100644
--- a/api/api.go
+++ b/api/api.go
@@ -1,14 +1,17 @@
package api
import (
- "errors"
- "fmt"
"io/ioutil"
"net/http"
+ "os"
"path"
"reflect"
"regexp"
"strings"
+ "time"
+
+ "github.com/juju/errors"
+ "github.com/rs/zerolog"
"github.com/beevik/etree"
"github.com/gin-gonic/gin"
@@ -18,6 +21,18 @@ import (
wsdiscovery "github.com/kerberos-io/onvif/ws-discovery"
)
+var (
+ // LoggerContext is the builder of a zerolog.Logger that is exposed to the application so that
+ // options at the CLI might alter the formatting and the output of the logs.
+ LoggerContext = zerolog.
+ New(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.RFC3339}).
+ With().Timestamp()
+
+ // Logger is a zerolog logger, that can be safely used from any part of the application.
+ // It gathers the format and the output.
+ Logger = LoggerContext.Logger()
+)
+
func RunApi() {
router := gin.Default()
@@ -32,7 +47,7 @@ func RunApi() {
xaddr := c.GetHeader("xaddr")
acceptedData, err := c.GetRawData()
if err != nil {
- fmt.Println(err)
+ Logger.Debug().Err(err).Msg("Failed to get rawx data")
}
message, err := callNecessaryMethod(serviceName, methodName, string(acceptedData), username, pass, xaddr)
@@ -49,45 +64,45 @@ func RunApi() {
interfaceName := context.GetHeader("interface")
- var response = "["
- devices := wsdiscovery.SendProbe(interfaceName, nil, []string{"dn:NetworkVideoTransmitter"}, map[string]string{"dn": "http://www.onvif.org/ver10/network/wsdl"})
+ devices, err := wsdiscovery.SendProbe(interfaceName, nil, []string{"dn:NetworkVideoTransmitter"}, map[string]string{"dn": "http://www.onvif.org/ver10/network/wsdl"})
+ if err != nil {
+ context.String(http.StatusInternalServerError, "error")
+ } else {
+ response := "["
- for _, j := range devices {
- doc := etree.NewDocument()
- if err := doc.ReadFromString(j); err != nil {
- context.XML(http.StatusBadRequest, err.Error())
- } else {
+ for _, j := range devices {
+ doc := etree.NewDocument()
+ if err := doc.ReadFromString(j); err != nil {
+ context.XML(http.StatusBadRequest, err.Error())
+ } else {
- endpoints := doc.Root().FindElements("./Body/ProbeMatches/ProbeMatch/XAddrs")
- scopes := doc.Root().FindElements("./Body/ProbeMatches/ProbeMatch/Scopes")
+ endpoints := doc.Root().FindElements("./Body/ProbeMatches/ProbeMatch/XAddrs")
+ scopes := doc.Root().FindElements("./Body/ProbeMatches/ProbeMatch/Scopes")
- flag := false
+ flag := false
- for _, xaddr := range endpoints {
- xaddr := strings.Split(strings.Split(xaddr.Text(), " ")[0], "/")[2]
- if strings.Contains(response, xaddr) {
- flag = true
+ for _, xaddr := range endpoints {
+ xaddr := strings.Split(strings.Split(xaddr.Text(), " ")[0], "/")[2]
+ if strings.Contains(response, xaddr) {
+ flag = true
+ break
+ }
+ response += "{"
+ response += `"url":"` + xaddr + `",`
+ }
+ if flag {
break
}
- response += "{"
- response += `"url":"` + xaddr + `",`
- }
- if flag {
- break
- }
- for _, scope := range scopes {
- re := regexp.MustCompile(`onvif:\/\/www\.onvif\.org\/name\/[A-Za-z0-9-]+`)
- match := re.FindStringSubmatch(scope.Text())
- response += `"name":"` + path.Base(match[0]) + `"`
+ for _, scope := range scopes {
+ re := regexp.MustCompile(`onvif:\/\/www\.onvif\.org\/name\/[A-Za-z0-9-]+`)
+ match := re.FindStringSubmatch(scope.Text())
+ response += `"name":"` + path.Base(match[0]) + `"`
+ }
+ response += "},"
}
- response += "},"
-
}
-
- }
- response = strings.TrimRight(response, ",")
- response += "]"
- if response != "" {
+ response = strings.TrimRight(response, ",")
+ response += "]"
context.String(http.StatusOK, response)
}
})
@@ -95,25 +110,6 @@ func RunApi() {
router.Run()
}
-//func soapHandling(tp interface{}, tags* map[string]string) {
-// ifaceValue := reflect.ValueOf(tp).Elem()
-// typeOfStruct := ifaceValue.Type()
-// if ifaceValue.Kind() != reflect.Struct {
-// return
-// }
-// for i := 0; i < ifaceValue.NumField(); i++ {
-// field := ifaceValue.Field(i)
-// tg, err := typeOfStruct.FieldByName(typeOfStruct.Field(i).Name)
-// if err == false {
-// fmt.Println(err)
-// }
-// (*tags)[typeOfStruct.Field(i).Name] = string(tg.Tag)
-//
-// subStruct := reflect.New(reflect.TypeOf( field.Interface() ))
-// soapHandling(subStruct.Interface(), tags)
-// }
-//}
-
func callNecessaryMethod(serviceName, methodName, acceptedData, username, password, xaddr string) (string, error) {
var methodStruct interface{}
var err error
@@ -129,17 +125,17 @@ func callNecessaryMethod(serviceName, methodName, acceptedData, username, passwo
return "", errors.New("there is no such service")
}
if err != nil { //done
- return "", err
+ return "", errors.Annotate(err, "getStructByName")
}
resp, err := xmlAnalize(methodStruct, &acceptedData)
if err != nil {
- return "", err
+ return "", errors.Annotate(err, "xmlAnalize")
}
endpoint, err := getEndpoint(serviceName, xaddr)
if err != nil {
- return "", err
+ return "", errors.Annotate(err, "getEndpoint")
}
soap := gosoap.NewEmptySOAP()
@@ -149,21 +145,23 @@ func callNecessaryMethod(serviceName, methodName, acceptedData, username, passwo
servResp, err := networking.SendSoap(new(http.Client), endpoint, soap.String())
if err != nil {
- return "", err
+ return "", errors.Annotate(err, "SendSoap")
}
rsp, err := ioutil.ReadAll(servResp.Body)
if err != nil {
- return "", err
+ return "", errors.Annotate(err, "ReadAll")
}
+ servResp.Body.Close()
+
return string(rsp), nil
}
func getEndpoint(service, xaddr string) (string, error) {
dev, err := onvif.NewDevice(onvif.DeviceParams{Xaddr: xaddr})
if err != nil {
- return "", err
+ return "", errors.Annotate(err, "NewDevice")
}
pkg := strings.ToLower(service)
@@ -193,7 +191,7 @@ func xmlAnalize(methodStruct interface{}, acceptedData *string) (*string, error)
doc := etree.NewDocument()
if err := doc.ReadFromString(*acceptedData); err != nil {
- return nil, err
+ return nil, errors.Annotate(err, "readFromString")
}
etr := doc.FindElements("./*")
xmlUnmarshal(etr, &testunMarshal, &mas)
@@ -207,7 +205,7 @@ func xmlAnalize(methodStruct interface{}, acceptedData *string) (*string, error)
lst := (testunMarshal)[lstIndex]
elemName, attr, value, err := xmlMaker(&lst, &test, lstIndex)
if err != nil {
- return nil, err
+ return nil, errors.Annotate(err, "xmlMarker")
}
if mas[lstIndex] == "Push" && lstIndex == 0 { //done
@@ -251,10 +249,10 @@ func xmlAnalize(methodStruct interface{}, acceptedData *string) (*string, error)
resp, err := document.WriteToString()
if err != nil {
- return nil, err
+ return nil, errors.Annotate(err, "writeToString")
}
- return &resp, err
+ return &resp, nil
}
func xmlMaker(lst *[]interface{}, tags *[]map[string]string, lstIndex int) (string, map[string]string, string, error) {
@@ -273,13 +271,13 @@ func xmlMaker(lst *[]interface{}, tags *[]map[string]string, lstIndex int) (stri
if index == 0 && lstIndex == 0 {
res, err := xmlProcessing(tg["XMLName"])
if err != nil {
- return "", nil, "", err
+ return "", nil, "", errors.Annotate(err, "xmlProcessing")
}
elemName = res
} else if index == 0 {
res, err := xmlProcessing(tg[conversion])
if err != nil {
- return "", nil, "", err
+ return "", nil, "", errors.Annotate(err, "xmlProcessing")
}
elemName = res
} else {
@@ -314,8 +312,6 @@ func xmlProcessing(tg string) (string, error) {
} else {
return str[1][0:omitAttr], nil
}
-
- return "", errors.New("something went wrong")
}
func mapProcessing(mapVar []map[string]string) []map[string]string {
@@ -343,9 +339,9 @@ func soapHandling(tp interface{}, tags *[]map[string]string) {
}
for i := 0; i < s.NumField(); i++ {
f := s.Field(i)
- tmp, err := typeOfT.FieldByName(typeOfT.Field(i).Name)
- if err == false {
- fmt.Println(err)
+ tmp, ok := typeOfT.FieldByName(typeOfT.Field(i).Name)
+ if !ok {
+ Logger.Debug().Str("field", typeOfT.Field(i).Name).Msg("reflection failed")
}
*tags = append(*tags, map[string]string{typeOfT.Field(i).Name: string(tmp.Tag)})
subStruct := reflect.New(reflect.TypeOf(f.Interface()))
diff --git a/event/operation.go b/event/operation.go
index d6b10d72..408a2a10 100644
--- a/event/operation.go
+++ b/event/operation.go
@@ -21,18 +21,18 @@ type SubscriptionPolicy struct { //tev http://www.onvif.org/ver10/events/wsdl
//Subscribe action for subscribe event topic
type Subscribe struct { //http://docs.oasis-open.org/wsn/b-2.xsd
- XMLName struct{} `xml:"wsnt:Subscribe"`
- ConsumerReference EndpointReferenceType `xml:"wsnt:ConsumerReference"`
- Filter FilterType `xml:"wsnt:Filter"`
- SubscriptionPolicy SubscriptionPolicy `xml:"wsnt:SubscriptionPolicy"`
- InitialTerminationTime TerminationTime `xml:"wsnt:InitialTerminationTime"`
+ XMLName struct{} `xml:"wsnt:Subscribe"`
+ ConsumerReference EndpointReferenceType `xml:"wsnt:ConsumerReference"`
+ Filter FilterType `xml:"wsnt:Filter"`
+ SubscriptionPolicy SubscriptionPolicy `xml:"wsnt:SubscriptionPolicy"`
+ InitialTerminationTime AbsoluteOrRelativeTimeType `xml:"wsnt:InitialTerminationTime"`
}
//SubscribeResponse message for subscribe event topic
type SubscribeResponse struct { //http://docs.oasis-open.org/wsn/b-2.xsd
- ConsumerReference EndpointReferenceType `xml:"wsnt:ConsumerReference"`
- CurrentTime CurrentTime `xml:"wsnt:CurrentTime"`
- TerminationTime TerminationTime `xml:"wsnt:TerminationTime"`
+ SubscriptionReference EndpointReferenceType
+ CurrentTime CurrentTime
+ TerminationTime TerminationTime
}
//Renew action for refresh event topic subscription
@@ -57,7 +57,6 @@ type UnsubscribeResponse struct { //http://docs.oasis-open.org/wsn/b-2.xsd
}
//CreatePullPointSubscription action
-//BUG(r) Bad AbsoluteOrRelativeTimeType type
type CreatePullPointSubscription struct {
XMLName string `xml:"tev:CreatePullPointSubscription"`
Filter FilterType `xml:"tev:Filter"`
diff --git a/event/types.go b/event/types.go
index b15d4721..745080b3 100644
--- a/event/types.go
+++ b/event/types.go
@@ -2,44 +2,56 @@ package event
import (
"github.com/kerberos-io/onvif/xsd"
+ "github.com/kerberos-io/onvif/xsd/onvif"
)
-//Address Alias
+// Address Alias
type Address xsd.String
-//CurrentTime alias
+// CurrentTime alias
type CurrentTime xsd.DateTime //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
-//TerminationTime alias
+
+// TerminationTime alias
type TerminationTime xsd.DateTime //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
-//FixedTopicSet alias
+
+// FixedTopicSet alias
type FixedTopicSet xsd.Boolean //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
-//Documentation alias
+// Documentation alias
type Documentation xsd.AnyType //wstop http://docs.oasis-open.org/wsn/t-1.xsd
-//TopicExpressionDialect alias
+// TopicExpressionDialect alias
type TopicExpressionDialect xsd.AnyURI
-//Message alias
+// Message alias
type Message xsd.AnyType
-//ActionType for AttributedURIType
+// MessageNotification alias
+type MessageNotification struct {
+ Message MessageNotificationHolderType
+}
+
+type MessageNotificationHolderType struct {
+ UtcTime xsd.DateTime `xml:",attr"`
+ PropertyOperation xsd.String `xml:",attr"`
+ Source onvif.SimpleItem `xml:"Source>SimpleItem"`
+ Data onvif.SimpleItem `xml:"Data>SimpleItem"`
+}
+
+// ActionType for AttributedURIType
type ActionType AttributedURIType
-//AttributedURIType in ws-addr
+// AttributedURIType in ws-addr
type AttributedURIType xsd.AnyURI //wsa https://www.w3.org/2005/08/addressing/ws-addr.xsd
-//AbsoluteOrRelativeTimeType
-type AbsoluteOrRelativeTimeType struct { //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
- xsd.DateTime
- xsd.Duration
-}
+// AbsoluteOrRelativeTimeType
+type AbsoluteOrRelativeTimeType xsd.AnySimpleType //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
-//EndpointReferenceType in ws-addr
+// EndpointReferenceType in ws-addr
type EndpointReferenceType struct { //wsa http://www.w3.org/2005/08/addressing/ws-addr.xsd
- Address AttributedURIType `xml:"wsnt:Address"`
- ReferenceParameters ReferenceParametersType `xml:"wsnt:ReferenceParameters"`
- Metadata MetadataType `xml:"wsnt:Metadata"`
+ Address AttributedURIType
+ ReferenceParameters ReferenceParametersType
+ Metadata MetadataType
}
// FilterType struct
@@ -48,74 +60,74 @@ type FilterType struct {
MessageContent QueryExpressionType `xml:"wsnt:MessageContent"`
}
-//EndpointReference alais
+// EndpointReference alais
type EndpointReference EndpointReferenceType
-//ReferenceParametersType in ws-addr
+// ReferenceParametersType in ws-addr
type ReferenceParametersType struct { //wsa https://www.w3.org/2005/08/addressing/ws-addr.xsd
//Here can be anyAttribute
}
-//Metadata in ws-addr
+// Metadata in ws-addr
type Metadata MetadataType //wsa https://www.w3.org/2005/08/addressing/ws-addr.xsd
-//MetadataType in ws-addr
+// MetadataType in ws-addr
type MetadataType struct { //wsa https://www.w3.org/2005/08/addressing/ws-addr.xsd
//Here can be anyAttribute
}
-//TopicSet alias
+// TopicSet alias
type TopicSet TopicSetType //wstop http://docs.oasis-open.org/wsn/t-1.xsd
-//TopicSetType alias
+// TopicSetType alias
type TopicSetType struct { //wstop http://docs.oasis-open.org/wsn/t-1.xsd
ExtensibleDocumented
//here can be any element
}
-//ExtensibleDocumented struct
+// ExtensibleDocumented struct
type ExtensibleDocumented struct { //wstop http://docs.oasis-open.org/wsn/t-1.xsd
Documentation Documentation //к xsd-документе documentation с маленькой буквы начинается
//here can be anyAttribute
}
-//ProducerReference Alias
+// ProducerReference Alias
type ProducerReference EndpointReferenceType
-//SubscriptionReference Alias
+// SubscriptionReference Alias
type SubscriptionReference EndpointReferenceType
-//NotificationMessageHolderType Alias
+// NotificationMessageHolderType Alias
type NotificationMessageHolderType struct {
SubscriptionReference SubscriptionReference //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
Topic Topic
ProducerReference ProducerReference
- Message Message
+ Message MessageNotification
}
-//NotificationMessage Alias
+// NotificationMessage Alias
type NotificationMessage NotificationMessageHolderType //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
-//QueryExpressionType struct for wsnt:MessageContent
+// QueryExpressionType struct for wsnt:MessageContent
type QueryExpressionType struct { //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
Dialect xsd.AnyURI `xml:"Dialect,attr"`
MessageKind xsd.String `xml:",chardata"` // boolean(ncex:Producer="15")
}
-//MessageContentType Alias
+// MessageContentType Alias
type MessageContentType QueryExpressionType
-//QueryExpression Alias
+// QueryExpression Alias
type QueryExpression QueryExpressionType
-//TopicExpressionType struct for wsnt:TopicExpression
+// TopicExpressionType struct for wsnt:TopicExpression
type TopicExpressionType struct { //wsnt http://docs.oasis-open.org/wsn/b-2.xsd
Dialect xsd.AnyURI `xml:"Dialect,attr"`
TopicKinds xsd.String `xml:",chardata"`
}
-//Topic Alias
+// Topic Alias
type Topic TopicExpressionType
// Capabilities of event
@@ -128,50 +140,50 @@ type Capabilities struct { //tev
PersistentNotificationStorage xsd.Boolean `xml:"PersistentNotificationStorage,attr"`
}
-//ResourceUnknownFault response type
+// ResourceUnknownFault response type
type ResourceUnknownFault struct {
}
-//InvalidFilterFault response type
+// InvalidFilterFault response type
type InvalidFilterFault struct {
}
-//TopicExpressionDialectUnknownFault response type
+// TopicExpressionDialectUnknownFault response type
type TopicExpressionDialectUnknownFault struct {
}
-//InvalidTopicExpressionFault response type
+// InvalidTopicExpressionFault response type
type InvalidTopicExpressionFault struct {
}
-//TopicNotSupportedFault response type
+// TopicNotSupportedFault response type
type TopicNotSupportedFault struct {
}
-//InvalidProducerPropertiesExpressionFault response type
+// InvalidProducerPropertiesExpressionFault response type
type InvalidProducerPropertiesExpressionFault struct {
}
-//InvalidMessageContentExpressionFault response type
+// InvalidMessageContentExpressionFault response type
type InvalidMessageContentExpressionFault struct {
}
-//UnacceptableInitialTerminationTimeFault response type
+// UnacceptableInitialTerminationTimeFault response type
type UnacceptableInitialTerminationTimeFault struct {
}
-//UnrecognizedPolicyRequestFault response type
+// UnrecognizedPolicyRequestFault response type
type UnrecognizedPolicyRequestFault struct {
}
-//UnsupportedPolicyRequestFault response type
+// UnsupportedPolicyRequestFault response type
type UnsupportedPolicyRequestFault struct {
}
-//NotifyMessageNotSupportedFault response type
+// NotifyMessageNotSupportedFault response type
type NotifyMessageNotSupportedFault struct {
}
-//SubscribeCreationFailedFault response type
+// SubscribeCreationFailedFault response type
type SubscribeCreationFailedFault struct {
}
diff --git a/examples/DeviceService.go b/examples/DeviceService.go
index 62a6c932..84cc9bd2 100644
--- a/examples/DeviceService.go
+++ b/examples/DeviceService.go
@@ -1,15 +1,15 @@
package main
import (
+ "context"
"fmt"
- "io/ioutil"
"log"
"net/http"
- goonvif "github.com/kerberos-io/onvif"
- "github.com/kerberos-io/onvif/device"
- "github.com/kerberos-io/onvif/gosoap"
- "github.com/kerberos-io/onvif/xsd/onvif"
+ goonvif "github.com/use-go/onvif"
+ "github.com/use-go/onvif/device"
+ sdk "github.com/use-go/onvif/sdk/device"
+ "github.com/use-go/onvif/xsd/onvif"
)
const (
@@ -17,15 +17,9 @@ const (
password = "Supervisor"
)
-func readResponse(resp *http.Response) string {
- b, err := ioutil.ReadAll(resp.Body)
- if err != nil {
- panic(err)
- }
- return string(b)
-}
-
func main() {
+ ctx := context.Background()
+
//Getting an camera instance
dev, err := goonvif.NewDevice(goonvif.DeviceParams{
Xaddr: "192.168.13.14:80",
@@ -40,34 +34,34 @@ func main() {
//Preparing commands
systemDateAndTyme := device.GetSystemDateAndTime{}
getCapabilities := device.GetCapabilities{Category: "All"}
- createUser := device.CreateUsers{User: onvif.User{
- Username: "TestUser",
- Password: "TestPassword",
- UserLevel: "User",
- },
+ createUser := device.CreateUsers{
+ User: onvif.User{
+ Username: "TestUser",
+ Password: "TestPassword",
+ UserLevel: "User",
+ },
}
//Commands execution
- systemDateAndTymeResponse, err := dev.CallMethod(systemDateAndTyme)
+ systemDateAndTymeResponse, err := sdk.Call_GetSystemDateAndTime(ctx, dev, systemDateAndTyme)
if err != nil {
log.Println(err)
} else {
- fmt.Println(readResponse(systemDateAndTymeResponse))
+ fmt.Println(systemDateAndTymeResponse)
}
- getCapabilitiesResponse, err := dev.CallMethod(getCapabilities)
+ getCapabilitiesResponse, err := sdk.Call_GetCapabilities(ctx, dev, getCapabilities)
if err != nil {
log.Println(err)
} else {
- fmt.Println(readResponse(getCapabilitiesResponse))
+ fmt.Println(getCapabilitiesResponse)
}
- createUserResponse, err := dev.CallMethod(createUser)
+
+ createUserResponse, err := sdk.Call_CreateUsers(ctx, dev, createUser)
if err != nil {
log.Println(err)
} else {
- /*
- You could use https://github.com/kerberos-io/onvif/gosoap for pretty printing response
- */
- fmt.Println(gosoap.SoapMessage(readResponse(createUserResponse)).StringIndent())
+ // You could use https://github.com/use-go/onvif/gosoap for pretty printing response
+ fmt.Println(createUserResponse)
}
}
diff --git a/examples/discovery_test.go b/examples/discovery_test.go
index da1754cd..e2bd1364 100644
--- a/examples/discovery_test.go
+++ b/examples/discovery_test.go
@@ -1,4 +1,4 @@
-package example
+package main
import (
"encoding/json"
@@ -16,12 +16,8 @@ import (
)
func TestGetAvailableDevicesAtSpecificEthernetInterface(t *testing.T) {
-
- // client()
- // runDiscovery("en0")
- s := onvif.GetAvailableDevicesAtSpecificEthernetInterface("en0")
-
- log.Printf("%s", s)
+ s, err := onvif.GetAvailableDevicesAtSpecificEthernetInterface("en0")
+ log.Printf("%v %v", err, s)
}
func client() {
@@ -45,7 +41,11 @@ type Host struct {
func runDiscovery(interfaceName string) {
var hosts []*Host
- devices := discover.SendProbe(interfaceName, nil, []string{"dn:NetworkVideoTransmitter"}, map[string]string{"dn": "http://www.onvif.org/ver10/network/wsdl"})
+ devices, err := discover.SendProbe(interfaceName, nil, []string{"dn:NetworkVideoTransmitter"}, map[string]string{"dn": "http://www.onvif.org/ver10/network/wsdl"})
+ if err != nil {
+ log.Printf("error %s", err)
+ return
+ }
for _, j := range devices {
doc := etree.NewDocument()
if err := doc.ReadFromString(j); err != nil {
diff --git a/go.mod b/go.mod
index ca1c8f39..90e204e7 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,9 @@ go 1.15
require (
github.com/beevik/etree v1.1.0
github.com/elgs/gostrgen v0.0.0-20161222160715-9d61ae07eeae
- github.com/gin-gonic/gin v1.6.2
+ github.com/gin-gonic/gin v1.7.0
github.com/gofrs/uuid v3.2.0+incompatible
- golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0
+ github.com/juju/errors v0.0.0-20220331221717-b38fca44723b
+ github.com/rs/zerolog v1.26.1
+ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d
)
diff --git a/go.sum b/go.sum
index 89eedc72..4a3f2558 100644
--- a/go.sum
+++ b/go.sum
@@ -1,5 +1,7 @@
github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs=
github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A=
+github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -7,16 +9,17 @@ github.com/elgs/gostrgen v0.0.0-20161222160715-9d61ae07eeae h1:3KvK2DmA7TxQ6PZ2f
github.com/elgs/gostrgen v0.0.0-20161222160715-9d61ae07eeae/go.mod h1:wruC5r2gHdr/JIUs5Rr1V45YtsAzKXZxAnn/5rPC97g=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
-github.com/gin-gonic/gin v1.6.2 h1:88crIK23zO6TqlQBt+f9FrPJNKm9ZEr7qjp9vl/d5TM=
-github.com/gin-gonic/gin v1.6.2/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
+github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU=
+github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
-github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
-github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
+github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE=
+github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
+github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I=
@@ -24,6 +27,14 @@ github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaW
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
+github.com/juju/errors v0.0.0-20220331221717-b38fca44723b h1:AxFeSQJfcm2O3ov1wqAkTKYFsnMw2g1B4PkYujfAdkY=
+github.com/juju/errors v0.0.0-20220331221717-b38fca44723b/go.mod h1:jMGj9DWF/qbo91ODcfJq6z/RYc3FX3taCBZMCcpI4Ls=
+github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
@@ -32,8 +43,12 @@ github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OH
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
+github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
+github.com/rs/zerolog v1.26.1 h1:/ihwxqH+4z8UxyI70wM1z9yCvkWcfz/a3mj48k/Zngc=
+github.com/rs/zerolog v1.26.1/go.mod h1:/wSSJWX7lVrsOwlbyTRSOJvqRlc+WjWlfes+CiJ+tmc=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
@@ -42,18 +57,41 @@ github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
+github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0 h1:Jcxah/M+oLZ/R4/z5RzfPzGbPXnVDPkEDtf2JnuxN+U=
-golang.org/x/net v0.0.0-20200425230154-ff2c4b7c35a0/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
+golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
+golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
+golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e h1:1SzTfNOXwIS2oWiMF+6qu0OUDKb0dauo6MoDUQyu+yU=
+golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
+golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
+golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
+golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI=
+golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
+golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA=
+golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
+golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
+golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
+golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/networking/networking.go b/networking/networking.go
index 7e1aef20..f86f4e05 100644
--- a/networking/networking.go
+++ b/networking/networking.go
@@ -3,13 +3,15 @@ package networking
import (
"bytes"
"net/http"
+
+ "github.com/juju/errors"
)
// SendSoap send soap message
func SendSoap(httpClient *http.Client, endpoint, message string) (*http.Response, error) {
resp, err := httpClient.Post(endpoint, "application/soap+xml; charset=utf-8", bytes.NewBufferString(message))
if err != nil {
- return resp, err
+ return resp, errors.Annotate(err, "Post")
}
return resp, nil
diff --git a/ptz/types.go b/ptz/types.go
index 444e46d7..f21dd571 100644
--- a/ptz/types.go
+++ b/ptz/types.go
@@ -98,7 +98,7 @@ type SetPreset struct {
XMLName string `xml:"tptz:SetPreset"`
ProfileToken onvif.ReferenceToken `xml:"tptz:ProfileToken"`
PresetName xsd.String `xml:"tptz:PresetName"`
- PresetToken onvif.ReferenceToken `xml:"tptz:PresetToken"`
+ PresetToken onvif.ReferenceToken `xml:"tptz:PresetToken,omitempty"`
}
type SetPresetResponse struct {
diff --git a/sdk/codegen/main.go b/sdk/codegen/main.go
new file mode 100644
index 00000000..d49b0b66
--- /dev/null
+++ b/sdk/codegen/main.go
@@ -0,0 +1,78 @@
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package main
+
+import (
+ "flag"
+ "log"
+ "os"
+ "text/template"
+)
+
+var mainTemplate = `// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package {{.Package}}
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/{{.StructPackage}}"
+)
+
+// Call_{{.TypeRequest}} forwards the call to dev.CallMethod() then parses the payload of the reply as a {{.TypeReply}}.
+func Call_{{.TypeRequest}}(ctx context.Context, dev *onvif.Device, request {{.StructPackage}}.{{.TypeRequest}}) ({{.StructPackage}}.{{.TypeReply}}, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ {{.TypeReply}} {{.StructPackage}}.{{.TypeReply}}
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.{{.TypeReply}}, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "{{.TypeRequest}}")
+ return reply.Body.{{.TypeReply}}, errors.Annotate(err, "reply")
+ }
+}
+`
+
+type parserEnv struct {
+ Package string
+ StructPackage string
+ TypeReply string
+ TypeRequest string
+}
+
+func main() {
+ flag.Parse()
+ env := parserEnv{
+ Package: flag.Arg(0),
+ StructPackage: flag.Arg(1),
+ TypeRequest: flag.Arg(2),
+ TypeReply: flag.Arg(2) + "Response",
+ }
+
+ log.Println(env)
+
+ body, err := template.New("body").Parse(mainTemplate)
+ if err != nil {
+ log.Fatalln(err)
+ }
+
+ fout, err := os.Create(env.TypeRequest + "_auto.go")
+ if err != nil {
+ log.Fatalln(err)
+ }
+ defer fout.Close()
+
+ err = body.Execute(fout, &env)
+ if err != nil {
+ log.Fatalln(err)
+ }
+}
diff --git a/sdk/device/AddIPAddressFilter_auto.go b/sdk/device/AddIPAddressFilter_auto.go
new file mode 100644
index 00000000..bb74bb2a
--- /dev/null
+++ b/sdk/device/AddIPAddressFilter_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_AddIPAddressFilter forwards the call to dev.CallMethod() then parses the payload of the reply as a AddIPAddressFilterResponse.
+func Call_AddIPAddressFilter(ctx context.Context, dev *onvif.Device, request device.AddIPAddressFilter) (device.AddIPAddressFilterResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddIPAddressFilterResponse device.AddIPAddressFilterResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddIPAddressFilterResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddIPAddressFilter")
+ return reply.Body.AddIPAddressFilterResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/AddScopes_auto.go b/sdk/device/AddScopes_auto.go
new file mode 100644
index 00000000..d665d94e
--- /dev/null
+++ b/sdk/device/AddScopes_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_AddScopes forwards the call to dev.CallMethod() then parses the payload of the reply as a AddScopesResponse.
+func Call_AddScopes(ctx context.Context, dev *onvif.Device, request device.AddScopes) (device.AddScopesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddScopesResponse device.AddScopesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddScopesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddScopes")
+ return reply.Body.AddScopesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/CreateCertificate_auto.go b/sdk/device/CreateCertificate_auto.go
new file mode 100644
index 00000000..3409679b
--- /dev/null
+++ b/sdk/device/CreateCertificate_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_CreateCertificate forwards the call to dev.CallMethod() then parses the payload of the reply as a CreateCertificateResponse.
+func Call_CreateCertificate(ctx context.Context, dev *onvif.Device, request device.CreateCertificate) (device.CreateCertificateResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ CreateCertificateResponse device.CreateCertificateResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.CreateCertificateResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "CreateCertificate")
+ return reply.Body.CreateCertificateResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/CreateDot1XConfiguration_auto.go b/sdk/device/CreateDot1XConfiguration_auto.go
new file mode 100644
index 00000000..43de94c4
--- /dev/null
+++ b/sdk/device/CreateDot1XConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_CreateDot1XConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a CreateDot1XConfigurationResponse.
+func Call_CreateDot1XConfiguration(ctx context.Context, dev *onvif.Device, request device.CreateDot1XConfiguration) (device.CreateDot1XConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ CreateDot1XConfigurationResponse device.CreateDot1XConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.CreateDot1XConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "CreateDot1XConfiguration")
+ return reply.Body.CreateDot1XConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/CreateStorageConfiguration_auto.go b/sdk/device/CreateStorageConfiguration_auto.go
new file mode 100644
index 00000000..78f27fff
--- /dev/null
+++ b/sdk/device/CreateStorageConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_CreateStorageConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a CreateStorageConfigurationResponse.
+func Call_CreateStorageConfiguration(ctx context.Context, dev *onvif.Device, request device.CreateStorageConfiguration) (device.CreateStorageConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ CreateStorageConfigurationResponse device.CreateStorageConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.CreateStorageConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "CreateStorageConfiguration")
+ return reply.Body.CreateStorageConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/CreateUsers_auto.go b/sdk/device/CreateUsers_auto.go
new file mode 100644
index 00000000..4eabb153
--- /dev/null
+++ b/sdk/device/CreateUsers_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_CreateUsers forwards the call to dev.CallMethod() then parses the payload of the reply as a CreateUsersResponse.
+func Call_CreateUsers(ctx context.Context, dev *onvif.Device, request device.CreateUsers) (device.CreateUsersResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ CreateUsersResponse device.CreateUsersResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.CreateUsersResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "CreateUsers")
+ return reply.Body.CreateUsersResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/DeleteCertificates_auto.go b/sdk/device/DeleteCertificates_auto.go
new file mode 100644
index 00000000..15390bf9
--- /dev/null
+++ b/sdk/device/DeleteCertificates_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_DeleteCertificates forwards the call to dev.CallMethod() then parses the payload of the reply as a DeleteCertificatesResponse.
+func Call_DeleteCertificates(ctx context.Context, dev *onvif.Device, request device.DeleteCertificates) (device.DeleteCertificatesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ DeleteCertificatesResponse device.DeleteCertificatesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.DeleteCertificatesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "DeleteCertificates")
+ return reply.Body.DeleteCertificatesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/DeleteDot1XConfiguration_auto.go b/sdk/device/DeleteDot1XConfiguration_auto.go
new file mode 100644
index 00000000..25335b26
--- /dev/null
+++ b/sdk/device/DeleteDot1XConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_DeleteDot1XConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a DeleteDot1XConfigurationResponse.
+func Call_DeleteDot1XConfiguration(ctx context.Context, dev *onvif.Device, request device.DeleteDot1XConfiguration) (device.DeleteDot1XConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ DeleteDot1XConfigurationResponse device.DeleteDot1XConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.DeleteDot1XConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "DeleteDot1XConfiguration")
+ return reply.Body.DeleteDot1XConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/DeleteGeoLocation_auto.go b/sdk/device/DeleteGeoLocation_auto.go
new file mode 100644
index 00000000..7b1be28b
--- /dev/null
+++ b/sdk/device/DeleteGeoLocation_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_DeleteGeoLocation forwards the call to dev.CallMethod() then parses the payload of the reply as a DeleteGeoLocationResponse.
+func Call_DeleteGeoLocation(ctx context.Context, dev *onvif.Device, request device.DeleteGeoLocation) (device.DeleteGeoLocationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ DeleteGeoLocationResponse device.DeleteGeoLocationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.DeleteGeoLocationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "DeleteGeoLocation")
+ return reply.Body.DeleteGeoLocationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/DeleteStorageConfiguration_auto.go b/sdk/device/DeleteStorageConfiguration_auto.go
new file mode 100644
index 00000000..8362441b
--- /dev/null
+++ b/sdk/device/DeleteStorageConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_DeleteStorageConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a DeleteStorageConfigurationResponse.
+func Call_DeleteStorageConfiguration(ctx context.Context, dev *onvif.Device, request device.DeleteStorageConfiguration) (device.DeleteStorageConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ DeleteStorageConfigurationResponse device.DeleteStorageConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.DeleteStorageConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "DeleteStorageConfiguration")
+ return reply.Body.DeleteStorageConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/DeleteUsers_auto.go b/sdk/device/DeleteUsers_auto.go
new file mode 100644
index 00000000..4c003372
--- /dev/null
+++ b/sdk/device/DeleteUsers_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_DeleteUsers forwards the call to dev.CallMethod() then parses the payload of the reply as a DeleteUsersResponse.
+func Call_DeleteUsers(ctx context.Context, dev *onvif.Device, request device.DeleteUsers) (device.DeleteUsersResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ DeleteUsersResponse device.DeleteUsersResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.DeleteUsersResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "DeleteUsers")
+ return reply.Body.DeleteUsersResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetAccessPolicy_auto.go b/sdk/device/GetAccessPolicy_auto.go
new file mode 100644
index 00000000..4710b826
--- /dev/null
+++ b/sdk/device/GetAccessPolicy_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetAccessPolicy forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAccessPolicyResponse.
+func Call_GetAccessPolicy(ctx context.Context, dev *onvif.Device, request device.GetAccessPolicy) (device.GetAccessPolicyResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAccessPolicyResponse device.GetAccessPolicyResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAccessPolicyResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAccessPolicy")
+ return reply.Body.GetAccessPolicyResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetCACertificates_auto.go b/sdk/device/GetCACertificates_auto.go
new file mode 100644
index 00000000..8fb1eaf9
--- /dev/null
+++ b/sdk/device/GetCACertificates_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetCACertificates forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCACertificatesResponse.
+func Call_GetCACertificates(ctx context.Context, dev *onvif.Device, request device.GetCACertificates) (device.GetCACertificatesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCACertificatesResponse device.GetCACertificatesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCACertificatesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCACertificates")
+ return reply.Body.GetCACertificatesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetCapabilities_auto.go b/sdk/device/GetCapabilities_auto.go
new file mode 100644
index 00000000..86fc1541
--- /dev/null
+++ b/sdk/device/GetCapabilities_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetCapabilities forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCapabilitiesResponse.
+func Call_GetCapabilities(ctx context.Context, dev *onvif.Device, request device.GetCapabilities) (device.GetCapabilitiesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCapabilitiesResponse device.GetCapabilitiesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCapabilitiesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCapabilities")
+ return reply.Body.GetCapabilitiesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetCertificateInformation_auto.go b/sdk/device/GetCertificateInformation_auto.go
new file mode 100644
index 00000000..4d966d40
--- /dev/null
+++ b/sdk/device/GetCertificateInformation_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetCertificateInformation forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCertificateInformationResponse.
+func Call_GetCertificateInformation(ctx context.Context, dev *onvif.Device, request device.GetCertificateInformation) (device.GetCertificateInformationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCertificateInformationResponse device.GetCertificateInformationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCertificateInformationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCertificateInformation")
+ return reply.Body.GetCertificateInformationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetCertificatesStatus_auto.go b/sdk/device/GetCertificatesStatus_auto.go
new file mode 100644
index 00000000..6f3da111
--- /dev/null
+++ b/sdk/device/GetCertificatesStatus_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetCertificatesStatus forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCertificatesStatusResponse.
+func Call_GetCertificatesStatus(ctx context.Context, dev *onvif.Device, request device.GetCertificatesStatus) (device.GetCertificatesStatusResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCertificatesStatusResponse device.GetCertificatesStatusResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCertificatesStatusResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCertificatesStatus")
+ return reply.Body.GetCertificatesStatusResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetCertificates_auto.go b/sdk/device/GetCertificates_auto.go
new file mode 100644
index 00000000..ec856fb0
--- /dev/null
+++ b/sdk/device/GetCertificates_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetCertificates forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCertificatesResponse.
+func Call_GetCertificates(ctx context.Context, dev *onvif.Device, request device.GetCertificates) (device.GetCertificatesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCertificatesResponse device.GetCertificatesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCertificatesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCertificates")
+ return reply.Body.GetCertificatesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetClientCertificateMode_auto.go b/sdk/device/GetClientCertificateMode_auto.go
new file mode 100644
index 00000000..122be49e
--- /dev/null
+++ b/sdk/device/GetClientCertificateMode_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetClientCertificateMode forwards the call to dev.CallMethod() then parses the payload of the reply as a GetClientCertificateModeResponse.
+func Call_GetClientCertificateMode(ctx context.Context, dev *onvif.Device, request device.GetClientCertificateMode) (device.GetClientCertificateModeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetClientCertificateModeResponse device.GetClientCertificateModeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetClientCertificateModeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetClientCertificateMode")
+ return reply.Body.GetClientCertificateModeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetDNS_auto.go b/sdk/device/GetDNS_auto.go
new file mode 100644
index 00000000..3fe0f843
--- /dev/null
+++ b/sdk/device/GetDNS_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetDNS forwards the call to dev.CallMethod() then parses the payload of the reply as a GetDNSResponse.
+func Call_GetDNS(ctx context.Context, dev *onvif.Device, request device.GetDNS) (device.GetDNSResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetDNSResponse device.GetDNSResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetDNSResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetDNS")
+ return reply.Body.GetDNSResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetDPAddresses_auto.go b/sdk/device/GetDPAddresses_auto.go
new file mode 100644
index 00000000..e8e8b807
--- /dev/null
+++ b/sdk/device/GetDPAddresses_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetDPAddresses forwards the call to dev.CallMethod() then parses the payload of the reply as a GetDPAddressesResponse.
+func Call_GetDPAddresses(ctx context.Context, dev *onvif.Device, request device.GetDPAddresses) (device.GetDPAddressesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetDPAddressesResponse device.GetDPAddressesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetDPAddressesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetDPAddresses")
+ return reply.Body.GetDPAddressesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetDeviceInformation_auto.go b/sdk/device/GetDeviceInformation_auto.go
new file mode 100644
index 00000000..dac510da
--- /dev/null
+++ b/sdk/device/GetDeviceInformation_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetDeviceInformation forwards the call to dev.CallMethod() then parses the payload of the reply as a GetDeviceInformationResponse.
+func Call_GetDeviceInformation(ctx context.Context, dev *onvif.Device, request device.GetDeviceInformation) (device.GetDeviceInformationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetDeviceInformationResponse device.GetDeviceInformationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetDeviceInformationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetDeviceInformation")
+ return reply.Body.GetDeviceInformationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetDiscoveryMode_auto.go b/sdk/device/GetDiscoveryMode_auto.go
new file mode 100644
index 00000000..5d8565e3
--- /dev/null
+++ b/sdk/device/GetDiscoveryMode_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetDiscoveryMode forwards the call to dev.CallMethod() then parses the payload of the reply as a GetDiscoveryModeResponse.
+func Call_GetDiscoveryMode(ctx context.Context, dev *onvif.Device, request device.GetDiscoveryMode) (device.GetDiscoveryModeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetDiscoveryModeResponse device.GetDiscoveryModeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetDiscoveryModeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetDiscoveryMode")
+ return reply.Body.GetDiscoveryModeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetDot11Capabilities_auto.go b/sdk/device/GetDot11Capabilities_auto.go
new file mode 100644
index 00000000..f9cb0b89
--- /dev/null
+++ b/sdk/device/GetDot11Capabilities_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetDot11Capabilities forwards the call to dev.CallMethod() then parses the payload of the reply as a GetDot11CapabilitiesResponse.
+func Call_GetDot11Capabilities(ctx context.Context, dev *onvif.Device, request device.GetDot11Capabilities) (device.GetDot11CapabilitiesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetDot11CapabilitiesResponse device.GetDot11CapabilitiesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetDot11CapabilitiesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetDot11Capabilities")
+ return reply.Body.GetDot11CapabilitiesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetDot11Status_auto.go b/sdk/device/GetDot11Status_auto.go
new file mode 100644
index 00000000..8b92b702
--- /dev/null
+++ b/sdk/device/GetDot11Status_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetDot11Status forwards the call to dev.CallMethod() then parses the payload of the reply as a GetDot11StatusResponse.
+func Call_GetDot11Status(ctx context.Context, dev *onvif.Device, request device.GetDot11Status) (device.GetDot11StatusResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetDot11StatusResponse device.GetDot11StatusResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetDot11StatusResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetDot11Status")
+ return reply.Body.GetDot11StatusResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetDot1XConfiguration_auto.go b/sdk/device/GetDot1XConfiguration_auto.go
new file mode 100644
index 00000000..3e6531f5
--- /dev/null
+++ b/sdk/device/GetDot1XConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetDot1XConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetDot1XConfigurationResponse.
+func Call_GetDot1XConfiguration(ctx context.Context, dev *onvif.Device, request device.GetDot1XConfiguration) (device.GetDot1XConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetDot1XConfigurationResponse device.GetDot1XConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetDot1XConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetDot1XConfiguration")
+ return reply.Body.GetDot1XConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetDot1XConfigurations_auto.go b/sdk/device/GetDot1XConfigurations_auto.go
new file mode 100644
index 00000000..5b3c8a16
--- /dev/null
+++ b/sdk/device/GetDot1XConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetDot1XConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetDot1XConfigurationsResponse.
+func Call_GetDot1XConfigurations(ctx context.Context, dev *onvif.Device, request device.GetDot1XConfigurations) (device.GetDot1XConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetDot1XConfigurationsResponse device.GetDot1XConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetDot1XConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetDot1XConfigurations")
+ return reply.Body.GetDot1XConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetDynamicDNS_auto.go b/sdk/device/GetDynamicDNS_auto.go
new file mode 100644
index 00000000..aba75d42
--- /dev/null
+++ b/sdk/device/GetDynamicDNS_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetDynamicDNS forwards the call to dev.CallMethod() then parses the payload of the reply as a GetDynamicDNSResponse.
+func Call_GetDynamicDNS(ctx context.Context, dev *onvif.Device, request device.GetDynamicDNS) (device.GetDynamicDNSResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetDynamicDNSResponse device.GetDynamicDNSResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetDynamicDNSResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetDynamicDNS")
+ return reply.Body.GetDynamicDNSResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetEndpointReference_auto.go b/sdk/device/GetEndpointReference_auto.go
new file mode 100644
index 00000000..ac40ae4c
--- /dev/null
+++ b/sdk/device/GetEndpointReference_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetEndpointReference forwards the call to dev.CallMethod() then parses the payload of the reply as a GetEndpointReferenceResponse.
+func Call_GetEndpointReference(ctx context.Context, dev *onvif.Device, request device.GetEndpointReference) (device.GetEndpointReferenceResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetEndpointReferenceResponse device.GetEndpointReferenceResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetEndpointReferenceResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetEndpointReference")
+ return reply.Body.GetEndpointReferenceResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetGeoLocation_auto.go b/sdk/device/GetGeoLocation_auto.go
new file mode 100644
index 00000000..20febace
--- /dev/null
+++ b/sdk/device/GetGeoLocation_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetGeoLocation forwards the call to dev.CallMethod() then parses the payload of the reply as a GetGeoLocationResponse.
+func Call_GetGeoLocation(ctx context.Context, dev *onvif.Device, request device.GetGeoLocation) (device.GetGeoLocationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetGeoLocationResponse device.GetGeoLocationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetGeoLocationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetGeoLocation")
+ return reply.Body.GetGeoLocationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetHostname_auto.go b/sdk/device/GetHostname_auto.go
new file mode 100644
index 00000000..8cacaa71
--- /dev/null
+++ b/sdk/device/GetHostname_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetHostname forwards the call to dev.CallMethod() then parses the payload of the reply as a GetHostnameResponse.
+func Call_GetHostname(ctx context.Context, dev *onvif.Device, request device.GetHostname) (device.GetHostnameResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetHostnameResponse device.GetHostnameResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetHostnameResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetHostname")
+ return reply.Body.GetHostnameResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetIPAddressFilter_auto.go b/sdk/device/GetIPAddressFilter_auto.go
new file mode 100644
index 00000000..1944bc25
--- /dev/null
+++ b/sdk/device/GetIPAddressFilter_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetIPAddressFilter forwards the call to dev.CallMethod() then parses the payload of the reply as a GetIPAddressFilterResponse.
+func Call_GetIPAddressFilter(ctx context.Context, dev *onvif.Device, request device.GetIPAddressFilter) (device.GetIPAddressFilterResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetIPAddressFilterResponse device.GetIPAddressFilterResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetIPAddressFilterResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetIPAddressFilter")
+ return reply.Body.GetIPAddressFilterResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetNTP_auto.go b/sdk/device/GetNTP_auto.go
new file mode 100644
index 00000000..45b8f5a3
--- /dev/null
+++ b/sdk/device/GetNTP_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetNTP forwards the call to dev.CallMethod() then parses the payload of the reply as a GetNTPResponse.
+func Call_GetNTP(ctx context.Context, dev *onvif.Device, request device.GetNTP) (device.GetNTPResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetNTPResponse device.GetNTPResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetNTPResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetNTP")
+ return reply.Body.GetNTPResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetNetworkDefaultGateway_auto.go b/sdk/device/GetNetworkDefaultGateway_auto.go
new file mode 100644
index 00000000..6b380974
--- /dev/null
+++ b/sdk/device/GetNetworkDefaultGateway_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetNetworkDefaultGateway forwards the call to dev.CallMethod() then parses the payload of the reply as a GetNetworkDefaultGatewayResponse.
+func Call_GetNetworkDefaultGateway(ctx context.Context, dev *onvif.Device, request device.GetNetworkDefaultGateway) (device.GetNetworkDefaultGatewayResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetNetworkDefaultGatewayResponse device.GetNetworkDefaultGatewayResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetNetworkDefaultGatewayResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetNetworkDefaultGateway")
+ return reply.Body.GetNetworkDefaultGatewayResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetNetworkInterfaces_auto.go b/sdk/device/GetNetworkInterfaces_auto.go
new file mode 100644
index 00000000..3b37ca74
--- /dev/null
+++ b/sdk/device/GetNetworkInterfaces_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetNetworkInterfaces forwards the call to dev.CallMethod() then parses the payload of the reply as a GetNetworkInterfacesResponse.
+func Call_GetNetworkInterfaces(ctx context.Context, dev *onvif.Device, request device.GetNetworkInterfaces) (device.GetNetworkInterfacesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetNetworkInterfacesResponse device.GetNetworkInterfacesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetNetworkInterfacesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetNetworkInterfaces")
+ return reply.Body.GetNetworkInterfacesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetNetworkProtocols_auto.go b/sdk/device/GetNetworkProtocols_auto.go
new file mode 100644
index 00000000..0fe53f39
--- /dev/null
+++ b/sdk/device/GetNetworkProtocols_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetNetworkProtocols forwards the call to dev.CallMethod() then parses the payload of the reply as a GetNetworkProtocolsResponse.
+func Call_GetNetworkProtocols(ctx context.Context, dev *onvif.Device, request device.GetNetworkProtocols) (device.GetNetworkProtocolsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetNetworkProtocolsResponse device.GetNetworkProtocolsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetNetworkProtocolsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetNetworkProtocols")
+ return reply.Body.GetNetworkProtocolsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetPkcs10Request_auto.go b/sdk/device/GetPkcs10Request_auto.go
new file mode 100644
index 00000000..b5e78614
--- /dev/null
+++ b/sdk/device/GetPkcs10Request_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetPkcs10Request forwards the call to dev.CallMethod() then parses the payload of the reply as a GetPkcs10RequestResponse.
+func Call_GetPkcs10Request(ctx context.Context, dev *onvif.Device, request device.GetPkcs10Request) (device.GetPkcs10RequestResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetPkcs10RequestResponse device.GetPkcs10RequestResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetPkcs10RequestResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetPkcs10Request")
+ return reply.Body.GetPkcs10RequestResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetRelayOutputs_auto.go b/sdk/device/GetRelayOutputs_auto.go
new file mode 100644
index 00000000..fedd4fe2
--- /dev/null
+++ b/sdk/device/GetRelayOutputs_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetRelayOutputs forwards the call to dev.CallMethod() then parses the payload of the reply as a GetRelayOutputsResponse.
+func Call_GetRelayOutputs(ctx context.Context, dev *onvif.Device, request device.GetRelayOutputs) (device.GetRelayOutputsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetRelayOutputsResponse device.GetRelayOutputsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetRelayOutputsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetRelayOutputs")
+ return reply.Body.GetRelayOutputsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetRemoteDiscoveryMode_auto.go b/sdk/device/GetRemoteDiscoveryMode_auto.go
new file mode 100644
index 00000000..b8d36bb4
--- /dev/null
+++ b/sdk/device/GetRemoteDiscoveryMode_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetRemoteDiscoveryMode forwards the call to dev.CallMethod() then parses the payload of the reply as a GetRemoteDiscoveryModeResponse.
+func Call_GetRemoteDiscoveryMode(ctx context.Context, dev *onvif.Device, request device.GetRemoteDiscoveryMode) (device.GetRemoteDiscoveryModeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetRemoteDiscoveryModeResponse device.GetRemoteDiscoveryModeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetRemoteDiscoveryModeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetRemoteDiscoveryMode")
+ return reply.Body.GetRemoteDiscoveryModeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetRemoteUser_auto.go b/sdk/device/GetRemoteUser_auto.go
new file mode 100644
index 00000000..cc32bd61
--- /dev/null
+++ b/sdk/device/GetRemoteUser_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetRemoteUser forwards the call to dev.CallMethod() then parses the payload of the reply as a GetRemoteUserResponse.
+func Call_GetRemoteUser(ctx context.Context, dev *onvif.Device, request device.GetRemoteUser) (device.GetRemoteUserResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetRemoteUserResponse device.GetRemoteUserResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetRemoteUserResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetRemoteUser")
+ return reply.Body.GetRemoteUserResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetScopes_auto.go b/sdk/device/GetScopes_auto.go
new file mode 100644
index 00000000..c23bf58a
--- /dev/null
+++ b/sdk/device/GetScopes_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetScopes forwards the call to dev.CallMethod() then parses the payload of the reply as a GetScopesResponse.
+func Call_GetScopes(ctx context.Context, dev *onvif.Device, request device.GetScopes) (device.GetScopesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetScopesResponse device.GetScopesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetScopesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetScopes")
+ return reply.Body.GetScopesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetServiceCapabilities_auto.go b/sdk/device/GetServiceCapabilities_auto.go
new file mode 100644
index 00000000..bdbc3900
--- /dev/null
+++ b/sdk/device/GetServiceCapabilities_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetServiceCapabilities forwards the call to dev.CallMethod() then parses the payload of the reply as a GetServiceCapabilitiesResponse.
+func Call_GetServiceCapabilities(ctx context.Context, dev *onvif.Device, request device.GetServiceCapabilities) (device.GetServiceCapabilitiesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetServiceCapabilitiesResponse device.GetServiceCapabilitiesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetServiceCapabilitiesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetServiceCapabilities")
+ return reply.Body.GetServiceCapabilitiesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetServices_auto.go b/sdk/device/GetServices_auto.go
new file mode 100644
index 00000000..15d3593b
--- /dev/null
+++ b/sdk/device/GetServices_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetServices forwards the call to dev.CallMethod() then parses the payload of the reply as a GetServicesResponse.
+func Call_GetServices(ctx context.Context, dev *onvif.Device, request device.GetServices) (device.GetServicesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetServicesResponse device.GetServicesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetServicesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetServices")
+ return reply.Body.GetServicesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetStorageConfiguration_auto.go b/sdk/device/GetStorageConfiguration_auto.go
new file mode 100644
index 00000000..1bdf670d
--- /dev/null
+++ b/sdk/device/GetStorageConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetStorageConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetStorageConfigurationResponse.
+func Call_GetStorageConfiguration(ctx context.Context, dev *onvif.Device, request device.GetStorageConfiguration) (device.GetStorageConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetStorageConfigurationResponse device.GetStorageConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetStorageConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetStorageConfiguration")
+ return reply.Body.GetStorageConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetStorageConfigurations_auto.go b/sdk/device/GetStorageConfigurations_auto.go
new file mode 100644
index 00000000..bb83e062
--- /dev/null
+++ b/sdk/device/GetStorageConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetStorageConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetStorageConfigurationsResponse.
+func Call_GetStorageConfigurations(ctx context.Context, dev *onvif.Device, request device.GetStorageConfigurations) (device.GetStorageConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetStorageConfigurationsResponse device.GetStorageConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetStorageConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetStorageConfigurations")
+ return reply.Body.GetStorageConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetSystemBackup_auto.go b/sdk/device/GetSystemBackup_auto.go
new file mode 100644
index 00000000..773f5097
--- /dev/null
+++ b/sdk/device/GetSystemBackup_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetSystemBackup forwards the call to dev.CallMethod() then parses the payload of the reply as a GetSystemBackupResponse.
+func Call_GetSystemBackup(ctx context.Context, dev *onvif.Device, request device.GetSystemBackup) (device.GetSystemBackupResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetSystemBackupResponse device.GetSystemBackupResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetSystemBackupResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetSystemBackup")
+ return reply.Body.GetSystemBackupResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetSystemDateAndTime_auto.go b/sdk/device/GetSystemDateAndTime_auto.go
new file mode 100644
index 00000000..4f54ea93
--- /dev/null
+++ b/sdk/device/GetSystemDateAndTime_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetSystemDateAndTime forwards the call to dev.CallMethod() then parses the payload of the reply as a GetSystemDateAndTimeResponse.
+func Call_GetSystemDateAndTime(ctx context.Context, dev *onvif.Device, request device.GetSystemDateAndTime) (device.GetSystemDateAndTimeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetSystemDateAndTimeResponse device.GetSystemDateAndTimeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetSystemDateAndTimeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetSystemDateAndTime")
+ return reply.Body.GetSystemDateAndTimeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetSystemLog_auto.go b/sdk/device/GetSystemLog_auto.go
new file mode 100644
index 00000000..40c969aa
--- /dev/null
+++ b/sdk/device/GetSystemLog_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetSystemLog forwards the call to dev.CallMethod() then parses the payload of the reply as a GetSystemLogResponse.
+func Call_GetSystemLog(ctx context.Context, dev *onvif.Device, request device.GetSystemLog) (device.GetSystemLogResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetSystemLogResponse device.GetSystemLogResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetSystemLogResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetSystemLog")
+ return reply.Body.GetSystemLogResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetSystemSupportInformation_auto.go b/sdk/device/GetSystemSupportInformation_auto.go
new file mode 100644
index 00000000..9a9a3965
--- /dev/null
+++ b/sdk/device/GetSystemSupportInformation_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetSystemSupportInformation forwards the call to dev.CallMethod() then parses the payload of the reply as a GetSystemSupportInformationResponse.
+func Call_GetSystemSupportInformation(ctx context.Context, dev *onvif.Device, request device.GetSystemSupportInformation) (device.GetSystemSupportInformationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetSystemSupportInformationResponse device.GetSystemSupportInformationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetSystemSupportInformationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetSystemSupportInformation")
+ return reply.Body.GetSystemSupportInformationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetSystemUris_auto.go b/sdk/device/GetSystemUris_auto.go
new file mode 100644
index 00000000..4a7d2afe
--- /dev/null
+++ b/sdk/device/GetSystemUris_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetSystemUris forwards the call to dev.CallMethod() then parses the payload of the reply as a GetSystemUrisResponse.
+func Call_GetSystemUris(ctx context.Context, dev *onvif.Device, request device.GetSystemUris) (device.GetSystemUrisResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetSystemUrisResponse device.GetSystemUrisResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetSystemUrisResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetSystemUris")
+ return reply.Body.GetSystemUrisResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetUsers_auto.go b/sdk/device/GetUsers_auto.go
new file mode 100644
index 00000000..156d7c9d
--- /dev/null
+++ b/sdk/device/GetUsers_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetUsers forwards the call to dev.CallMethod() then parses the payload of the reply as a GetUsersResponse.
+func Call_GetUsers(ctx context.Context, dev *onvif.Device, request device.GetUsers) (device.GetUsersResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetUsersResponse device.GetUsersResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetUsersResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetUsers")
+ return reply.Body.GetUsersResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetWsdlUrl_auto.go b/sdk/device/GetWsdlUrl_auto.go
new file mode 100644
index 00000000..5f49e100
--- /dev/null
+++ b/sdk/device/GetWsdlUrl_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetWsdlUrl forwards the call to dev.CallMethod() then parses the payload of the reply as a GetWsdlUrlResponse.
+func Call_GetWsdlUrl(ctx context.Context, dev *onvif.Device, request device.GetWsdlUrl) (device.GetWsdlUrlResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetWsdlUrlResponse device.GetWsdlUrlResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetWsdlUrlResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetWsdlUrl")
+ return reply.Body.GetWsdlUrlResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/GetZeroConfiguration_auto.go b/sdk/device/GetZeroConfiguration_auto.go
new file mode 100644
index 00000000..3e011546
--- /dev/null
+++ b/sdk/device/GetZeroConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_GetZeroConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetZeroConfigurationResponse.
+func Call_GetZeroConfiguration(ctx context.Context, dev *onvif.Device, request device.GetZeroConfiguration) (device.GetZeroConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetZeroConfigurationResponse device.GetZeroConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetZeroConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetZeroConfiguration")
+ return reply.Body.GetZeroConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/LoadCACertificates_auto.go b/sdk/device/LoadCACertificates_auto.go
new file mode 100644
index 00000000..6c5aacd6
--- /dev/null
+++ b/sdk/device/LoadCACertificates_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_LoadCACertificates forwards the call to dev.CallMethod() then parses the payload of the reply as a LoadCACertificatesResponse.
+func Call_LoadCACertificates(ctx context.Context, dev *onvif.Device, request device.LoadCACertificates) (device.LoadCACertificatesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ LoadCACertificatesResponse device.LoadCACertificatesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.LoadCACertificatesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "LoadCACertificates")
+ return reply.Body.LoadCACertificatesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/LoadCertificateWithPrivateKey_auto.go b/sdk/device/LoadCertificateWithPrivateKey_auto.go
new file mode 100644
index 00000000..3184f848
--- /dev/null
+++ b/sdk/device/LoadCertificateWithPrivateKey_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_LoadCertificateWithPrivateKey forwards the call to dev.CallMethod() then parses the payload of the reply as a LoadCertificateWithPrivateKeyResponse.
+func Call_LoadCertificateWithPrivateKey(ctx context.Context, dev *onvif.Device, request device.LoadCertificateWithPrivateKey) (device.LoadCertificateWithPrivateKeyResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ LoadCertificateWithPrivateKeyResponse device.LoadCertificateWithPrivateKeyResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.LoadCertificateWithPrivateKeyResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "LoadCertificateWithPrivateKey")
+ return reply.Body.LoadCertificateWithPrivateKeyResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/LoadCertificates_auto.go b/sdk/device/LoadCertificates_auto.go
new file mode 100644
index 00000000..04eb82bb
--- /dev/null
+++ b/sdk/device/LoadCertificates_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_LoadCertificates forwards the call to dev.CallMethod() then parses the payload of the reply as a LoadCertificatesResponse.
+func Call_LoadCertificates(ctx context.Context, dev *onvif.Device, request device.LoadCertificates) (device.LoadCertificatesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ LoadCertificatesResponse device.LoadCertificatesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.LoadCertificatesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "LoadCertificates")
+ return reply.Body.LoadCertificatesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/RemoveIPAddressFilter_auto.go b/sdk/device/RemoveIPAddressFilter_auto.go
new file mode 100644
index 00000000..072f3378
--- /dev/null
+++ b/sdk/device/RemoveIPAddressFilter_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_RemoveIPAddressFilter forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveIPAddressFilterResponse.
+func Call_RemoveIPAddressFilter(ctx context.Context, dev *onvif.Device, request device.RemoveIPAddressFilter) (device.RemoveIPAddressFilterResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveIPAddressFilterResponse device.RemoveIPAddressFilterResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveIPAddressFilterResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveIPAddressFilter")
+ return reply.Body.RemoveIPAddressFilterResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/RemoveScopes_auto.go b/sdk/device/RemoveScopes_auto.go
new file mode 100644
index 00000000..ffcd995e
--- /dev/null
+++ b/sdk/device/RemoveScopes_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_RemoveScopes forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveScopesResponse.
+func Call_RemoveScopes(ctx context.Context, dev *onvif.Device, request device.RemoveScopes) (device.RemoveScopesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveScopesResponse device.RemoveScopesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveScopesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveScopes")
+ return reply.Body.RemoveScopesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/RestoreSystem_auto.go b/sdk/device/RestoreSystem_auto.go
new file mode 100644
index 00000000..00515a0c
--- /dev/null
+++ b/sdk/device/RestoreSystem_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_RestoreSystem forwards the call to dev.CallMethod() then parses the payload of the reply as a RestoreSystemResponse.
+func Call_RestoreSystem(ctx context.Context, dev *onvif.Device, request device.RestoreSystem) (device.RestoreSystemResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RestoreSystemResponse device.RestoreSystemResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RestoreSystemResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RestoreSystem")
+ return reply.Body.RestoreSystemResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/ScanAvailableDot11Networks_auto.go b/sdk/device/ScanAvailableDot11Networks_auto.go
new file mode 100644
index 00000000..7df81bcc
--- /dev/null
+++ b/sdk/device/ScanAvailableDot11Networks_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_ScanAvailableDot11Networks forwards the call to dev.CallMethod() then parses the payload of the reply as a ScanAvailableDot11NetworksResponse.
+func Call_ScanAvailableDot11Networks(ctx context.Context, dev *onvif.Device, request device.ScanAvailableDot11Networks) (device.ScanAvailableDot11NetworksResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ ScanAvailableDot11NetworksResponse device.ScanAvailableDot11NetworksResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.ScanAvailableDot11NetworksResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "ScanAvailableDot11Networks")
+ return reply.Body.ScanAvailableDot11NetworksResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SendAuxiliaryCommand_auto.go b/sdk/device/SendAuxiliaryCommand_auto.go
new file mode 100644
index 00000000..2d24019a
--- /dev/null
+++ b/sdk/device/SendAuxiliaryCommand_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SendAuxiliaryCommand forwards the call to dev.CallMethod() then parses the payload of the reply as a SendAuxiliaryCommandResponse.
+func Call_SendAuxiliaryCommand(ctx context.Context, dev *onvif.Device, request device.SendAuxiliaryCommand) (device.SendAuxiliaryCommandResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SendAuxiliaryCommandResponse device.SendAuxiliaryCommandResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SendAuxiliaryCommandResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SendAuxiliaryCommand")
+ return reply.Body.SendAuxiliaryCommandResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetAccessPolicy_auto.go b/sdk/device/SetAccessPolicy_auto.go
new file mode 100644
index 00000000..922173e8
--- /dev/null
+++ b/sdk/device/SetAccessPolicy_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetAccessPolicy forwards the call to dev.CallMethod() then parses the payload of the reply as a SetAccessPolicyResponse.
+func Call_SetAccessPolicy(ctx context.Context, dev *onvif.Device, request device.SetAccessPolicy) (device.SetAccessPolicyResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetAccessPolicyResponse device.SetAccessPolicyResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetAccessPolicyResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetAccessPolicy")
+ return reply.Body.SetAccessPolicyResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetCertificatesStatus_auto.go b/sdk/device/SetCertificatesStatus_auto.go
new file mode 100644
index 00000000..09be5ac6
--- /dev/null
+++ b/sdk/device/SetCertificatesStatus_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetCertificatesStatus forwards the call to dev.CallMethod() then parses the payload of the reply as a SetCertificatesStatusResponse.
+func Call_SetCertificatesStatus(ctx context.Context, dev *onvif.Device, request device.SetCertificatesStatus) (device.SetCertificatesStatusResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetCertificatesStatusResponse device.SetCertificatesStatusResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetCertificatesStatusResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetCertificatesStatus")
+ return reply.Body.SetCertificatesStatusResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetClientCertificateMode_auto.go b/sdk/device/SetClientCertificateMode_auto.go
new file mode 100644
index 00000000..50fd2165
--- /dev/null
+++ b/sdk/device/SetClientCertificateMode_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetClientCertificateMode forwards the call to dev.CallMethod() then parses the payload of the reply as a SetClientCertificateModeResponse.
+func Call_SetClientCertificateMode(ctx context.Context, dev *onvif.Device, request device.SetClientCertificateMode) (device.SetClientCertificateModeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetClientCertificateModeResponse device.SetClientCertificateModeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetClientCertificateModeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetClientCertificateMode")
+ return reply.Body.SetClientCertificateModeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetDNS_auto.go b/sdk/device/SetDNS_auto.go
new file mode 100644
index 00000000..b4121661
--- /dev/null
+++ b/sdk/device/SetDNS_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetDNS forwards the call to dev.CallMethod() then parses the payload of the reply as a SetDNSResponse.
+func Call_SetDNS(ctx context.Context, dev *onvif.Device, request device.SetDNS) (device.SetDNSResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetDNSResponse device.SetDNSResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetDNSResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetDNS")
+ return reply.Body.SetDNSResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetDiscoveryMode_auto.go b/sdk/device/SetDiscoveryMode_auto.go
new file mode 100644
index 00000000..e5628efd
--- /dev/null
+++ b/sdk/device/SetDiscoveryMode_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetDiscoveryMode forwards the call to dev.CallMethod() then parses the payload of the reply as a SetDiscoveryModeResponse.
+func Call_SetDiscoveryMode(ctx context.Context, dev *onvif.Device, request device.SetDiscoveryMode) (device.SetDiscoveryModeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetDiscoveryModeResponse device.SetDiscoveryModeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetDiscoveryModeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetDiscoveryMode")
+ return reply.Body.SetDiscoveryModeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetDot1XConfiguration_auto.go b/sdk/device/SetDot1XConfiguration_auto.go
new file mode 100644
index 00000000..02fff397
--- /dev/null
+++ b/sdk/device/SetDot1XConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetDot1XConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetDot1XConfigurationResponse.
+func Call_SetDot1XConfiguration(ctx context.Context, dev *onvif.Device, request device.SetDot1XConfiguration) (device.SetDot1XConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetDot1XConfigurationResponse device.SetDot1XConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetDot1XConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetDot1XConfiguration")
+ return reply.Body.SetDot1XConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetDynamicDNS_auto.go b/sdk/device/SetDynamicDNS_auto.go
new file mode 100644
index 00000000..9bf54245
--- /dev/null
+++ b/sdk/device/SetDynamicDNS_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetDynamicDNS forwards the call to dev.CallMethod() then parses the payload of the reply as a SetDynamicDNSResponse.
+func Call_SetDynamicDNS(ctx context.Context, dev *onvif.Device, request device.SetDynamicDNS) (device.SetDynamicDNSResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetDynamicDNSResponse device.SetDynamicDNSResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetDynamicDNSResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetDynamicDNS")
+ return reply.Body.SetDynamicDNSResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetGeoLocation_auto.go b/sdk/device/SetGeoLocation_auto.go
new file mode 100644
index 00000000..165f0f82
--- /dev/null
+++ b/sdk/device/SetGeoLocation_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetGeoLocation forwards the call to dev.CallMethod() then parses the payload of the reply as a SetGeoLocationResponse.
+func Call_SetGeoLocation(ctx context.Context, dev *onvif.Device, request device.SetGeoLocation) (device.SetGeoLocationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetGeoLocationResponse device.SetGeoLocationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetGeoLocationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetGeoLocation")
+ return reply.Body.SetGeoLocationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetHostnameFromDHCP_auto.go b/sdk/device/SetHostnameFromDHCP_auto.go
new file mode 100644
index 00000000..6c206d6b
--- /dev/null
+++ b/sdk/device/SetHostnameFromDHCP_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetHostnameFromDHCP forwards the call to dev.CallMethod() then parses the payload of the reply as a SetHostnameFromDHCPResponse.
+func Call_SetHostnameFromDHCP(ctx context.Context, dev *onvif.Device, request device.SetHostnameFromDHCP) (device.SetHostnameFromDHCPResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetHostnameFromDHCPResponse device.SetHostnameFromDHCPResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetHostnameFromDHCPResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetHostnameFromDHCP")
+ return reply.Body.SetHostnameFromDHCPResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetHostname_auto.go b/sdk/device/SetHostname_auto.go
new file mode 100644
index 00000000..2c16860b
--- /dev/null
+++ b/sdk/device/SetHostname_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetHostname forwards the call to dev.CallMethod() then parses the payload of the reply as a SetHostnameResponse.
+func Call_SetHostname(ctx context.Context, dev *onvif.Device, request device.SetHostname) (device.SetHostnameResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetHostnameResponse device.SetHostnameResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetHostnameResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetHostname")
+ return reply.Body.SetHostnameResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetIPAddressFilter_auto.go b/sdk/device/SetIPAddressFilter_auto.go
new file mode 100644
index 00000000..37203dca
--- /dev/null
+++ b/sdk/device/SetIPAddressFilter_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetIPAddressFilter forwards the call to dev.CallMethod() then parses the payload of the reply as a SetIPAddressFilterResponse.
+func Call_SetIPAddressFilter(ctx context.Context, dev *onvif.Device, request device.SetIPAddressFilter) (device.SetIPAddressFilterResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetIPAddressFilterResponse device.SetIPAddressFilterResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetIPAddressFilterResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetIPAddressFilter")
+ return reply.Body.SetIPAddressFilterResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetNTP_auto.go b/sdk/device/SetNTP_auto.go
new file mode 100644
index 00000000..e33ff4c9
--- /dev/null
+++ b/sdk/device/SetNTP_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetNTP forwards the call to dev.CallMethod() then parses the payload of the reply as a SetNTPResponse.
+func Call_SetNTP(ctx context.Context, dev *onvif.Device, request device.SetNTP) (device.SetNTPResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetNTPResponse device.SetNTPResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetNTPResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetNTP")
+ return reply.Body.SetNTPResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetNetworkDefaultGateway_auto.go b/sdk/device/SetNetworkDefaultGateway_auto.go
new file mode 100644
index 00000000..e56cf811
--- /dev/null
+++ b/sdk/device/SetNetworkDefaultGateway_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetNetworkDefaultGateway forwards the call to dev.CallMethod() then parses the payload of the reply as a SetNetworkDefaultGatewayResponse.
+func Call_SetNetworkDefaultGateway(ctx context.Context, dev *onvif.Device, request device.SetNetworkDefaultGateway) (device.SetNetworkDefaultGatewayResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetNetworkDefaultGatewayResponse device.SetNetworkDefaultGatewayResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetNetworkDefaultGatewayResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetNetworkDefaultGateway")
+ return reply.Body.SetNetworkDefaultGatewayResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetNetworkInterfaces_auto.go b/sdk/device/SetNetworkInterfaces_auto.go
new file mode 100644
index 00000000..09bda76e
--- /dev/null
+++ b/sdk/device/SetNetworkInterfaces_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetNetworkInterfaces forwards the call to dev.CallMethod() then parses the payload of the reply as a SetNetworkInterfacesResponse.
+func Call_SetNetworkInterfaces(ctx context.Context, dev *onvif.Device, request device.SetNetworkInterfaces) (device.SetNetworkInterfacesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetNetworkInterfacesResponse device.SetNetworkInterfacesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetNetworkInterfacesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetNetworkInterfaces")
+ return reply.Body.SetNetworkInterfacesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetNetworkProtocols_auto.go b/sdk/device/SetNetworkProtocols_auto.go
new file mode 100644
index 00000000..a9cc93d4
--- /dev/null
+++ b/sdk/device/SetNetworkProtocols_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetNetworkProtocols forwards the call to dev.CallMethod() then parses the payload of the reply as a SetNetworkProtocolsResponse.
+func Call_SetNetworkProtocols(ctx context.Context, dev *onvif.Device, request device.SetNetworkProtocols) (device.SetNetworkProtocolsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetNetworkProtocolsResponse device.SetNetworkProtocolsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetNetworkProtocolsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetNetworkProtocols")
+ return reply.Body.SetNetworkProtocolsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetRelayOutputSettings_auto.go b/sdk/device/SetRelayOutputSettings_auto.go
new file mode 100644
index 00000000..ded40928
--- /dev/null
+++ b/sdk/device/SetRelayOutputSettings_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetRelayOutputSettings forwards the call to dev.CallMethod() then parses the payload of the reply as a SetRelayOutputSettingsResponse.
+func Call_SetRelayOutputSettings(ctx context.Context, dev *onvif.Device, request device.SetRelayOutputSettings) (device.SetRelayOutputSettingsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetRelayOutputSettingsResponse device.SetRelayOutputSettingsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetRelayOutputSettingsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetRelayOutputSettings")
+ return reply.Body.SetRelayOutputSettingsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetRelayOutputState_auto.go b/sdk/device/SetRelayOutputState_auto.go
new file mode 100644
index 00000000..9a94cab6
--- /dev/null
+++ b/sdk/device/SetRelayOutputState_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetRelayOutputState forwards the call to dev.CallMethod() then parses the payload of the reply as a SetRelayOutputStateResponse.
+func Call_SetRelayOutputState(ctx context.Context, dev *onvif.Device, request device.SetRelayOutputState) (device.SetRelayOutputStateResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetRelayOutputStateResponse device.SetRelayOutputStateResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetRelayOutputStateResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetRelayOutputState")
+ return reply.Body.SetRelayOutputStateResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetRemoteDiscoveryMode_auto.go b/sdk/device/SetRemoteDiscoveryMode_auto.go
new file mode 100644
index 00000000..ce8db585
--- /dev/null
+++ b/sdk/device/SetRemoteDiscoveryMode_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetRemoteDiscoveryMode forwards the call to dev.CallMethod() then parses the payload of the reply as a SetRemoteDiscoveryModeResponse.
+func Call_SetRemoteDiscoveryMode(ctx context.Context, dev *onvif.Device, request device.SetRemoteDiscoveryMode) (device.SetRemoteDiscoveryModeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetRemoteDiscoveryModeResponse device.SetRemoteDiscoveryModeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetRemoteDiscoveryModeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetRemoteDiscoveryMode")
+ return reply.Body.SetRemoteDiscoveryModeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetRemoteUser_auto.go b/sdk/device/SetRemoteUser_auto.go
new file mode 100644
index 00000000..5754ee7d
--- /dev/null
+++ b/sdk/device/SetRemoteUser_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetRemoteUser forwards the call to dev.CallMethod() then parses the payload of the reply as a SetRemoteUserResponse.
+func Call_SetRemoteUser(ctx context.Context, dev *onvif.Device, request device.SetRemoteUser) (device.SetRemoteUserResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetRemoteUserResponse device.SetRemoteUserResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetRemoteUserResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetRemoteUser")
+ return reply.Body.SetRemoteUserResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetScopes_auto.go b/sdk/device/SetScopes_auto.go
new file mode 100644
index 00000000..1acef528
--- /dev/null
+++ b/sdk/device/SetScopes_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetScopes forwards the call to dev.CallMethod() then parses the payload of the reply as a SetScopesResponse.
+func Call_SetScopes(ctx context.Context, dev *onvif.Device, request device.SetScopes) (device.SetScopesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetScopesResponse device.SetScopesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetScopesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetScopes")
+ return reply.Body.SetScopesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetStorageConfiguration_auto.go b/sdk/device/SetStorageConfiguration_auto.go
new file mode 100644
index 00000000..18a508b5
--- /dev/null
+++ b/sdk/device/SetStorageConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetStorageConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetStorageConfigurationResponse.
+func Call_SetStorageConfiguration(ctx context.Context, dev *onvif.Device, request device.SetStorageConfiguration) (device.SetStorageConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetStorageConfigurationResponse device.SetStorageConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetStorageConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetStorageConfiguration")
+ return reply.Body.SetStorageConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetSystemDateAndTime_auto.go b/sdk/device/SetSystemDateAndTime_auto.go
new file mode 100644
index 00000000..71f2535b
--- /dev/null
+++ b/sdk/device/SetSystemDateAndTime_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetSystemDateAndTime forwards the call to dev.CallMethod() then parses the payload of the reply as a SetSystemDateAndTimeResponse.
+func Call_SetSystemDateAndTime(ctx context.Context, dev *onvif.Device, request device.SetSystemDateAndTime) (device.SetSystemDateAndTimeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetSystemDateAndTimeResponse device.SetSystemDateAndTimeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetSystemDateAndTimeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetSystemDateAndTime")
+ return reply.Body.SetSystemDateAndTimeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetSystemFactoryDefault_auto.go b/sdk/device/SetSystemFactoryDefault_auto.go
new file mode 100644
index 00000000..ad15c988
--- /dev/null
+++ b/sdk/device/SetSystemFactoryDefault_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetSystemFactoryDefault forwards the call to dev.CallMethod() then parses the payload of the reply as a SetSystemFactoryDefaultResponse.
+func Call_SetSystemFactoryDefault(ctx context.Context, dev *onvif.Device, request device.SetSystemFactoryDefault) (device.SetSystemFactoryDefaultResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetSystemFactoryDefaultResponse device.SetSystemFactoryDefaultResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetSystemFactoryDefaultResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetSystemFactoryDefault")
+ return reply.Body.SetSystemFactoryDefaultResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetUser_auto.go b/sdk/device/SetUser_auto.go
new file mode 100644
index 00000000..713aa4e1
--- /dev/null
+++ b/sdk/device/SetUser_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetUser forwards the call to dev.CallMethod() then parses the payload of the reply as a SetUserResponse.
+func Call_SetUser(ctx context.Context, dev *onvif.Device, request device.SetUser) (device.SetUserResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetUserResponse device.SetUserResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetUserResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetUser")
+ return reply.Body.SetUserResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SetZeroConfiguration_auto.go b/sdk/device/SetZeroConfiguration_auto.go
new file mode 100644
index 00000000..c4c849ae
--- /dev/null
+++ b/sdk/device/SetZeroConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SetZeroConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetZeroConfigurationResponse.
+func Call_SetZeroConfiguration(ctx context.Context, dev *onvif.Device, request device.SetZeroConfiguration) (device.SetZeroConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetZeroConfigurationResponse device.SetZeroConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetZeroConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetZeroConfiguration")
+ return reply.Body.SetZeroConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/StartFirmwareUpgrade_auto.go b/sdk/device/StartFirmwareUpgrade_auto.go
new file mode 100644
index 00000000..5f04ad95
--- /dev/null
+++ b/sdk/device/StartFirmwareUpgrade_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_StartFirmwareUpgrade forwards the call to dev.CallMethod() then parses the payload of the reply as a StartFirmwareUpgradeResponse.
+func Call_StartFirmwareUpgrade(ctx context.Context, dev *onvif.Device, request device.StartFirmwareUpgrade) (device.StartFirmwareUpgradeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ StartFirmwareUpgradeResponse device.StartFirmwareUpgradeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.StartFirmwareUpgradeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "StartFirmwareUpgrade")
+ return reply.Body.StartFirmwareUpgradeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/StartSystemRestore_auto.go b/sdk/device/StartSystemRestore_auto.go
new file mode 100644
index 00000000..c542e5a5
--- /dev/null
+++ b/sdk/device/StartSystemRestore_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_StartSystemRestore forwards the call to dev.CallMethod() then parses the payload of the reply as a StartSystemRestoreResponse.
+func Call_StartSystemRestore(ctx context.Context, dev *onvif.Device, request device.StartSystemRestore) (device.StartSystemRestoreResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ StartSystemRestoreResponse device.StartSystemRestoreResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.StartSystemRestoreResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "StartSystemRestore")
+ return reply.Body.StartSystemRestoreResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/SystemReboot_auto.go b/sdk/device/SystemReboot_auto.go
new file mode 100644
index 00000000..d9879fd4
--- /dev/null
+++ b/sdk/device/SystemReboot_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_SystemReboot forwards the call to dev.CallMethod() then parses the payload of the reply as a SystemRebootResponse.
+func Call_SystemReboot(ctx context.Context, dev *onvif.Device, request device.SystemReboot) (device.SystemRebootResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SystemRebootResponse device.SystemRebootResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SystemRebootResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SystemReboot")
+ return reply.Body.SystemRebootResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/UpgradeSystemFirmware_auto.go b/sdk/device/UpgradeSystemFirmware_auto.go
new file mode 100644
index 00000000..9fc3b11a
--- /dev/null
+++ b/sdk/device/UpgradeSystemFirmware_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package device
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/device"
+)
+
+// Call_UpgradeSystemFirmware forwards the call to dev.CallMethod() then parses the payload of the reply as a UpgradeSystemFirmwareResponse.
+func Call_UpgradeSystemFirmware(ctx context.Context, dev *onvif.Device, request device.UpgradeSystemFirmware) (device.UpgradeSystemFirmwareResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ UpgradeSystemFirmwareResponse device.UpgradeSystemFirmwareResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.UpgradeSystemFirmwareResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "UpgradeSystemFirmware")
+ return reply.Body.UpgradeSystemFirmwareResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/device/device.go b/sdk/device/device.go
new file mode 100644
index 00000000..e65a6293
--- /dev/null
+++ b/sdk/device/device.go
@@ -0,0 +1,91 @@
+package device
+
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetServices
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetServiceCapabilities
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetDeviceInformation
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetSystemDateAndTime
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetSystemDateAndTime
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetSystemFactoryDefault
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device UpgradeSystemFirmware
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SystemReboot
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device RestoreSystem
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetSystemBackup
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetSystemLog
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetSystemSupportInformation
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetScopes
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetScopes
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device AddScopes
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device RemoveScopes
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetDiscoveryMode
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetDiscoveryMode
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetRemoteDiscoveryMode
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetRemoteDiscoveryMode
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetDPAddresses
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetEndpointReference
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetRemoteUser
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetRemoteUser
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetUsers
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device CreateUsers
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device DeleteUsers
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetUser
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetWsdlUrl
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetCapabilities
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetHostname
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetHostname
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetHostnameFromDHCP
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetDNS
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetDNS
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetNTP
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetNTP
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetDynamicDNS
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetDynamicDNS
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetNetworkInterfaces
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetNetworkInterfaces
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetNetworkProtocols
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetNetworkProtocols
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetNetworkDefaultGateway
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetNetworkDefaultGateway
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetZeroConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetZeroConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetIPAddressFilter
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetIPAddressFilter
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device AddIPAddressFilter
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device RemoveIPAddressFilter
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetAccessPolicy
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetAccessPolicy
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device CreateCertificate
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetCertificates
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetCertificatesStatus
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetCertificatesStatus
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device DeleteCertificates
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetPkcs10Request
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device LoadCertificates
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetClientCertificateMode
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetClientCertificateMode
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetRelayOutputs
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetRelayOutputSettings
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetRelayOutputState
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SendAuxiliaryCommand
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetCACertificates
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device LoadCertificateWithPrivateKey
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetCertificateInformation
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device LoadCACertificates
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device CreateDot1XConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetDot1XConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetDot1XConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetDot1XConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device DeleteDot1XConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetDot11Capabilities
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetDot11Status
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device ScanAvailableDot11Networks
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetSystemUris
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device StartFirmwareUpgrade
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device StartSystemRestore
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetStorageConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device CreateStorageConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetStorageConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetStorageConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device DeleteStorageConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device GetGeoLocation
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device SetGeoLocation
+//go:generate go run github.com/use-go/onvif/sdk/codegen device device DeleteGeoLocation
diff --git a/sdk/event/CreatePullPointSubscription_auto.go b/sdk/event/CreatePullPointSubscription_auto.go
new file mode 100644
index 00000000..b4b70ab5
--- /dev/null
+++ b/sdk/event/CreatePullPointSubscription_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package event
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/event"
+)
+
+// Call_CreatePullPointSubscription forwards the call to dev.CallMethod() then parses the payload of the reply as a CreatePullPointSubscriptionResponse.
+func Call_CreatePullPointSubscription(ctx context.Context, dev *onvif.Device, request event.CreatePullPointSubscription) (event.CreatePullPointSubscriptionResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ CreatePullPointSubscriptionResponse event.CreatePullPointSubscriptionResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.CreatePullPointSubscriptionResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "CreatePullPointSubscription")
+ return reply.Body.CreatePullPointSubscriptionResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/event/GetEventProperties_auto.go b/sdk/event/GetEventProperties_auto.go
new file mode 100644
index 00000000..887e5bdd
--- /dev/null
+++ b/sdk/event/GetEventProperties_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package event
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/event"
+)
+
+// Call_GetEventProperties forwards the call to dev.CallMethod() then parses the payload of the reply as a GetEventPropertiesResponse.
+func Call_GetEventProperties(ctx context.Context, dev *onvif.Device, request event.GetEventProperties) (event.GetEventPropertiesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetEventPropertiesResponse event.GetEventPropertiesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetEventPropertiesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetEventProperties")
+ return reply.Body.GetEventPropertiesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/event/GetServiceCapabilities_auto.go b/sdk/event/GetServiceCapabilities_auto.go
new file mode 100644
index 00000000..fa34bbf9
--- /dev/null
+++ b/sdk/event/GetServiceCapabilities_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package event
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/event"
+)
+
+// Call_GetServiceCapabilities forwards the call to dev.CallMethod() then parses the payload of the reply as a GetServiceCapabilitiesResponse.
+func Call_GetServiceCapabilities(ctx context.Context, dev *onvif.Device, request event.GetServiceCapabilities) (event.GetServiceCapabilitiesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetServiceCapabilitiesResponse event.GetServiceCapabilitiesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetServiceCapabilitiesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetServiceCapabilities")
+ return reply.Body.GetServiceCapabilitiesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/event/Subscribe_auto.go b/sdk/event/Subscribe_auto.go
new file mode 100644
index 00000000..2c5212d9
--- /dev/null
+++ b/sdk/event/Subscribe_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package event
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/event"
+)
+
+// Call_Subscribe forwards the call to dev.CallMethod() then parses the payload of the reply as a SubscribeResponse.
+func Call_Subscribe(ctx context.Context, dev *onvif.Device, request event.Subscribe) (event.SubscribeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SubscribeResponse event.SubscribeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SubscribeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "Subscribe")
+ return reply.Body.SubscribeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/event/Unsubscribe_auto.go b/sdk/event/Unsubscribe_auto.go
new file mode 100644
index 00000000..d7f376b9
--- /dev/null
+++ b/sdk/event/Unsubscribe_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package event
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/event"
+)
+
+// Call_Unsubscribe forwards the call to dev.CallMethod() then parses the payload of the reply as a UnsubscribeResponse.
+func Call_Unsubscribe(ctx context.Context, dev *onvif.Device, request event.Unsubscribe) (event.UnsubscribeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ UnsubscribeResponse event.UnsubscribeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.UnsubscribeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "Unsubscribe")
+ return reply.Body.UnsubscribeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/AddAudioDecoderConfiguration_auto.go b/sdk/media/AddAudioDecoderConfiguration_auto.go
new file mode 100644
index 00000000..87a8088b
--- /dev/null
+++ b/sdk/media/AddAudioDecoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_AddAudioDecoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a AddAudioDecoderConfigurationResponse.
+func Call_AddAudioDecoderConfiguration(ctx context.Context, dev *onvif.Device, request media.AddAudioDecoderConfiguration) (media.AddAudioDecoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddAudioDecoderConfigurationResponse media.AddAudioDecoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddAudioDecoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddAudioDecoderConfiguration")
+ return reply.Body.AddAudioDecoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/AddAudioEncoderConfiguration_auto.go b/sdk/media/AddAudioEncoderConfiguration_auto.go
new file mode 100644
index 00000000..3577280e
--- /dev/null
+++ b/sdk/media/AddAudioEncoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_AddAudioEncoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a AddAudioEncoderConfigurationResponse.
+func Call_AddAudioEncoderConfiguration(ctx context.Context, dev *onvif.Device, request media.AddAudioEncoderConfiguration) (media.AddAudioEncoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddAudioEncoderConfigurationResponse media.AddAudioEncoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddAudioEncoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddAudioEncoderConfiguration")
+ return reply.Body.AddAudioEncoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/AddAudioOutputConfiguration_auto.go b/sdk/media/AddAudioOutputConfiguration_auto.go
new file mode 100644
index 00000000..c403feb8
--- /dev/null
+++ b/sdk/media/AddAudioOutputConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_AddAudioOutputConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a AddAudioOutputConfigurationResponse.
+func Call_AddAudioOutputConfiguration(ctx context.Context, dev *onvif.Device, request media.AddAudioOutputConfiguration) (media.AddAudioOutputConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddAudioOutputConfigurationResponse media.AddAudioOutputConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddAudioOutputConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddAudioOutputConfiguration")
+ return reply.Body.AddAudioOutputConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/AddAudioSourceConfiguration_auto.go b/sdk/media/AddAudioSourceConfiguration_auto.go
new file mode 100644
index 00000000..722d4508
--- /dev/null
+++ b/sdk/media/AddAudioSourceConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_AddAudioSourceConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a AddAudioSourceConfigurationResponse.
+func Call_AddAudioSourceConfiguration(ctx context.Context, dev *onvif.Device, request media.AddAudioSourceConfiguration) (media.AddAudioSourceConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddAudioSourceConfigurationResponse media.AddAudioSourceConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddAudioSourceConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddAudioSourceConfiguration")
+ return reply.Body.AddAudioSourceConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/AddMetadataConfiguration_auto.go b/sdk/media/AddMetadataConfiguration_auto.go
new file mode 100644
index 00000000..c564f4c0
--- /dev/null
+++ b/sdk/media/AddMetadataConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_AddMetadataConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a AddMetadataConfigurationResponse.
+func Call_AddMetadataConfiguration(ctx context.Context, dev *onvif.Device, request media.AddMetadataConfiguration) (media.AddMetadataConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddMetadataConfigurationResponse media.AddMetadataConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddMetadataConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddMetadataConfiguration")
+ return reply.Body.AddMetadataConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/AddPTZConfiguration_auto.go b/sdk/media/AddPTZConfiguration_auto.go
new file mode 100644
index 00000000..bb4cac76
--- /dev/null
+++ b/sdk/media/AddPTZConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_AddPTZConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a AddPTZConfigurationResponse.
+func Call_AddPTZConfiguration(ctx context.Context, dev *onvif.Device, request media.AddPTZConfiguration) (media.AddPTZConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddPTZConfigurationResponse media.AddPTZConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddPTZConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddPTZConfiguration")
+ return reply.Body.AddPTZConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/AddVideoAnalyticsConfiguration_auto.go b/sdk/media/AddVideoAnalyticsConfiguration_auto.go
new file mode 100644
index 00000000..0f09f2d8
--- /dev/null
+++ b/sdk/media/AddVideoAnalyticsConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_AddVideoAnalyticsConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a AddVideoAnalyticsConfigurationResponse.
+func Call_AddVideoAnalyticsConfiguration(ctx context.Context, dev *onvif.Device, request media.AddVideoAnalyticsConfiguration) (media.AddVideoAnalyticsConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddVideoAnalyticsConfigurationResponse media.AddVideoAnalyticsConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddVideoAnalyticsConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddVideoAnalyticsConfiguration")
+ return reply.Body.AddVideoAnalyticsConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/AddVideoEncoderConfiguration_auto.go b/sdk/media/AddVideoEncoderConfiguration_auto.go
new file mode 100644
index 00000000..30354012
--- /dev/null
+++ b/sdk/media/AddVideoEncoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_AddVideoEncoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a AddVideoEncoderConfigurationResponse.
+func Call_AddVideoEncoderConfiguration(ctx context.Context, dev *onvif.Device, request media.AddVideoEncoderConfiguration) (media.AddVideoEncoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddVideoEncoderConfigurationResponse media.AddVideoEncoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddVideoEncoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddVideoEncoderConfiguration")
+ return reply.Body.AddVideoEncoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/AddVideoSourceConfiguration_auto.go b/sdk/media/AddVideoSourceConfiguration_auto.go
new file mode 100644
index 00000000..fd4654f2
--- /dev/null
+++ b/sdk/media/AddVideoSourceConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_AddVideoSourceConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a AddVideoSourceConfigurationResponse.
+func Call_AddVideoSourceConfiguration(ctx context.Context, dev *onvif.Device, request media.AddVideoSourceConfiguration) (media.AddVideoSourceConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AddVideoSourceConfigurationResponse media.AddVideoSourceConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AddVideoSourceConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AddVideoSourceConfiguration")
+ return reply.Body.AddVideoSourceConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/CreateOSD_auto.go b/sdk/media/CreateOSD_auto.go
new file mode 100644
index 00000000..642e1b5e
--- /dev/null
+++ b/sdk/media/CreateOSD_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_CreateOSD forwards the call to dev.CallMethod() then parses the payload of the reply as a CreateOSDResponse.
+func Call_CreateOSD(ctx context.Context, dev *onvif.Device, request media.CreateOSD) (media.CreateOSDResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ CreateOSDResponse media.CreateOSDResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.CreateOSDResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "CreateOSD")
+ return reply.Body.CreateOSDResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/CreateProfile_auto.go b/sdk/media/CreateProfile_auto.go
new file mode 100644
index 00000000..a0090806
--- /dev/null
+++ b/sdk/media/CreateProfile_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_CreateProfile forwards the call to dev.CallMethod() then parses the payload of the reply as a CreateProfileResponse.
+func Call_CreateProfile(ctx context.Context, dev *onvif.Device, request media.CreateProfile) (media.CreateProfileResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ CreateProfileResponse media.CreateProfileResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.CreateProfileResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "CreateProfile")
+ return reply.Body.CreateProfileResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/DeleteOSD_auto.go b/sdk/media/DeleteOSD_auto.go
new file mode 100644
index 00000000..5510d74f
--- /dev/null
+++ b/sdk/media/DeleteOSD_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_DeleteOSD forwards the call to dev.CallMethod() then parses the payload of the reply as a DeleteOSDResponse.
+func Call_DeleteOSD(ctx context.Context, dev *onvif.Device, request media.DeleteOSD) (media.DeleteOSDResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ DeleteOSDResponse media.DeleteOSDResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.DeleteOSDResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "DeleteOSD")
+ return reply.Body.DeleteOSDResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/DeleteProfile_auto.go b/sdk/media/DeleteProfile_auto.go
new file mode 100644
index 00000000..f59cd186
--- /dev/null
+++ b/sdk/media/DeleteProfile_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_DeleteProfile forwards the call to dev.CallMethod() then parses the payload of the reply as a DeleteProfileResponse.
+func Call_DeleteProfile(ctx context.Context, dev *onvif.Device, request media.DeleteProfile) (media.DeleteProfileResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ DeleteProfileResponse media.DeleteProfileResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.DeleteProfileResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "DeleteProfile")
+ return reply.Body.DeleteProfileResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioDecoderConfigurationOptions_auto.go b/sdk/media/GetAudioDecoderConfigurationOptions_auto.go
new file mode 100644
index 00000000..66686109
--- /dev/null
+++ b/sdk/media/GetAudioDecoderConfigurationOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioDecoderConfigurationOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioDecoderConfigurationOptionsResponse.
+func Call_GetAudioDecoderConfigurationOptions(ctx context.Context, dev *onvif.Device, request media.GetAudioDecoderConfigurationOptions) (media.GetAudioDecoderConfigurationOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioDecoderConfigurationOptionsResponse media.GetAudioDecoderConfigurationOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioDecoderConfigurationOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioDecoderConfigurationOptions")
+ return reply.Body.GetAudioDecoderConfigurationOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioDecoderConfiguration_auto.go b/sdk/media/GetAudioDecoderConfiguration_auto.go
new file mode 100644
index 00000000..c93726bc
--- /dev/null
+++ b/sdk/media/GetAudioDecoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioDecoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioDecoderConfigurationResponse.
+func Call_GetAudioDecoderConfiguration(ctx context.Context, dev *onvif.Device, request media.GetAudioDecoderConfiguration) (media.GetAudioDecoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioDecoderConfigurationResponse media.GetAudioDecoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioDecoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioDecoderConfiguration")
+ return reply.Body.GetAudioDecoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioDecoderConfigurations_auto.go b/sdk/media/GetAudioDecoderConfigurations_auto.go
new file mode 100644
index 00000000..b71c20f9
--- /dev/null
+++ b/sdk/media/GetAudioDecoderConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioDecoderConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioDecoderConfigurationsResponse.
+func Call_GetAudioDecoderConfigurations(ctx context.Context, dev *onvif.Device, request media.GetAudioDecoderConfigurations) (media.GetAudioDecoderConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioDecoderConfigurationsResponse media.GetAudioDecoderConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioDecoderConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioDecoderConfigurations")
+ return reply.Body.GetAudioDecoderConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioEncoderConfigurationOptions_auto.go b/sdk/media/GetAudioEncoderConfigurationOptions_auto.go
new file mode 100644
index 00000000..0e4941b7
--- /dev/null
+++ b/sdk/media/GetAudioEncoderConfigurationOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioEncoderConfigurationOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioEncoderConfigurationOptionsResponse.
+func Call_GetAudioEncoderConfigurationOptions(ctx context.Context, dev *onvif.Device, request media.GetAudioEncoderConfigurationOptions) (media.GetAudioEncoderConfigurationOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioEncoderConfigurationOptionsResponse media.GetAudioEncoderConfigurationOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioEncoderConfigurationOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioEncoderConfigurationOptions")
+ return reply.Body.GetAudioEncoderConfigurationOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioEncoderConfiguration_auto.go b/sdk/media/GetAudioEncoderConfiguration_auto.go
new file mode 100644
index 00000000..6dd6d33a
--- /dev/null
+++ b/sdk/media/GetAudioEncoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioEncoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioEncoderConfigurationResponse.
+func Call_GetAudioEncoderConfiguration(ctx context.Context, dev *onvif.Device, request media.GetAudioEncoderConfiguration) (media.GetAudioEncoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioEncoderConfigurationResponse media.GetAudioEncoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioEncoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioEncoderConfiguration")
+ return reply.Body.GetAudioEncoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioEncoderConfigurations_auto.go b/sdk/media/GetAudioEncoderConfigurations_auto.go
new file mode 100644
index 00000000..b73f05b2
--- /dev/null
+++ b/sdk/media/GetAudioEncoderConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioEncoderConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioEncoderConfigurationsResponse.
+func Call_GetAudioEncoderConfigurations(ctx context.Context, dev *onvif.Device, request media.GetAudioEncoderConfigurations) (media.GetAudioEncoderConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioEncoderConfigurationsResponse media.GetAudioEncoderConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioEncoderConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioEncoderConfigurations")
+ return reply.Body.GetAudioEncoderConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioOutputConfigurationOptions_auto.go b/sdk/media/GetAudioOutputConfigurationOptions_auto.go
new file mode 100644
index 00000000..d4f825f9
--- /dev/null
+++ b/sdk/media/GetAudioOutputConfigurationOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioOutputConfigurationOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioOutputConfigurationOptionsResponse.
+func Call_GetAudioOutputConfigurationOptions(ctx context.Context, dev *onvif.Device, request media.GetAudioOutputConfigurationOptions) (media.GetAudioOutputConfigurationOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioOutputConfigurationOptionsResponse media.GetAudioOutputConfigurationOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioOutputConfigurationOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioOutputConfigurationOptions")
+ return reply.Body.GetAudioOutputConfigurationOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioOutputConfiguration_auto.go b/sdk/media/GetAudioOutputConfiguration_auto.go
new file mode 100644
index 00000000..3298318c
--- /dev/null
+++ b/sdk/media/GetAudioOutputConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioOutputConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioOutputConfigurationResponse.
+func Call_GetAudioOutputConfiguration(ctx context.Context, dev *onvif.Device, request media.GetAudioOutputConfiguration) (media.GetAudioOutputConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioOutputConfigurationResponse media.GetAudioOutputConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioOutputConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioOutputConfiguration")
+ return reply.Body.GetAudioOutputConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioOutputConfigurations_auto.go b/sdk/media/GetAudioOutputConfigurations_auto.go
new file mode 100644
index 00000000..31c7895e
--- /dev/null
+++ b/sdk/media/GetAudioOutputConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioOutputConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioOutputConfigurationsResponse.
+func Call_GetAudioOutputConfigurations(ctx context.Context, dev *onvif.Device, request media.GetAudioOutputConfigurations) (media.GetAudioOutputConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioOutputConfigurationsResponse media.GetAudioOutputConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioOutputConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioOutputConfigurations")
+ return reply.Body.GetAudioOutputConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioOutputs_auto.go b/sdk/media/GetAudioOutputs_auto.go
new file mode 100644
index 00000000..0bc2f9e4
--- /dev/null
+++ b/sdk/media/GetAudioOutputs_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioOutputs forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioOutputsResponse.
+func Call_GetAudioOutputs(ctx context.Context, dev *onvif.Device, request media.GetAudioOutputs) (media.GetAudioOutputsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioOutputsResponse media.GetAudioOutputsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioOutputsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioOutputs")
+ return reply.Body.GetAudioOutputsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioSourceConfigurationOptions_auto.go b/sdk/media/GetAudioSourceConfigurationOptions_auto.go
new file mode 100644
index 00000000..77317da3
--- /dev/null
+++ b/sdk/media/GetAudioSourceConfigurationOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioSourceConfigurationOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioSourceConfigurationOptionsResponse.
+func Call_GetAudioSourceConfigurationOptions(ctx context.Context, dev *onvif.Device, request media.GetAudioSourceConfigurationOptions) (media.GetAudioSourceConfigurationOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioSourceConfigurationOptionsResponse media.GetAudioSourceConfigurationOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioSourceConfigurationOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioSourceConfigurationOptions")
+ return reply.Body.GetAudioSourceConfigurationOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioSourceConfiguration_auto.go b/sdk/media/GetAudioSourceConfiguration_auto.go
new file mode 100644
index 00000000..56f97692
--- /dev/null
+++ b/sdk/media/GetAudioSourceConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioSourceConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioSourceConfigurationResponse.
+func Call_GetAudioSourceConfiguration(ctx context.Context, dev *onvif.Device, request media.GetAudioSourceConfiguration) (media.GetAudioSourceConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioSourceConfigurationResponse media.GetAudioSourceConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioSourceConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioSourceConfiguration")
+ return reply.Body.GetAudioSourceConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioSourceConfigurations_auto.go b/sdk/media/GetAudioSourceConfigurations_auto.go
new file mode 100644
index 00000000..244a2bfe
--- /dev/null
+++ b/sdk/media/GetAudioSourceConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioSourceConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioSourceConfigurationsResponse.
+func Call_GetAudioSourceConfigurations(ctx context.Context, dev *onvif.Device, request media.GetAudioSourceConfigurations) (media.GetAudioSourceConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioSourceConfigurationsResponse media.GetAudioSourceConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioSourceConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioSourceConfigurations")
+ return reply.Body.GetAudioSourceConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetAudioSources_auto.go b/sdk/media/GetAudioSources_auto.go
new file mode 100644
index 00000000..14ae3b45
--- /dev/null
+++ b/sdk/media/GetAudioSources_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetAudioSources forwards the call to dev.CallMethod() then parses the payload of the reply as a GetAudioSourcesResponse.
+func Call_GetAudioSources(ctx context.Context, dev *onvif.Device, request media.GetAudioSources) (media.GetAudioSourcesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetAudioSourcesResponse media.GetAudioSourcesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetAudioSourcesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetAudioSources")
+ return reply.Body.GetAudioSourcesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetCompatibleAudioDecoderConfigurations_auto.go b/sdk/media/GetCompatibleAudioDecoderConfigurations_auto.go
new file mode 100644
index 00000000..bb826997
--- /dev/null
+++ b/sdk/media/GetCompatibleAudioDecoderConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetCompatibleAudioDecoderConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCompatibleAudioDecoderConfigurationsResponse.
+func Call_GetCompatibleAudioDecoderConfigurations(ctx context.Context, dev *onvif.Device, request media.GetCompatibleAudioDecoderConfigurations) (media.GetCompatibleAudioDecoderConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCompatibleAudioDecoderConfigurationsResponse media.GetCompatibleAudioDecoderConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCompatibleAudioDecoderConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCompatibleAudioDecoderConfigurations")
+ return reply.Body.GetCompatibleAudioDecoderConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetCompatibleAudioEncoderConfigurations_auto.go b/sdk/media/GetCompatibleAudioEncoderConfigurations_auto.go
new file mode 100644
index 00000000..9925115f
--- /dev/null
+++ b/sdk/media/GetCompatibleAudioEncoderConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetCompatibleAudioEncoderConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCompatibleAudioEncoderConfigurationsResponse.
+func Call_GetCompatibleAudioEncoderConfigurations(ctx context.Context, dev *onvif.Device, request media.GetCompatibleAudioEncoderConfigurations) (media.GetCompatibleAudioEncoderConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCompatibleAudioEncoderConfigurationsResponse media.GetCompatibleAudioEncoderConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCompatibleAudioEncoderConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCompatibleAudioEncoderConfigurations")
+ return reply.Body.GetCompatibleAudioEncoderConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetCompatibleAudioOutputConfigurations_auto.go b/sdk/media/GetCompatibleAudioOutputConfigurations_auto.go
new file mode 100644
index 00000000..6f70ed50
--- /dev/null
+++ b/sdk/media/GetCompatibleAudioOutputConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetCompatibleAudioOutputConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCompatibleAudioOutputConfigurationsResponse.
+func Call_GetCompatibleAudioOutputConfigurations(ctx context.Context, dev *onvif.Device, request media.GetCompatibleAudioOutputConfigurations) (media.GetCompatibleAudioOutputConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCompatibleAudioOutputConfigurationsResponse media.GetCompatibleAudioOutputConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCompatibleAudioOutputConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCompatibleAudioOutputConfigurations")
+ return reply.Body.GetCompatibleAudioOutputConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetCompatibleAudioSourceConfigurations_auto.go b/sdk/media/GetCompatibleAudioSourceConfigurations_auto.go
new file mode 100644
index 00000000..3957c412
--- /dev/null
+++ b/sdk/media/GetCompatibleAudioSourceConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetCompatibleAudioSourceConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCompatibleAudioSourceConfigurationsResponse.
+func Call_GetCompatibleAudioSourceConfigurations(ctx context.Context, dev *onvif.Device, request media.GetCompatibleAudioSourceConfigurations) (media.GetCompatibleAudioSourceConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCompatibleAudioSourceConfigurationsResponse media.GetCompatibleAudioSourceConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCompatibleAudioSourceConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCompatibleAudioSourceConfigurations")
+ return reply.Body.GetCompatibleAudioSourceConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetCompatibleMetadataConfigurations_auto.go b/sdk/media/GetCompatibleMetadataConfigurations_auto.go
new file mode 100644
index 00000000..44db0ce0
--- /dev/null
+++ b/sdk/media/GetCompatibleMetadataConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetCompatibleMetadataConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCompatibleMetadataConfigurationsResponse.
+func Call_GetCompatibleMetadataConfigurations(ctx context.Context, dev *onvif.Device, request media.GetCompatibleMetadataConfigurations) (media.GetCompatibleMetadataConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCompatibleMetadataConfigurationsResponse media.GetCompatibleMetadataConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCompatibleMetadataConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCompatibleMetadataConfigurations")
+ return reply.Body.GetCompatibleMetadataConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetCompatibleVideoAnalyticsConfigurations_auto.go b/sdk/media/GetCompatibleVideoAnalyticsConfigurations_auto.go
new file mode 100644
index 00000000..3921387f
--- /dev/null
+++ b/sdk/media/GetCompatibleVideoAnalyticsConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetCompatibleVideoAnalyticsConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCompatibleVideoAnalyticsConfigurationsResponse.
+func Call_GetCompatibleVideoAnalyticsConfigurations(ctx context.Context, dev *onvif.Device, request media.GetCompatibleVideoAnalyticsConfigurations) (media.GetCompatibleVideoAnalyticsConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCompatibleVideoAnalyticsConfigurationsResponse media.GetCompatibleVideoAnalyticsConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCompatibleVideoAnalyticsConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCompatibleVideoAnalyticsConfigurations")
+ return reply.Body.GetCompatibleVideoAnalyticsConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetCompatibleVideoEncoderConfigurations_auto.go b/sdk/media/GetCompatibleVideoEncoderConfigurations_auto.go
new file mode 100644
index 00000000..8fd3aafd
--- /dev/null
+++ b/sdk/media/GetCompatibleVideoEncoderConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetCompatibleVideoEncoderConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCompatibleVideoEncoderConfigurationsResponse.
+func Call_GetCompatibleVideoEncoderConfigurations(ctx context.Context, dev *onvif.Device, request media.GetCompatibleVideoEncoderConfigurations) (media.GetCompatibleVideoEncoderConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCompatibleVideoEncoderConfigurationsResponse media.GetCompatibleVideoEncoderConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCompatibleVideoEncoderConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCompatibleVideoEncoderConfigurations")
+ return reply.Body.GetCompatibleVideoEncoderConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetCompatibleVideoSourceConfigurations_auto.go b/sdk/media/GetCompatibleVideoSourceConfigurations_auto.go
new file mode 100644
index 00000000..75539caa
--- /dev/null
+++ b/sdk/media/GetCompatibleVideoSourceConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetCompatibleVideoSourceConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCompatibleVideoSourceConfigurationsResponse.
+func Call_GetCompatibleVideoSourceConfigurations(ctx context.Context, dev *onvif.Device, request media.GetCompatibleVideoSourceConfigurations) (media.GetCompatibleVideoSourceConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCompatibleVideoSourceConfigurationsResponse media.GetCompatibleVideoSourceConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCompatibleVideoSourceConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCompatibleVideoSourceConfigurations")
+ return reply.Body.GetCompatibleVideoSourceConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetGuaranteedNumberOfVideoEncoderInstances_auto.go b/sdk/media/GetGuaranteedNumberOfVideoEncoderInstances_auto.go
new file mode 100644
index 00000000..f4559f43
--- /dev/null
+++ b/sdk/media/GetGuaranteedNumberOfVideoEncoderInstances_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetGuaranteedNumberOfVideoEncoderInstances forwards the call to dev.CallMethod() then parses the payload of the reply as a GetGuaranteedNumberOfVideoEncoderInstancesResponse.
+func Call_GetGuaranteedNumberOfVideoEncoderInstances(ctx context.Context, dev *onvif.Device, request media.GetGuaranteedNumberOfVideoEncoderInstances) (media.GetGuaranteedNumberOfVideoEncoderInstancesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetGuaranteedNumberOfVideoEncoderInstancesResponse media.GetGuaranteedNumberOfVideoEncoderInstancesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetGuaranteedNumberOfVideoEncoderInstancesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetGuaranteedNumberOfVideoEncoderInstances")
+ return reply.Body.GetGuaranteedNumberOfVideoEncoderInstancesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetMetadataConfigurationOptions_auto.go b/sdk/media/GetMetadataConfigurationOptions_auto.go
new file mode 100644
index 00000000..4be77470
--- /dev/null
+++ b/sdk/media/GetMetadataConfigurationOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetMetadataConfigurationOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetMetadataConfigurationOptionsResponse.
+func Call_GetMetadataConfigurationOptions(ctx context.Context, dev *onvif.Device, request media.GetMetadataConfigurationOptions) (media.GetMetadataConfigurationOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetMetadataConfigurationOptionsResponse media.GetMetadataConfigurationOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetMetadataConfigurationOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetMetadataConfigurationOptions")
+ return reply.Body.GetMetadataConfigurationOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetMetadataConfiguration_auto.go b/sdk/media/GetMetadataConfiguration_auto.go
new file mode 100644
index 00000000..1c78949a
--- /dev/null
+++ b/sdk/media/GetMetadataConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetMetadataConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetMetadataConfigurationResponse.
+func Call_GetMetadataConfiguration(ctx context.Context, dev *onvif.Device, request media.GetMetadataConfiguration) (media.GetMetadataConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetMetadataConfigurationResponse media.GetMetadataConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetMetadataConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetMetadataConfiguration")
+ return reply.Body.GetMetadataConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetMetadataConfigurations_auto.go b/sdk/media/GetMetadataConfigurations_auto.go
new file mode 100644
index 00000000..34358814
--- /dev/null
+++ b/sdk/media/GetMetadataConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetMetadataConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetMetadataConfigurationsResponse.
+func Call_GetMetadataConfigurations(ctx context.Context, dev *onvif.Device, request media.GetMetadataConfigurations) (media.GetMetadataConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetMetadataConfigurationsResponse media.GetMetadataConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetMetadataConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetMetadataConfigurations")
+ return reply.Body.GetMetadataConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetOSDOptions_auto.go b/sdk/media/GetOSDOptions_auto.go
new file mode 100644
index 00000000..fa56d2ef
--- /dev/null
+++ b/sdk/media/GetOSDOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetOSDOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetOSDOptionsResponse.
+func Call_GetOSDOptions(ctx context.Context, dev *onvif.Device, request media.GetOSDOptions) (media.GetOSDOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetOSDOptionsResponse media.GetOSDOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetOSDOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetOSDOptions")
+ return reply.Body.GetOSDOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetOSD_auto.go b/sdk/media/GetOSD_auto.go
new file mode 100644
index 00000000..4bbe7d5e
--- /dev/null
+++ b/sdk/media/GetOSD_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetOSD forwards the call to dev.CallMethod() then parses the payload of the reply as a GetOSDResponse.
+func Call_GetOSD(ctx context.Context, dev *onvif.Device, request media.GetOSD) (media.GetOSDResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetOSDResponse media.GetOSDResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetOSDResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetOSD")
+ return reply.Body.GetOSDResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetOSDs_auto.go b/sdk/media/GetOSDs_auto.go
new file mode 100644
index 00000000..89c461fb
--- /dev/null
+++ b/sdk/media/GetOSDs_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetOSDs forwards the call to dev.CallMethod() then parses the payload of the reply as a GetOSDsResponse.
+func Call_GetOSDs(ctx context.Context, dev *onvif.Device, request media.GetOSDs) (media.GetOSDsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetOSDsResponse media.GetOSDsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetOSDsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetOSDs")
+ return reply.Body.GetOSDsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetProfile_auto.go b/sdk/media/GetProfile_auto.go
new file mode 100644
index 00000000..ca026e48
--- /dev/null
+++ b/sdk/media/GetProfile_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetProfile forwards the call to dev.CallMethod() then parses the payload of the reply as a GetProfileResponse.
+func Call_GetProfile(ctx context.Context, dev *onvif.Device, request media.GetProfile) (media.GetProfileResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetProfileResponse media.GetProfileResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetProfileResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetProfile")
+ return reply.Body.GetProfileResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetProfiles_auto.go b/sdk/media/GetProfiles_auto.go
new file mode 100644
index 00000000..0100f554
--- /dev/null
+++ b/sdk/media/GetProfiles_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetProfiles forwards the call to dev.CallMethod() then parses the payload of the reply as a GetProfilesResponse.
+func Call_GetProfiles(ctx context.Context, dev *onvif.Device, request media.GetProfiles) (media.GetProfilesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetProfilesResponse media.GetProfilesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetProfilesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetProfiles")
+ return reply.Body.GetProfilesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetServiceCapabilities_auto.go b/sdk/media/GetServiceCapabilities_auto.go
new file mode 100644
index 00000000..eca9ae19
--- /dev/null
+++ b/sdk/media/GetServiceCapabilities_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetServiceCapabilities forwards the call to dev.CallMethod() then parses the payload of the reply as a GetServiceCapabilitiesResponse.
+func Call_GetServiceCapabilities(ctx context.Context, dev *onvif.Device, request media.GetServiceCapabilities) (media.GetServiceCapabilitiesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetServiceCapabilitiesResponse media.GetServiceCapabilitiesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetServiceCapabilitiesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetServiceCapabilities")
+ return reply.Body.GetServiceCapabilitiesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetSnapshotUri_auto.go b/sdk/media/GetSnapshotUri_auto.go
new file mode 100644
index 00000000..54a68c7a
--- /dev/null
+++ b/sdk/media/GetSnapshotUri_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetSnapshotUri forwards the call to dev.CallMethod() then parses the payload of the reply as a GetSnapshotUriResponse.
+func Call_GetSnapshotUri(ctx context.Context, dev *onvif.Device, request media.GetSnapshotUri) (media.GetSnapshotUriResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetSnapshotUriResponse media.GetSnapshotUriResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetSnapshotUriResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetSnapshotUri")
+ return reply.Body.GetSnapshotUriResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetStreamUri_auto.go b/sdk/media/GetStreamUri_auto.go
new file mode 100644
index 00000000..1ecfc426
--- /dev/null
+++ b/sdk/media/GetStreamUri_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetStreamUri forwards the call to dev.CallMethod() then parses the payload of the reply as a GetStreamUriResponse.
+func Call_GetStreamUri(ctx context.Context, dev *onvif.Device, request media.GetStreamUri) (media.GetStreamUriResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetStreamUriResponse media.GetStreamUriResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetStreamUriResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetStreamUri")
+ return reply.Body.GetStreamUriResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoAnalyticsConfiguration_auto.go b/sdk/media/GetVideoAnalyticsConfiguration_auto.go
new file mode 100644
index 00000000..cfc49f20
--- /dev/null
+++ b/sdk/media/GetVideoAnalyticsConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoAnalyticsConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoAnalyticsConfigurationResponse.
+func Call_GetVideoAnalyticsConfiguration(ctx context.Context, dev *onvif.Device, request media.GetVideoAnalyticsConfiguration) (media.GetVideoAnalyticsConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoAnalyticsConfigurationResponse media.GetVideoAnalyticsConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoAnalyticsConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoAnalyticsConfiguration")
+ return reply.Body.GetVideoAnalyticsConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoAnalyticsConfigurations_auto.go b/sdk/media/GetVideoAnalyticsConfigurations_auto.go
new file mode 100644
index 00000000..74fc35b1
--- /dev/null
+++ b/sdk/media/GetVideoAnalyticsConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoAnalyticsConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoAnalyticsConfigurationsResponse.
+func Call_GetVideoAnalyticsConfigurations(ctx context.Context, dev *onvif.Device, request media.GetVideoAnalyticsConfigurations) (media.GetVideoAnalyticsConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoAnalyticsConfigurationsResponse media.GetVideoAnalyticsConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoAnalyticsConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoAnalyticsConfigurations")
+ return reply.Body.GetVideoAnalyticsConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoEncoderConfigurationOptions_auto.go b/sdk/media/GetVideoEncoderConfigurationOptions_auto.go
new file mode 100644
index 00000000..cd1cc41b
--- /dev/null
+++ b/sdk/media/GetVideoEncoderConfigurationOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoEncoderConfigurationOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoEncoderConfigurationOptionsResponse.
+func Call_GetVideoEncoderConfigurationOptions(ctx context.Context, dev *onvif.Device, request media.GetVideoEncoderConfigurationOptions) (media.GetVideoEncoderConfigurationOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoEncoderConfigurationOptionsResponse media.GetVideoEncoderConfigurationOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoEncoderConfigurationOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoEncoderConfigurationOptions")
+ return reply.Body.GetVideoEncoderConfigurationOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoEncoderConfiguration_auto.go b/sdk/media/GetVideoEncoderConfiguration_auto.go
new file mode 100644
index 00000000..bcbb4e2b
--- /dev/null
+++ b/sdk/media/GetVideoEncoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoEncoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoEncoderConfigurationResponse.
+func Call_GetVideoEncoderConfiguration(ctx context.Context, dev *onvif.Device, request media.GetVideoEncoderConfiguration) (media.GetVideoEncoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoEncoderConfigurationResponse media.GetVideoEncoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoEncoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoEncoderConfiguration")
+ return reply.Body.GetVideoEncoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoEncoderConfigurations_auto.go b/sdk/media/GetVideoEncoderConfigurations_auto.go
new file mode 100644
index 00000000..0b8a128c
--- /dev/null
+++ b/sdk/media/GetVideoEncoderConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoEncoderConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoEncoderConfigurationsResponse.
+func Call_GetVideoEncoderConfigurations(ctx context.Context, dev *onvif.Device, request media.GetVideoEncoderConfigurations) (media.GetVideoEncoderConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoEncoderConfigurationsResponse media.GetVideoEncoderConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoEncoderConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoEncoderConfigurations")
+ return reply.Body.GetVideoEncoderConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoSourceConfigurationOptions_auto.go b/sdk/media/GetVideoSourceConfigurationOptions_auto.go
new file mode 100644
index 00000000..ec3f70dc
--- /dev/null
+++ b/sdk/media/GetVideoSourceConfigurationOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoSourceConfigurationOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoSourceConfigurationOptionsResponse.
+func Call_GetVideoSourceConfigurationOptions(ctx context.Context, dev *onvif.Device, request media.GetVideoSourceConfigurationOptions) (media.GetVideoSourceConfigurationOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoSourceConfigurationOptionsResponse media.GetVideoSourceConfigurationOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoSourceConfigurationOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoSourceConfigurationOptions")
+ return reply.Body.GetVideoSourceConfigurationOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoSourceConfiguration_auto.go b/sdk/media/GetVideoSourceConfiguration_auto.go
new file mode 100644
index 00000000..336bbdcf
--- /dev/null
+++ b/sdk/media/GetVideoSourceConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoSourceConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoSourceConfigurationResponse.
+func Call_GetVideoSourceConfiguration(ctx context.Context, dev *onvif.Device, request media.GetVideoSourceConfiguration) (media.GetVideoSourceConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoSourceConfigurationResponse media.GetVideoSourceConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoSourceConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoSourceConfiguration")
+ return reply.Body.GetVideoSourceConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoSourceConfigurations_auto.go b/sdk/media/GetVideoSourceConfigurations_auto.go
new file mode 100644
index 00000000..9a939465
--- /dev/null
+++ b/sdk/media/GetVideoSourceConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoSourceConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoSourceConfigurationsResponse.
+func Call_GetVideoSourceConfigurations(ctx context.Context, dev *onvif.Device, request media.GetVideoSourceConfigurations) (media.GetVideoSourceConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoSourceConfigurationsResponse media.GetVideoSourceConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoSourceConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoSourceConfigurations")
+ return reply.Body.GetVideoSourceConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoSourceModes_auto.go b/sdk/media/GetVideoSourceModes_auto.go
new file mode 100644
index 00000000..052e392b
--- /dev/null
+++ b/sdk/media/GetVideoSourceModes_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoSourceModes forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoSourceModesResponse.
+func Call_GetVideoSourceModes(ctx context.Context, dev *onvif.Device, request media.GetVideoSourceModes) (media.GetVideoSourceModesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoSourceModesResponse media.GetVideoSourceModesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoSourceModesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoSourceModes")
+ return reply.Body.GetVideoSourceModesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/GetVideoSources_auto.go b/sdk/media/GetVideoSources_auto.go
new file mode 100644
index 00000000..c683fd83
--- /dev/null
+++ b/sdk/media/GetVideoSources_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_GetVideoSources forwards the call to dev.CallMethod() then parses the payload of the reply as a GetVideoSourcesResponse.
+func Call_GetVideoSources(ctx context.Context, dev *onvif.Device, request media.GetVideoSources) (media.GetVideoSourcesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetVideoSourcesResponse media.GetVideoSourcesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetVideoSourcesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetVideoSources")
+ return reply.Body.GetVideoSourcesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/RemoveAudioDecoderConfiguration_auto.go b/sdk/media/RemoveAudioDecoderConfiguration_auto.go
new file mode 100644
index 00000000..aff1a8a5
--- /dev/null
+++ b/sdk/media/RemoveAudioDecoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_RemoveAudioDecoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveAudioDecoderConfigurationResponse.
+func Call_RemoveAudioDecoderConfiguration(ctx context.Context, dev *onvif.Device, request media.RemoveAudioDecoderConfiguration) (media.RemoveAudioDecoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveAudioDecoderConfigurationResponse media.RemoveAudioDecoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveAudioDecoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveAudioDecoderConfiguration")
+ return reply.Body.RemoveAudioDecoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/RemoveAudioEncoderConfiguration_auto.go b/sdk/media/RemoveAudioEncoderConfiguration_auto.go
new file mode 100644
index 00000000..edbc89d2
--- /dev/null
+++ b/sdk/media/RemoveAudioEncoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_RemoveAudioEncoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveAudioEncoderConfigurationResponse.
+func Call_RemoveAudioEncoderConfiguration(ctx context.Context, dev *onvif.Device, request media.RemoveAudioEncoderConfiguration) (media.RemoveAudioEncoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveAudioEncoderConfigurationResponse media.RemoveAudioEncoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveAudioEncoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveAudioEncoderConfiguration")
+ return reply.Body.RemoveAudioEncoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/RemoveAudioOutputConfiguration_auto.go b/sdk/media/RemoveAudioOutputConfiguration_auto.go
new file mode 100644
index 00000000..51f1bcda
--- /dev/null
+++ b/sdk/media/RemoveAudioOutputConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_RemoveAudioOutputConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveAudioOutputConfigurationResponse.
+func Call_RemoveAudioOutputConfiguration(ctx context.Context, dev *onvif.Device, request media.RemoveAudioOutputConfiguration) (media.RemoveAudioOutputConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveAudioOutputConfigurationResponse media.RemoveAudioOutputConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveAudioOutputConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveAudioOutputConfiguration")
+ return reply.Body.RemoveAudioOutputConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/RemoveAudioSourceConfiguration_auto.go b/sdk/media/RemoveAudioSourceConfiguration_auto.go
new file mode 100644
index 00000000..1aef6ca6
--- /dev/null
+++ b/sdk/media/RemoveAudioSourceConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_RemoveAudioSourceConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveAudioSourceConfigurationResponse.
+func Call_RemoveAudioSourceConfiguration(ctx context.Context, dev *onvif.Device, request media.RemoveAudioSourceConfiguration) (media.RemoveAudioSourceConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveAudioSourceConfigurationResponse media.RemoveAudioSourceConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveAudioSourceConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveAudioSourceConfiguration")
+ return reply.Body.RemoveAudioSourceConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/RemoveMetadataConfiguration_auto.go b/sdk/media/RemoveMetadataConfiguration_auto.go
new file mode 100644
index 00000000..479359d9
--- /dev/null
+++ b/sdk/media/RemoveMetadataConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_RemoveMetadataConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveMetadataConfigurationResponse.
+func Call_RemoveMetadataConfiguration(ctx context.Context, dev *onvif.Device, request media.RemoveMetadataConfiguration) (media.RemoveMetadataConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveMetadataConfigurationResponse media.RemoveMetadataConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveMetadataConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveMetadataConfiguration")
+ return reply.Body.RemoveMetadataConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/RemovePTZConfiguration_auto.go b/sdk/media/RemovePTZConfiguration_auto.go
new file mode 100644
index 00000000..0b07f056
--- /dev/null
+++ b/sdk/media/RemovePTZConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_RemovePTZConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a RemovePTZConfigurationResponse.
+func Call_RemovePTZConfiguration(ctx context.Context, dev *onvif.Device, request media.RemovePTZConfiguration) (media.RemovePTZConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemovePTZConfigurationResponse media.RemovePTZConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemovePTZConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemovePTZConfiguration")
+ return reply.Body.RemovePTZConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/RemoveVideoAnalyticsConfiguration_auto.go b/sdk/media/RemoveVideoAnalyticsConfiguration_auto.go
new file mode 100644
index 00000000..88e7d60c
--- /dev/null
+++ b/sdk/media/RemoveVideoAnalyticsConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_RemoveVideoAnalyticsConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveVideoAnalyticsConfigurationResponse.
+func Call_RemoveVideoAnalyticsConfiguration(ctx context.Context, dev *onvif.Device, request media.RemoveVideoAnalyticsConfiguration) (media.RemoveVideoAnalyticsConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveVideoAnalyticsConfigurationResponse media.RemoveVideoAnalyticsConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveVideoAnalyticsConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveVideoAnalyticsConfiguration")
+ return reply.Body.RemoveVideoAnalyticsConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/RemoveVideoEncoderConfiguration_auto.go b/sdk/media/RemoveVideoEncoderConfiguration_auto.go
new file mode 100644
index 00000000..7a8745bb
--- /dev/null
+++ b/sdk/media/RemoveVideoEncoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_RemoveVideoEncoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveVideoEncoderConfigurationResponse.
+func Call_RemoveVideoEncoderConfiguration(ctx context.Context, dev *onvif.Device, request media.RemoveVideoEncoderConfiguration) (media.RemoveVideoEncoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveVideoEncoderConfigurationResponse media.RemoveVideoEncoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveVideoEncoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveVideoEncoderConfiguration")
+ return reply.Body.RemoveVideoEncoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/RemoveVideoSourceConfiguration_auto.go b/sdk/media/RemoveVideoSourceConfiguration_auto.go
new file mode 100644
index 00000000..b3ffb79a
--- /dev/null
+++ b/sdk/media/RemoveVideoSourceConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_RemoveVideoSourceConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a RemoveVideoSourceConfigurationResponse.
+func Call_RemoveVideoSourceConfiguration(ctx context.Context, dev *onvif.Device, request media.RemoveVideoSourceConfiguration) (media.RemoveVideoSourceConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemoveVideoSourceConfigurationResponse media.RemoveVideoSourceConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemoveVideoSourceConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemoveVideoSourceConfiguration")
+ return reply.Body.RemoveVideoSourceConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetAudioDecoderConfiguration_auto.go b/sdk/media/SetAudioDecoderConfiguration_auto.go
new file mode 100644
index 00000000..47e34fe2
--- /dev/null
+++ b/sdk/media/SetAudioDecoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetAudioDecoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetAudioDecoderConfigurationResponse.
+func Call_SetAudioDecoderConfiguration(ctx context.Context, dev *onvif.Device, request media.SetAudioDecoderConfiguration) (media.SetAudioDecoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetAudioDecoderConfigurationResponse media.SetAudioDecoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetAudioDecoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetAudioDecoderConfiguration")
+ return reply.Body.SetAudioDecoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetAudioEncoderConfiguration_auto.go b/sdk/media/SetAudioEncoderConfiguration_auto.go
new file mode 100644
index 00000000..c60857db
--- /dev/null
+++ b/sdk/media/SetAudioEncoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetAudioEncoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetAudioEncoderConfigurationResponse.
+func Call_SetAudioEncoderConfiguration(ctx context.Context, dev *onvif.Device, request media.SetAudioEncoderConfiguration) (media.SetAudioEncoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetAudioEncoderConfigurationResponse media.SetAudioEncoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetAudioEncoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetAudioEncoderConfiguration")
+ return reply.Body.SetAudioEncoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetAudioOutputConfiguration_auto.go b/sdk/media/SetAudioOutputConfiguration_auto.go
new file mode 100644
index 00000000..1e2dd4b2
--- /dev/null
+++ b/sdk/media/SetAudioOutputConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetAudioOutputConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetAudioOutputConfigurationResponse.
+func Call_SetAudioOutputConfiguration(ctx context.Context, dev *onvif.Device, request media.SetAudioOutputConfiguration) (media.SetAudioOutputConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetAudioOutputConfigurationResponse media.SetAudioOutputConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetAudioOutputConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetAudioOutputConfiguration")
+ return reply.Body.SetAudioOutputConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetAudioSourceConfiguration_auto.go b/sdk/media/SetAudioSourceConfiguration_auto.go
new file mode 100644
index 00000000..5fd835c6
--- /dev/null
+++ b/sdk/media/SetAudioSourceConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetAudioSourceConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetAudioSourceConfigurationResponse.
+func Call_SetAudioSourceConfiguration(ctx context.Context, dev *onvif.Device, request media.SetAudioSourceConfiguration) (media.SetAudioSourceConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetAudioSourceConfigurationResponse media.SetAudioSourceConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetAudioSourceConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetAudioSourceConfiguration")
+ return reply.Body.SetAudioSourceConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetMetadataConfiguration_auto.go b/sdk/media/SetMetadataConfiguration_auto.go
new file mode 100644
index 00000000..1baf90b9
--- /dev/null
+++ b/sdk/media/SetMetadataConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetMetadataConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetMetadataConfigurationResponse.
+func Call_SetMetadataConfiguration(ctx context.Context, dev *onvif.Device, request media.SetMetadataConfiguration) (media.SetMetadataConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetMetadataConfigurationResponse media.SetMetadataConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetMetadataConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetMetadataConfiguration")
+ return reply.Body.SetMetadataConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetOSD_auto.go b/sdk/media/SetOSD_auto.go
new file mode 100644
index 00000000..eb79fb9f
--- /dev/null
+++ b/sdk/media/SetOSD_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetOSD forwards the call to dev.CallMethod() then parses the payload of the reply as a SetOSDResponse.
+func Call_SetOSD(ctx context.Context, dev *onvif.Device, request media.SetOSD) (media.SetOSDResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetOSDResponse media.SetOSDResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetOSDResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetOSD")
+ return reply.Body.SetOSDResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetSynchronizationPoint_auto.go b/sdk/media/SetSynchronizationPoint_auto.go
new file mode 100644
index 00000000..79eedb84
--- /dev/null
+++ b/sdk/media/SetSynchronizationPoint_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetSynchronizationPoint forwards the call to dev.CallMethod() then parses the payload of the reply as a SetSynchronizationPointResponse.
+func Call_SetSynchronizationPoint(ctx context.Context, dev *onvif.Device, request media.SetSynchronizationPoint) (media.SetSynchronizationPointResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetSynchronizationPointResponse media.SetSynchronizationPointResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetSynchronizationPointResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetSynchronizationPoint")
+ return reply.Body.SetSynchronizationPointResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetVideoAnalyticsConfiguration_auto.go b/sdk/media/SetVideoAnalyticsConfiguration_auto.go
new file mode 100644
index 00000000..172bf5a7
--- /dev/null
+++ b/sdk/media/SetVideoAnalyticsConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetVideoAnalyticsConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetVideoAnalyticsConfigurationResponse.
+func Call_SetVideoAnalyticsConfiguration(ctx context.Context, dev *onvif.Device, request media.SetVideoAnalyticsConfiguration) (media.SetVideoAnalyticsConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetVideoAnalyticsConfigurationResponse media.SetVideoAnalyticsConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetVideoAnalyticsConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetVideoAnalyticsConfiguration")
+ return reply.Body.SetVideoAnalyticsConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetVideoEncoderConfiguration_auto.go b/sdk/media/SetVideoEncoderConfiguration_auto.go
new file mode 100644
index 00000000..0a0727dc
--- /dev/null
+++ b/sdk/media/SetVideoEncoderConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetVideoEncoderConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetVideoEncoderConfigurationResponse.
+func Call_SetVideoEncoderConfiguration(ctx context.Context, dev *onvif.Device, request media.SetVideoEncoderConfiguration) (media.SetVideoEncoderConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetVideoEncoderConfigurationResponse media.SetVideoEncoderConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetVideoEncoderConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetVideoEncoderConfiguration")
+ return reply.Body.SetVideoEncoderConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetVideoSourceConfiguration_auto.go b/sdk/media/SetVideoSourceConfiguration_auto.go
new file mode 100644
index 00000000..6ee077a0
--- /dev/null
+++ b/sdk/media/SetVideoSourceConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetVideoSourceConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetVideoSourceConfigurationResponse.
+func Call_SetVideoSourceConfiguration(ctx context.Context, dev *onvif.Device, request media.SetVideoSourceConfiguration) (media.SetVideoSourceConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetVideoSourceConfigurationResponse media.SetVideoSourceConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetVideoSourceConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetVideoSourceConfiguration")
+ return reply.Body.SetVideoSourceConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/SetVideoSourceMode_auto.go b/sdk/media/SetVideoSourceMode_auto.go
new file mode 100644
index 00000000..7cc06218
--- /dev/null
+++ b/sdk/media/SetVideoSourceMode_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_SetVideoSourceMode forwards the call to dev.CallMethod() then parses the payload of the reply as a SetVideoSourceModeResponse.
+func Call_SetVideoSourceMode(ctx context.Context, dev *onvif.Device, request media.SetVideoSourceMode) (media.SetVideoSourceModeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetVideoSourceModeResponse media.SetVideoSourceModeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetVideoSourceModeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetVideoSourceMode")
+ return reply.Body.SetVideoSourceModeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/StartMulticastStreaming_auto.go b/sdk/media/StartMulticastStreaming_auto.go
new file mode 100644
index 00000000..030c6e31
--- /dev/null
+++ b/sdk/media/StartMulticastStreaming_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_StartMulticastStreaming forwards the call to dev.CallMethod() then parses the payload of the reply as a StartMulticastStreamingResponse.
+func Call_StartMulticastStreaming(ctx context.Context, dev *onvif.Device, request media.StartMulticastStreaming) (media.StartMulticastStreamingResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ StartMulticastStreamingResponse media.StartMulticastStreamingResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.StartMulticastStreamingResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "StartMulticastStreaming")
+ return reply.Body.StartMulticastStreamingResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/StopMulticastStreaming_auto.go b/sdk/media/StopMulticastStreaming_auto.go
new file mode 100644
index 00000000..118aa93b
--- /dev/null
+++ b/sdk/media/StopMulticastStreaming_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package media
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/media"
+)
+
+// Call_StopMulticastStreaming forwards the call to dev.CallMethod() then parses the payload of the reply as a StopMulticastStreamingResponse.
+func Call_StopMulticastStreaming(ctx context.Context, dev *onvif.Device, request media.StopMulticastStreaming) (media.StopMulticastStreamingResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ StopMulticastStreamingResponse media.StopMulticastStreamingResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.StopMulticastStreamingResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "StopMulticastStreaming")
+ return reply.Body.StopMulticastStreamingResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/media/media.go b/sdk/media/media.go
new file mode 100644
index 00000000..93469f6e
--- /dev/null
+++ b/sdk/media/media.go
@@ -0,0 +1,81 @@
+package media
+
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetServiceCapabilities
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoSources
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioSources
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioOutputs
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media CreateProfile
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetProfile
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetProfiles
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media AddVideoEncoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media RemoveVideoEncoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media AddVideoSourceConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media RemoveVideoSourceConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media AddAudioEncoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media RemoveAudioEncoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media AddAudioSourceConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media RemoveAudioSourceConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media AddPTZConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media RemovePTZConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media AddVideoAnalyticsConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media RemoveVideoAnalyticsConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media AddMetadataConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media RemoveMetadataConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media AddAudioOutputConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media RemoveAudioOutputConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media AddAudioDecoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media RemoveAudioDecoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media DeleteProfile
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoSourceConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoEncoderConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioSourceConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioEncoderConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoAnalyticsConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetMetadataConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioOutputConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioDecoderConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoSourceConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoEncoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioSourceConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioEncoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoAnalyticsConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetMetadataConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioOutputConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioDecoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetCompatibleVideoEncoderConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetCompatibleVideoSourceConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetCompatibleAudioEncoderConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetCompatibleAudioSourceConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetCompatibleVideoAnalyticsConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetCompatibleMetadataConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetCompatibleAudioOutputConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetCompatibleAudioDecoderConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetVideoSourceConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetVideoEncoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetAudioSourceConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetAudioEncoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetVideoAnalyticsConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetMetadataConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetAudioOutputConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetAudioDecoderConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoSourceConfigurationOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoEncoderConfigurationOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioSourceConfigurationOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioEncoderConfigurationOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetMetadataConfigurationOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioOutputConfigurationOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetAudioDecoderConfigurationOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetGuaranteedNumberOfVideoEncoderInstances
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetStreamUri
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media StartMulticastStreaming
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media StopMulticastStreaming
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetSynchronizationPoint
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetSnapshotUri
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetVideoSourceModes
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetVideoSourceMode
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetOSDs
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetOSD
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media GetOSDOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media SetOSD
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media CreateOSD
+//go:generate go run github.com/use-go/onvif/sdk/codegen media media DeleteOSD
diff --git a/sdk/ptz/AbsoluteMove_auto.go b/sdk/ptz/AbsoluteMove_auto.go
new file mode 100644
index 00000000..99a6732b
--- /dev/null
+++ b/sdk/ptz/AbsoluteMove_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_AbsoluteMove forwards the call to dev.CallMethod() then parses the payload of the reply as a AbsoluteMoveResponse.
+func Call_AbsoluteMove(ctx context.Context, dev *onvif.Device, request ptz.AbsoluteMove) (ptz.AbsoluteMoveResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ AbsoluteMoveResponse ptz.AbsoluteMoveResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.AbsoluteMoveResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "AbsoluteMove")
+ return reply.Body.AbsoluteMoveResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/ContinuousMove_auto.go b/sdk/ptz/ContinuousMove_auto.go
new file mode 100644
index 00000000..fa8eca92
--- /dev/null
+++ b/sdk/ptz/ContinuousMove_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_ContinuousMove forwards the call to dev.CallMethod() then parses the payload of the reply as a ContinuousMoveResponse.
+func Call_ContinuousMove(ctx context.Context, dev *onvif.Device, request ptz.ContinuousMove) (ptz.ContinuousMoveResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ ContinuousMoveResponse ptz.ContinuousMoveResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.ContinuousMoveResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "ContinuousMove")
+ return reply.Body.ContinuousMoveResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/CreatePresetTour_auto.go b/sdk/ptz/CreatePresetTour_auto.go
new file mode 100644
index 00000000..fc99a5df
--- /dev/null
+++ b/sdk/ptz/CreatePresetTour_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_CreatePresetTour forwards the call to dev.CallMethod() then parses the payload of the reply as a CreatePresetTourResponse.
+func Call_CreatePresetTour(ctx context.Context, dev *onvif.Device, request ptz.CreatePresetTour) (ptz.CreatePresetTourResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ CreatePresetTourResponse ptz.CreatePresetTourResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.CreatePresetTourResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "CreatePresetTour")
+ return reply.Body.CreatePresetTourResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GeoMove_auto.go b/sdk/ptz/GeoMove_auto.go
new file mode 100644
index 00000000..03c5c98a
--- /dev/null
+++ b/sdk/ptz/GeoMove_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GeoMove forwards the call to dev.CallMethod() then parses the payload of the reply as a GeoMoveResponse.
+func Call_GeoMove(ctx context.Context, dev *onvif.Device, request ptz.GeoMove) (ptz.GeoMoveResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GeoMoveResponse ptz.GeoMoveResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GeoMoveResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GeoMove")
+ return reply.Body.GeoMoveResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetCompatibleConfigurations_auto.go b/sdk/ptz/GetCompatibleConfigurations_auto.go
new file mode 100644
index 00000000..3e7c68c1
--- /dev/null
+++ b/sdk/ptz/GetCompatibleConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetCompatibleConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetCompatibleConfigurationsResponse.
+func Call_GetCompatibleConfigurations(ctx context.Context, dev *onvif.Device, request ptz.GetCompatibleConfigurations) (ptz.GetCompatibleConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetCompatibleConfigurationsResponse ptz.GetCompatibleConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetCompatibleConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetCompatibleConfigurations")
+ return reply.Body.GetCompatibleConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetConfigurationOptions_auto.go b/sdk/ptz/GetConfigurationOptions_auto.go
new file mode 100644
index 00000000..02e2ee96
--- /dev/null
+++ b/sdk/ptz/GetConfigurationOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetConfigurationOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetConfigurationOptionsResponse.
+func Call_GetConfigurationOptions(ctx context.Context, dev *onvif.Device, request ptz.GetConfigurationOptions) (ptz.GetConfigurationOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetConfigurationOptionsResponse ptz.GetConfigurationOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetConfigurationOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetConfigurationOptions")
+ return reply.Body.GetConfigurationOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetConfiguration_auto.go b/sdk/ptz/GetConfiguration_auto.go
new file mode 100644
index 00000000..5b7e36ac
--- /dev/null
+++ b/sdk/ptz/GetConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a GetConfigurationResponse.
+func Call_GetConfiguration(ctx context.Context, dev *onvif.Device, request ptz.GetConfiguration) (ptz.GetConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetConfigurationResponse ptz.GetConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetConfiguration")
+ return reply.Body.GetConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetConfigurations_auto.go b/sdk/ptz/GetConfigurations_auto.go
new file mode 100644
index 00000000..0cc1f159
--- /dev/null
+++ b/sdk/ptz/GetConfigurations_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetConfigurations forwards the call to dev.CallMethod() then parses the payload of the reply as a GetConfigurationsResponse.
+func Call_GetConfigurations(ctx context.Context, dev *onvif.Device, request ptz.GetConfigurations) (ptz.GetConfigurationsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetConfigurationsResponse ptz.GetConfigurationsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetConfigurationsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetConfigurations")
+ return reply.Body.GetConfigurationsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetNode_auto.go b/sdk/ptz/GetNode_auto.go
new file mode 100644
index 00000000..399931d2
--- /dev/null
+++ b/sdk/ptz/GetNode_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetNode forwards the call to dev.CallMethod() then parses the payload of the reply as a GetNodeResponse.
+func Call_GetNode(ctx context.Context, dev *onvif.Device, request ptz.GetNode) (ptz.GetNodeResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetNodeResponse ptz.GetNodeResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetNodeResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetNode")
+ return reply.Body.GetNodeResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetNodes_auto.go b/sdk/ptz/GetNodes_auto.go
new file mode 100644
index 00000000..08689f95
--- /dev/null
+++ b/sdk/ptz/GetNodes_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetNodes forwards the call to dev.CallMethod() then parses the payload of the reply as a GetNodesResponse.
+func Call_GetNodes(ctx context.Context, dev *onvif.Device, request ptz.GetNodes) (ptz.GetNodesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetNodesResponse ptz.GetNodesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetNodesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetNodes")
+ return reply.Body.GetNodesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetPresetTourOptions_auto.go b/sdk/ptz/GetPresetTourOptions_auto.go
new file mode 100644
index 00000000..82b72202
--- /dev/null
+++ b/sdk/ptz/GetPresetTourOptions_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetPresetTourOptions forwards the call to dev.CallMethod() then parses the payload of the reply as a GetPresetTourOptionsResponse.
+func Call_GetPresetTourOptions(ctx context.Context, dev *onvif.Device, request ptz.GetPresetTourOptions) (ptz.GetPresetTourOptionsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetPresetTourOptionsResponse ptz.GetPresetTourOptionsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetPresetTourOptionsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetPresetTourOptions")
+ return reply.Body.GetPresetTourOptionsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetPresetTour_auto.go b/sdk/ptz/GetPresetTour_auto.go
new file mode 100644
index 00000000..019fbf9f
--- /dev/null
+++ b/sdk/ptz/GetPresetTour_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetPresetTour forwards the call to dev.CallMethod() then parses the payload of the reply as a GetPresetTourResponse.
+func Call_GetPresetTour(ctx context.Context, dev *onvif.Device, request ptz.GetPresetTour) (ptz.GetPresetTourResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetPresetTourResponse ptz.GetPresetTourResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetPresetTourResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetPresetTour")
+ return reply.Body.GetPresetTourResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetPresetTours_auto.go b/sdk/ptz/GetPresetTours_auto.go
new file mode 100644
index 00000000..b9ad833d
--- /dev/null
+++ b/sdk/ptz/GetPresetTours_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetPresetTours forwards the call to dev.CallMethod() then parses the payload of the reply as a GetPresetToursResponse.
+func Call_GetPresetTours(ctx context.Context, dev *onvif.Device, request ptz.GetPresetTours) (ptz.GetPresetToursResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetPresetToursResponse ptz.GetPresetToursResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetPresetToursResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetPresetTours")
+ return reply.Body.GetPresetToursResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetPresets_auto.go b/sdk/ptz/GetPresets_auto.go
new file mode 100644
index 00000000..9663655a
--- /dev/null
+++ b/sdk/ptz/GetPresets_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetPresets forwards the call to dev.CallMethod() then parses the payload of the reply as a GetPresetsResponse.
+func Call_GetPresets(ctx context.Context, dev *onvif.Device, request ptz.GetPresets) (ptz.GetPresetsResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetPresetsResponse ptz.GetPresetsResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetPresetsResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetPresets")
+ return reply.Body.GetPresetsResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetServiceCapabilities_auto.go b/sdk/ptz/GetServiceCapabilities_auto.go
new file mode 100644
index 00000000..c52bfec4
--- /dev/null
+++ b/sdk/ptz/GetServiceCapabilities_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetServiceCapabilities forwards the call to dev.CallMethod() then parses the payload of the reply as a GetServiceCapabilitiesResponse.
+func Call_GetServiceCapabilities(ctx context.Context, dev *onvif.Device, request ptz.GetServiceCapabilities) (ptz.GetServiceCapabilitiesResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetServiceCapabilitiesResponse ptz.GetServiceCapabilitiesResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetServiceCapabilitiesResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetServiceCapabilities")
+ return reply.Body.GetServiceCapabilitiesResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GetStatus_auto.go b/sdk/ptz/GetStatus_auto.go
new file mode 100644
index 00000000..a8fc6297
--- /dev/null
+++ b/sdk/ptz/GetStatus_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GetStatus forwards the call to dev.CallMethod() then parses the payload of the reply as a GetStatusResponse.
+func Call_GetStatus(ctx context.Context, dev *onvif.Device, request ptz.GetStatus) (ptz.GetStatusResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GetStatusResponse ptz.GetStatusResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GetStatusResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GetStatus")
+ return reply.Body.GetStatusResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GotoHomePosition_auto.go b/sdk/ptz/GotoHomePosition_auto.go
new file mode 100644
index 00000000..6b222309
--- /dev/null
+++ b/sdk/ptz/GotoHomePosition_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GotoHomePosition forwards the call to dev.CallMethod() then parses the payload of the reply as a GotoHomePositionResponse.
+func Call_GotoHomePosition(ctx context.Context, dev *onvif.Device, request ptz.GotoHomePosition) (ptz.GotoHomePositionResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GotoHomePositionResponse ptz.GotoHomePositionResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GotoHomePositionResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GotoHomePosition")
+ return reply.Body.GotoHomePositionResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/GotoPreset_auto.go b/sdk/ptz/GotoPreset_auto.go
new file mode 100644
index 00000000..bab80c70
--- /dev/null
+++ b/sdk/ptz/GotoPreset_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_GotoPreset forwards the call to dev.CallMethod() then parses the payload of the reply as a GotoPresetResponse.
+func Call_GotoPreset(ctx context.Context, dev *onvif.Device, request ptz.GotoPreset) (ptz.GotoPresetResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ GotoPresetResponse ptz.GotoPresetResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.GotoPresetResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "GotoPreset")
+ return reply.Body.GotoPresetResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/ModifyPresetTour_auto.go b/sdk/ptz/ModifyPresetTour_auto.go
new file mode 100644
index 00000000..5a6c3a43
--- /dev/null
+++ b/sdk/ptz/ModifyPresetTour_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_ModifyPresetTour forwards the call to dev.CallMethod() then parses the payload of the reply as a ModifyPresetTourResponse.
+func Call_ModifyPresetTour(ctx context.Context, dev *onvif.Device, request ptz.ModifyPresetTour) (ptz.ModifyPresetTourResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ ModifyPresetTourResponse ptz.ModifyPresetTourResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.ModifyPresetTourResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "ModifyPresetTour")
+ return reply.Body.ModifyPresetTourResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/OperatePresetTour_auto.go b/sdk/ptz/OperatePresetTour_auto.go
new file mode 100644
index 00000000..2e4d9429
--- /dev/null
+++ b/sdk/ptz/OperatePresetTour_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_OperatePresetTour forwards the call to dev.CallMethod() then parses the payload of the reply as a OperatePresetTourResponse.
+func Call_OperatePresetTour(ctx context.Context, dev *onvif.Device, request ptz.OperatePresetTour) (ptz.OperatePresetTourResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ OperatePresetTourResponse ptz.OperatePresetTourResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.OperatePresetTourResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "OperatePresetTour")
+ return reply.Body.OperatePresetTourResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/RelativeMove_auto.go b/sdk/ptz/RelativeMove_auto.go
new file mode 100644
index 00000000..5adce584
--- /dev/null
+++ b/sdk/ptz/RelativeMove_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_RelativeMove forwards the call to dev.CallMethod() then parses the payload of the reply as a RelativeMoveResponse.
+func Call_RelativeMove(ctx context.Context, dev *onvif.Device, request ptz.RelativeMove) (ptz.RelativeMoveResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RelativeMoveResponse ptz.RelativeMoveResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RelativeMoveResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RelativeMove")
+ return reply.Body.RelativeMoveResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/RemovePresetTour_auto.go b/sdk/ptz/RemovePresetTour_auto.go
new file mode 100644
index 00000000..136f5686
--- /dev/null
+++ b/sdk/ptz/RemovePresetTour_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_RemovePresetTour forwards the call to dev.CallMethod() then parses the payload of the reply as a RemovePresetTourResponse.
+func Call_RemovePresetTour(ctx context.Context, dev *onvif.Device, request ptz.RemovePresetTour) (ptz.RemovePresetTourResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemovePresetTourResponse ptz.RemovePresetTourResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemovePresetTourResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemovePresetTour")
+ return reply.Body.RemovePresetTourResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/RemovePreset_auto.go b/sdk/ptz/RemovePreset_auto.go
new file mode 100644
index 00000000..1db7c993
--- /dev/null
+++ b/sdk/ptz/RemovePreset_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_RemovePreset forwards the call to dev.CallMethod() then parses the payload of the reply as a RemovePresetResponse.
+func Call_RemovePreset(ctx context.Context, dev *onvif.Device, request ptz.RemovePreset) (ptz.RemovePresetResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ RemovePresetResponse ptz.RemovePresetResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.RemovePresetResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "RemovePreset")
+ return reply.Body.RemovePresetResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/SendAuxiliaryCommand_auto.go b/sdk/ptz/SendAuxiliaryCommand_auto.go
new file mode 100644
index 00000000..6ed6f1ce
--- /dev/null
+++ b/sdk/ptz/SendAuxiliaryCommand_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_SendAuxiliaryCommand forwards the call to dev.CallMethod() then parses the payload of the reply as a SendAuxiliaryCommandResponse.
+func Call_SendAuxiliaryCommand(ctx context.Context, dev *onvif.Device, request ptz.SendAuxiliaryCommand) (ptz.SendAuxiliaryCommandResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SendAuxiliaryCommandResponse ptz.SendAuxiliaryCommandResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SendAuxiliaryCommandResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SendAuxiliaryCommand")
+ return reply.Body.SendAuxiliaryCommandResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/SetConfiguration_auto.go b/sdk/ptz/SetConfiguration_auto.go
new file mode 100644
index 00000000..97be3b21
--- /dev/null
+++ b/sdk/ptz/SetConfiguration_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_SetConfiguration forwards the call to dev.CallMethod() then parses the payload of the reply as a SetConfigurationResponse.
+func Call_SetConfiguration(ctx context.Context, dev *onvif.Device, request ptz.SetConfiguration) (ptz.SetConfigurationResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetConfigurationResponse ptz.SetConfigurationResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetConfigurationResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetConfiguration")
+ return reply.Body.SetConfigurationResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/SetHomePosition_auto.go b/sdk/ptz/SetHomePosition_auto.go
new file mode 100644
index 00000000..9f2722d1
--- /dev/null
+++ b/sdk/ptz/SetHomePosition_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_SetHomePosition forwards the call to dev.CallMethod() then parses the payload of the reply as a SetHomePositionResponse.
+func Call_SetHomePosition(ctx context.Context, dev *onvif.Device, request ptz.SetHomePosition) (ptz.SetHomePositionResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetHomePositionResponse ptz.SetHomePositionResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetHomePositionResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetHomePosition")
+ return reply.Body.SetHomePositionResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/SetPreset_auto.go b/sdk/ptz/SetPreset_auto.go
new file mode 100644
index 00000000..020e73ff
--- /dev/null
+++ b/sdk/ptz/SetPreset_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_SetPreset forwards the call to dev.CallMethod() then parses the payload of the reply as a SetPresetResponse.
+func Call_SetPreset(ctx context.Context, dev *onvif.Device, request ptz.SetPreset) (ptz.SetPresetResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ SetPresetResponse ptz.SetPresetResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.SetPresetResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "SetPreset")
+ return reply.Body.SetPresetResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/Stop_auto.go b/sdk/ptz/Stop_auto.go
new file mode 100644
index 00000000..12f6e541
--- /dev/null
+++ b/sdk/ptz/Stop_auto.go
@@ -0,0 +1,30 @@
+// Code generated : DO NOT EDIT.
+// Copyright (c) 2022 Jean-Francois SMIGIELSKI
+// Distributed under the MIT License
+
+package ptz
+
+import (
+ "context"
+ "github.com/juju/errors"
+ "github.com/use-go/onvif"
+ "github.com/use-go/onvif/sdk"
+ "github.com/use-go/onvif/ptz"
+)
+
+// Call_Stop forwards the call to dev.CallMethod() then parses the payload of the reply as a StopResponse.
+func Call_Stop(ctx context.Context, dev *onvif.Device, request ptz.Stop) (ptz.StopResponse, error) {
+ type Envelope struct {
+ Header struct{}
+ Body struct {
+ StopResponse ptz.StopResponse
+ }
+ }
+ var reply Envelope
+ if httpReply, err := dev.CallMethod(request); err != nil {
+ return reply.Body.StopResponse, errors.Annotate(err, "call")
+ } else {
+ err = sdk.ReadAndParse(ctx, httpReply, &reply, "Stop")
+ return reply.Body.StopResponse, errors.Annotate(err, "reply")
+ }
+}
diff --git a/sdk/ptz/ptz.go b/sdk/ptz/ptz.go
new file mode 100644
index 00000000..910b28f5
--- /dev/null
+++ b/sdk/ptz/ptz.go
@@ -0,0 +1,30 @@
+package ptz
+
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetServiceCapabilities
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetNodes
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetNode
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetConfigurations
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz SetConfiguration
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetConfigurationOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz SendAuxiliaryCommand
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetPresets
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz SetPreset
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz RemovePreset
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GotoPreset
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GotoHomePosition
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz SetHomePosition
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz ContinuousMove
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz RelativeMove
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetStatus
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz AbsoluteMove
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GeoMove
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz Stop
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetPresetTours
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetPresetTour
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetPresetTourOptions
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz CreatePresetTour
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz ModifyPresetTour
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz OperatePresetTour
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz RemovePresetTour
+//go:generate go run github.com/use-go/onvif/sdk/codegen ptz ptz GetCompatibleConfigurations
diff --git a/sdk/sdk.go b/sdk/sdk.go
new file mode 100644
index 00000000..0399b4ee
--- /dev/null
+++ b/sdk/sdk.go
@@ -0,0 +1,43 @@
+package sdk
+
+import (
+ "context"
+ "encoding/xml"
+ "io/ioutil"
+ "net/http"
+ "os"
+ "time"
+
+ "github.com/juju/errors"
+ "github.com/rs/zerolog"
+)
+
+var (
+ // LoggerContext is the builder of a zerolog.Logger that is exposed to the application so that
+ // options at the CLI might alter the formatting and the output of the logs.
+ LoggerContext = zerolog.
+ New(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.RFC3339}).
+ With().Timestamp()
+
+ // Logger is a zerolog logger, that can be safely used from any part of the application.
+ // It gathers the format and the output.
+ Logger = LoggerContext.Logger()
+)
+
+func ReadAndParse(ctx context.Context, httpReply *http.Response, reply interface{}, tag string) error {
+ Logger.Debug().
+ Str("msg", httpReply.Status).
+ Int("status", httpReply.StatusCode).
+ Str("action", tag).
+ Msg("RPC")
+ // TODO(jfsmig): extract the deadline from ctx.Deadline() and apply it on the reply reading
+ b, err := ioutil.ReadAll(httpReply.Body)
+ if err != nil {
+ return errors.Annotate(err, "read")
+ }
+
+ httpReply.Body.Close()
+
+ err = xml.Unmarshal(b, reply)
+ return errors.Annotate(err, "decode")
+}
diff --git a/ws-discovery/networking.go b/ws-discovery/networking.go
index 288cce4f..7c1dc4f7 100644
--- a/ws-discovery/networking.go
+++ b/ws-discovery/networking.go
@@ -11,8 +11,6 @@ package wsdiscovery
import (
"errors"
- "fmt"
- "log"
"net"
"os"
"time"
@@ -24,7 +22,7 @@ import (
const bufSize = 8192
//SendProbe to device
-func SendProbe(interfaceName string, scopes, types []string, namespaces map[string]string) []string {
+func SendProbe(interfaceName string, scopes, types []string, namespaces map[string]string) ([]string, error) {
// Creating UUID Version 4
uuidV4 := uuid.Must(uuid.NewV4())
//fmt.Printf("UUIDv4: %s\n", uuidV4)
@@ -45,54 +43,53 @@ func SendProbe(interfaceName string, scopes, types []string, namespaces map[stri
//`
return sendUDPMulticast(probeSOAP.String(), interfaceName)
-
}
-func sendUDPMulticast(msg string, interfaceName string) []string {
- var result []string
- data := []byte(msg)
- iface, err := net.InterfaceByName(interfaceName)
+func sendUDPMulticast(msg string, interfaceName string) ([]string, error) {
+ c, err := net.ListenPacket("udp4", "0.0.0.0:0")
if err != nil {
- fmt.Println(err)
+ return nil, err
}
- group := net.IPv4(239, 255, 255, 250)
+ defer c.Close()
- c, err := net.ListenPacket("udp4", "0.0.0.0:1024")
+ iface, err := net.InterfaceByName(interfaceName)
if err != nil {
- fmt.Println(err)
+ return nil, err
}
- defer c.Close()
p := ipv4.NewPacketConn(c)
+ group := net.IPv4(239, 255, 255, 250)
if err := p.JoinGroup(iface, &net.UDPAddr{IP: group}); err != nil {
- fmt.Println(err)
+ return nil, err
}
dst := &net.UDPAddr{IP: group, Port: 3702}
+ data := []byte(msg)
for _, ifi := range []*net.Interface{iface} {
if err := p.SetMulticastInterface(ifi); err != nil {
- fmt.Println(err)
+ return nil, err
}
p.SetMulticastTTL(2)
if _, err := p.WriteTo(data, nil, dst); err != nil {
- fmt.Println(err)
+ return nil, err
}
}
if err := p.SetReadDeadline(time.Now().Add(time.Second * 1)); err != nil {
- log.Fatal(err)
+ return nil, err
}
+ var result []string
for {
b := make([]byte, bufSize)
n, _, _, err := p.ReadFrom(b)
if err != nil {
if !errors.Is(err, os.ErrDeadlineExceeded) {
- fmt.Println(err)
+ return nil, err
}
break
}
result = append(result, string(b[0:n]))
}
- return result
+ return result, nil
}
diff --git a/xsd/built_in.go b/xsd/built_in.go
index ffea950a..2592b0ab 100644
--- a/xsd/built_in.go
+++ b/xsd/built_in.go
@@ -304,9 +304,8 @@ type GYearMonth AnySimpleType
/*
Construct an instance of xsd GYearMonth type
*/
-func (tp GYearMonth) NewGYearMonth(time time.Time) GYearMonth {
- return GYearMonth(fmt.Sprintf("", time.Year(), "-", time.Month()))
- //return GYearMonth(time.Format("2004-04-05:00"))
+func (tp GYearMonth) NewGYearMonth(t time.Time) GYearMonth {
+ return GYearMonth(fmt.Sprintf("%4d-%2d", t.Year(), t.Month()))
}
/*
@@ -326,9 +325,8 @@ type GYear AnySimpleType
/*
Construct an instance of xsd GYear type
*/
-func (tp GYear) NewGYear(time time.Time) GYear {
- return GYear(fmt.Sprintf("", time.Year()))
- //return GYearMonth(time.Format("2004-04-05:00"))
+func (tp GYear) NewGYear(t time.Time) GYear {
+ return GYear(fmt.Sprintf("%4d", t.Year()))
}
/*
@@ -346,8 +344,8 @@ type GMonthDay AnySimpleType
/*
Construct an instance of xsd GMonthDay type
*/
-func (tp GMonthDay) NewGMonthDay(time time.Time) GMonthDay {
- return GMonthDay(fmt.Sprintf("--", time.Month(), "-", time.Day()))
+func (tp GMonthDay) NewGMonthDay(t time.Time) GMonthDay {
+ return GMonthDay(fmt.Sprintf("--%2d-%2d", t.Month(), t.Day()))
}
/*
@@ -366,8 +364,8 @@ type GDay AnySimpleType
/*
Construct an instance of xsd GDay type
*/
-func (tp GDay) NewGDay(time time.Time) GDay {
- return GDay(fmt.Sprintf("---", time.Day()))
+func (tp GDay) NewGDay(t time.Time) GDay {
+ return GDay(fmt.Sprintf("---%2d", t.Day()))
}
/*
@@ -384,8 +382,8 @@ func (tp GDay) NewGDay(time time.Time) GDay {
*/
type GMonth AnySimpleType
-func (tp GMonth) NewGMonth(time time.Time) GMonth {
- return GMonth(fmt.Sprintf("--", time.Month()))
+func (tp GMonth) NewGMonth(t time.Time) GMonth {
+ return GMonth(fmt.Sprintf("--%2d", t.Month()))
}
/*
diff --git a/xsd/onvif/onvif.go b/xsd/onvif/onvif.go
index 2862119a..0eea49e1 100644
--- a/xsd/onvif/onvif.go
+++ b/xsd/onvif/onvif.go
@@ -215,17 +215,17 @@ type VideoSourceExtension struct {
}
type ImagingSettings20 struct {
- BacklightCompensation BacklightCompensation20 `xml:"onvif:BacklightCompensation"`
- Brightness float64 `xml:"onvif:Brightness"`
- ColorSaturation float64 `xml:"onvif:ColorSaturation"`
- Contrast float64 `xml:"onvif:Contrast"`
- Exposure Exposure20 `xml:"onvif:Exposure"`
- Focus FocusConfiguration20 `xml:"onvif:Focus"`
- IrCutFilter IrCutFilterMode `xml:"onvif:IrCutFilter"`
- Sharpness float64 `xml:"onvif:Sharpness"`
- WideDynamicRange WideDynamicRange20 `xml:"onvif:WideDynamicRange"`
- WhiteBalance WhiteBalance20 `xml:"onvif:WhiteBalance"`
- Extension ImagingSettingsExtension20 `xml:"onvif:Extension"`
+ BacklightCompensation *BacklightCompensation20 `xml:"onvif:BacklightCompensation"`
+ Brightness float64 `xml:"onvif:Brightness,omitempty"`
+ ColorSaturation float64 `xml:"onvif:ColorSaturation,omitempty"`
+ Contrast float64 `xml:"onvif:Contrast,omitempty"`
+ Exposure *Exposure20 `xml:"onvif:Exposure"`
+ Focus *FocusConfiguration20 `xml:"onvif:Focus"`
+ IrCutFilter *IrCutFilterMode `xml:"onvif:IrCutFilter"`
+ Sharpness float64 `xml:"onvif:Sharpness,omitempty"`
+ WideDynamicRange *WideDynamicRange20 `xml:"onvif:WideDynamicRange"`
+ WhiteBalance *WhiteBalance20 `xml:"onvif:WhiteBalance"`
+ Extension *ImagingSettingsExtension20 `xml:"onvif:Extension"`
}
type BacklightCompensation20 struct {
@@ -234,18 +234,18 @@ type BacklightCompensation20 struct {
}
type Exposure20 struct {
- Mode ExposureMode `xml:"onvif:Mode"`
- Priority ExposurePriority `xml:"onvif:Priority"`
- Window Rectangle `xml:"onvif:Window"`
- MinExposureTime float64 `xml:"onvif:MinExposureTime"`
- MaxExposureTime float64 `xml:"onvif:MaxExposureTime"`
- MinGain float64 `xml:"onvif:MinGain"`
- MaxGain float64 `xml:"onvif:MaxGain"`
- MinIris float64 `xml:"onvif:MinIris"`
- MaxIris float64 `xml:"onvif:MaxIris"`
- ExposureTime float64 `xml:"onvif:ExposureTime"`
- Gain float64 `xml:"onvif:Gain"`
- Iris float64 `xml:"onvif:Iris"`
+ Mode ExposureMode `xml:"onvif:Mode,omitempty"`
+ Priority ExposurePriority `xml:"onvif:Priority,omitempty"`
+ Window Rectangle `xml:"onvif:Window,omitempty"`
+ MinExposureTime float64 `xml:"onvif:MinExposureTime,omitempty"`
+ MaxExposureTime float64 `xml:"onvif:MaxExposureTime,omitempty"`
+ MinGain float64 `xml:"onvif:MinGain,omitempty"`
+ MaxGain float64 `xml:"onvif:MaxGain,omitempty"`
+ MinIris float64 `xml:"onvif:MinIris,omitempty"`
+ MaxIris float64 `xml:"onvif:MaxIris,omitempty"`
+ ExposureTime float64 `xml:"onvif:ExposureTime,omitempty"`
+ Gain float64 `xml:"onvif:Gain,omitempty"`
+ Iris float64 `xml:"onvif:Iris,omitempty"`
}
type FocusConfiguration20 struct {
@@ -509,8 +509,8 @@ type ItemList struct {
}
type SimpleItem struct {
- Name string `xml:"onvif:Name,attr"`
- Value xsd.AnySimpleType `xml:"onvif:Value,attr"`
+ Name string `xml:"Name,attr"`
+ Value xsd.AnySimpleType `xml:"Value,attr"`
}
type ElementItem struct {