告警接收代码示例
一. C# 告警接收示例
查看!
using System;
using System.Collections.Generic;
using System.Globalization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
public partial class MateAlarmTab
{
[JsonProperty("ackTime")]
public DateTimeOffset? AckTime { get; set; }
/// <summary>
/// 告警ID
/// </summary>
[JsonProperty("AlarmID")]
public long? AlarmId { get; set; }
/// <summary>
/// 告警等级
/// </summary>
[JsonProperty("AlarmLevelID")]
public long? AlarmLevelId { get; set; }
/// <summary>
/// 告警类型
/// </summary>
[JsonProperty("AlarmType")]
public string AlarmType { get; set; }
[JsonProperty("CalibrationID")]
public long? CalibrationId { get; set; }
/// <summary>
/// 告警编号,主键
/// </summary>
[JsonProperty("DBAlarmID")]
public long? DbAlarmId { get; set; }
[JsonProperty("DescribeInfo")]
public string DescribeInfo { get; set; }
[JsonProperty("DVUID")]
public long? Dvuid { get; set; }
[JsonProperty("IntellexAlarmID")]
public string IntellexAlarmId { get; set; }
/// <summary>
/// 告警录像地址
/// </summary>
[JsonProperty("JPBPath")]
public string JpbPath { get; set; }
/// <summary>
/// 告警发生时间
/// </summary>
[JsonProperty("ManagerAlarmTime")]
public DateTimeOffset? ManagerAlarmTime { get; set; }
/// <summary>
/// 告警结束时间
/// </summary>
[JsonProperty("ManagerEndTime")]
public DateTimeOffset? ManagerEndTime { get; set; }
/// <summary>
/// 告警开始时间
/// </summary>
[JsonProperty("ManagerStartTime")]
public DateTimeOffset? ManagerStartTime { get; set; }
[JsonProperty("PTZNumber")]
public long? PtzNumber { get; set; }
/// <summary>
/// 算法名称
/// </summary>
[JsonProperty("ruleName")]
public string RuleName { get; set; }
/// <summary>
/// 告警名称
/// </summary>
[JsonProperty("RuleNameStr")]
public string RuleNameStr { get; set; }
[JsonProperty("ScannerAlarmID")]
public long? ScannerAlarmId { get; set; }
/// <summary>
/// 设备号
/// </summary>
[JsonProperty("ScannerCustomerNumber")]
public long? ScannerCustomerNumber { get; set; }
/// <summary>
/// 通道号
/// </summary>
[JsonProperty("ScannerFeedNumber")]
public long? ScannerFeedNumber { get; set; }
/// <summary>
/// 分析服务IP
/// </summary>
[JsonProperty("ScannerIP")]
public string ScannerIp { get; set; }
/// <summary>
/// 分析服务名
/// </summary>
[JsonProperty("ScannerName")]
public string ScannerName { get; set; }
[JsonProperty("spareInt1")]
public long? SpareInt1 { get; set; }
[JsonProperty("spareInt2")]
public long? SpareInt2 { get; set; }
/// <summary>
/// 处理状态 1:已处理 0:未处理
/// </summary>
[JsonProperty("spareInt3")]
public long? SpareInt3 { get; set; }
[JsonProperty("spareStr32_1")]
public string SpareStr321 { get; set; }
[JsonProperty("spareStr32_2")]
public string SpareStr322 { get; set; }
/// <summary>
/// 相机名称
/// </summary>
[JsonProperty("spareStr64_1")]
public string SpareStr641 { get; set; }
/// <summary>
/// 分类告警目标信息,json字符串
/// </summary>
[JsonProperty("spareStr64_2")]
public string SpareStr642 { get; set; }
[JsonProperty("SpeciesID")]
public long? SpeciesId { get; set; }
/// <summary>
/// base64图片
/// </summary>
[JsonProperty("Thumbnail")]
public string Thumbnail { get; set; }
[JsonProperty("ThumbnailCols")]
public long? ThumbnailCols { get; set; }
/// <summary>
/// 告警图片http地址
/// </summary>
[JsonProperty("ThumbnailPath")]
public string ThumbnailPath { get; set; }
[JsonProperty("ThumbnailRows")]
public long? ThumbnailRows { get; set; }
[JsonProperty("ThumbnailSize")]
public long? ThumbnailSize { get; set; }
/// <summary>
/// 用户ID
/// </summary>
[JsonProperty("UserID")]
public long? UserId { get; set; }
/// <summary>
/// VcaServer 编号
/// </summary>
[JsonProperty("VcaServerID")]
public string VcaServerId { get; set; }
[JsonProperty("VideoSourceAlarmEndTime")]
public long? VideoSourceAlarmEndTime { get; set; }
[JsonProperty("VideoSourceAlarmStartTime")]
public long? VideoSourceAlarmStartTime { get; set; }
[JsonProperty("VideoSourceAlarmTime")]
public long? VideoSourceAlarmTime { get; set; }
[JsonProperty("VideoSourceChannelID")]
public long? VideoSourceChannelId { get; set; }
[JsonProperty("VideoSourceSystemID")]
public string VideoSourceSystemId { get; set; }
}
/// <summary>
/// 告警推送接收示例
/// </summary>
/// <param name="data">告警数据对象</param>
/// <returns></returns>
[HttpPost]
[Route("receiveAlarmData")]
public TData receiveAlarmData([FromBody] MateAlarmTab data)
{
return new TData { code = 0, message = "接收数据成功", data = data };
}
二.Java告警接收示例
查看!
import java.time.OffsetDateTime;
public class MateAlarmTab {
private OffsetDateTime ackTime;
/**
* 告警ID
*/
private Long alarmID;
/**
* 告警等级
*/
private Long alarmLevelID;
/**
* 告警类型
*/
private String alarmType;
private Long calibrationID;
/**
* 告警编号,主键
*/
private Long dbAlarmID;
private String describeInfo;
private Long dvuid;
private String intellexAlarmID;
/**
* 告警录像地址
*/
private String jpbPath;
/**
* 告警发生时间
*/
private OffsetDateTime managerAlarmTime;
/**
* 告警结束时间
*/
private OffsetDateTime managerEndTime;
/**
* 告警开始时间
*/
private OffsetDateTime managerStartTime;
private Long ptzNumber;
/**
* 算法名称
*/
private String ruleName;
/**
* 告警名称
*/
private String ruleNameStr;
private Long scannerAlarmID;
/**
* 设备号
*/
private Long scannerCustomerNumber;
/**
* 通道号
*/
private Long scannerFeedNumber;
/**
* 分析服务IP
*/
private String scannerIP;
/**
* 分析服务名
*/
private String scannerName;
private Long spareInt1;
private Long spareInt2;
/**
* 处理状态 1:已处理 0:未处理
*/
private Long spareInt3;
private String spareStr321;
private String spareStr322;
/**
* 相机名称
*/
private String spareStr641;
/**
* 分类告警目标信息
*/
private String spareStr642;
private Long speciesID;
/**
* base64图片
*/
private String thumbnail;
private Long thumbnailCols;
/**
* 告警图片地址
*/
private String thumbnailPath;
private Long thumbnailRows;
private Long thumbnailSize;
/**
* 用户ID
*/
private Long userID;
/**
* VcaServer 编号
*/
private String vcaServerID;
private Long videoSourceAlarmEndTime;
private Long videoSourceAlarmStartTime;
private Long videoSourceAlarmTime;
private Long videoSourceChannelID;
private String videoSourceSystemID;
public OffsetDateTime getackTime() { return ackTime; }
public void setackTime(OffsetDateTime value) { this.ackTime = value; }
public Long getAlarmID() { return alarmID; }
public void setAlarmID(Long value) { this.alarmID = value; }
public Long getAlarmLevelID() { return alarmLevelID; }
public void setAlarmLevelID(Long value) { this.alarmLevelID = value; }
public String getAlarmType() { return alarmType; }
public void setAlarmType(String value) { this.alarmType = value; }
public Long getCalibrationID() { return calibrationID; }
public void setCalibrationID(Long value) { this.calibrationID = value; }
public Long getdbAlarmID() { return dbAlarmID; }
public void setdbAlarmID(Long value) { this.dbAlarmID = value; }
public String getDescribeInfo() { return describeInfo; }
public void setDescribeInfo(String value) { this.describeInfo = value; }
public Long getDvuid() { return dvuid; }
public void setDvuid(Long value) { this.dvuid = value; }
public String getIntellexAlarmID() { return intellexAlarmID; }
public void setIntellexAlarmID(String value) { this.intellexAlarmID = value; }
public String getJpbPath() { return jpbPath; }
public void setJpbPath(String value) { this.jpbPath = value; }
public OffsetDateTime getManagerAlarmTime() { return managerAlarmTime; }
public void setManagerAlarmTime(OffsetDateTime value) { this.managerAlarmTime = value; }
public OffsetDateTime getManagerEndTime() { return managerEndTime; }
public void setManagerEndTime(OffsetDateTime value) { this.managerEndTime = value; }
public OffsetDateTime getManagerStartTime() { return managerStartTime; }
public void setManagerStartTime(OffsetDateTime value) { this.managerStartTime = value; }
public Long getPtzNumber() { return ptzNumber; }
public void setPtzNumber(Long value) { this.ptzNumber = value; }
public String getRuleName() { return ruleName; }
public void setRuleName(String value) { this.ruleName = value; }
public String getRuleNameStr() { return ruleNameStr; }
public void setRuleNameStr(String value) { this.ruleNameStr = value; }
public Long getScannerAlarmID() { return scannerAlarmID; }
public void setScannerAlarmID(Long value) { this.scannerAlarmID = value; }
public Long getScannerCustomerNumber() { return scannerCustomerNumber; }
public void setScannerCustomerNumber(Long value) { this.scannerCustomerNumber = value; }
public Long getScannerFeedNumber() { return scannerFeedNumber; }
public void setScannerFeedNumber(Long value) { this.scannerFeedNumber = value; }
public String getScannerIP() { return scannerIP; }
public void setScannerIP(String value) { this.scannerIP = value; }
public String getScannerName() { return scannerName; }
public void setScannerName(String value) { this.scannerName = value; }
public Long getSpareInt1() { return spareInt1; }
public void setSpareInt1(Long value) { this.spareInt1 = value; }
public Long getSpareInt2() { return spareInt2; }
public void setSpareInt2(Long value) { this.spareInt2 = value; }
public Long getSpareInt3() { return spareInt3; }
public void setSpareInt3(Long value) { this.spareInt3 = value; }
public String getSpareStr321() { return spareStr321; }
public void setSpareStr321(String value) { this.spareStr321 = value; }
public String getSpareStr322() { return spareStr322; }
public void setSpareStr322(String value) { this.spareStr322 = value; }
public String getSpareStr641() { return spareStr641; }
public void setSpareStr641(String value) { this.spareStr641 = value; }
public String getSpareStr642() { return spareStr642; }
public void setSpareStr642(String value) { this.spareStr642 = value; }
public Long getSpeciesID() { return speciesID; }
public void setSpeciesID(Long value) { this.speciesID = value; }
public String getThumbnail() { return thumbnail; }
public void setThumbnail(String value) { this.thumbnail = value; }
public Long getThumbnailCols() { return thumbnailCols; }
public void setThumbnailCols(Long value) { this.thumbnailCols = value; }
public String getThumbnailPath() { return thumbnailPath; }
public void setThumbnailPath(String value) { this.thumbnailPath = value; }
public Long getThumbnailRows() { return thumbnailRows; }
public void setThumbnailRows(Long value) { this.thumbnailRows = value; }
public Long getThumbnailSize() { return thumbnailSize; }
public void setThumbnailSize(Long value) { this.thumbnailSize = value; }
public Long getUserID() { return userID; }
public void setUserID(Long value) { this.userID = value; }
public String getVcaServerID() { return vcaServerID; }
public void setVcaServerID(String value) { this.vcaServerID = value; }
public Long getVideoSourceAlarmEndTime() { return videoSourceAlarmEndTime; }
public void setVideoSourceAlarmEndTime(Long value) { this.videoSourceAlarmEndTime = value; }
public Long getVideoSourceAlarmStartTime() { return videoSourceAlarmStartTime; }
public void setVideoSourceAlarmStartTime(Long value) { this.videoSourceAlarmStartTime = value; }
public Long getVideoSourceAlarmTime() { return videoSourceAlarmTime; }
public void setVideoSourceAlarmTime(Long value) { this.videoSourceAlarmTime = value; }
public Long getVideoSourceChannelID() { return videoSourceChannelID; }
public void setVideoSourceChannelID(Long value) { this.videoSourceChannelID = value; }
public String getVideoSourceSystemID() { return videoSourceSystemID; }
public void setVideoSourceSystemID(String value) { this.videoSourceSystemID = value; }
}
/**
* 告警推送接收示例
*
* @param data 告警数据对象
* @return TData对象
*/
@PostMapping("receiveAlarmData")
public TData receiveAlarmData(@RequestBody MateAlarmTab data) {
return new TData(0, "接收数据成功", data);
}
三.python告警接收示例
查看!
from flask import Flask, request, jsonify
app = Flask(__name__)
class TData:
def __init__(self, code, message, data):
self.code = code
self.message = message
self.data = data
def to_dict(self):
return {
'code': self.code,
'message': self.message,
'data': self.data
}
class MateAlarmTab:
ack_time: Optional[datetime]
"""告警ID"""
alarm_id: Optional[int]
"""告警等级"""
alarm_level_id: Optional[int]
"""告警类型"""
alarm_type: Optional[str]
calibration_id: Optional[int]
"""告警编号,主键"""
db_alarm_id: Optional[int]
describe_info: Optional[str]
dvuid: Optional[int]
intellex_alarm_id: Optional[str]
"""告警录像地址"""
jpb_path: Optional[str]
"""告警发生时间"""
manager_alarm_time: Optional[datetime]
"""告警结束时间"""
manager_end_time: Optional[datetime]
"""告警开始时间"""
manager_start_time: Optional[datetime]
ptz_number: Optional[int]
"""算法名称"""
rule_name: Optional[str]
"""告警名称"""
rule_name_str: Optional[str]
scanner_alarm_id: Optional[int]
"""设备号"""
scanner_customer_number: Optional[int]
"""通道号"""
scanner_feed_number: Optional[int]
"""分析服务IP"""
scanner_ip: Optional[str]
"""分析服务名"""
scanner_name: Optional[str]
spare_int1: Optional[int]
spare_int2: Optional[int]
"""处理状态 1:已处理 0:未处理"""
spare_int3: Optional[int]
spare_str32_1: Optional[str]
spare_str32_2: Optional[str]
"""相机名称"""
spare_str64_1: Optional[str]
"""分类告警目标信息,json字符串"""
spare_str64_2: Optional[str]
species_id: Optional[int]
"""base64图片"""
thumbnail: Optional[str]
thumbnail_cols: Optional[int]
"""告警图片http地址"""
thumbnail_path: Optional[str]
thumbnail_rows: Optional[int]
thumbnail_size: Optional[int]
"""用户ID"""
user_id: Optional[int]
"""VcaServer 编号"""
vca_server_id: Optional[str]
video_source_alarm_end_time: Optional[int]
video_source_alarm_start_time: Optional[int]
video_source_alarm_time: Optional[int]
video_source_channel_id: Optional[int]
video_source_system_id: Optional[str]
def __init__(self, ack_time: Optional[datetime], alarm_id: Optional[int], alarm_level_id: Optional[int], alarm_type: Optional[str], calibration_id: Optional[int], db_alarm_id: Optional[int], describe_info: Optional[str], dvuid: Optional[int], intellex_alarm_id: Optional[str], jpb_path: Optional[str], manager_alarm_time: Optional[datetime], manager_end_time: Optional[datetime], manager_start_time: Optional[datetime], ptz_number: Optional[int], rule_name: Optional[str], rule_name_str: Optional[str], scanner_alarm_id: Optional[int], scanner_customer_number: Optional[int], scanner_feed_number: Optional[int], scanner_ip: Optional[str], scanner_name: Optional[str], spare_int1: Optional[int], spare_int2: Optional[int], spare_int3: Optional[int], spare_str32_1: Optional[str], spare_str32_2: Optional[str], spare_str64_1: Optional[str], spare_str64_2: Optional[str], species_id: Optional[int], thumbnail: Optional[str], thumbnail_cols: Optional[int], thumbnail_path: Optional[str], thumbnail_rows: Optional[int], thumbnail_size: Optional[int], user_id: Optional[int], vca_server_id: Optional[str], video_source_alarm_end_time: Optional[int], video_source_alarm_start_time: Optional[int], video_source_alarm_time: Optional[int], video_source_channel_id: Optional[int], video_source_system_id: Optional[str]) -> None:
self.ack_time = ack_time
self.alarm_id = alarm_id
self.alarm_level_id = alarm_level_id
self.alarm_type = alarm_type
self.calibration_id = calibration_id
self.db_alarm_id = db_alarm_id
self.describe_info = describe_info
self.dvuid = dvuid
self.intellex_alarm_id = intellex_alarm_id
self.jpb_path = jpb_path
self.manager_alarm_time = manager_alarm_time
self.manager_end_time = manager_end_time
self.manager_start_time = manager_start_time
self.ptz_number = ptz_number
self.rule_name = rule_name
self.rule_name_str = rule_name_str
self.scanner_alarm_id = scanner_alarm_id
self.scanner_customer_number = scanner_customer_number
self.scanner_feed_number = scanner_feed_number
self.scanner_ip = scanner_ip
self.scanner_name = scanner_name
self.spare_int1 = spare_int1
self.spare_int2 = spare_int2
self.spare_int3 = spare_int3
self.spare_str32_1 = spare_str32_1
self.spare_str32_2 = spare_str32_2
self.spare_str64_1 = spare_str64_1
self.spare_str64_2 = spare_str64_2
self.species_id = species_id
self.thumbnail = thumbnail
self.thumbnail_cols = thumbnail_cols
self.thumbnail_path = thumbnail_path
self.thumbnail_rows = thumbnail_rows
self.thumbnail_size = thumbnail_size
self.user_id = user_id
self.vca_server_id = vca_server_id
self.video_source_alarm_end_time = video_source_alarm_end_time
self.video_source_alarm_start_time = video_source_alarm_start_time
self.video_source_alarm_time = video_source_alarm_time
self.video_source_channel_id = video_source_channel_id
self.video_source_system_id = video_source_system_id
pass
@app.route('/receiveAlarmData', methods=['POST'])
def receive_alarm_data():
data = request.json # 假设请求体是JSON格式
mate_alarm_tab = MateAlarmTab()
t_data = TData(code=0, message="接收数据成功", data=mate_alarm_tab)
return jsonify(t_data.to_dict())
if __name__ == '__main__':
app.run(debug=True)
四.PHP告警接收示例
查看!
// This is a autogenerated file:MateAlarmTab class MateAlarmTab { private DateTime $ackTime; // json:ackTime Optional private ?int $alarmID; // json:AlarmID Optional private ?int $alarmLevelID; // json:AlarmLevelID Optional private ?string $alarmType; // json:AlarmType Optional private ?int $calibrationID; // json:CalibrationID Optional private ?int $dbAlarmID; // json:DBAlarmID Optional private ?string $describeInfo; // json:DescribeInfo Optional private ?int $dvuid; // json:DVUID Optional private ?string $intellexAlarmID; // json:IntellexAlarmID Optional private ?string $jpbPath; // json:JPBPath Optional private DateTime $managerAlarmTime; // json:ManagerAlarmTime Optional private DateTime $managerEndTime; // json:ManagerEndTime Optional private DateTime $managerStartTime; // json:ManagerStartTime Optional private ?int $ptzNumber; // json:PTZNumber Optional private ?string $ruleName; // json:ruleName Optional private ?string $ruleNameStr; // json:RuleNameStr Optional private ?int $scannerAlarmID; // json:ScannerAlarmID Optional private ?int $scannerCustomerNumber; // json:ScannerCustomerNumber Optional private ?int $scannerFeedNumber; // json:ScannerFeedNumber Optional private ?string $scannerIP; // json:ScannerIP Optional private ?string $scannerName; // json:ScannerName Optional private ?int $spareInt1; // json:spareInt1 Optional private ?int $spareInt2; // json:spareInt2 Optional private ?int $spareInt3; // json:spareInt3 Optional private ?string $spareStr321; // json:spareStr32_1 Optional private ?string $spareStr322; // json:spareStr32_2 Optional private ?string $spareStr641; // json:spareStr64_1 Optional private ?string $spareStr642; // json:spareStr64_2 Optional private ?int $speciesID; // json:SpeciesID Optional private ?string $thumbnail; // json:Thumbnail Optional private ?int $thumbnailCols; // json:ThumbnailCols Optional private ?string $thumbnailPath; // json:ThumbnailPath Optional private ?int $thumbnailRows; // json:ThumbnailRows Optional private ?int $thumbnailSize; // json:ThumbnailSize Optional private ?int $userID; // json:UserID Optional private ?string $vcaServerID; // json:VcaServerID Optional private ?int $videoSourceAlarmEndTime; // json:VideoSourceAlarmEndTime Optional private ?int $videoSourceAlarmStartTime; // json:VideoSourceAlarmStartTime Optional private ?int $videoSourceAlarmTime; // json:VideoSourceAlarmTime Optional private ?int $videoSourceChannelID; // json:VideoSourceChannelID Optional private ?string $videoSourceSystemID; // json:VideoSourceSystemID Optional /** * @param DateTime $ackTime * @param int|null $alarmID * @param int|null $alarmLevelID * @param string|null $alarmType * @param int|null $calibrationID * @param int|null $dbAlarmID * @param string|null $describeInfo * @param int|null $dvuid * @param string|null $intellexAlarmID * @param string|null $jpbPath * @param DateTime $managerAlarmTime * @param DateTime $managerEndTime * @param DateTime $managerStartTime * @param int|null $ptzNumber * @param string|null $ruleName * @param string|null $ruleNameStr * @param int|null $scannerAlarmID * @param int|null $scannerCustomerNumber * @param int|null $scannerFeedNumber * @param string|null $scannerIP * @param string|null $scannerName * @param int|null $spareInt1 * @param int|null $spareInt2 * @param int|null $spareInt3 * @param string|null $spareStr321 * @param string|null $spareStr322 * @param string|null $spareStr641 * @param string|null $spareStr642 * @param int|null $speciesID * @param string|null $thumbnail * @param int|null $thumbnailCols * @param string|null $thumbnailPath * @param int|null $thumbnailRows * @param int|null $thumbnailSize * @param int|null $userID * @param string|null $vcaServerID * @param int|null $videoSourceAlarmEndTime * @param int|null $videoSourceAlarmStartTime * @param int|null $videoSourceAlarmTime * @param int|null $videoSourceChannelID * @param string|null $videoSourceSystemID */ public function __construct(DateTime $ackTime, ?int $alarmID, ?int $alarmLevelID, ?string $alarmType, ?int $calibrationID, ?int $dbAlarmID, ?string $describeInfo, ?int $dvuid, ?string $intellexAlarmID, ?string $jpbPath, DateTime $managerAlarmTime, DateTime $managerEndTime, DateTime $managerStartTime, ?int $ptzNumber, ?string $ruleName, ?string $ruleNameStr, ?int $scannerAlarmID, ?int $scannerCustomerNumber, ?int $scannerFeedNumber, ?string $scannerIP, ?string $scannerName, ?int $spareInt1, ?int $spareInt2, ?int $spareInt3, ?string $spareStr321, ?string $spareStr322, ?string $spareStr641, ?string $spareStr642, ?int $speciesID, ?string $thumbnail, ?int $thumbnailCols, ?string $thumbnailPath, ?int $thumbnailRows, ?int $thumbnailSize, ?int $userID, ?string $vcaServerID, ?int $videoSourceAlarmEndTime, ?int $videoSourceAlarmStartTime, ?int $videoSourceAlarmTime, ?int $videoSourceChannelID, ?string $videoSourceSystemID) { $this->ackTime = $ackTime; $this->alarmID = $alarmID; $this->alarmLevelID = $alarmLevelID; $this->alarmType = $alarmType; $this->calibrationID = $calibrationID; $this->dbAlarmID = $dbAlarmID; $this->describeInfo = $describeInfo; $this->dvuid = $dvuid; $this->intellexAlarmID = $intellexAlarmID; $this->jpbPath = $jpbPath; $this->managerAlarmTime = $managerAlarmTime; $this->managerEndTime = $managerEndTime; $this->managerStartTime = $managerStartTime; $this->ptzNumber = $ptzNumber; $this->ruleName = $ruleName; $this->ruleNameStr = $ruleNameStr; $this->scannerAlarmID = $scannerAlarmID; $this->scannerCustomerNumber = $scannerCustomerNumber; $this->scannerFeedNumber = $scannerFeedNumber; $this->scannerIP = $scannerIP; $this->scannerName = $scannerName; $this->spareInt1 = $spareInt1; $this->spareInt2 = $spareInt2; $this->spareInt3 = $spareInt3; $this->spareStr321 = $spareStr321; $this->spareStr322 = $spareStr322; $this->spareStr641 = $spareStr641; $this->spareStr642 = $spareStr642; $this->speciesID = $speciesID; $this->thumbnail = $thumbnail; $this->thumbnailCols = $thumbnailCols; $this->thumbnailPath = $thumbnailPath; $this->thumbnailRows = $thumbnailRows; $this->thumbnailSize = $thumbnailSize; $this->userID = $userID; $this->vcaServerID = $vcaServerID; $this->videoSourceAlarmEndTime = $videoSourceAlarmEndTime; $this->videoSourceAlarmStartTime = $videoSourceAlarmStartTime; $this->videoSourceAlarmTime = $videoSourceAlarmTime; $this->videoSourceChannelID = $videoSourceChannelID; $this->videoSourceSystemID = $videoSourceSystemID; } /** * @param ?string $value * @throws Exception * @return DateTime */ public static function fromACKTime(?string $value): DateTime { if (!is_null($value)) { $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value); if (!is_a($tmp, 'DateTime')) { throw new Exception('Attribute Error:MateAlarmTab::'); } return $tmp; } else { return null; } } /** * @throws Exception * @return ?string */ public function toACKTime(): ?string { if (MateAlarmTab::validateACKTime($this->ackTime)) { if (!is_null($this->ackTime)) { return $this->ackTime->format(DateTimeInterface::ISO8601); } else { return null; } } throw new Exception('never get to this MateAlarmTab::ackTime'); } /** * @param DateTime * @return bool * @throws Exception */ public static function validateACKTime(DateTime $value): bool { if (!is_null($value)) { if (!is_a($value, 'DateTime')) { throw new Exception('Attribute Error:MateAlarmTab::ackTime'); } } return true; } /** * @throws Exception * @return DateTime */ public function getACKTime(): DateTime { if (MateAlarmTab::validateACKTime($this->ackTime)) { return $this->ackTime; } throw new Exception('never get to getACKTime MateAlarmTab::ackTime'); } /** * @return DateTime */ public static function sampleACKTime(): DateTime { return DateTime::createFromFormat(DateTimeInterface::ISO8601, '2020-12-10T12:10:10+00:00'); } /** * 告警ID * * @param ?int $value * @throws Exception * @return ?int */ public static function fromAlarmID(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * 告警ID * * @throws Exception * @return ?int */ public function toAlarmID(): ?int { if (MateAlarmTab::validateAlarmID($this->alarmID)) { if (!is_null($this->alarmID)) { return $this->alarmID; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::alarmID'); } /** * 告警ID * * @param int|null * @return bool * @throws Exception */ public static function validateAlarmID(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::alarmID"); } } return true; } /** * 告警ID * * @throws Exception * @return ?int */ public function getAlarmID(): ?int { if (MateAlarmTab::validateAlarmID($this->alarmID)) { return $this->alarmID; } throw new Exception('never get to getAlarmID MateAlarmTab::alarmID'); } /** * 告警ID * * @return ?int */ public static function sampleAlarmID(): ?int { return 32; /*32:alarmID*/ } /** * 告警等级 * * @param ?int $value * @throws Exception * @return ?int */ public static function fromAlarmLevelID(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * 告警等级 * * @throws Exception * @return ?int */ public function toAlarmLevelID(): ?int { if (MateAlarmTab::validateAlarmLevelID($this->alarmLevelID)) { if (!is_null($this->alarmLevelID)) { return $this->alarmLevelID; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::alarmLevelID'); } /** * 告警等级 * * @param int|null * @return bool * @throws Exception */ public static function validateAlarmLevelID(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::alarmLevelID"); } } return true; } /** * 告警等级 * * @throws Exception * @return ?int */ public function getAlarmLevelID(): ?int { if (MateAlarmTab::validateAlarmLevelID($this->alarmLevelID)) { return $this->alarmLevelID; } throw new Exception('never get to getAlarmLevelID MateAlarmTab::alarmLevelID'); } /** * 告警等级 * * @return ?int */ public static function sampleAlarmLevelID(): ?int { return 33; /*33:alarmLevelID*/ } /** * 告警类型 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromAlarmType(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * 告警类型 * * @throws Exception * @return ?string */ public function toAlarmType(): ?string { if (MateAlarmTab::validateAlarmType($this->alarmType)) { if (!is_null($this->alarmType)) { return $this->alarmType; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::alarmType'); } /** * 告警类型 * * @param string|null * @return bool * @throws Exception */ public static function validateAlarmType(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::alarmType"); } } return true; } /** * 告警类型 * * @throws Exception * @return ?string */ public function getAlarmType(): ?string { if (MateAlarmTab::validateAlarmType($this->alarmType)) { return $this->alarmType; } throw new Exception('never get to getAlarmType MateAlarmTab::alarmType'); } /** * 告警类型 * * @return ?string */ public static function sampleAlarmType(): ?string { return 'MateAlarmTab::alarmType::34'; /*34:alarmType*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromCalibrationID(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toCalibrationID(): ?int { if (MateAlarmTab::validateCalibrationID($this->calibrationID)) { if (!is_null($this->calibrationID)) { return $this->calibrationID; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::calibrationID'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateCalibrationID(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::calibrationID"); } } return true; } /** * @throws Exception * @return ?int */ public function getCalibrationID(): ?int { if (MateAlarmTab::validateCalibrationID($this->calibrationID)) { return $this->calibrationID; } throw new Exception('never get to getCalibrationID MateAlarmTab::calibrationID'); } /** * @return ?int */ public static function sampleCalibrationID(): ?int { return 35; /*35:calibrationID*/ } /** * 告警编号,主键 * * @param ?int $value * @throws Exception * @return ?int */ public static function fromDBAlarmID(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * 告警编号,主键 * * @throws Exception * @return ?int */ public function toDBAlarmID(): ?int { if (MateAlarmTab::validateDBAlarmID($this->dbAlarmID)) { if (!is_null($this->dbAlarmID)) { return $this->dbAlarmID; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::dbAlarmID'); } /** * 告警编号,主键 * * @param int|null * @return bool * @throws Exception */ public static function validateDBAlarmID(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::dbAlarmID"); } } return true; } /** * 告警编号,主键 * * @throws Exception * @return ?int */ public function getDBAlarmID(): ?int { if (MateAlarmTab::validateDBAlarmID($this->dbAlarmID)) { return $this->dbAlarmID; } throw new Exception('never get to getDBAlarmID MateAlarmTab::dbAlarmID'); } /** * 告警编号,主键 * * @return ?int */ public static function sampleDBAlarmID(): ?int { return 36; /*36:dbAlarmID*/ } /** * @param ?string $value * @throws Exception * @return ?string */ public static function fromDescribeInfo(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * @throws Exception * @return ?string */ public function toDescribeInfo(): ?string { if (MateAlarmTab::validateDescribeInfo($this->describeInfo)) { if (!is_null($this->describeInfo)) { return $this->describeInfo; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::describeInfo'); } /** * @param string|null * @return bool * @throws Exception */ public static function validateDescribeInfo(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::describeInfo"); } } return true; } /** * @throws Exception * @return ?string */ public function getDescribeInfo(): ?string { if (MateAlarmTab::validateDescribeInfo($this->describeInfo)) { return $this->describeInfo; } throw new Exception('never get to getDescribeInfo MateAlarmTab::describeInfo'); } /** * @return ?string */ public static function sampleDescribeInfo(): ?string { return 'MateAlarmTab::describeInfo::37'; /*37:describeInfo*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromDvuid(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toDvuid(): ?int { if (MateAlarmTab::validateDvuid($this->dvuid)) { if (!is_null($this->dvuid)) { return $this->dvuid; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::dvuid'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateDvuid(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::dvuid"); } } return true; } /** * @throws Exception * @return ?int */ public function getDvuid(): ?int { if (MateAlarmTab::validateDvuid($this->dvuid)) { return $this->dvuid; } throw new Exception('never get to getDvuid MateAlarmTab::dvuid'); } /** * @return ?int */ public static function sampleDvuid(): ?int { return 38; /*38:dvuid*/ } /** * @param ?string $value * @throws Exception * @return ?string */ public static function fromIntellexAlarmID(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * @throws Exception * @return ?string */ public function toIntellexAlarmID(): ?string { if (MateAlarmTab::validateIntellexAlarmID($this->intellexAlarmID)) { if (!is_null($this->intellexAlarmID)) { return $this->intellexAlarmID; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::intellexAlarmID'); } /** * @param string|null * @return bool * @throws Exception */ public static function validateIntellexAlarmID(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::intellexAlarmID"); } } return true; } /** * @throws Exception * @return ?string */ public function getIntellexAlarmID(): ?string { if (MateAlarmTab::validateIntellexAlarmID($this->intellexAlarmID)) { return $this->intellexAlarmID; } throw new Exception('never get to getIntellexAlarmID MateAlarmTab::intellexAlarmID'); } /** * @return ?string */ public static function sampleIntellexAlarmID(): ?string { return 'MateAlarmTab::intellexAlarmID::39'; /*39:intellexAlarmID*/ } /** * 告警录像地址 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromJpbPath(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * 告警录像地址 * * @throws Exception * @return ?string */ public function toJpbPath(): ?string { if (MateAlarmTab::validateJpbPath($this->jpbPath)) { if (!is_null($this->jpbPath)) { return $this->jpbPath; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::jpbPath'); } /** * 告警录像地址 * * @param string|null * @return bool * @throws Exception */ public static function validateJpbPath(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::jpbPath"); } } return true; } /** * 告警录像地址 * * @throws Exception * @return ?string */ public function getJpbPath(): ?string { if (MateAlarmTab::validateJpbPath($this->jpbPath)) { return $this->jpbPath; } throw new Exception('never get to getJpbPath MateAlarmTab::jpbPath'); } /** * 告警录像地址 * * @return ?string */ public static function sampleJpbPath(): ?string { return 'MateAlarmTab::jpbPath::40'; /*40:jpbPath*/ } /** * 告警发生时间 * * @param ?string $value * @throws Exception * @return DateTime */ public static function fromManagerAlarmTime(?string $value): DateTime { if (!is_null($value)) { $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value); if (!is_a($tmp, 'DateTime')) { throw new Exception('Attribute Error:MateAlarmTab::'); } return $tmp; } else { return null; } } /** * 告警发生时间 * * @throws Exception * @return ?string */ public function toManagerAlarmTime(): ?string { if (MateAlarmTab::validateManagerAlarmTime($this->managerAlarmTime)) { if (!is_null($this->managerAlarmTime)) { return $this->managerAlarmTime->format(DateTimeInterface::ISO8601); } else { return null; } } throw new Exception('never get to this MateAlarmTab::managerAlarmTime'); } /** * 告警发生时间 * * @param DateTime * @return bool * @throws Exception */ public static function validateManagerAlarmTime(DateTime $value): bool { if (!is_null($value)) { if (!is_a($value, 'DateTime')) { throw new Exception('Attribute Error:MateAlarmTab::managerAlarmTime'); } } return true; } /** * 告警发生时间 * * @throws Exception * @return DateTime */ public function getManagerAlarmTime(): DateTime { if (MateAlarmTab::validateManagerAlarmTime($this->managerAlarmTime)) { return $this->managerAlarmTime; } throw new Exception('never get to getManagerAlarmTime MateAlarmTab::managerAlarmTime'); } /** * 告警发生时间 * * @return DateTime */ public static function sampleManagerAlarmTime(): DateTime { return DateTime::createFromFormat(DateTimeInterface::ISO8601, '2020-12-11T12:11:11+00:00'); } /** * 告警结束时间 * * @param ?string $value * @throws Exception * @return DateTime */ public static function fromManagerEndTime(?string $value): DateTime { if (!is_null($value)) { $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value); if (!is_a($tmp, 'DateTime')) { throw new Exception('Attribute Error:MateAlarmTab::'); } return $tmp; } else { return null; } } /** * 告警结束时间 * * @throws Exception * @return ?string */ public function toManagerEndTime(): ?string { if (MateAlarmTab::validateManagerEndTime($this->managerEndTime)) { if (!is_null($this->managerEndTime)) { return $this->managerEndTime->format(DateTimeInterface::ISO8601); } else { return null; } } throw new Exception('never get to this MateAlarmTab::managerEndTime'); } /** * 告警结束时间 * * @param DateTime * @return bool * @throws Exception */ public static function validateManagerEndTime(DateTime $value): bool { if (!is_null($value)) { if (!is_a($value, 'DateTime')) { throw new Exception('Attribute Error:MateAlarmTab::managerEndTime'); } } return true; } /** * 告警结束时间 * * @throws Exception * @return DateTime */ public function getManagerEndTime(): DateTime { if (MateAlarmTab::validateManagerEndTime($this->managerEndTime)) { return $this->managerEndTime; } throw new Exception('never get to getManagerEndTime MateAlarmTab::managerEndTime'); } /** * 告警结束时间 * * @return DateTime */ public static function sampleManagerEndTime(): DateTime { return DateTime::createFromFormat(DateTimeInterface::ISO8601, '2020-12-12T12:12:12+00:00'); } /** * 告警开始时间 * * @param ?string $value * @throws Exception * @return DateTime */ public static function fromManagerStartTime(?string $value): DateTime { if (!is_null($value)) { $tmp = DateTime::createFromFormat(DateTimeInterface::ISO8601, $value); if (!is_a($tmp, 'DateTime')) { throw new Exception('Attribute Error:MateAlarmTab::'); } return $tmp; } else { return null; } } /** * 告警开始时间 * * @throws Exception * @return ?string */ public function toManagerStartTime(): ?string { if (MateAlarmTab::validateManagerStartTime($this->managerStartTime)) { if (!is_null($this->managerStartTime)) { return $this->managerStartTime->format(DateTimeInterface::ISO8601); } else { return null; } } throw new Exception('never get to this MateAlarmTab::managerStartTime'); } /** * 告警开始时间 * * @param DateTime * @return bool * @throws Exception */ public static function validateManagerStartTime(DateTime $value): bool { if (!is_null($value)) { if (!is_a($value, 'DateTime')) { throw new Exception('Attribute Error:MateAlarmTab::managerStartTime'); } } return true; } /** * 告警开始时间 * * @throws Exception * @return DateTime */ public function getManagerStartTime(): DateTime { if (MateAlarmTab::validateManagerStartTime($this->managerStartTime)) { return $this->managerStartTime; } throw new Exception('never get to getManagerStartTime MateAlarmTab::managerStartTime'); } /** * 告警开始时间 * * @return DateTime */ public static function sampleManagerStartTime(): DateTime { return DateTime::createFromFormat(DateTimeInterface::ISO8601, '2020-12-13T12:13:13+00:00'); } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromPtzNumber(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toPtzNumber(): ?int { if (MateAlarmTab::validatePtzNumber($this->ptzNumber)) { if (!is_null($this->ptzNumber)) { return $this->ptzNumber; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::ptzNumber'); } /** * @param int|null * @return bool * @throws Exception */ public static function validatePtzNumber(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::ptzNumber"); } } return true; } /** * @throws Exception * @return ?int */ public function getPtzNumber(): ?int { if (MateAlarmTab::validatePtzNumber($this->ptzNumber)) { return $this->ptzNumber; } throw new Exception('never get to getPtzNumber MateAlarmTab::ptzNumber'); } /** * @return ?int */ public static function samplePtzNumber(): ?int { return 44; /*44:ptzNumber*/ } /** * 算法名称 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromRuleName(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * 算法名称 * * @throws Exception * @return ?string */ public function toRuleName(): ?string { if (MateAlarmTab::validateRuleName($this->ruleName)) { if (!is_null($this->ruleName)) { return $this->ruleName; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::ruleName'); } /** * 算法名称 * * @param string|null * @return bool * @throws Exception */ public static function validateRuleName(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::ruleName"); } } return true; } /** * 算法名称 * * @throws Exception * @return ?string */ public function getRuleName(): ?string { if (MateAlarmTab::validateRuleName($this->ruleName)) { return $this->ruleName; } throw new Exception('never get to getRuleName MateAlarmTab::ruleName'); } /** * 算法名称 * * @return ?string */ public static function sampleRuleName(): ?string { return 'MateAlarmTab::ruleName::45'; /*45:ruleName*/ } /** * 告警名称 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromRuleNameStr(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * 告警名称 * * @throws Exception * @return ?string */ public function toRuleNameStr(): ?string { if (MateAlarmTab::validateRuleNameStr($this->ruleNameStr)) { if (!is_null($this->ruleNameStr)) { return $this->ruleNameStr; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::ruleNameStr'); } /** * 告警名称 * * @param string|null * @return bool * @throws Exception */ public static function validateRuleNameStr(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::ruleNameStr"); } } return true; } /** * 告警名称 * * @throws Exception * @return ?string */ public function getRuleNameStr(): ?string { if (MateAlarmTab::validateRuleNameStr($this->ruleNameStr)) { return $this->ruleNameStr; } throw new Exception('never get to getRuleNameStr MateAlarmTab::ruleNameStr'); } /** * 告警名称 * * @return ?string */ public static function sampleRuleNameStr(): ?string { return 'MateAlarmTab::ruleNameStr::46'; /*46:ruleNameStr*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromScannerAlarmID(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toScannerAlarmID(): ?int { if (MateAlarmTab::validateScannerAlarmID($this->scannerAlarmID)) { if (!is_null($this->scannerAlarmID)) { return $this->scannerAlarmID; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::scannerAlarmID'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateScannerAlarmID(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::scannerAlarmID"); } } return true; } /** * @throws Exception * @return ?int */ public function getScannerAlarmID(): ?int { if (MateAlarmTab::validateScannerAlarmID($this->scannerAlarmID)) { return $this->scannerAlarmID; } throw new Exception('never get to getScannerAlarmID MateAlarmTab::scannerAlarmID'); } /** * @return ?int */ public static function sampleScannerAlarmID(): ?int { return 47; /*47:scannerAlarmID*/ } /** * 设备号 * * @param ?int $value * @throws Exception * @return ?int */ public static function fromScannerCustomerNumber(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * 设备号 * * @throws Exception * @return ?int */ public function toScannerCustomerNumber(): ?int { if (MateAlarmTab::validateScannerCustomerNumber($this->scannerCustomerNumber)) { if (!is_null($this->scannerCustomerNumber)) { return $this->scannerCustomerNumber; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::scannerCustomerNumber'); } /** * 设备号 * * @param int|null * @return bool * @throws Exception */ public static function validateScannerCustomerNumber(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::scannerCustomerNumber"); } } return true; } /** * 设备号 * * @throws Exception * @return ?int */ public function getScannerCustomerNumber(): ?int { if (MateAlarmTab::validateScannerCustomerNumber($this->scannerCustomerNumber)) { return $this->scannerCustomerNumber; } throw new Exception('never get to getScannerCustomerNumber MateAlarmTab::scannerCustomerNumber'); } /** * 设备号 * * @return ?int */ public static function sampleScannerCustomerNumber(): ?int { return 48; /*48:scannerCustomerNumber*/ } /** * 通道号 * * @param ?int $value * @throws Exception * @return ?int */ public static function fromScannerFeedNumber(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * 通道号 * * @throws Exception * @return ?int */ public function toScannerFeedNumber(): ?int { if (MateAlarmTab::validateScannerFeedNumber($this->scannerFeedNumber)) { if (!is_null($this->scannerFeedNumber)) { return $this->scannerFeedNumber; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::scannerFeedNumber'); } /** * 通道号 * * @param int|null * @return bool * @throws Exception */ public static function validateScannerFeedNumber(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::scannerFeedNumber"); } } return true; } /** * 通道号 * * @throws Exception * @return ?int */ public function getScannerFeedNumber(): ?int { if (MateAlarmTab::validateScannerFeedNumber($this->scannerFeedNumber)) { return $this->scannerFeedNumber; } throw new Exception('never get to getScannerFeedNumber MateAlarmTab::scannerFeedNumber'); } /** * 通道号 * * @return ?int */ public static function sampleScannerFeedNumber(): ?int { return 49; /*49:scannerFeedNumber*/ } /** * 分析服务IP * * @param ?string $value * @throws Exception * @return ?string */ public static function fromScannerIP(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * 分析服务IP * * @throws Exception * @return ?string */ public function toScannerIP(): ?string { if (MateAlarmTab::validateScannerIP($this->scannerIP)) { if (!is_null($this->scannerIP)) { return $this->scannerIP; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::scannerIP'); } /** * 分析服务IP * * @param string|null * @return bool * @throws Exception */ public static function validateScannerIP(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::scannerIP"); } } return true; } /** * 分析服务IP * * @throws Exception * @return ?string */ public function getScannerIP(): ?string { if (MateAlarmTab::validateScannerIP($this->scannerIP)) { return $this->scannerIP; } throw new Exception('never get to getScannerIP MateAlarmTab::scannerIP'); } /** * 分析服务IP * * @return ?string */ public static function sampleScannerIP(): ?string { return 'MateAlarmTab::scannerIP::50'; /*50:scannerIP*/ } /** * 分析服务名 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromScannerName(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * 分析服务名 * * @throws Exception * @return ?string */ public function toScannerName(): ?string { if (MateAlarmTab::validateScannerName($this->scannerName)) { if (!is_null($this->scannerName)) { return $this->scannerName; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::scannerName'); } /** * 分析服务名 * * @param string|null * @return bool * @throws Exception */ public static function validateScannerName(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::scannerName"); } } return true; } /** * 分析服务名 * * @throws Exception * @return ?string */ public function getScannerName(): ?string { if (MateAlarmTab::validateScannerName($this->scannerName)) { return $this->scannerName; } throw new Exception('never get to getScannerName MateAlarmTab::scannerName'); } /** * 分析服务名 * * @return ?string */ public static function sampleScannerName(): ?string { return 'MateAlarmTab::scannerName::51'; /*51:scannerName*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromSpareInt1(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toSpareInt1(): ?int { if (MateAlarmTab::validateSpareInt1($this->spareInt1)) { if (!is_null($this->spareInt1)) { return $this->spareInt1; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::spareInt1'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateSpareInt1(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::spareInt1"); } } return true; } /** * @throws Exception * @return ?int */ public function getSpareInt1(): ?int { if (MateAlarmTab::validateSpareInt1($this->spareInt1)) { return $this->spareInt1; } throw new Exception('never get to getSpareInt1 MateAlarmTab::spareInt1'); } /** * @return ?int */ public static function sampleSpareInt1(): ?int { return 52; /*52:spareInt1*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromSpareInt2(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toSpareInt2(): ?int { if (MateAlarmTab::validateSpareInt2($this->spareInt2)) { if (!is_null($this->spareInt2)) { return $this->spareInt2; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::spareInt2'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateSpareInt2(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::spareInt2"); } } return true; } /** * @throws Exception * @return ?int */ public function getSpareInt2(): ?int { if (MateAlarmTab::validateSpareInt2($this->spareInt2)) { return $this->spareInt2; } throw new Exception('never get to getSpareInt2 MateAlarmTab::spareInt2'); } /** * @return ?int */ public static function sampleSpareInt2(): ?int { return 53; /*53:spareInt2*/ } /** * 处理状态 1:已处理 0:未处理 * * @param ?int $value * @throws Exception * @return ?int */ public static function fromSpareInt3(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * 处理状态 1:已处理 0:未处理 * * @throws Exception * @return ?int */ public function toSpareInt3(): ?int { if (MateAlarmTab::validateSpareInt3($this->spareInt3)) { if (!is_null($this->spareInt3)) { return $this->spareInt3; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::spareInt3'); } /** * 处理状态 1:已处理 0:未处理 * * @param int|null * @return bool * @throws Exception */ public static function validateSpareInt3(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::spareInt3"); } } return true; } /** * 处理状态 1:已处理 0:未处理 * * @throws Exception * @return ?int */ public function getSpareInt3(): ?int { if (MateAlarmTab::validateSpareInt3($this->spareInt3)) { return $this->spareInt3; } throw new Exception('never get to getSpareInt3 MateAlarmTab::spareInt3'); } /** * 处理状态 1:已处理 0:未处理 * * @return ?int */ public static function sampleSpareInt3(): ?int { return 54; /*54:spareInt3*/ } /** * @param ?string $value * @throws Exception * @return ?string */ public static function fromSpareStr321(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * @throws Exception * @return ?string */ public function toSpareStr321(): ?string { if (MateAlarmTab::validateSpareStr321($this->spareStr321)) { if (!is_null($this->spareStr321)) { return $this->spareStr321; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::spareStr321'); } /** * @param string|null * @return bool * @throws Exception */ public static function validateSpareStr321(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::spareStr321"); } } return true; } /** * @throws Exception * @return ?string */ public function getSpareStr321(): ?string { if (MateAlarmTab::validateSpareStr321($this->spareStr321)) { return $this->spareStr321; } throw new Exception('never get to getSpareStr321 MateAlarmTab::spareStr321'); } /** * @return ?string */ public static function sampleSpareStr321(): ?string { return 'MateAlarmTab::spareStr321::55'; /*55:spareStr321*/ } /** * @param ?string $value * @throws Exception * @return ?string */ public static function fromSpareStr322(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * @throws Exception * @return ?string */ public function toSpareStr322(): ?string { if (MateAlarmTab::validateSpareStr322($this->spareStr322)) { if (!is_null($this->spareStr322)) { return $this->spareStr322; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::spareStr322'); } /** * @param string|null * @return bool * @throws Exception */ public static function validateSpareStr322(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::spareStr322"); } } return true; } /** * @throws Exception * @return ?string */ public function getSpareStr322(): ?string { if (MateAlarmTab::validateSpareStr322($this->spareStr322)) { return $this->spareStr322; } throw new Exception('never get to getSpareStr322 MateAlarmTab::spareStr322'); } /** * @return ?string */ public static function sampleSpareStr322(): ?string { return 'MateAlarmTab::spareStr322::56'; /*56:spareStr322*/ } /** * 相机名称 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromSpareStr641(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * 相机名称 * * @throws Exception * @return ?string */ public function toSpareStr641(): ?string { if (MateAlarmTab::validateSpareStr641($this->spareStr641)) { if (!is_null($this->spareStr641)) { return $this->spareStr641; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::spareStr641'); } /** * 相机名称 * * @param string|null * @return bool * @throws Exception */ public static function validateSpareStr641(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::spareStr641"); } } return true; } /** * 相机名称 * * @throws Exception * @return ?string */ public function getSpareStr641(): ?string { if (MateAlarmTab::validateSpareStr641($this->spareStr641)) { return $this->spareStr641; } throw new Exception('never get to getSpareStr641 MateAlarmTab::spareStr641'); } /** * 相机名称 * * @return ?string */ public static function sampleSpareStr641(): ?string { return 'MateAlarmTab::spareStr641::57'; /*57:spareStr641*/ } /** * 分类告警目标信息,json字符串 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromSpareStr642(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * 分类告警目标信息,json字符串 * * @throws Exception * @return ?string */ public function toSpareStr642(): ?string { if (MateAlarmTab::validateSpareStr642($this->spareStr642)) { if (!is_null($this->spareStr642)) { return $this->spareStr642; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::spareStr642'); } /** * 分类告警目标信息,json字符串 * * @param string|null * @return bool * @throws Exception */ public static function validateSpareStr642(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::spareStr642"); } } return true; } /** * 分类告警目标信息,json字符串 * * @throws Exception * @return ?string */ public function getSpareStr642(): ?string { if (MateAlarmTab::validateSpareStr642($this->spareStr642)) { return $this->spareStr642; } throw new Exception('never get to getSpareStr642 MateAlarmTab::spareStr642'); } /** * 分类告警目标信息,json字符串 * * @return ?string */ public static function sampleSpareStr642(): ?string { return 'MateAlarmTab::spareStr642::58'; /*58:spareStr642*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromSpeciesID(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toSpeciesID(): ?int { if (MateAlarmTab::validateSpeciesID($this->speciesID)) { if (!is_null($this->speciesID)) { return $this->speciesID; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::speciesID'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateSpeciesID(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::speciesID"); } } return true; } /** * @throws Exception * @return ?int */ public function getSpeciesID(): ?int { if (MateAlarmTab::validateSpeciesID($this->speciesID)) { return $this->speciesID; } throw new Exception('never get to getSpeciesID MateAlarmTab::speciesID'); } /** * @return ?int */ public static function sampleSpeciesID(): ?int { return 59; /*59:speciesID*/ } /** * base64图片 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromThumbnail(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * base64图片 * * @throws Exception * @return ?string */ public function toThumbnail(): ?string { if (MateAlarmTab::validateThumbnail($this->thumbnail)) { if (!is_null($this->thumbnail)) { return $this->thumbnail; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::thumbnail'); } /** * base64图片 * * @param string|null * @return bool * @throws Exception */ public static function validateThumbnail(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::thumbnail"); } } return true; } /** * base64图片 * * @throws Exception * @return ?string */ public function getThumbnail(): ?string { if (MateAlarmTab::validateThumbnail($this->thumbnail)) { return $this->thumbnail; } throw new Exception('never get to getThumbnail MateAlarmTab::thumbnail'); } /** * base64图片 * * @return ?string */ public static function sampleThumbnail(): ?string { return 'MateAlarmTab::thumbnail::60'; /*60:thumbnail*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromThumbnailCols(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toThumbnailCols(): ?int { if (MateAlarmTab::validateThumbnailCols($this->thumbnailCols)) { if (!is_null($this->thumbnailCols)) { return $this->thumbnailCols; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::thumbnailCols'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateThumbnailCols(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::thumbnailCols"); } } return true; } /** * @throws Exception * @return ?int */ public function getThumbnailCols(): ?int { if (MateAlarmTab::validateThumbnailCols($this->thumbnailCols)) { return $this->thumbnailCols; } throw new Exception('never get to getThumbnailCols MateAlarmTab::thumbnailCols'); } /** * @return ?int */ public static function sampleThumbnailCols(): ?int { return 61; /*61:thumbnailCols*/ } /** * 告警图片http地址 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromThumbnailPath(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * 告警图片http地址 * * @throws Exception * @return ?string */ public function toThumbnailPath(): ?string { if (MateAlarmTab::validateThumbnailPath($this->thumbnailPath)) { if (!is_null($this->thumbnailPath)) { return $this->thumbnailPath; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::thumbnailPath'); } /** * 告警图片http地址 * * @param string|null * @return bool * @throws Exception */ public static function validateThumbnailPath(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::thumbnailPath"); } } return true; } /** * 告警图片http地址 * * @throws Exception * @return ?string */ public function getThumbnailPath(): ?string { if (MateAlarmTab::validateThumbnailPath($this->thumbnailPath)) { return $this->thumbnailPath; } throw new Exception('never get to getThumbnailPath MateAlarmTab::thumbnailPath'); } /** * 告警图片http地址 * * @return ?string */ public static function sampleThumbnailPath(): ?string { return 'MateAlarmTab::thumbnailPath::62'; /*62:thumbnailPath*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromThumbnailRows(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toThumbnailRows(): ?int { if (MateAlarmTab::validateThumbnailRows($this->thumbnailRows)) { if (!is_null($this->thumbnailRows)) { return $this->thumbnailRows; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::thumbnailRows'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateThumbnailRows(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::thumbnailRows"); } } return true; } /** * @throws Exception * @return ?int */ public function getThumbnailRows(): ?int { if (MateAlarmTab::validateThumbnailRows($this->thumbnailRows)) { return $this->thumbnailRows; } throw new Exception('never get to getThumbnailRows MateAlarmTab::thumbnailRows'); } /** * @return ?int */ public static function sampleThumbnailRows(): ?int { return 63; /*63:thumbnailRows*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromThumbnailSize(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toThumbnailSize(): ?int { if (MateAlarmTab::validateThumbnailSize($this->thumbnailSize)) { if (!is_null($this->thumbnailSize)) { return $this->thumbnailSize; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::thumbnailSize'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateThumbnailSize(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::thumbnailSize"); } } return true; } /** * @throws Exception * @return ?int */ public function getThumbnailSize(): ?int { if (MateAlarmTab::validateThumbnailSize($this->thumbnailSize)) { return $this->thumbnailSize; } throw new Exception('never get to getThumbnailSize MateAlarmTab::thumbnailSize'); } /** * @return ?int */ public static function sampleThumbnailSize(): ?int { return 64; /*64:thumbnailSize*/ } /** * 用户ID * * @param ?int $value * @throws Exception * @return ?int */ public static function fromUserID(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * 用户ID * * @throws Exception * @return ?int */ public function toUserID(): ?int { if (MateAlarmTab::validateUserID($this->userID)) { if (!is_null($this->userID)) { return $this->userID; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::userID'); } /** * 用户ID * * @param int|null * @return bool * @throws Exception */ public static function validateUserID(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::userID"); } } return true; } /** * 用户ID * * @throws Exception * @return ?int */ public function getUserID(): ?int { if (MateAlarmTab::validateUserID($this->userID)) { return $this->userID; } throw new Exception('never get to getUserID MateAlarmTab::userID'); } /** * 用户ID * * @return ?int */ public static function sampleUserID(): ?int { return 65; /*65:userID*/ } /** * VcaServer 编号 * * @param ?string $value * @throws Exception * @return ?string */ public static function fromVcaServerID(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * VcaServer 编号 * * @throws Exception * @return ?string */ public function toVcaServerID(): ?string { if (MateAlarmTab::validateVcaServerID($this->vcaServerID)) { if (!is_null($this->vcaServerID)) { return $this->vcaServerID; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::vcaServerID'); } /** * VcaServer 编号 * * @param string|null * @return bool * @throws Exception */ public static function validateVcaServerID(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::vcaServerID"); } } return true; } /** * VcaServer 编号 * * @throws Exception * @return ?string */ public function getVcaServerID(): ?string { if (MateAlarmTab::validateVcaServerID($this->vcaServerID)) { return $this->vcaServerID; } throw new Exception('never get to getVcaServerID MateAlarmTab::vcaServerID'); } /** * VcaServer 编号 * * @return ?string */ public static function sampleVcaServerID(): ?string { return 'MateAlarmTab::vcaServerID::66'; /*66:vcaServerID*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromVideoSourceAlarmEndTime(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toVideoSourceAlarmEndTime(): ?int { if (MateAlarmTab::validateVideoSourceAlarmEndTime($this->videoSourceAlarmEndTime)) { if (!is_null($this->videoSourceAlarmEndTime)) { return $this->videoSourceAlarmEndTime; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::videoSourceAlarmEndTime'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateVideoSourceAlarmEndTime(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::videoSourceAlarmEndTime"); } } return true; } /** * @throws Exception * @return ?int */ public function getVideoSourceAlarmEndTime(): ?int { if (MateAlarmTab::validateVideoSourceAlarmEndTime($this->videoSourceAlarmEndTime)) { return $this->videoSourceAlarmEndTime; } throw new Exception('never get to getVideoSourceAlarmEndTime MateAlarmTab::videoSourceAlarmEndTime'); } /** * @return ?int */ public static function sampleVideoSourceAlarmEndTime(): ?int { return 67; /*67:videoSourceAlarmEndTime*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromVideoSourceAlarmStartTime(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toVideoSourceAlarmStartTime(): ?int { if (MateAlarmTab::validateVideoSourceAlarmStartTime($this->videoSourceAlarmStartTime)) { if (!is_null($this->videoSourceAlarmStartTime)) { return $this->videoSourceAlarmStartTime; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::videoSourceAlarmStartTime'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateVideoSourceAlarmStartTime(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::videoSourceAlarmStartTime"); } } return true; } /** * @throws Exception * @return ?int */ public function getVideoSourceAlarmStartTime(): ?int { if (MateAlarmTab::validateVideoSourceAlarmStartTime($this->videoSourceAlarmStartTime)) { return $this->videoSourceAlarmStartTime; } throw new Exception('never get to getVideoSourceAlarmStartTime MateAlarmTab::videoSourceAlarmStartTime'); } /** * @return ?int */ public static function sampleVideoSourceAlarmStartTime(): ?int { return 68; /*68:videoSourceAlarmStartTime*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromVideoSourceAlarmTime(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toVideoSourceAlarmTime(): ?int { if (MateAlarmTab::validateVideoSourceAlarmTime($this->videoSourceAlarmTime)) { if (!is_null($this->videoSourceAlarmTime)) { return $this->videoSourceAlarmTime; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::videoSourceAlarmTime'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateVideoSourceAlarmTime(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::videoSourceAlarmTime"); } } return true; } /** * @throws Exception * @return ?int */ public function getVideoSourceAlarmTime(): ?int { if (MateAlarmTab::validateVideoSourceAlarmTime($this->videoSourceAlarmTime)) { return $this->videoSourceAlarmTime; } throw new Exception('never get to getVideoSourceAlarmTime MateAlarmTab::videoSourceAlarmTime'); } /** * @return ?int */ public static function sampleVideoSourceAlarmTime(): ?int { return 69; /*69:videoSourceAlarmTime*/ } /** * @param ?int $value * @throws Exception * @return ?int */ public static function fromVideoSourceChannelID(?int $value): ?int { if (!is_null($value)) { return $value; /*int*/ } else { return null; } } /** * @throws Exception * @return ?int */ public function toVideoSourceChannelID(): ?int { if (MateAlarmTab::validateVideoSourceChannelID($this->videoSourceChannelID)) { if (!is_null($this->videoSourceChannelID)) { return $this->videoSourceChannelID; /*int*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::videoSourceChannelID'); } /** * @param int|null * @return bool * @throws Exception */ public static function validateVideoSourceChannelID(?int $value): bool { if (!is_null($value)) { if (!is_integer($value)) { throw new Exception("Attribute Error:MateAlarmTab::videoSourceChannelID"); } } return true; } /** * @throws Exception * @return ?int */ public function getVideoSourceChannelID(): ?int { if (MateAlarmTab::validateVideoSourceChannelID($this->videoSourceChannelID)) { return $this->videoSourceChannelID; } throw new Exception('never get to getVideoSourceChannelID MateAlarmTab::videoSourceChannelID'); } /** * @return ?int */ public static function sampleVideoSourceChannelID(): ?int { return 70; /*70:videoSourceChannelID*/ } /** * @param ?string $value * @throws Exception * @return ?string */ public static function fromVideoSourceSystemID(?string $value): ?string { if (!is_null($value)) { return $value; /*string*/ } else { return null; } } /** * @throws Exception * @return ?string */ public function toVideoSourceSystemID(): ?string { if (MateAlarmTab::validateVideoSourceSystemID($this->videoSourceSystemID)) { if (!is_null($this->videoSourceSystemID)) { return $this->videoSourceSystemID; /*string*/ } else { return null; } } throw new Exception('never get to this MateAlarmTab::videoSourceSystemID'); } /** * @param string|null * @return bool * @throws Exception */ public static function validateVideoSourceSystemID(?string $value): bool { if (!is_null($value)) { if (!is_string($value)) { throw new Exception("Attribute Error:MateAlarmTab::videoSourceSystemID"); } } return true; } /** * @throws Exception * @return ?string */ public function getVideoSourceSystemID(): ?string { if (MateAlarmTab::validateVideoSourceSystemID($this->videoSourceSystemID)) { return $this->videoSourceSystemID; } throw new Exception('never get to getVideoSourceSystemID MateAlarmTab::videoSourceSystemID'); } /** * @return ?string */ public static function sampleVideoSourceSystemID(): ?string { return 'MateAlarmTab::videoSourceSystemID::71'; /*71:videoSourceSystemID*/ } /** * @throws Exception * @return bool */ public function validate(): bool { return MateAlarmTab::validateACKTime($this->ackTime) || MateAlarmTab::validateAlarmID($this->alarmID) || MateAlarmTab::validateAlarmLevelID($this->alarmLevelID) || MateAlarmTab::validateAlarmType($this->alarmType) || MateAlarmTab::validateCalibrationID($this->calibrationID) || MateAlarmTab::validateDBAlarmID($this->dbAlarmID) || MateAlarmTab::validateDescribeInfo($this->describeInfo) || MateAlarmTab::validateDvuid($this->dvuid) || MateAlarmTab::validateIntellexAlarmID($this->intellexAlarmID) || MateAlarmTab::validateJpbPath($this->jpbPath) || MateAlarmTab::validateManagerAlarmTime($this->managerAlarmTime) || MateAlarmTab::validateManagerEndTime($this->managerEndTime) || MateAlarmTab::validateManagerStartTime($this->managerStartTime) || MateAlarmTab::validatePtzNumber($this->ptzNumber) || MateAlarmTab::validateRuleName($this->ruleName) || MateAlarmTab::validateRuleNameStr($this->ruleNameStr) || MateAlarmTab::validateScannerAlarmID($this->scannerAlarmID) || MateAlarmTab::validateScannerCustomerNumber($this->scannerCustomerNumber) || MateAlarmTab::validateScannerFeedNumber($this->scannerFeedNumber) || MateAlarmTab::validateScannerIP($this->scannerIP) || MateAlarmTab::validateScannerName($this->scannerName) || MateAlarmTab::validateSpareInt1($this->spareInt1) || MateAlarmTab::validateSpareInt2($this->spareInt2) || MateAlarmTab::validateSpareInt3($this->spareInt3) || MateAlarmTab::validateSpareStr321($this->spareStr321) || MateAlarmTab::validateSpareStr322($this->spareStr322) || MateAlarmTab::validateSpareStr641($this->spareStr641) || MateAlarmTab::validateSpareStr642($this->spareStr642) || MateAlarmTab::validateSpeciesID($this->speciesID) || MateAlarmTab::validateThumbnail($this->thumbnail) || MateAlarmTab::validateThumbnailCols($this->thumbnailCols) || MateAlarmTab::validateThumbnailPath($this->thumbnailPath) || MateAlarmTab::validateThumbnailRows($this->thumbnailRows) || MateAlarmTab::validateThumbnailSize($this->thumbnailSize) || MateAlarmTab::validateUserID($this->userID) || MateAlarmTab::validateVcaServerID($this->vcaServerID) || MateAlarmTab::validateVideoSourceAlarmEndTime($this->videoSourceAlarmEndTime) || MateAlarmTab::validateVideoSourceAlarmStartTime($this->videoSourceAlarmStartTime) || MateAlarmTab::validateVideoSourceAlarmTime($this->videoSourceAlarmTime) || MateAlarmTab::validateVideoSourceChannelID($this->videoSourceChannelID) || MateAlarmTab::validateVideoSourceSystemID($this->videoSourceSystemID); } /** * @return stdClass * @throws Exception */ public function to(): stdClass { $out = new stdClass(); $out->{'ackTime'} = $this->toACKTime(); $out->{'AlarmID'} = $this->toAlarmID(); $out->{'AlarmLevelID'} = $this->toAlarmLevelID(); $out->{'AlarmType'} = $this->toAlarmType(); $out->{'CalibrationID'} = $this->toCalibrationID(); $out->{'DBAlarmID'} = $this->toDBAlarmID(); $out->{'DescribeInfo'} = $this->toDescribeInfo(); $out->{'DVUID'} = $this->toDvuid(); $out->{'IntellexAlarmID'} = $this->toIntellexAlarmID(); $out->{'JPBPath'} = $this->toJpbPath(); $out->{'ManagerAlarmTime'} = $this->toManagerAlarmTime(); $out->{'ManagerEndTime'} = $this->toManagerEndTime(); $out->{'ManagerStartTime'} = $this->toManagerStartTime(); $out->{'PTZNumber'} = $this->toPtzNumber(); $out->{'ruleName'} = $this->toRuleName(); $out->{'RuleNameStr'} = $this->toRuleNameStr(); $out->{'ScannerAlarmID'} = $this->toScannerAlarmID(); $out->{'ScannerCustomerNumber'} = $this->toScannerCustomerNumber(); $out->{'ScannerFeedNumber'} = $this->toScannerFeedNumber(); $out->{'ScannerIP'} = $this->toScannerIP(); $out->{'ScannerName'} = $this->toScannerName(); $out->{'spareInt1'} = $this->toSpareInt1(); $out->{'spareInt2'} = $this->toSpareInt2(); $out->{'spareInt3'} = $this->toSpareInt3(); $out->{'spareStr32_1'} = $this->toSpareStr321(); $out->{'spareStr32_2'} = $this->toSpareStr322(); $out->{'spareStr64_1'} = $this->toSpareStr641(); $out->{'spareStr64_2'} = $this->toSpareStr642(); $out->{'SpeciesID'} = $this->toSpeciesID(); $out->{'Thumbnail'} = $this->toThumbnail(); $out->{'ThumbnailCols'} = $this->toThumbnailCols(); $out->{'ThumbnailPath'} = $this->toThumbnailPath(); $out->{'ThumbnailRows'} = $this->toThumbnailRows(); $out->{'ThumbnailSize'} = $this->toThumbnailSize(); $out->{'UserID'} = $this->toUserID(); $out->{'VcaServerID'} = $this->toVcaServerID(); $out->{'VideoSourceAlarmEndTime'} = $this->toVideoSourceAlarmEndTime(); $out->{'VideoSourceAlarmStartTime'} = $this->toVideoSourceAlarmStartTime(); $out->{'VideoSourceAlarmTime'} = $this->toVideoSourceAlarmTime(); $out->{'VideoSourceChannelID'} = $this->toVideoSourceChannelID(); $out->{'VideoSourceSystemID'} = $this->toVideoSourceSystemID(); return $out; } /** * @param stdClass $obj * @return MateAlarmTab * @throws Exception */ public static function from(stdClass $obj): MateAlarmTab { return new MateAlarmTab( MateAlarmTab::fromACKTime($obj->{'ackTime'}) ,MateAlarmTab::fromAlarmID($obj->{'AlarmID'}) ,MateAlarmTab::fromAlarmLevelID($obj->{'AlarmLevelID'}) ,MateAlarmTab::fromAlarmType($obj->{'AlarmType'}) ,MateAlarmTab::fromCalibrationID($obj->{'CalibrationID'}) ,MateAlarmTab::fromDBAlarmID($obj->{'DBAlarmID'}) ,MateAlarmTab::fromDescribeInfo($obj->{'DescribeInfo'}) ,MateAlarmTab::fromDvuid($obj->{'DVUID'}) ,MateAlarmTab::fromIntellexAlarmID($obj->{'IntellexAlarmID'}) ,MateAlarmTab::fromJpbPath($obj->{'JPBPath'}) ,MateAlarmTab::fromManagerAlarmTime($obj->{'ManagerAlarmTime'}) ,MateAlarmTab::fromManagerEndTime($obj->{'ManagerEndTime'}) ,MateAlarmTab::fromManagerStartTime($obj->{'ManagerStartTime'}) ,MateAlarmTab::fromPtzNumber($obj->{'PTZNumber'}) ,MateAlarmTab::fromRuleName($obj->{'ruleName'}) ,MateAlarmTab::fromRuleNameStr($obj->{'RuleNameStr'}) ,MateAlarmTab::fromScannerAlarmID($obj->{'ScannerAlarmID'}) ,MateAlarmTab::fromScannerCustomerNumber($obj->{'ScannerCustomerNumber'}) ,MateAlarmTab::fromScannerFeedNumber($obj->{'ScannerFeedNumber'}) ,MateAlarmTab::fromScannerIP($obj->{'ScannerIP'}) ,MateAlarmTab::fromScannerName($obj->{'ScannerName'}) ,MateAlarmTab::fromSpareInt1($obj->{'spareInt1'}) ,MateAlarmTab::fromSpareInt2($obj->{'spareInt2'}) ,MateAlarmTab::fromSpareInt3($obj->{'spareInt3'}) ,MateAlarmTab::fromSpareStr321($obj->{'spareStr32_1'}) ,MateAlarmTab::fromSpareStr322($obj->{'spareStr32_2'}) ,MateAlarmTab::fromSpareStr641($obj->{'spareStr64_1'}) ,MateAlarmTab::fromSpareStr642($obj->{'spareStr64_2'}) ,MateAlarmTab::fromSpeciesID($obj->{'SpeciesID'}) ,MateAlarmTab::fromThumbnail($obj->{'Thumbnail'}) ,MateAlarmTab::fromThumbnailCols($obj->{'ThumbnailCols'}) ,MateAlarmTab::fromThumbnailPath($obj->{'ThumbnailPath'}) ,MateAlarmTab::fromThumbnailRows($obj->{'ThumbnailRows'}) ,MateAlarmTab::fromThumbnailSize($obj->{'ThumbnailSize'}) ,MateAlarmTab::fromUserID($obj->{'UserID'}) ,MateAlarmTab::fromVcaServerID($obj->{'VcaServerID'}) ,MateAlarmTab::fromVideoSourceAlarmEndTime($obj->{'VideoSourceAlarmEndTime'}) ,MateAlarmTab::fromVideoSourceAlarmStartTime($obj->{'VideoSourceAlarmStartTime'}) ,MateAlarmTab::fromVideoSourceAlarmTime($obj->{'VideoSourceAlarmTime'}) ,MateAlarmTab::fromVideoSourceChannelID($obj->{'VideoSourceChannelID'}) ,MateAlarmTab::fromVideoSourceSystemID($obj->{'VideoSourceSystemID'}) ); } /** * @return MateAlarmTab */ public static function sample(): MateAlarmTab { return new MateAlarmTab( MateAlarmTab::sampleACKTime() ,MateAlarmTab::sampleAlarmID() ,MateAlarmTab::sampleAlarmLevelID() ,MateAlarmTab::sampleAlarmType() ,MateAlarmTab::sampleCalibrationID() ,MateAlarmTab::sampleDBAlarmID() ,MateAlarmTab::sampleDescribeInfo() ,MateAlarmTab::sampleDvuid() ,MateAlarmTab::sampleIntellexAlarmID() ,MateAlarmTab::sampleJpbPath() ,MateAlarmTab::sampleManagerAlarmTime() ,MateAlarmTab::sampleManagerEndTime() ,MateAlarmTab::sampleManagerStartTime() ,MateAlarmTab::samplePtzNumber() ,MateAlarmTab::sampleRuleName() ,MateAlarmTab::sampleRuleNameStr() ,MateAlarmTab::sampleScannerAlarmID() ,MateAlarmTab::sampleScannerCustomerNumber() ,MateAlarmTab::sampleScannerFeedNumber() ,MateAlarmTab::sampleScannerIP() ,MateAlarmTab::sampleScannerName() ,MateAlarmTab::sampleSpareInt1() ,MateAlarmTab::sampleSpareInt2() ,MateAlarmTab::sampleSpareInt3() ,MateAlarmTab::sampleSpareStr321() ,MateAlarmTab::sampleSpareStr322() ,MateAlarmTab::sampleSpareStr641() ,MateAlarmTab::sampleSpareStr642() ,MateAlarmTab::sampleSpeciesID() ,MateAlarmTab::sampleThumbnail() ,MateAlarmTab::sampleThumbnailCols() ,MateAlarmTab::sampleThumbnailPath() ,MateAlarmTab::sampleThumbnailRows() ,MateAlarmTab::sampleThumbnailSize() ,MateAlarmTab::sampleUserID() ,MateAlarmTab::sampleVcaServerID() ,MateAlarmTab::sampleVideoSourceAlarmEndTime() ,MateAlarmTab::sampleVideoSourceAlarmStartTime() ,MateAlarmTab::sampleVideoSourceAlarmTime() ,MateAlarmTab::sampleVideoSourceChannelID() ,MateAlarmTab::sampleVideoSourceSystemID() ); } } /** * 告警推送接收示例 * * @param Request $request * @return \Illuminate\Http\JsonResponse */ public function receiveAlarmData(Request $request) { $data = $request->json()->all(); // 假设请求体是JSON格式 $tData = [ 'code' => 0, 'message' => '接收数据成功', 'data' => $data ]; return response()->json($tData); }
接口文档地址:https://apifox.com/apidoc/shared-f468ac50-1e4a-4abe-bf28-7852c2b6c7c0
修改于 2024-08-07 05:25:43