| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122 |
- package schedule
- import (
- "context"
- "encoding/xml"
- "time"
- "lc/common/onvif/soap"
- )
- // against "unused imports"
- var _ time.Time
- var _ xml.Name
- // GetServiceCapabilities type
- type GetServiceCapabilities struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetServiceCapabilities"`
- }
- // GetServiceCapabilitiesResponse type
- type GetServiceCapabilitiesResponse struct {
- XMLName xml.Name `xml:"GetServiceCapabilitiesResponse"`
- //
- // The capability response message contains the requested schedule service
- // capabilities using a hierarchical XML capability structure.
- //
- Capabilities ServiceCapabilities `xml:"Capabilities,omitempty"`
- }
- // GetScheduleState type
- type GetScheduleState struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetScheduleState"`
- //
- // Token of schedule instance to get ScheduleState.
- //
- Token ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
- }
- // GetScheduleStateResponse type
- type GetScheduleStateResponse struct {
- XMLName xml.Name `xml:"GetScheduleStateResponse"`
- //
- // ScheduleState item.
- //
- ScheduleState ScheduleState `xml:"ScheduleState,omitempty"`
- }
- // GetScheduleInfo type
- type GetScheduleInfo struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetScheduleInfo"`
- //
- // Tokens of ScheduleInfo items to get.
- //
- Token []ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
- }
- // GetScheduleInfoResponse type
- type GetScheduleInfoResponse struct {
- XMLName xml.Name `xml:"GetScheduleInfoResponse"`
- //
- // List of ScheduleInfo items.
- //
- ScheduleInfo []ScheduleInfo `xml:"ScheduleInfo,omitempty"`
- }
- // GetScheduleInfoList type
- type GetScheduleInfoList struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetScheduleInfoList"`
- //
- // Maximum number of entries to return. If not specified, less than one
- // or higher than what the device supports, the number of items is
- // determined by the device.
- //
- Limit int32 `xml:"http://www.onvif.org/ver10/schema Limit,omitempty"`
- //
- // Start returning entries from this start reference.
- // If not specified, entries shall start from the beginning of the dataset.
- //
- StartReference string `xml:"http://www.onvif.org/ver10/schedule/wsdl StartReference,omitempty"`
- }
- // GetScheduleInfoListResponse type
- type GetScheduleInfoListResponse struct {
- XMLName xml.Name `xml:"GetScheduleInfoListResponse"`
- //
- // StartReference to use in next call to get the following items.
- // If absent, no more items to get.
- //
- NextStartReference string `xml:"NextStartReference,omitempty"`
- //
- // List of ScheduleInfo items.
- //
- ScheduleInfo []ScheduleInfo `xml:"ScheduleInfo,omitempty"`
- }
- // GetSchedules type
- type GetSchedules struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSchedules"`
- // Tokens of Schedule items to get
- Token []ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
- }
- // GetSchedulesResponse type
- type GetSchedulesResponse struct {
- XMLName xml.Name `xml:"GetSchedulesResponse"`
- // List of schedule items.
- Schedule []Schedule `xml:"Schedule,omitempty"`
- }
- // GetScheduleList type
- type GetScheduleList struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetScheduleList"`
- //
- // Maximum number of entries to return.
- // If not specified, less than one or higher than what the device supports,
- // the number of items is determined by the device.
- //
- Limit int32 `xml:"http://www.onvif.org/ver10/schema Limit,omitempty"`
- //
- // Start returning entries from this start reference.
- // If not specified, entries shall start from the beginning of the dataset.
- //
- StartReference string `xml:"http://www.onvif.org/ver10/schedule/wsdl StartReference,omitempty"`
- }
- // GetScheduleListResponse type
- type GetScheduleListResponse struct {
- XMLName xml.Name `xml:"GetScheduleListResponse"`
- //
- // StartReference to use in next call to get the following items.
- // If absent, no more items to get.
- //
- NextStartReference string `xml:"NextStartReference,omitempty"`
- // List of Schedule items.
- Schedule []Schedule `xml:"Schedule,omitempty"`
- }
- // CreateSchedule type
- type CreateSchedule struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl CreateSchedule"`
- // The Schedule to create
- Schedule Schedule `xml:"http://www.onvif.org/ver10/schedule/wsdl Schedule,omitempty"`
- }
- // CreateScheduleResponse type
- type CreateScheduleResponse struct {
- XMLName xml.Name `xml:"CreateScheduleResponse"`
- // The token of created Schedule
- Token ReferenceToken `xml:"Token,omitempty"`
- }
- // SetSchedule type
- type SetSchedule struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl SetSchedule"`
- // The Schedule to modify/create
- Schedule Schedule `xml:"http://www.onvif.org/ver10/schedule/wsdl Schedule,omitempty"`
- }
- // SetScheduleResponse type
- type SetScheduleResponse struct {
- XMLName xml.Name `xml:"SetScheduleResponse"`
- }
- // ModifySchedule type
- type ModifySchedule struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl ModifySchedule"`
- // The Schedule to modify/update
- Schedule Schedule `xml:"http://www.onvif.org/ver10/schedule/wsdl Schedule,omitempty"`
- }
- // ModifyScheduleResponse type
- type ModifyScheduleResponse struct {
- XMLName xml.Name `xml:"ModifyScheduleResponse"`
- }
- // DeleteSchedule type
- type DeleteSchedule struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl DeleteSchedule"`
- // The token of the schedule to delete.
- Token ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
- }
- // DeleteScheduleResponse type
- type DeleteScheduleResponse struct {
- XMLName xml.Name `xml:"DeleteScheduleResponse"`
- }
- // GetSpecialDayGroupInfo type
- type GetSpecialDayGroupInfo struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSpecialDayGroupInfo"`
- // Tokens of SpecialDayGroupInfo items to get.
- Token []ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
- }
- // GetSpecialDayGroupInfoResponse type
- type GetSpecialDayGroupInfoResponse struct {
- XMLName xml.Name `xml:"GetSpecialDayGroupInfoResponse"`
- // List of SpecialDayGroupInfo items.
- SpecialDayGroupInfo []SpecialDayGroupInfo `xml:"SpecialDayGroupInfo,omitempty"`
- }
- // GetSpecialDayGroupInfoList type
- type GetSpecialDayGroupInfoList struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSpecialDayGroupInfoList"`
- //
- // Maximum number of entries to return. If not specified, less than
- // one or higher than what the device supports, the number
- // of items is determined by the device.
- //
- Limit int32 `xml:"http://www.onvif.org/ver10/schema Limit,omitempty"`
- //
- // Start returning entries from this start reference.
- // If not specified, entries shall start from the beginning of the dataset.
- //
- StartReference string `xml:"http://www.onvif.org/ver10/schedule/wsdl StartReference,omitempty"`
- }
- // GetSpecialDayGroupInfoListResponse type
- type GetSpecialDayGroupInfoListResponse struct {
- XMLName xml.Name `xml:"GetSpecialDayGroupInfoListResponse"`
- //
- // StartReference to use in next call to get the following items.
- // If absent, no more items to get.
- //
- NextStartReference string `xml:"NextStartReference,omitempty"`
- // List of SpecialDayGroupInfo items.
- SpecialDayGroupInfo []SpecialDayGroupInfo `xml:"SpecialDayGroupInfo,omitempty"`
- }
- // GetSpecialDayGroups type
- type GetSpecialDayGroups struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSpecialDayGroups"`
- // Tokens of the SpecialDayGroup items to get
- Token []ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
- }
- // GetSpecialDayGroupsResponse type
- type GetSpecialDayGroupsResponse struct {
- XMLName xml.Name `xml:"GetSpecialDayGroupsResponse"`
- // List of SpecialDayGroup items.
- SpecialDayGroup []SpecialDayGroup `xml:"SpecialDayGroup,omitempty"`
- }
- // GetSpecialDayGroupList type
- type GetSpecialDayGroupList struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSpecialDayGroupList"`
- //
- // Maximum number of entries to return. If not specified, less than
- // one or higher than what the device supports, the number of
- // items is determined by the device.
- //
- Limit int32 `xml:"http://www.onvif.org/ver10/schema Limit,omitempty"`
- //
- // Start returning entries from this start reference.
- // If not specified, entries shall start from the beginning of the dataset.
- //
- StartReference string `xml:"http://www.onvif.org/ver10/schedule/wsdl StartReference,omitempty"`
- }
- // GetSpecialDayGroupListResponse type
- type GetSpecialDayGroupListResponse struct {
- XMLName xml.Name `xml:"GetSpecialDayGroupListResponse"`
- // StartReference to use in next call to get the following items. If
- // absent, no more items to get.
- //
- NextStartReference string `xml:"NextStartReference,omitempty"`
- // List of SpecialDayGroup items.
- SpecialDayGroup []SpecialDayGroup `xml:"SpecialDayGroup,omitempty"`
- }
- // CreateSpecialDayGroup type
- type CreateSpecialDayGroup struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl CreateSpecialDayGroup"`
- //
- // The special day group to create.
- //
- SpecialDayGroup SpecialDayGroup `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDayGroup,omitempty"`
- }
- // CreateSpecialDayGroupResponse type
- type CreateSpecialDayGroupResponse struct {
- XMLName xml.Name `xml:"CreateSpecialDayGroupResponse"`
- // The token of created special day group.
- Token ReferenceToken `xml:"Token,omitempty"`
- }
- // SetSpecialDayGroup type
- type SetSpecialDayGroup struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl SetSpecialDayGroup"`
- // The SpecialDayGroup to modify/create
- SpecialDayGroup SpecialDayGroup `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDayGroup,omitempty"`
- }
- // SetSpecialDayGroupResponse type
- type SetSpecialDayGroupResponse struct {
- XMLName xml.Name `xml:"SetSpecialDayGroupResponse"`
- }
- // ModifySpecialDayGroup type
- type ModifySpecialDayGroup struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl ModifySpecialDayGroup"`
- //
- // The special day group to modify/update.
- //
- SpecialDayGroup SpecialDayGroup `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDayGroup,omitempty"`
- }
- // ModifySpecialDayGroupResponse type
- type ModifySpecialDayGroupResponse struct {
- XMLName xml.Name `xml:"ModifySpecialDayGroupResponse"`
- }
- // DeleteSpecialDayGroup type
- type DeleteSpecialDayGroup struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl DeleteSpecialDayGroup"`
- //
- // The token of the special day group item to delete.
- //
- Token ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
- }
- // DeleteSpecialDayGroupResponse type
- type DeleteSpecialDayGroupResponse struct {
- XMLName xml.Name `xml:"DeleteSpecialDayGroupResponse"`
- }
- // ServiceCapabilities type
- type ServiceCapabilities struct {
- XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl Capabilities"`
- //
- // The maximum number of entries returned by a single Get<Entity>List or
- // Get<Entity> request. The device shall never return more than this number
- // of entities in a single response.
- //
- MaxLimit PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxLimit,attr,omitempty"`
- //
- // Indicates the maximum number of schedules the device supports.
- // The device shall support at least one schedule.
- //
- MaxSchedules PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxSchedules,attr,omitempty"`
- //
- // Indicates the maximum number of time periods per day the device supports
- // in a schedule including special days schedule. The device shall support
- // at least one time period per day.
- //
- MaxTimePeriodsPerDay PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxTimePeriodsPerDay,attr,omitempty"`
- //
- // Indicates the maximum number of special day group entities the device supports.
- // The device shall support at least one ‘SpecialDayGroup’ entity.
- //
- MaxSpecialDayGroups PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxSpecialDayGroups,attr,omitempty"`
- //
- // Indicates the maximum number of days per ‘SpecialDayGroup’ entity the device
- // supports. The device shall support at least one day per ‘SpecialDayGroup’ entity.
- //
- MaxDaysInSpecialDayGroup PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxDaysInSpecialDayGroup,attr,omitempty"`
- //
- // Indicates the maximum number of ‘SpecialDaysSchedule’ entities referred by a
- // schedule that the device supports.
- //
- MaxSpecialDaysSchedules PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxSpecialDaysSchedules,attr,omitempty"`
- //
- // For schedules:
- // If this capability is supported, then all iCalendar recurrence types shall
- // be supported by the device. The device shall also support the start and end dates (or
- // iCalendar occurrence count) in recurring events (see iCalendar examples in section 3).
- // If this capability is not supported, then only the weekly iCalendar recurrence
- // type shall be supported. Non-recurring events and other recurring types are
- // not supported. The device shall only accept a start date with the year ‘1970’
- // (the month and day is needed to reflect the week day of the recurrence)
- // and will not accept an occurrence count (or iCalendar until date) in recurring events.
- // For special days (only applicable if SpecialDaysSupported is set to true):
- // If this capability is supported, then all iCalendar recurrence types shall
- // be supported by the device. The device shall also support the start and
- // end dates (or occurrence count) in recurring events.
- // If this capability is not supported, then only non-recurring special days are supported.
- //
- ExtendedRecurrenceSupported bool `xml:"http://www.onvif.org/ver10/schedule/wsdl ExtendedRecurrenceSupported,attr,omitempty"`
- //
- // If this capability is supported, then the device shall support special days.
- //
- SpecialDaysSupported bool `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDaysSupported,attr,omitempty"`
- //
- // If this capability is set to true, the device shall implement the
- // GetScheduleState command, and shall notify subscribing clients whenever
- // schedules become active or inactive.
- //
- StateReportingSupported bool `xml:"http://www.onvif.org/ver10/schedule/wsdl StateReportingSupported,attr,omitempty"`
- //
- // Indicates that the client is allowed to supply the token when creating schedules and special day groups.
- // To enable the use of the commands SetSchedule and SetSpecialDayGroup, the value must be set to true.
- //
- ClientSuppliedTokenSupported bool `xml:"http://www.onvif.org/ver10/schedule/wsdl ClientSuppliedTokenSupported,attr,omitempty"`
- }
- // ScheduleInfo type
- type ScheduleInfo struct {
- *DataEntity
- //
- // A user readable name. It shall be up to 64 characters.
- //
- Name Name `xml:"http://www.onvif.org/ver10/schedule/wsdl Name,omitempty"`
- //
- // User readable description for the schedule. It shall be up to 1024 characters.
- //
- Description Description `xml:"http://www.onvif.org/ver10/schedule/wsdl Description,omitempty"`
- }
- // Schedule type
- type Schedule struct {
- *ScheduleInfo
- //
- // An iCalendar structure that defines a number of events. Events
- // can be recurring or non-recurring. The events can, for instance,
- // be used to control when a camera should record or when a facility
- // is accessible. Some devices might not be able to fully support
- // all the features of iCalendar. Setting the service capability
- // ExtendedRecurrenceSupported to false will enable more devices
- // to be ONVIF compliant. Is of type string (but contains an iCalendar structure).
- //
- Standard string `xml:"http://www.onvif.org/ver10/schedule/wsdl Standard,omitempty"`
- //
- // For devices that are not able to support all the features of iCalendar,
- // supporting special days is essential. Each SpecialDaysSchedule
- // instance defines an alternate set of time periods that overrides
- // the regular schedule for a specified list of special days.
- // Is of type SpecialDaysSchedule.
- //
- SpecialDays []SpecialDaysSchedule `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDays,omitempty"`
- Extension ScheduleExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
- }
- // ScheduleExtension type
- type ScheduleExtension struct {
- }
- // SpecialDaysSchedule type
- type SpecialDaysSchedule struct {
- //
- // Indicates the list of special days in a schedule.
- //
- GroupToken ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl GroupToken,omitempty"`
- //
- // Indicates the alternate time periods for the list of special days
- // (overrides the regular schedule). For example, the regular schedule indicates
- // that it is active from 8AM to 5PM on Mondays. However, this particular
- // Monday is a special day, and the alternate time periods state that the
- // schedule is active from 9 AM to 11 AM and 1 PM to 4 PM.
- // If no time periods are defined, then no access is allowed.
- // Is of type TimePeriod.
- //
- TimeRange []TimePeriod `xml:"http://www.onvif.org/ver10/schedule/wsdl TimeRange,omitempty"`
- Extension SpecialDaysScheduleExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
- }
- // SpecialDaysScheduleExtension type
- type SpecialDaysScheduleExtension struct {
- }
- // ScheduleState type
- type ScheduleState struct {
- //
- // Indicates that the current time is within the boundaries of the schedule
- // or its special days schedules’ time periods. For example, if this
- // schedule is being used for triggering automatic recording on a video source,
- // the Active flag will be true when the schedule-based recording is supposed to record.
- //
- Active bool `xml:"http://www.onvif.org/ver10/schedule/wsdl Active,omitempty"`
- //
- // Indicates that the current time is within the boundaries of its special
- // days schedules’ time periods. For example, if this schedule is being used
- // for recording at a lower frame rate on a video source during special days,
- // the SpecialDay flag will be true. If special days are not supported by the device,
- // this field may be omitted and interpreted as false by the client.
- //
- SpecialDay bool `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDay,omitempty"`
- Extension ScheduleStateExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
- }
- // ScheduleStateExtension type
- type ScheduleStateExtension struct {
- }
- // TimePeriod type
- type TimePeriod struct {
- //
- // Indicates the start time.
- //
- From string `xml:"http://www.onvif.org/ver10/schema From,omitempty"`
- //
- // Indicates the end time. Is optional, if omitted, the period ends at midnight.
- // The end time is exclusive, meaning that that exact moment in time is not
- // part of the period. To determine if a moment in time (t) is part of a time period,
- // the formula StartTime ≤ t < EndTime is used.
- //
- Until string `xml:"http://www.onvif.org/ver10/schema Until,omitempty"`
- Extension TimePeriodExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
- }
- // TimePeriodExtension type
- type TimePeriodExtension struct {
- }
- // SpecialDayGroupInfo type
- type SpecialDayGroupInfo struct {
- *DataEntity
- //
- // User readable name. It shall be up to 64 characters.
- //
- Name Name `xml:"http://www.onvif.org/ver10/schedule/wsdl Name,omitempty"`
- //
- // User readable description for the special days. It shall be up to 1024
- // characters.
- //
- Description Description `xml:"http://www.onvif.org/ver10/schedule/wsdl Description,omitempty"`
- }
- // SpecialDayGroup type
- type SpecialDayGroup struct {
- *SpecialDayGroupInfo
- //
- // An iCalendar structure that contains a group of special days.
- // Is of type string (containing an iCalendar structure).
- //
- Days string `xml:"http://www.onvif.org/ver10/schedule/wsdl Days,omitempty"`
- Extension SpecialDayGroupExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
- }
- // SpecialDayGroupExtension type
- type SpecialDayGroupExtension struct {
- }
- // Type used to reference logical and physical entities.
- // ReferenceToken type
- type ReferenceToken string
- // Type used for names of logical and physical entities.
- // Name type
- type Name string
- // Description is optional and the maximum length is device specific.
- // If the length is more than maximum length, it is silently chopped to the maximum length
- // supported by the device/service (which may be 0).
- //
- // Description type
- type Description string
- // Type used to represent the numbers from 1 ,2 , 3,...
- // PositiveInteger type
- type PositiveInteger uint32
- // DataEntity type
- type DataEntity struct {
- // A service-unique identifier of the item.
- Token ReferenceToken `xml:"token,attr,omitempty"`
- }
- // SchedulePort type
- type SchedulePort interface {
- /*
- This operation returns the capabilities of the schedule service.
- */
- GetServiceCapabilities(request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error)
- GetServiceCapabilitiesContext(ctx context.Context, request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error)
- /*
- This operation requests the ScheduleState for the schedule instance specified by the given token.
- */
- GetScheduleState(request *GetScheduleState) (*GetScheduleStateResponse, error)
- GetScheduleStateContext(ctx context.Context, request *GetScheduleState) (*GetScheduleStateResponse, error)
- /*
- This method returns a list of schedule info items, specified in the request.
- Only found schedules shall be returned, i.e., the returned numbers of elements can
- differ from the requested element.
- The device shall ignore tokens it cannot resolve and shall return an empty list if
- there are no items matching the specified tokens.
- If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be returned.
- */
- GetScheduleInfo(request *GetScheduleInfo) (*GetScheduleInfoResponse, error)
- GetScheduleInfoContext(ctx context.Context, request *GetScheduleInfo) (*GetScheduleInfoResponse, error)
- /*
- This operation requests a list of all of ScheduleInfo items provided by the device.
- A call to this method shall return a StartReference when not all data is returned
- and more data is available. The reference shall be valid for retrieving the next set of data.
- Please refer Access Control Service Specification for more details.
- The number of items returned shall not be greater the Limit parameter.
- */
- GetScheduleInfoList(request *GetScheduleInfoList) (*GetScheduleInfoListResponse, error)
- GetScheduleInfoListContext(ctx context.Context, request *GetScheduleInfoList) (*GetScheduleInfoListResponse, error)
- /*
- This operation returns the specified schedule item matching the given tokens.
- The device shall ignore tokens it cannot resolve and shall return an empty list
- if there are no items matching the specified tokens.
- If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be returned
- */
- GetSchedules(request *GetSchedules) (*GetSchedulesResponse, error)
- GetSchedulesContext(ctx context.Context, request *GetSchedules) (*GetSchedulesResponse, error)
- /*
- This operation requests a list of all of Schedule items provided by the device.
- A call to this method shall return a StartReference when not all data is returned
- and more data is available. The reference shall be valid for retrieving the next set of data.
- Please refer Access Control Service Specification for more details.
- The number of items returned shall not be greater the Limit parameter.
- */
- GetScheduleList(request *GetScheduleList) (*GetScheduleListResponse, error)
- GetScheduleListContext(ctx context.Context, request *GetScheduleList) (*GetScheduleListResponse, error)
- /*
- This operation creates the specified schedule. The token field of the schedule structure
- shall be empty, the device shall allocate a token for the schedule. The allocated token
- shall be returned in the response. If the client sends any value in the token field,
- the device shall return InvalidArgVal as generic fault code.
- */
- CreateSchedule(request *CreateSchedule) (*CreateScheduleResponse, error)
- CreateScheduleContext(ctx context.Context, request *CreateSchedule) (*CreateScheduleResponse, error)
- /*
- This operation modifies or creates the specified schedule.
- */
- SetSchedule(request *SetSchedule) (*SetScheduleResponse, error)
- SetScheduleContext(ctx context.Context, request *SetSchedule) (*SetScheduleResponse, error)
- /*
- This operation modifies or updates the specified schedule.
- */
- ModifySchedule(request *ModifySchedule) (*ModifyScheduleResponse, error)
- ModifyScheduleContext(ctx context.Context, request *ModifySchedule) (*ModifyScheduleResponse, error)
- /*
- This operation will delete the specified schedule.
- If it is associated with one or more entities some devices may not be able to delete the schedule,
- and consequently a ReferenceInUse fault shall be generated.
- */
- DeleteSchedule(request *DeleteSchedule) (*DeleteScheduleResponse, error)
- DeleteScheduleContext(ctx context.Context, request *DeleteSchedule) (*DeleteScheduleResponse, error)
- /*
- This operation requests a list of SpecialDayGroupInfo items matching the given tokens.
- The device shall ignore tokens it cannot resolve and shall return an empty list if
- there are no items matching specified tokens. The device shall not return a fault in this case.
- If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be returned.
- */
- GetSpecialDayGroupInfo(request *GetSpecialDayGroupInfo) (*GetSpecialDayGroupInfoResponse, error)
- GetSpecialDayGroupInfoContext(ctx context.Context, request *GetSpecialDayGroupInfo) (*GetSpecialDayGroupInfoResponse, error)
- /*
- This operation requests a list of all of SpecialDayGroupInfo items provided by the device.
- A call to this method shall return a StartReference when not all data is returned and
- more data is available. The reference shall be valid for retrieving the next set of data.
- The number of items returned shall not be greater than Limit parameter.
- */
- GetSpecialDayGroupInfoList(request *GetSpecialDayGroupInfoList) (*GetSpecialDayGroupInfoListResponse, error)
- GetSpecialDayGroupInfoListContext(ctx context.Context, request *GetSpecialDayGroupInfoList) (*GetSpecialDayGroupInfoListResponse, error)
- /*
- This operation returns the specified special day group item matching the given token.
- */
- GetSpecialDayGroups(request *GetSpecialDayGroups) (*GetSpecialDayGroupsResponse, error)
- GetSpecialDayGroupsContext(ctx context.Context, request *GetSpecialDayGroups) (*GetSpecialDayGroupsResponse, error)
- /*
- This operation requests a list of all of SpecialDayGroupList items provided by the device.
- A call to this method shall return a StartReference when not all data is returned and
- more data is available. The reference shall be valid for retrieving the next set of data.
- Please refer Access Control Service Specification for more details.
- The number of items returned shall not be greater the Limit parameter.
- */
- GetSpecialDayGroupList(request *GetSpecialDayGroupList) (*GetSpecialDayGroupListResponse, error)
- GetSpecialDayGroupListContext(ctx context.Context, request *GetSpecialDayGroupList) (*GetSpecialDayGroupListResponse, error)
- /*
- This operation creates the specified special day group. The token field of the
- SpecialDayGroup structure shall be empty, the device shall allocate a token for the
- special day group. The allocated token shall be returned in the response.
- If there is any value in the token field, the device shall return InvalidArgVal as generic fault code.
- */
- CreateSpecialDayGroup(request *CreateSpecialDayGroup) (*CreateSpecialDayGroupResponse, error)
- CreateSpecialDayGroupContext(ctx context.Context, request *CreateSpecialDayGroup) (*CreateSpecialDayGroupResponse, error)
- /*
- This operation modifies or creates the specified special day group.
- */
- SetSpecialDayGroup(request *SetSpecialDayGroup) (*SetSpecialDayGroupResponse, error)
- SetSpecialDayGroupContext(ctx context.Context, request *SetSpecialDayGroup) (*SetSpecialDayGroupResponse, error)
- /*
- This operation updates the specified special day group.
- */
- ModifySpecialDayGroup(request *ModifySpecialDayGroup) (*ModifySpecialDayGroupResponse, error)
- ModifySpecialDayGroupContext(ctx context.Context, request *ModifySpecialDayGroup) (*ModifySpecialDayGroupResponse, error)
- /*
- This method deletes the specified special day group.
- If it is associated with one or more schedules some devices may not be able to delete
- the special day group, and consequently a ReferenceInUse fault must be generated.
- */
- DeleteSpecialDayGroup(request *DeleteSpecialDayGroup) (*DeleteSpecialDayGroupResponse, error)
- DeleteSpecialDayGroupContext(ctx context.Context, request *DeleteSpecialDayGroup) (*DeleteSpecialDayGroupResponse, error)
- }
- // schedulePort type
- type schedulePort struct {
- client *soap.Client
- xaddr string
- }
- func NewSchedulePort(client *soap.Client, xaddr string) SchedulePort {
- return &schedulePort{
- client: client,
- xaddr: xaddr,
- }
- }
- func (service *schedulePort) GetServiceCapabilitiesContext(ctx context.Context, request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) {
- response := new(GetServiceCapabilitiesResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetServiceCapabilities", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetServiceCapabilities(request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) {
- return service.GetServiceCapabilitiesContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) GetScheduleStateContext(ctx context.Context, request *GetScheduleState) (*GetScheduleStateResponse, error) {
- response := new(GetScheduleStateResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetScheduleState", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetScheduleState(request *GetScheduleState) (*GetScheduleStateResponse, error) {
- return service.GetScheduleStateContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) GetScheduleInfoContext(ctx context.Context, request *GetScheduleInfo) (*GetScheduleInfoResponse, error) {
- response := new(GetScheduleInfoResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetScheduleInfo", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetScheduleInfo(request *GetScheduleInfo) (*GetScheduleInfoResponse, error) {
- return service.GetScheduleInfoContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) GetScheduleInfoListContext(ctx context.Context, request *GetScheduleInfoList) (*GetScheduleInfoListResponse, error) {
- response := new(GetScheduleInfoListResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetScheduleInfoList", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetScheduleInfoList(request *GetScheduleInfoList) (*GetScheduleInfoListResponse, error) {
- return service.GetScheduleInfoListContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) GetSchedulesContext(ctx context.Context, request *GetSchedules) (*GetSchedulesResponse, error) {
- response := new(GetSchedulesResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSchedules", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetSchedules(request *GetSchedules) (*GetSchedulesResponse, error) {
- return service.GetSchedulesContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) GetScheduleListContext(ctx context.Context, request *GetScheduleList) (*GetScheduleListResponse, error) {
- response := new(GetScheduleListResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetScheduleList", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetScheduleList(request *GetScheduleList) (*GetScheduleListResponse, error) {
- return service.GetScheduleListContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) CreateScheduleContext(ctx context.Context, request *CreateSchedule) (*CreateScheduleResponse, error) {
- response := new(CreateScheduleResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/CreateSchedule", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) CreateSchedule(request *CreateSchedule) (*CreateScheduleResponse, error) {
- return service.CreateScheduleContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) SetScheduleContext(ctx context.Context, request *SetSchedule) (*SetScheduleResponse, error) {
- response := new(SetScheduleResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/SetSchedule", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) SetSchedule(request *SetSchedule) (*SetScheduleResponse, error) {
- return service.SetScheduleContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) ModifyScheduleContext(ctx context.Context, request *ModifySchedule) (*ModifyScheduleResponse, error) {
- response := new(ModifyScheduleResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/ModifySchedule", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) ModifySchedule(request *ModifySchedule) (*ModifyScheduleResponse, error) {
- return service.ModifyScheduleContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) DeleteScheduleContext(ctx context.Context, request *DeleteSchedule) (*DeleteScheduleResponse, error) {
- response := new(DeleteScheduleResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/DeleteSchedule", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) DeleteSchedule(request *DeleteSchedule) (*DeleteScheduleResponse, error) {
- return service.DeleteScheduleContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) GetSpecialDayGroupInfoContext(ctx context.Context, request *GetSpecialDayGroupInfo) (*GetSpecialDayGroupInfoResponse, error) {
- response := new(GetSpecialDayGroupInfoResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSpecialDayGroupInfo", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetSpecialDayGroupInfo(request *GetSpecialDayGroupInfo) (*GetSpecialDayGroupInfoResponse, error) {
- return service.GetSpecialDayGroupInfoContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) GetSpecialDayGroupInfoListContext(ctx context.Context, request *GetSpecialDayGroupInfoList) (*GetSpecialDayGroupInfoListResponse, error) {
- response := new(GetSpecialDayGroupInfoListResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSpecialDayGroupInfoList", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetSpecialDayGroupInfoList(request *GetSpecialDayGroupInfoList) (*GetSpecialDayGroupInfoListResponse, error) {
- return service.GetSpecialDayGroupInfoListContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) GetSpecialDayGroupsContext(ctx context.Context, request *GetSpecialDayGroups) (*GetSpecialDayGroupsResponse, error) {
- response := new(GetSpecialDayGroupsResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSpecialDayGroups", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetSpecialDayGroups(request *GetSpecialDayGroups) (*GetSpecialDayGroupsResponse, error) {
- return service.GetSpecialDayGroupsContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) GetSpecialDayGroupListContext(ctx context.Context, request *GetSpecialDayGroupList) (*GetSpecialDayGroupListResponse, error) {
- response := new(GetSpecialDayGroupListResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSpecialDayGroupList", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) GetSpecialDayGroupList(request *GetSpecialDayGroupList) (*GetSpecialDayGroupListResponse, error) {
- return service.GetSpecialDayGroupListContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) CreateSpecialDayGroupContext(ctx context.Context, request *CreateSpecialDayGroup) (*CreateSpecialDayGroupResponse, error) {
- response := new(CreateSpecialDayGroupResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/CreateSpecialDayGroup", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) CreateSpecialDayGroup(request *CreateSpecialDayGroup) (*CreateSpecialDayGroupResponse, error) {
- return service.CreateSpecialDayGroupContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) SetSpecialDayGroupContext(ctx context.Context, request *SetSpecialDayGroup) (*SetSpecialDayGroupResponse, error) {
- response := new(SetSpecialDayGroupResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/SetSpecialDayGroup", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) SetSpecialDayGroup(request *SetSpecialDayGroup) (*SetSpecialDayGroupResponse, error) {
- return service.SetSpecialDayGroupContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) ModifySpecialDayGroupContext(ctx context.Context, request *ModifySpecialDayGroup) (*ModifySpecialDayGroupResponse, error) {
- response := new(ModifySpecialDayGroupResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/ModifySpecialDayGroup", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) ModifySpecialDayGroup(request *ModifySpecialDayGroup) (*ModifySpecialDayGroupResponse, error) {
- return service.ModifySpecialDayGroupContext(
- context.Background(),
- request,
- )
- }
- func (service *schedulePort) DeleteSpecialDayGroupContext(ctx context.Context, request *DeleteSpecialDayGroup) (*DeleteSpecialDayGroupResponse, error) {
- response := new(DeleteSpecialDayGroupResponse)
- err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/DeleteSpecialDayGroup", request, response)
- if err != nil {
- return nil, err
- }
- return response, nil
- }
- func (service *schedulePort) DeleteSpecialDayGroup(request *DeleteSpecialDayGroup) (*DeleteSpecialDayGroupResponse, error) {
- return service.DeleteSpecialDayGroupContext(
- context.Background(),
- request,
- )
- }
|