schedule.go 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122
  1. package schedule
  2. import (
  3. "context"
  4. "encoding/xml"
  5. "time"
  6. "lc/common/onvif/soap"
  7. )
  8. // against "unused imports"
  9. var _ time.Time
  10. var _ xml.Name
  11. // GetServiceCapabilities type
  12. type GetServiceCapabilities struct {
  13. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetServiceCapabilities"`
  14. }
  15. // GetServiceCapabilitiesResponse type
  16. type GetServiceCapabilitiesResponse struct {
  17. XMLName xml.Name `xml:"GetServiceCapabilitiesResponse"`
  18. //
  19. // The capability response message contains the requested schedule service
  20. // capabilities using a hierarchical XML capability structure.
  21. //
  22. Capabilities ServiceCapabilities `xml:"Capabilities,omitempty"`
  23. }
  24. // GetScheduleState type
  25. type GetScheduleState struct {
  26. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetScheduleState"`
  27. //
  28. // Token of schedule instance to get ScheduleState.
  29. //
  30. Token ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
  31. }
  32. // GetScheduleStateResponse type
  33. type GetScheduleStateResponse struct {
  34. XMLName xml.Name `xml:"GetScheduleStateResponse"`
  35. //
  36. // ScheduleState item.
  37. //
  38. ScheduleState ScheduleState `xml:"ScheduleState,omitempty"`
  39. }
  40. // GetScheduleInfo type
  41. type GetScheduleInfo struct {
  42. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetScheduleInfo"`
  43. //
  44. // Tokens of ScheduleInfo items to get.
  45. //
  46. Token []ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
  47. }
  48. // GetScheduleInfoResponse type
  49. type GetScheduleInfoResponse struct {
  50. XMLName xml.Name `xml:"GetScheduleInfoResponse"`
  51. //
  52. // List of ScheduleInfo items.
  53. //
  54. ScheduleInfo []ScheduleInfo `xml:"ScheduleInfo,omitempty"`
  55. }
  56. // GetScheduleInfoList type
  57. type GetScheduleInfoList struct {
  58. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetScheduleInfoList"`
  59. //
  60. // Maximum number of entries to return. If not specified, less than one
  61. // or higher than what the device supports, the number of items is
  62. // determined by the device.
  63. //
  64. Limit int32 `xml:"http://www.onvif.org/ver10/schema Limit,omitempty"`
  65. //
  66. // Start returning entries from this start reference.
  67. // If not specified, entries shall start from the beginning of the dataset.
  68. //
  69. StartReference string `xml:"http://www.onvif.org/ver10/schedule/wsdl StartReference,omitempty"`
  70. }
  71. // GetScheduleInfoListResponse type
  72. type GetScheduleInfoListResponse struct {
  73. XMLName xml.Name `xml:"GetScheduleInfoListResponse"`
  74. //
  75. // StartReference to use in next call to get the following items.
  76. // If absent, no more items to get.
  77. //
  78. NextStartReference string `xml:"NextStartReference,omitempty"`
  79. //
  80. // List of ScheduleInfo items.
  81. //
  82. ScheduleInfo []ScheduleInfo `xml:"ScheduleInfo,omitempty"`
  83. }
  84. // GetSchedules type
  85. type GetSchedules struct {
  86. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSchedules"`
  87. // Tokens of Schedule items to get
  88. Token []ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
  89. }
  90. // GetSchedulesResponse type
  91. type GetSchedulesResponse struct {
  92. XMLName xml.Name `xml:"GetSchedulesResponse"`
  93. // List of schedule items.
  94. Schedule []Schedule `xml:"Schedule,omitempty"`
  95. }
  96. // GetScheduleList type
  97. type GetScheduleList struct {
  98. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetScheduleList"`
  99. //
  100. // Maximum number of entries to return.
  101. // If not specified, less than one or higher than what the device supports,
  102. // the number of items is determined by the device.
  103. //
  104. Limit int32 `xml:"http://www.onvif.org/ver10/schema Limit,omitempty"`
  105. //
  106. // Start returning entries from this start reference.
  107. // If not specified, entries shall start from the beginning of the dataset.
  108. //
  109. StartReference string `xml:"http://www.onvif.org/ver10/schedule/wsdl StartReference,omitempty"`
  110. }
  111. // GetScheduleListResponse type
  112. type GetScheduleListResponse struct {
  113. XMLName xml.Name `xml:"GetScheduleListResponse"`
  114. //
  115. // StartReference to use in next call to get the following items.
  116. // If absent, no more items to get.
  117. //
  118. NextStartReference string `xml:"NextStartReference,omitempty"`
  119. // List of Schedule items.
  120. Schedule []Schedule `xml:"Schedule,omitempty"`
  121. }
  122. // CreateSchedule type
  123. type CreateSchedule struct {
  124. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl CreateSchedule"`
  125. // The Schedule to create
  126. Schedule Schedule `xml:"http://www.onvif.org/ver10/schedule/wsdl Schedule,omitempty"`
  127. }
  128. // CreateScheduleResponse type
  129. type CreateScheduleResponse struct {
  130. XMLName xml.Name `xml:"CreateScheduleResponse"`
  131. // The token of created Schedule
  132. Token ReferenceToken `xml:"Token,omitempty"`
  133. }
  134. // SetSchedule type
  135. type SetSchedule struct {
  136. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl SetSchedule"`
  137. // The Schedule to modify/create
  138. Schedule Schedule `xml:"http://www.onvif.org/ver10/schedule/wsdl Schedule,omitempty"`
  139. }
  140. // SetScheduleResponse type
  141. type SetScheduleResponse struct {
  142. XMLName xml.Name `xml:"SetScheduleResponse"`
  143. }
  144. // ModifySchedule type
  145. type ModifySchedule struct {
  146. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl ModifySchedule"`
  147. // The Schedule to modify/update
  148. Schedule Schedule `xml:"http://www.onvif.org/ver10/schedule/wsdl Schedule,omitempty"`
  149. }
  150. // ModifyScheduleResponse type
  151. type ModifyScheduleResponse struct {
  152. XMLName xml.Name `xml:"ModifyScheduleResponse"`
  153. }
  154. // DeleteSchedule type
  155. type DeleteSchedule struct {
  156. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl DeleteSchedule"`
  157. // The token of the schedule to delete.
  158. Token ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
  159. }
  160. // DeleteScheduleResponse type
  161. type DeleteScheduleResponse struct {
  162. XMLName xml.Name `xml:"DeleteScheduleResponse"`
  163. }
  164. // GetSpecialDayGroupInfo type
  165. type GetSpecialDayGroupInfo struct {
  166. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSpecialDayGroupInfo"`
  167. // Tokens of SpecialDayGroupInfo items to get.
  168. Token []ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
  169. }
  170. // GetSpecialDayGroupInfoResponse type
  171. type GetSpecialDayGroupInfoResponse struct {
  172. XMLName xml.Name `xml:"GetSpecialDayGroupInfoResponse"`
  173. // List of SpecialDayGroupInfo items.
  174. SpecialDayGroupInfo []SpecialDayGroupInfo `xml:"SpecialDayGroupInfo,omitempty"`
  175. }
  176. // GetSpecialDayGroupInfoList type
  177. type GetSpecialDayGroupInfoList struct {
  178. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSpecialDayGroupInfoList"`
  179. //
  180. // Maximum number of entries to return. If not specified, less than
  181. // one or higher than what the device supports, the number
  182. // of items is determined by the device.
  183. //
  184. Limit int32 `xml:"http://www.onvif.org/ver10/schema Limit,omitempty"`
  185. //
  186. // Start returning entries from this start reference.
  187. // If not specified, entries shall start from the beginning of the dataset.
  188. //
  189. StartReference string `xml:"http://www.onvif.org/ver10/schedule/wsdl StartReference,omitempty"`
  190. }
  191. // GetSpecialDayGroupInfoListResponse type
  192. type GetSpecialDayGroupInfoListResponse struct {
  193. XMLName xml.Name `xml:"GetSpecialDayGroupInfoListResponse"`
  194. //
  195. // StartReference to use in next call to get the following items.
  196. // If absent, no more items to get.
  197. //
  198. NextStartReference string `xml:"NextStartReference,omitempty"`
  199. // List of SpecialDayGroupInfo items.
  200. SpecialDayGroupInfo []SpecialDayGroupInfo `xml:"SpecialDayGroupInfo,omitempty"`
  201. }
  202. // GetSpecialDayGroups type
  203. type GetSpecialDayGroups struct {
  204. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSpecialDayGroups"`
  205. // Tokens of the SpecialDayGroup items to get
  206. Token []ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
  207. }
  208. // GetSpecialDayGroupsResponse type
  209. type GetSpecialDayGroupsResponse struct {
  210. XMLName xml.Name `xml:"GetSpecialDayGroupsResponse"`
  211. // List of SpecialDayGroup items.
  212. SpecialDayGroup []SpecialDayGroup `xml:"SpecialDayGroup,omitempty"`
  213. }
  214. // GetSpecialDayGroupList type
  215. type GetSpecialDayGroupList struct {
  216. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl GetSpecialDayGroupList"`
  217. //
  218. // Maximum number of entries to return. If not specified, less than
  219. // one or higher than what the device supports, the number of
  220. // items is determined by the device.
  221. //
  222. Limit int32 `xml:"http://www.onvif.org/ver10/schema Limit,omitempty"`
  223. //
  224. // Start returning entries from this start reference.
  225. // If not specified, entries shall start from the beginning of the dataset.
  226. //
  227. StartReference string `xml:"http://www.onvif.org/ver10/schedule/wsdl StartReference,omitempty"`
  228. }
  229. // GetSpecialDayGroupListResponse type
  230. type GetSpecialDayGroupListResponse struct {
  231. XMLName xml.Name `xml:"GetSpecialDayGroupListResponse"`
  232. // StartReference to use in next call to get the following items. If
  233. // absent, no more items to get.
  234. //
  235. NextStartReference string `xml:"NextStartReference,omitempty"`
  236. // List of SpecialDayGroup items.
  237. SpecialDayGroup []SpecialDayGroup `xml:"SpecialDayGroup,omitempty"`
  238. }
  239. // CreateSpecialDayGroup type
  240. type CreateSpecialDayGroup struct {
  241. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl CreateSpecialDayGroup"`
  242. //
  243. // The special day group to create.
  244. //
  245. SpecialDayGroup SpecialDayGroup `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDayGroup,omitempty"`
  246. }
  247. // CreateSpecialDayGroupResponse type
  248. type CreateSpecialDayGroupResponse struct {
  249. XMLName xml.Name `xml:"CreateSpecialDayGroupResponse"`
  250. // The token of created special day group.
  251. Token ReferenceToken `xml:"Token,omitempty"`
  252. }
  253. // SetSpecialDayGroup type
  254. type SetSpecialDayGroup struct {
  255. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl SetSpecialDayGroup"`
  256. // The SpecialDayGroup to modify/create
  257. SpecialDayGroup SpecialDayGroup `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDayGroup,omitempty"`
  258. }
  259. // SetSpecialDayGroupResponse type
  260. type SetSpecialDayGroupResponse struct {
  261. XMLName xml.Name `xml:"SetSpecialDayGroupResponse"`
  262. }
  263. // ModifySpecialDayGroup type
  264. type ModifySpecialDayGroup struct {
  265. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl ModifySpecialDayGroup"`
  266. //
  267. // The special day group to modify/update.
  268. //
  269. SpecialDayGroup SpecialDayGroup `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDayGroup,omitempty"`
  270. }
  271. // ModifySpecialDayGroupResponse type
  272. type ModifySpecialDayGroupResponse struct {
  273. XMLName xml.Name `xml:"ModifySpecialDayGroupResponse"`
  274. }
  275. // DeleteSpecialDayGroup type
  276. type DeleteSpecialDayGroup struct {
  277. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl DeleteSpecialDayGroup"`
  278. //
  279. // The token of the special day group item to delete.
  280. //
  281. Token ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl Token,omitempty"`
  282. }
  283. // DeleteSpecialDayGroupResponse type
  284. type DeleteSpecialDayGroupResponse struct {
  285. XMLName xml.Name `xml:"DeleteSpecialDayGroupResponse"`
  286. }
  287. // ServiceCapabilities type
  288. type ServiceCapabilities struct {
  289. XMLName xml.Name `xml:"http://www.onvif.org/ver10/schedule/wsdl Capabilities"`
  290. //
  291. // The maximum number of entries returned by a single Get<Entity>List or
  292. // Get<Entity> request. The device shall never return more than this number
  293. // of entities in a single response.
  294. //
  295. MaxLimit PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxLimit,attr,omitempty"`
  296. //
  297. // Indicates the maximum number of schedules the device supports.
  298. // The device shall support at least one schedule.
  299. //
  300. MaxSchedules PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxSchedules,attr,omitempty"`
  301. //
  302. // Indicates the maximum number of time periods per day the device supports
  303. // in a schedule including special days schedule. The device shall support
  304. // at least one time period per day.
  305. //
  306. MaxTimePeriodsPerDay PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxTimePeriodsPerDay,attr,omitempty"`
  307. //
  308. // Indicates the maximum number of special day group entities the device supports.
  309. // The device shall support at least one ‘SpecialDayGroup’ entity.
  310. //
  311. MaxSpecialDayGroups PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxSpecialDayGroups,attr,omitempty"`
  312. //
  313. // Indicates the maximum number of days per ‘SpecialDayGroup’ entity the device
  314. // supports. The device shall support at least one day per ‘SpecialDayGroup’ entity.
  315. //
  316. MaxDaysInSpecialDayGroup PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxDaysInSpecialDayGroup,attr,omitempty"`
  317. //
  318. // Indicates the maximum number of ‘SpecialDaysSchedule’ entities referred by a
  319. // schedule that the device supports.
  320. //
  321. MaxSpecialDaysSchedules PositiveInteger `xml:"http://www.onvif.org/ver10/schedule/wsdl MaxSpecialDaysSchedules,attr,omitempty"`
  322. //
  323. // For schedules:
  324. // If this capability is supported, then all iCalendar recurrence types shall
  325. // be supported by the device. The device shall also support the start and end dates (or
  326. // iCalendar occurrence count) in recurring events (see iCalendar examples in section 3).
  327. // If this capability is not supported, then only the weekly iCalendar recurrence
  328. // type shall be supported. Non-recurring events and other recurring types are
  329. // not supported. The device shall only accept a start date with the year ‘1970’
  330. // (the month and day is needed to reflect the week day of the recurrence)
  331. // and will not accept an occurrence count (or iCalendar until date) in recurring events.
  332. // For special days (only applicable if SpecialDaysSupported is set to true):
  333. // If this capability is supported, then all iCalendar recurrence types shall
  334. // be supported by the device. The device shall also support the start and
  335. // end dates (or occurrence count) in recurring events.
  336. // If this capability is not supported, then only non-recurring special days are supported.
  337. //
  338. ExtendedRecurrenceSupported bool `xml:"http://www.onvif.org/ver10/schedule/wsdl ExtendedRecurrenceSupported,attr,omitempty"`
  339. //
  340. // If this capability is supported, then the device shall support special days.
  341. //
  342. SpecialDaysSupported bool `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDaysSupported,attr,omitempty"`
  343. //
  344. // If this capability is set to true, the device shall implement the
  345. // GetScheduleState command, and shall notify subscribing clients whenever
  346. // schedules become active or inactive.
  347. //
  348. StateReportingSupported bool `xml:"http://www.onvif.org/ver10/schedule/wsdl StateReportingSupported,attr,omitempty"`
  349. //
  350. // Indicates that the client is allowed to supply the token when creating schedules and special day groups.
  351. // To enable the use of the commands SetSchedule and SetSpecialDayGroup, the value must be set to true.
  352. //
  353. ClientSuppliedTokenSupported bool `xml:"http://www.onvif.org/ver10/schedule/wsdl ClientSuppliedTokenSupported,attr,omitempty"`
  354. }
  355. // ScheduleInfo type
  356. type ScheduleInfo struct {
  357. *DataEntity
  358. //
  359. // A user readable name. It shall be up to 64 characters.
  360. //
  361. Name Name `xml:"http://www.onvif.org/ver10/schedule/wsdl Name,omitempty"`
  362. //
  363. // User readable description for the schedule. It shall be up to 1024 characters.
  364. //
  365. Description Description `xml:"http://www.onvif.org/ver10/schedule/wsdl Description,omitempty"`
  366. }
  367. // Schedule type
  368. type Schedule struct {
  369. *ScheduleInfo
  370. //
  371. // An iCalendar structure that defines a number of events. Events
  372. // can be recurring or non-recurring. The events can, for instance,
  373. // be used to control when a camera should record or when a facility
  374. // is accessible. Some devices might not be able to fully support
  375. // all the features of iCalendar. Setting the service capability
  376. // ExtendedRecurrenceSupported to false will enable more devices
  377. // to be ONVIF compliant. Is of type string (but contains an iCalendar structure).
  378. //
  379. Standard string `xml:"http://www.onvif.org/ver10/schedule/wsdl Standard,omitempty"`
  380. //
  381. // For devices that are not able to support all the features of iCalendar,
  382. // supporting special days is essential. Each SpecialDaysSchedule
  383. // instance defines an alternate set of time periods that overrides
  384. // the regular schedule for a specified list of special days.
  385. // Is of type SpecialDaysSchedule.
  386. //
  387. SpecialDays []SpecialDaysSchedule `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDays,omitempty"`
  388. Extension ScheduleExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
  389. }
  390. // ScheduleExtension type
  391. type ScheduleExtension struct {
  392. }
  393. // SpecialDaysSchedule type
  394. type SpecialDaysSchedule struct {
  395. //
  396. // Indicates the list of special days in a schedule.
  397. //
  398. GroupToken ReferenceToken `xml:"http://www.onvif.org/ver10/schedule/wsdl GroupToken,omitempty"`
  399. //
  400. // Indicates the alternate time periods for the list of special days
  401. // (overrides the regular schedule). For example, the regular schedule indicates
  402. // that it is active from 8AM to 5PM on Mondays. However, this particular
  403. // Monday is a special day, and the alternate time periods state that the
  404. // schedule is active from 9 AM to 11 AM and 1 PM to 4 PM.
  405. // If no time periods are defined, then no access is allowed.
  406. // Is of type TimePeriod.
  407. //
  408. TimeRange []TimePeriod `xml:"http://www.onvif.org/ver10/schedule/wsdl TimeRange,omitempty"`
  409. Extension SpecialDaysScheduleExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
  410. }
  411. // SpecialDaysScheduleExtension type
  412. type SpecialDaysScheduleExtension struct {
  413. }
  414. // ScheduleState type
  415. type ScheduleState struct {
  416. //
  417. // Indicates that the current time is within the boundaries of the schedule
  418. // or its special days schedules’ time periods. For example, if this
  419. // schedule is being used for triggering automatic recording on a video source,
  420. // the Active flag will be true when the schedule-based recording is supposed to record.
  421. //
  422. Active bool `xml:"http://www.onvif.org/ver10/schedule/wsdl Active,omitempty"`
  423. //
  424. // Indicates that the current time is within the boundaries of its special
  425. // days schedules’ time periods. For example, if this schedule is being used
  426. // for recording at a lower frame rate on a video source during special days,
  427. // the SpecialDay flag will be true. If special days are not supported by the device,
  428. // this field may be omitted and interpreted as false by the client.
  429. //
  430. SpecialDay bool `xml:"http://www.onvif.org/ver10/schedule/wsdl SpecialDay,omitempty"`
  431. Extension ScheduleStateExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
  432. }
  433. // ScheduleStateExtension type
  434. type ScheduleStateExtension struct {
  435. }
  436. // TimePeriod type
  437. type TimePeriod struct {
  438. //
  439. // Indicates the start time.
  440. //
  441. From string `xml:"http://www.onvif.org/ver10/schema From,omitempty"`
  442. //
  443. // Indicates the end time. Is optional, if omitted, the period ends at midnight.
  444. // The end time is exclusive, meaning that that exact moment in time is not
  445. // part of the period. To determine if a moment in time (t) is part of a time period,
  446. // the formula StartTime ≤ t < EndTime is used.
  447. //
  448. Until string `xml:"http://www.onvif.org/ver10/schema Until,omitempty"`
  449. Extension TimePeriodExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
  450. }
  451. // TimePeriodExtension type
  452. type TimePeriodExtension struct {
  453. }
  454. // SpecialDayGroupInfo type
  455. type SpecialDayGroupInfo struct {
  456. *DataEntity
  457. //
  458. // User readable name. It shall be up to 64 characters.
  459. //
  460. Name Name `xml:"http://www.onvif.org/ver10/schedule/wsdl Name,omitempty"`
  461. //
  462. // User readable description for the special days. It shall be up to 1024
  463. // characters.
  464. //
  465. Description Description `xml:"http://www.onvif.org/ver10/schedule/wsdl Description,omitempty"`
  466. }
  467. // SpecialDayGroup type
  468. type SpecialDayGroup struct {
  469. *SpecialDayGroupInfo
  470. //
  471. // An iCalendar structure that contains a group of special days.
  472. // Is of type string (containing an iCalendar structure).
  473. //
  474. Days string `xml:"http://www.onvif.org/ver10/schedule/wsdl Days,omitempty"`
  475. Extension SpecialDayGroupExtension `xml:"http://www.onvif.org/ver10/schedule/wsdl Extension,omitempty"`
  476. }
  477. // SpecialDayGroupExtension type
  478. type SpecialDayGroupExtension struct {
  479. }
  480. // Type used to reference logical and physical entities.
  481. // ReferenceToken type
  482. type ReferenceToken string
  483. // Type used for names of logical and physical entities.
  484. // Name type
  485. type Name string
  486. // Description is optional and the maximum length is device specific.
  487. // If the length is more than maximum length, it is silently chopped to the maximum length
  488. // supported by the device/service (which may be 0).
  489. //
  490. // Description type
  491. type Description string
  492. // Type used to represent the numbers from 1 ,2 , 3,...
  493. // PositiveInteger type
  494. type PositiveInteger uint32
  495. // DataEntity type
  496. type DataEntity struct {
  497. // A service-unique identifier of the item.
  498. Token ReferenceToken `xml:"token,attr,omitempty"`
  499. }
  500. // SchedulePort type
  501. type SchedulePort interface {
  502. /*
  503. This operation returns the capabilities of the schedule service.
  504. */
  505. GetServiceCapabilities(request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error)
  506. GetServiceCapabilitiesContext(ctx context.Context, request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error)
  507. /*
  508. This operation requests the ScheduleState for the schedule instance specified by the given token.
  509. */
  510. GetScheduleState(request *GetScheduleState) (*GetScheduleStateResponse, error)
  511. GetScheduleStateContext(ctx context.Context, request *GetScheduleState) (*GetScheduleStateResponse, error)
  512. /*
  513. This method returns a list of schedule info items, specified in the request.
  514. Only found schedules shall be returned, i.e., the returned numbers of elements can
  515. differ from the requested element.
  516. The device shall ignore tokens it cannot resolve and shall return an empty list if
  517. there are no items matching the specified tokens.
  518. If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be returned.
  519. */
  520. GetScheduleInfo(request *GetScheduleInfo) (*GetScheduleInfoResponse, error)
  521. GetScheduleInfoContext(ctx context.Context, request *GetScheduleInfo) (*GetScheduleInfoResponse, error)
  522. /*
  523. This operation requests a list of all of ScheduleInfo items provided by the device.
  524. A call to this method shall return a StartReference when not all data is returned
  525. and more data is available. The reference shall be valid for retrieving the next set of data.
  526. Please refer Access Control Service Specification for more details.
  527. The number of items returned shall not be greater the Limit parameter.
  528. */
  529. GetScheduleInfoList(request *GetScheduleInfoList) (*GetScheduleInfoListResponse, error)
  530. GetScheduleInfoListContext(ctx context.Context, request *GetScheduleInfoList) (*GetScheduleInfoListResponse, error)
  531. /*
  532. This operation returns the specified schedule item matching the given tokens.
  533. The device shall ignore tokens it cannot resolve and shall return an empty list
  534. if there are no items matching the specified tokens.
  535. If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be returned
  536. */
  537. GetSchedules(request *GetSchedules) (*GetSchedulesResponse, error)
  538. GetSchedulesContext(ctx context.Context, request *GetSchedules) (*GetSchedulesResponse, error)
  539. /*
  540. This operation requests a list of all of Schedule items provided by the device.
  541. A call to this method shall return a StartReference when not all data is returned
  542. and more data is available. The reference shall be valid for retrieving the next set of data.
  543. Please refer Access Control Service Specification for more details.
  544. The number of items returned shall not be greater the Limit parameter.
  545. */
  546. GetScheduleList(request *GetScheduleList) (*GetScheduleListResponse, error)
  547. GetScheduleListContext(ctx context.Context, request *GetScheduleList) (*GetScheduleListResponse, error)
  548. /*
  549. This operation creates the specified schedule. The token field of the schedule structure
  550. shall be empty, the device shall allocate a token for the schedule. The allocated token
  551. shall be returned in the response. If the client sends any value in the token field,
  552. the device shall return InvalidArgVal as generic fault code.
  553. */
  554. CreateSchedule(request *CreateSchedule) (*CreateScheduleResponse, error)
  555. CreateScheduleContext(ctx context.Context, request *CreateSchedule) (*CreateScheduleResponse, error)
  556. /*
  557. This operation modifies or creates the specified schedule.
  558. */
  559. SetSchedule(request *SetSchedule) (*SetScheduleResponse, error)
  560. SetScheduleContext(ctx context.Context, request *SetSchedule) (*SetScheduleResponse, error)
  561. /*
  562. This operation modifies or updates the specified schedule.
  563. */
  564. ModifySchedule(request *ModifySchedule) (*ModifyScheduleResponse, error)
  565. ModifyScheduleContext(ctx context.Context, request *ModifySchedule) (*ModifyScheduleResponse, error)
  566. /*
  567. This operation will delete the specified schedule.
  568. If it is associated with one or more entities some devices may not be able to delete the schedule,
  569. and consequently a ReferenceInUse fault shall be generated.
  570. */
  571. DeleteSchedule(request *DeleteSchedule) (*DeleteScheduleResponse, error)
  572. DeleteScheduleContext(ctx context.Context, request *DeleteSchedule) (*DeleteScheduleResponse, error)
  573. /*
  574. This operation requests a list of SpecialDayGroupInfo items matching the given tokens.
  575. The device shall ignore tokens it cannot resolve and shall return an empty list if
  576. there are no items matching specified tokens. The device shall not return a fault in this case.
  577. If the number of requested items is greater than MaxLimit, a TooManyItems fault shall be returned.
  578. */
  579. GetSpecialDayGroupInfo(request *GetSpecialDayGroupInfo) (*GetSpecialDayGroupInfoResponse, error)
  580. GetSpecialDayGroupInfoContext(ctx context.Context, request *GetSpecialDayGroupInfo) (*GetSpecialDayGroupInfoResponse, error)
  581. /*
  582. This operation requests a list of all of SpecialDayGroupInfo items provided by the device.
  583. A call to this method shall return a StartReference when not all data is returned and
  584. more data is available. The reference shall be valid for retrieving the next set of data.
  585. The number of items returned shall not be greater than Limit parameter.
  586. */
  587. GetSpecialDayGroupInfoList(request *GetSpecialDayGroupInfoList) (*GetSpecialDayGroupInfoListResponse, error)
  588. GetSpecialDayGroupInfoListContext(ctx context.Context, request *GetSpecialDayGroupInfoList) (*GetSpecialDayGroupInfoListResponse, error)
  589. /*
  590. This operation returns the specified special day group item matching the given token.
  591. */
  592. GetSpecialDayGroups(request *GetSpecialDayGroups) (*GetSpecialDayGroupsResponse, error)
  593. GetSpecialDayGroupsContext(ctx context.Context, request *GetSpecialDayGroups) (*GetSpecialDayGroupsResponse, error)
  594. /*
  595. This operation requests a list of all of SpecialDayGroupList items provided by the device.
  596. A call to this method shall return a StartReference when not all data is returned and
  597. more data is available. The reference shall be valid for retrieving the next set of data.
  598. Please refer Access Control Service Specification for more details.
  599. The number of items returned shall not be greater the Limit parameter.
  600. */
  601. GetSpecialDayGroupList(request *GetSpecialDayGroupList) (*GetSpecialDayGroupListResponse, error)
  602. GetSpecialDayGroupListContext(ctx context.Context, request *GetSpecialDayGroupList) (*GetSpecialDayGroupListResponse, error)
  603. /*
  604. This operation creates the specified special day group. The token field of the
  605. SpecialDayGroup structure shall be empty, the device shall allocate a token for the
  606. special day group. The allocated token shall be returned in the response.
  607. If there is any value in the token field, the device shall return InvalidArgVal as generic fault code.
  608. */
  609. CreateSpecialDayGroup(request *CreateSpecialDayGroup) (*CreateSpecialDayGroupResponse, error)
  610. CreateSpecialDayGroupContext(ctx context.Context, request *CreateSpecialDayGroup) (*CreateSpecialDayGroupResponse, error)
  611. /*
  612. This operation modifies or creates the specified special day group.
  613. */
  614. SetSpecialDayGroup(request *SetSpecialDayGroup) (*SetSpecialDayGroupResponse, error)
  615. SetSpecialDayGroupContext(ctx context.Context, request *SetSpecialDayGroup) (*SetSpecialDayGroupResponse, error)
  616. /*
  617. This operation updates the specified special day group.
  618. */
  619. ModifySpecialDayGroup(request *ModifySpecialDayGroup) (*ModifySpecialDayGroupResponse, error)
  620. ModifySpecialDayGroupContext(ctx context.Context, request *ModifySpecialDayGroup) (*ModifySpecialDayGroupResponse, error)
  621. /*
  622. This method deletes the specified special day group.
  623. If it is associated with one or more schedules some devices may not be able to delete
  624. the special day group, and consequently a ReferenceInUse fault must be generated.
  625. */
  626. DeleteSpecialDayGroup(request *DeleteSpecialDayGroup) (*DeleteSpecialDayGroupResponse, error)
  627. DeleteSpecialDayGroupContext(ctx context.Context, request *DeleteSpecialDayGroup) (*DeleteSpecialDayGroupResponse, error)
  628. }
  629. // schedulePort type
  630. type schedulePort struct {
  631. client *soap.Client
  632. xaddr string
  633. }
  634. func NewSchedulePort(client *soap.Client, xaddr string) SchedulePort {
  635. return &schedulePort{
  636. client: client,
  637. xaddr: xaddr,
  638. }
  639. }
  640. func (service *schedulePort) GetServiceCapabilitiesContext(ctx context.Context, request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) {
  641. response := new(GetServiceCapabilitiesResponse)
  642. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetServiceCapabilities", request, response)
  643. if err != nil {
  644. return nil, err
  645. }
  646. return response, nil
  647. }
  648. func (service *schedulePort) GetServiceCapabilities(request *GetServiceCapabilities) (*GetServiceCapabilitiesResponse, error) {
  649. return service.GetServiceCapabilitiesContext(
  650. context.Background(),
  651. request,
  652. )
  653. }
  654. func (service *schedulePort) GetScheduleStateContext(ctx context.Context, request *GetScheduleState) (*GetScheduleStateResponse, error) {
  655. response := new(GetScheduleStateResponse)
  656. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetScheduleState", request, response)
  657. if err != nil {
  658. return nil, err
  659. }
  660. return response, nil
  661. }
  662. func (service *schedulePort) GetScheduleState(request *GetScheduleState) (*GetScheduleStateResponse, error) {
  663. return service.GetScheduleStateContext(
  664. context.Background(),
  665. request,
  666. )
  667. }
  668. func (service *schedulePort) GetScheduleInfoContext(ctx context.Context, request *GetScheduleInfo) (*GetScheduleInfoResponse, error) {
  669. response := new(GetScheduleInfoResponse)
  670. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetScheduleInfo", request, response)
  671. if err != nil {
  672. return nil, err
  673. }
  674. return response, nil
  675. }
  676. func (service *schedulePort) GetScheduleInfo(request *GetScheduleInfo) (*GetScheduleInfoResponse, error) {
  677. return service.GetScheduleInfoContext(
  678. context.Background(),
  679. request,
  680. )
  681. }
  682. func (service *schedulePort) GetScheduleInfoListContext(ctx context.Context, request *GetScheduleInfoList) (*GetScheduleInfoListResponse, error) {
  683. response := new(GetScheduleInfoListResponse)
  684. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetScheduleInfoList", request, response)
  685. if err != nil {
  686. return nil, err
  687. }
  688. return response, nil
  689. }
  690. func (service *schedulePort) GetScheduleInfoList(request *GetScheduleInfoList) (*GetScheduleInfoListResponse, error) {
  691. return service.GetScheduleInfoListContext(
  692. context.Background(),
  693. request,
  694. )
  695. }
  696. func (service *schedulePort) GetSchedulesContext(ctx context.Context, request *GetSchedules) (*GetSchedulesResponse, error) {
  697. response := new(GetSchedulesResponse)
  698. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSchedules", request, response)
  699. if err != nil {
  700. return nil, err
  701. }
  702. return response, nil
  703. }
  704. func (service *schedulePort) GetSchedules(request *GetSchedules) (*GetSchedulesResponse, error) {
  705. return service.GetSchedulesContext(
  706. context.Background(),
  707. request,
  708. )
  709. }
  710. func (service *schedulePort) GetScheduleListContext(ctx context.Context, request *GetScheduleList) (*GetScheduleListResponse, error) {
  711. response := new(GetScheduleListResponse)
  712. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetScheduleList", request, response)
  713. if err != nil {
  714. return nil, err
  715. }
  716. return response, nil
  717. }
  718. func (service *schedulePort) GetScheduleList(request *GetScheduleList) (*GetScheduleListResponse, error) {
  719. return service.GetScheduleListContext(
  720. context.Background(),
  721. request,
  722. )
  723. }
  724. func (service *schedulePort) CreateScheduleContext(ctx context.Context, request *CreateSchedule) (*CreateScheduleResponse, error) {
  725. response := new(CreateScheduleResponse)
  726. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/CreateSchedule", request, response)
  727. if err != nil {
  728. return nil, err
  729. }
  730. return response, nil
  731. }
  732. func (service *schedulePort) CreateSchedule(request *CreateSchedule) (*CreateScheduleResponse, error) {
  733. return service.CreateScheduleContext(
  734. context.Background(),
  735. request,
  736. )
  737. }
  738. func (service *schedulePort) SetScheduleContext(ctx context.Context, request *SetSchedule) (*SetScheduleResponse, error) {
  739. response := new(SetScheduleResponse)
  740. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/SetSchedule", request, response)
  741. if err != nil {
  742. return nil, err
  743. }
  744. return response, nil
  745. }
  746. func (service *schedulePort) SetSchedule(request *SetSchedule) (*SetScheduleResponse, error) {
  747. return service.SetScheduleContext(
  748. context.Background(),
  749. request,
  750. )
  751. }
  752. func (service *schedulePort) ModifyScheduleContext(ctx context.Context, request *ModifySchedule) (*ModifyScheduleResponse, error) {
  753. response := new(ModifyScheduleResponse)
  754. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/ModifySchedule", request, response)
  755. if err != nil {
  756. return nil, err
  757. }
  758. return response, nil
  759. }
  760. func (service *schedulePort) ModifySchedule(request *ModifySchedule) (*ModifyScheduleResponse, error) {
  761. return service.ModifyScheduleContext(
  762. context.Background(),
  763. request,
  764. )
  765. }
  766. func (service *schedulePort) DeleteScheduleContext(ctx context.Context, request *DeleteSchedule) (*DeleteScheduleResponse, error) {
  767. response := new(DeleteScheduleResponse)
  768. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/DeleteSchedule", request, response)
  769. if err != nil {
  770. return nil, err
  771. }
  772. return response, nil
  773. }
  774. func (service *schedulePort) DeleteSchedule(request *DeleteSchedule) (*DeleteScheduleResponse, error) {
  775. return service.DeleteScheduleContext(
  776. context.Background(),
  777. request,
  778. )
  779. }
  780. func (service *schedulePort) GetSpecialDayGroupInfoContext(ctx context.Context, request *GetSpecialDayGroupInfo) (*GetSpecialDayGroupInfoResponse, error) {
  781. response := new(GetSpecialDayGroupInfoResponse)
  782. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSpecialDayGroupInfo", request, response)
  783. if err != nil {
  784. return nil, err
  785. }
  786. return response, nil
  787. }
  788. func (service *schedulePort) GetSpecialDayGroupInfo(request *GetSpecialDayGroupInfo) (*GetSpecialDayGroupInfoResponse, error) {
  789. return service.GetSpecialDayGroupInfoContext(
  790. context.Background(),
  791. request,
  792. )
  793. }
  794. func (service *schedulePort) GetSpecialDayGroupInfoListContext(ctx context.Context, request *GetSpecialDayGroupInfoList) (*GetSpecialDayGroupInfoListResponse, error) {
  795. response := new(GetSpecialDayGroupInfoListResponse)
  796. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSpecialDayGroupInfoList", request, response)
  797. if err != nil {
  798. return nil, err
  799. }
  800. return response, nil
  801. }
  802. func (service *schedulePort) GetSpecialDayGroupInfoList(request *GetSpecialDayGroupInfoList) (*GetSpecialDayGroupInfoListResponse, error) {
  803. return service.GetSpecialDayGroupInfoListContext(
  804. context.Background(),
  805. request,
  806. )
  807. }
  808. func (service *schedulePort) GetSpecialDayGroupsContext(ctx context.Context, request *GetSpecialDayGroups) (*GetSpecialDayGroupsResponse, error) {
  809. response := new(GetSpecialDayGroupsResponse)
  810. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSpecialDayGroups", request, response)
  811. if err != nil {
  812. return nil, err
  813. }
  814. return response, nil
  815. }
  816. func (service *schedulePort) GetSpecialDayGroups(request *GetSpecialDayGroups) (*GetSpecialDayGroupsResponse, error) {
  817. return service.GetSpecialDayGroupsContext(
  818. context.Background(),
  819. request,
  820. )
  821. }
  822. func (service *schedulePort) GetSpecialDayGroupListContext(ctx context.Context, request *GetSpecialDayGroupList) (*GetSpecialDayGroupListResponse, error) {
  823. response := new(GetSpecialDayGroupListResponse)
  824. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/GetSpecialDayGroupList", request, response)
  825. if err != nil {
  826. return nil, err
  827. }
  828. return response, nil
  829. }
  830. func (service *schedulePort) GetSpecialDayGroupList(request *GetSpecialDayGroupList) (*GetSpecialDayGroupListResponse, error) {
  831. return service.GetSpecialDayGroupListContext(
  832. context.Background(),
  833. request,
  834. )
  835. }
  836. func (service *schedulePort) CreateSpecialDayGroupContext(ctx context.Context, request *CreateSpecialDayGroup) (*CreateSpecialDayGroupResponse, error) {
  837. response := new(CreateSpecialDayGroupResponse)
  838. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/CreateSpecialDayGroup", request, response)
  839. if err != nil {
  840. return nil, err
  841. }
  842. return response, nil
  843. }
  844. func (service *schedulePort) CreateSpecialDayGroup(request *CreateSpecialDayGroup) (*CreateSpecialDayGroupResponse, error) {
  845. return service.CreateSpecialDayGroupContext(
  846. context.Background(),
  847. request,
  848. )
  849. }
  850. func (service *schedulePort) SetSpecialDayGroupContext(ctx context.Context, request *SetSpecialDayGroup) (*SetSpecialDayGroupResponse, error) {
  851. response := new(SetSpecialDayGroupResponse)
  852. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/SetSpecialDayGroup", request, response)
  853. if err != nil {
  854. return nil, err
  855. }
  856. return response, nil
  857. }
  858. func (service *schedulePort) SetSpecialDayGroup(request *SetSpecialDayGroup) (*SetSpecialDayGroupResponse, error) {
  859. return service.SetSpecialDayGroupContext(
  860. context.Background(),
  861. request,
  862. )
  863. }
  864. func (service *schedulePort) ModifySpecialDayGroupContext(ctx context.Context, request *ModifySpecialDayGroup) (*ModifySpecialDayGroupResponse, error) {
  865. response := new(ModifySpecialDayGroupResponse)
  866. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/ModifySpecialDayGroup", request, response)
  867. if err != nil {
  868. return nil, err
  869. }
  870. return response, nil
  871. }
  872. func (service *schedulePort) ModifySpecialDayGroup(request *ModifySpecialDayGroup) (*ModifySpecialDayGroupResponse, error) {
  873. return service.ModifySpecialDayGroupContext(
  874. context.Background(),
  875. request,
  876. )
  877. }
  878. func (service *schedulePort) DeleteSpecialDayGroupContext(ctx context.Context, request *DeleteSpecialDayGroup) (*DeleteSpecialDayGroupResponse, error) {
  879. response := new(DeleteSpecialDayGroupResponse)
  880. err := service.client.CallContext(ctx, service.xaddr, "http://www.onvif.org/ver10/schedule/wsdl/DeleteSpecialDayGroup", request, response)
  881. if err != nil {
  882. return nil, err
  883. }
  884. return response, nil
  885. }
  886. func (service *schedulePort) DeleteSpecialDayGroup(request *DeleteSpecialDayGroup) (*DeleteSpecialDayGroupResponse, error) {
  887. return service.DeleteSpecialDayGroupContext(
  888. context.Background(),
  889. request,
  890. )
  891. }