RabbitMQVideoService.cs 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. using log4net;
  2. using Microsoft.Extensions.DependencyInjection;
  3. using Microsoft.Extensions.Hosting;
  4. using Newtonsoft.Json;
  5. using RabbitMQ.Client;
  6. using RabbitMQ.Client.Events;
  7. using Ropin.Inspection.Common.Helper;
  8. using Ropin.Inspection.Model.Entities;
  9. using Ropin.Inspection.Repository;
  10. using System;
  11. using System.Collections.Generic;
  12. using System.Text;
  13. using System.Threading;
  14. using System.Threading.Tasks;
  15. using System.Linq;
  16. using Ropin.Inspection.Repository.VMC.Interface;
  17. using Ropin.Inspection.Model.ViewModel.VMC;
  18. using Ropin.Inspection.Model.SearchModel.VMC;
  19. using Ropin.Inspection.Repository.MTN.Interface;
  20. using System.IO;
  21. using Renci.SshNet.Messages;
  22. using Microsoft.Extensions.Configuration;
  23. using System.Net.NetworkInformation;
  24. using Ropin.Inspection.Repository.SYS.Interface;
  25. using Minio;
  26. using Minio.DataModel.Args;
  27. using System.Net.Http;
  28. using System.Net;
  29. namespace Ropin.Environmentally.VideoService.service
  30. {
  31. public class RabbitMQVideoService : IHostedService, IDisposable
  32. {
  33. private readonly IServiceProvider _provider;
  34. private static readonly ILog log = LogManager.GetLogger(typeof(RabbitMQVideoService));
  35. private readonly RabbitMQModel _rabbitMQModel;
  36. private readonly IConfiguration _configuration;
  37. private readonly MinioSettingsModel _minioSettingsModel;
  38. private readonly MinioClient _minioClient;
  39. public RabbitMQVideoService(IServiceProvider provider, RabbitMQModel rabbitMQModel, IConfiguration configuration, MinioSettingsModel minioSettingsModel)
  40. {
  41. this._provider = provider;
  42. _rabbitMQModel = rabbitMQModel;
  43. _configuration = configuration;
  44. _minioSettingsModel = minioSettingsModel;
  45. try
  46. {
  47. // 初始化 MinIO 客户端并使用 UseSSL 配置
  48. _minioClient = (MinioClient)new MinioClient()
  49. .WithEndpoint(_minioSettingsModel.Endpoint)
  50. .WithCredentials(_minioSettingsModel.AccessKey, _minioSettingsModel.SecretKey)
  51. .WithSSL(_minioSettingsModel.UseSSL) // 使用 UseSSL 配置
  52. .Build();
  53. }
  54. catch (Exception ex)
  55. {
  56. log.Info($"初始化 MinIO 客户端时出错: {ex.Message}");
  57. }
  58. }
  59. private IConnection con;
  60. private IModel channel;
  61. public Task StartAsync(CancellationToken cancellationToken)
  62. {
  63. Task.Run(async () =>
  64. {
  65. //string dewUrl = "http://124.71.132.255:10000/sms/34020000002020000001/api/v1/downloads/record_0200000001_20241121091328_0.mp4";
  66. //string urls= DownLoad_Video(dewUrl);
  67. //log.Info("【DownLoad_Video】" + urls);
  68. //TSYS_Message mes = new TSYS_Message
  69. //{
  70. // C_ID = "2d126655-a9ab-4380-a0ef-fcfddc8fba0b",
  71. // C_DevStoreCode = "36de09f8-589a-424b-861d-af937aa5dd0d",
  72. //};
  73. //await VideoExecute(mes);
  74. await AddRabbitMQ();
  75. });
  76. return Task.CompletedTask;
  77. }
  78. public async Task AddRabbitMQ()
  79. {
  80. try
  81. {
  82. var factory = new ConnectionFactory()
  83. {
  84. HostName = _rabbitMQModel.HostName,//"60.204.212.71",//IP地址
  85. Port = _rabbitMQModel.Port,//5672,//端口号
  86. UserName = _rabbitMQModel.UserName,//"guest",//用户账号
  87. VirtualHost = _rabbitMQModel.VirtualHost,//"/",
  88. Password = _rabbitMQModel.Password,// "guest"//用户密码
  89. };
  90. if (con == null || con.IsOpen == false)
  91. {
  92. con = factory.CreateConnection();//创建连接对象
  93. }
  94. if (channel == null || channel.IsOpen == false)
  95. {
  96. channel = con.CreateModel();//创建连接会话对象
  97. }
  98. channel.ExchangeDeclare(_rabbitMQModel.ExchangeName, type: ExchangeType.Direct); // Direct 交换机示例
  99. //声明队列
  100. var queueName = channel.QueueDeclare(
  101. queue: _rabbitMQModel.QueueName, //消息队列名称
  102. durable: false, //是否缓存
  103. exclusive: false,
  104. autoDelete: false,
  105. arguments: null
  106. ).QueueName;
  107. channel.QueueBind(queueName, _rabbitMQModel.ExchangeName, _rabbitMQModel.RoutingKey);
  108. //告诉Rabbit每次只能向消费者发送一条信息,再消费者未确认之前,不再向他发送信息
  109. channel.BasicQos(0, 1, false);
  110. channel.ConfirmSelect(); // 开启消息确认模式
  111. //创建消费者对象
  112. var consumer = new EventingBasicConsumer(channel);
  113. consumer.Received += async (model, ea) =>
  114. {
  115. try
  116. {
  117. var body = ea.Body.ToArray();
  118. var message = Encoding.UTF8.GetString(body);
  119. log.Info("【RabbitMQ】" + message);
  120. //var ReceiveData = JsonConvert.DeserializeObject<List<TMTN_PushMsgResult>>(message);
  121. //ReceiveData = ReceiveData?.OrderBy(t => t.C_DevStoreCode).ToList();
  122. //await VideoExecute1(ReceiveData);
  123. var ReceiveData = JsonConvert.DeserializeObject<TSYS_Message>(message);
  124. await VideoExecute(ReceiveData);
  125. // 确认消息已处理
  126. channel.BasicAck(deliveryTag: ea.DeliveryTag, multiple: false);
  127. }
  128. catch (Exception ex)
  129. {
  130. channel.BasicNack(ea.DeliveryTag, false, true); // 重新入队或发送到死信队列的逻辑需要自定义实现
  131. log.Info("【RabbitMQ-接收消息处理异常了】" + ex.Message);
  132. }
  133. };
  134. //消费者开启监听 将autoAck设置false 手动确认关闭;true:自动关闭;
  135. channel.BasicConsume(queue: queueName, autoAck: false, consumer: consumer);
  136. }
  137. catch (Exception ex)
  138. {
  139. log.Info("【异常-RabbitMQ】" + ex.Message);
  140. }
  141. }
  142. public async Task VideoExecute(TSYS_Message message)
  143. {
  144. List<Task> tasks0 = new List<Task>();
  145. if (message != null)
  146. {
  147. string devCode = message.C_DevStoreCode;
  148. tasks0.Add(Task.Run(async () =>
  149. {
  150. using (var scope = _provider.GetRequiredService<IServiceScopeFactory>().CreateScope())
  151. {
  152. try
  153. {
  154. var vmcCameraRepository = scope.ServiceProvider.GetService<IVMCDevCameraRepository>();
  155. VmcDevSearch searchModel = new VmcDevSearch();
  156. searchModel.IsPagination = false;
  157. searchModel.C_Status = "1";
  158. searchModel.C_DevStoreCode = devCode;
  159. IEnumerable<VmcDevCameraViewModel> viewModelsList = await vmcCameraRepository.GetConditionAsync(searchModel);
  160. await SaveData(message, viewModelsList);
  161. Thread.Sleep(1000);
  162. }
  163. catch (Exception ex)
  164. {
  165. log.Info("【异常-VideoExecute】" + ex.Message);
  166. throw;
  167. }
  168. }
  169. }));
  170. }
  171. await Task.WhenAll(tasks0);
  172. }
  173. public async Task SaveData(TSYS_Message message, IEnumerable<VmcDevCameraViewModel> viewModelsList)
  174. {
  175. if (message != null&& viewModelsList!=null)
  176. {
  177. List<Task> tasks = new List<Task>();
  178. foreach (var vmc in viewModelsList)
  179. {
  180. if (vmc.C_Status == "1")
  181. {
  182. //线程
  183. tasks.Add(Task.Run(async () =>
  184. {
  185. using (var scope = _provider.GetRequiredService<IServiceScopeFactory>().CreateScope())
  186. {
  187. LiveGBSHelper.loginUrl = vmc.C_CameraTypeValue;
  188. var messageFileRepository = scope.ServiceProvider.GetService<ITsysMessageFileRepository>();
  189. try
  190. {
  191. if (vmc != null && !string.IsNullOrEmpty(vmc.C_Serial) && !string.IsNullOrEmpty(vmc.Codes))
  192. {
  193. int ss = vmc.F_ShootingTime;//60;
  194. VideoStartRecording videoUrlModel = await LiveGBSHelper.StartRecording(vmc.C_Serial, vmc.Codes);
  195. Thread.Sleep(ss * 1000);
  196. if (videoUrlModel != null && !string.IsNullOrEmpty(videoUrlModel.DownloadURL))
  197. {
  198. VideoRecording channelVideo = await LiveGBSHelper.StopRecording(vmc.C_Serial, vmc.Codes);
  199. if (channelVideo != null && channelVideo.RecordList != null && channelVideo.RecordList.Count > 0)
  200. {
  201. VideoRecordingMode videoRecording = channelVideo.RecordList.Where(v => v.DownloadURL == videoUrlModel.DownloadURL).FirstOrDefault();
  202. if (videoRecording != null && !string.IsNullOrEmpty(videoRecording.EndTime))
  203. {
  204. #region 2025-8-7
  205. //string videoUrl = "/sms" + videoUrlModel.DownloadURL.Split("sms")[1];
  206. //TSYS_MessageFile messageFile = new TSYS_MessageFile();
  207. //messageFile.C_ID = Guid.NewGuid().ToString();
  208. //messageFile.C_MessageCode = message.C_ID;
  209. //messageFile.C_Url = videoUrl;
  210. //messageFile.C_Type = "FILE_TYP_004";
  211. //messageFile.C_CreateBy = Guid.NewGuid().ToString();
  212. //messageFile.D_CreateOn = DateTime.Now;
  213. //messageFile.C_Status = "1";
  214. //messageFileRepository.Create(messageFile);
  215. //var bolResult = await messageFileRepository.SaveAsync();
  216. #endregion
  217. try
  218. {
  219. // 下载视频文件
  220. string tempFilePath = DownLoad_Video(videoUrlModel.DownloadURL);
  221. if (!string.IsNullOrEmpty(tempFilePath))
  222. {
  223. // 生成 MinIO 中的对象名
  224. DateTime time = DateTime.Now;
  225. string objectName = $"videos/{time.Year}/{time.Month}/{time.ToString("yyyyMMddHHmmssfff")}.mp4";
  226. string bucketName = _minioSettingsModel.BucketName;
  227. // 检查存储桶名称是否符合规范
  228. if (!IsValidBucketName(bucketName))
  229. {
  230. log.Error($"存储桶名称 {bucketName} 不符合 MinIO 命名规范");
  231. return;
  232. }
  233. // 检查存储桶是否存在,不存在则创建
  234. var bucketExistsArgs = new BucketExistsArgs()
  235. .WithBucket(bucketName);
  236. bool found = await _minioClient.BucketExistsAsync(bucketExistsArgs);
  237. if (!found)
  238. {
  239. var makeBucketArgs = new MakeBucketArgs()
  240. .WithBucket(bucketName);
  241. await _minioClient.MakeBucketAsync(makeBucketArgs);
  242. }
  243. // 上传文件到 MinIO
  244. var putObjectArgs = new PutObjectArgs()
  245. .WithBucket(bucketName)
  246. .WithObject(objectName)
  247. .WithFileName(tempFilePath)
  248. .WithContentType("video/mp4");
  249. await _minioClient.PutObjectAsync(putObjectArgs);
  250. // 生成可访问的 URL
  251. var presignedGetObjectArgs = new PresignedGetObjectArgs()
  252. .WithBucket(bucketName)
  253. .WithObject(objectName)
  254. .WithExpiry(60 * 60 * 24 * 7); // 有效期 7 天
  255. string videoUrl = await _minioClient.PresignedGetObjectAsync(presignedGetObjectArgs);
  256. videoUrl = videoUrl.Replace(_minioSettingsModel.Urls, "");
  257. TSYS_MessageFile messageFile = new TSYS_MessageFile();
  258. messageFile.C_ID = Guid.NewGuid().ToString();
  259. messageFile.C_MessageCode = message.C_ID;
  260. messageFile.C_Url = videoUrl;
  261. messageFile.C_Type = "FILE_TYP_004";
  262. messageFile.C_CreateBy = Guid.NewGuid().ToString();
  263. messageFile.D_CreateOn = DateTime.Now;
  264. messageFile.C_Status = "1";
  265. messageFile.C_CreateBy = "6e864cbc-5252-11ec-8681-fa163e02b3e4";
  266. try
  267. {
  268. messageFileRepository.Create(messageFile);
  269. var bolResult = await messageFileRepository.SaveAsync();
  270. }
  271. catch (Exception ex)
  272. {
  273. log.Info($"【TSYS_MessageFile保存错误】{ex.Message}");
  274. }
  275. //删除临时文件
  276. try
  277. {
  278. // 获取视频所在文件夹路径
  279. string videoDirectory = Path.GetDirectoryName(tempFilePath);
  280. if (!string.IsNullOrEmpty(videoDirectory) && Directory.Exists(videoDirectory))
  281. {
  282. // 获取文件夹下所有 .mp4 文件
  283. string[] videoFiles = Directory.GetFiles(videoDirectory, "*.mp4");
  284. foreach (string videoFile in videoFiles)
  285. {
  286. // 判断文件是否被其他进程占用
  287. if (!IsFileLocked(videoFile))
  288. {
  289. try
  290. {
  291. File.Delete(videoFile);
  292. }
  293. catch (Exception delEx)
  294. {
  295. log.Info($"【删除其他视频文件 {videoFile} 出错】{delEx.Message}");
  296. }
  297. }
  298. else
  299. {
  300. log.Info($"【文件 {videoFile} 正在被其他进程使用,无法删除】");
  301. }
  302. }
  303. }
  304. }
  305. catch (Exception ex)
  306. {
  307. log.Info($"【删除临时文件出错】{ex.Message}");
  308. }
  309. }
  310. }
  311. catch (Exception ex)
  312. {
  313. log.Info($"【上传视频到 MinIO 出错】{ex.Message}");
  314. }
  315. }
  316. else
  317. {
  318. log.Info($"【停止实时录像错误,没有录像文件或者录像停止时间为空下载地址不能使用】");
  319. }
  320. }
  321. else
  322. {
  323. log.Info($"【停止实时录像错误,没有录像文件】");
  324. }
  325. }
  326. }
  327. }
  328. catch (Exception ex)
  329. {
  330. log.Info("【异常-SaveData】" + ex.Message);
  331. }
  332. }
  333. }));
  334. }
  335. }
  336. await Task.WhenAll(tasks);
  337. }
  338. }
  339. public async Task VideoExecute1(List<TMTN_PushMsgResult> list)
  340. {
  341. List<Task> tasks0 = new List<Task>();
  342. List<string> devCode = list.Select(t => t.C_DevStoreCode).Distinct().ToList();
  343. foreach (var item in devCode)
  344. {//线程
  345. tasks0.Add(Task.Run(async () =>
  346. {
  347. using (var scope = _provider.GetRequiredService<IServiceScopeFactory>().CreateScope())
  348. {
  349. try
  350. {
  351. var vmcCameraRepository = scope.ServiceProvider.GetService<IVMCDevCameraRepository>();
  352. //var bdmCodeDetailRepository = scope.ServiceProvider.GetService<ITbdmCodeDetailRepository>();
  353. //var mtnAlarmShadowRecordRepository = scope.ServiceProvider.GetService<ImtnAlarmShadowRecordRepository>();
  354. //var dbmList = await bdmCodeDetailRepository.GetByConditionAsync(t => t.C_MainCode == "VIDEORECORD_TIME");
  355. VmcDevSearch searchModel = new VmcDevSearch();
  356. searchModel.IsPagination = false;
  357. searchModel.C_Status="1";
  358. searchModel.C_DevStoreCode = item;
  359. IEnumerable<VmcDevCameraViewModel> viewModelsList = await vmcCameraRepository.GetConditionAsync(searchModel);
  360. await SaveData1(list, viewModelsList, item);
  361. Thread.Sleep(1000);
  362. }
  363. catch (Exception ex)
  364. {
  365. log.Info("【异常-VideoExecute】" + ex.Message);
  366. throw;
  367. }
  368. }
  369. }));
  370. }
  371. await Task.WhenAll(tasks0);
  372. }
  373. public async Task SaveData1(List<TMTN_PushMsgResult> list,IEnumerable<VmcDevCameraViewModel> viewModelsList, string devCode)
  374. {
  375. if (viewModelsList!=null)
  376. {
  377. List<Task> tasks = new List<Task>();
  378. foreach (var vmc in viewModelsList)
  379. {
  380. if (vmc.C_Status == "1")
  381. {
  382. //线程
  383. tasks.Add(Task.Run(async () =>
  384. {
  385. using (var scope = _provider.GetRequiredService<IServiceScopeFactory>().CreateScope())
  386. {
  387. LiveGBSHelper.loginUrl = vmc.C_CameraTypeValue;
  388. var mtnAlarmShadowRecordRepository = scope.ServiceProvider.GetService<ImtnAlarmShadowRecordRepository>();
  389. try
  390. {
  391. if (vmc != null && !string.IsNullOrEmpty(vmc.C_Serial) && !string.IsNullOrEmpty(vmc.Codes))
  392. {
  393. //TBDM_CodeDetail codeDetail = dbmList.Where(t => t.C_Name == vmc.C_TypeName).FirstOrDefault();
  394. int ss = vmc.F_ShootingTime;//60;
  395. //if (codeDetail != null)
  396. //{
  397. // ss = Convert.ToInt32(codeDetail.C_Value);
  398. //}
  399. VideoStartRecording videoUrlModel = await LiveGBSHelper.StartRecording(vmc.C_Serial, vmc.Codes);
  400. Thread.Sleep(ss * 1000);
  401. if (videoUrlModel != null && !string.IsNullOrEmpty(videoUrlModel.DownloadURL))
  402. {
  403. VideoRecording channelVideo = await LiveGBSHelper.StopRecording(vmc.C_Serial, vmc.Codes);
  404. if (channelVideo != null && channelVideo.RecordList != null && channelVideo.RecordList.Count > 0)
  405. {
  406. VideoRecordingMode videoRecording = channelVideo.RecordList.Where(v => v.DownloadURL == videoUrlModel.DownloadURL).FirstOrDefault();
  407. if (videoRecording != null && !string.IsNullOrEmpty(videoRecording.EndTime))
  408. {
  409. //string videoUrl = DownLoad_Video(videoUrlModel.DownloadURL);
  410. ///api/v1/cloudrecord/video/:operate/:serial/:code/:starttime/:endtime/video.mp4
  411. //string videoUrl = $"{LiveGBSHelper.loginUrl}api/v1/cloudrecord/video/play/{vmc.C_Serial}/{vmc.Codes}/{videoRecording.StartTime}/{videoRecording.EndTime}/video.mp4";
  412. string videoUrl = "/sms" + videoUrlModel.DownloadURL.Split("sms")[1];
  413. var mtnList = list.Where(m => m.C_DevStoreCode == devCode);
  414. foreach (var m in mtnList)
  415. {
  416. TMTN_AlarmShadowRecord alarmShadowRecord = new TMTN_AlarmShadowRecord();
  417. alarmShadowRecord.C_ID = Guid.NewGuid().ToString();
  418. alarmShadowRecord.C_PushMsgResultCode = m.C_ID;
  419. alarmShadowRecord.C_RecordUrl = videoUrl;
  420. alarmShadowRecord.C_Type = "1";
  421. alarmShadowRecord.C_CameraServiceType = vmc.C_CameraType;
  422. alarmShadowRecord.C_CameraCode = vmc.C_CameraCode;
  423. alarmShadowRecord.C_DevStoreCode = devCode;
  424. mtnAlarmShadowRecordRepository.Create(alarmShadowRecord);
  425. }
  426. var bolResult = await mtnAlarmShadowRecordRepository.SaveAsync();
  427. }
  428. else
  429. {
  430. log.Info($"【停止实时录像错误,没有录像文件或者录像停止时间为空下载地址不能使用】");
  431. }
  432. }
  433. else
  434. {
  435. log.Info($"【停止实时录像错误,没有录像文件】");
  436. }
  437. }
  438. }
  439. }
  440. catch (Exception ex)
  441. {
  442. log.Info("【异常-SaveData】" + ex.Message);
  443. }
  444. }
  445. }));
  446. }
  447. }
  448. await Task.WhenAll(tasks);
  449. }
  450. }
  451. private string DownLoad_Video(string pathUrl)
  452. {
  453. try
  454. {
  455. string serviceUrl = _configuration.GetSection("ServiceUrl").Value;
  456. //文件下载地址
  457. string path = System.IO.Directory.GetCurrentDirectory();
  458. DateTime time = DateTime.Now;
  459. string fileUrl = "/temp/Video/" + time.Year + "/" + time.Month + "/";
  460. string fileNmae = $"{time.ToString("yyyyMMddHHmmssfff")}.mp4";
  461. path += fileUrl;
  462. // 如果不存在就创建file文件夹
  463. if (!Directory.Exists(path))
  464. {
  465. if (path != null) Directory.CreateDirectory(path);
  466. }
  467. path += fileNmae;
  468. FileHelp.DownLoadVideo(pathUrl, path);
  469. string videoUrl= serviceUrl + fileUrl + fileNmae;
  470. return path;// videoUrl;
  471. }
  472. catch (Exception ex)
  473. {
  474. return null;
  475. }
  476. }
  477. // 检查存储桶名称是否符合规范的方法
  478. private bool IsValidBucketName(string bucketName)
  479. {
  480. //- 长度在 3 到 63 个字符之间。-只能包含小写字母、数字、连字符( - )。 -必须以字母或数字开头和结尾。
  481. if (string.IsNullOrEmpty(bucketName) || bucketName.Length < 3 || bucketName.Length > 63)
  482. {
  483. return false;
  484. }
  485. if (!char.IsLetterOrDigit(bucketName[0]) || !char.IsLetterOrDigit(bucketName[bucketName.Length - 1]))
  486. {
  487. return false;
  488. }
  489. foreach (char c in bucketName)
  490. {
  491. if (!(char.IsLower(c) || char.IsDigit(c) || c == '-'))
  492. {
  493. return false;
  494. }
  495. }
  496. return true;
  497. }
  498. // 添加判断文件是否被锁定的方法
  499. private bool IsFileLocked(string filePath)
  500. {
  501. try
  502. {
  503. using (FileStream stream = File.Open(filePath, FileMode.Open, FileAccess.ReadWrite, FileShare.None))
  504. {
  505. stream.Close();
  506. }
  507. }
  508. catch (IOException)
  509. {
  510. return true;
  511. }
  512. return false;
  513. }
  514. public Task StopAsync(CancellationToken cancellationToken)
  515. {
  516. Dispose();
  517. return Task.CompletedTask;
  518. }
  519. public void Dispose()
  520. {
  521. if (channel != null)
  522. {
  523. channel.Close();
  524. }
  525. if (con != null)
  526. {
  527. con.Close();
  528. }
  529. }
  530. }
  531. public class MinioSettingsModel
  532. {
  533. public string Urls { get; set; }
  534. public string BucketName { get; set; }
  535. public string Endpoint { get; set; }
  536. public string AccessKey { get; set; }
  537. public string SecretKey { get; set; }
  538. public bool UseSSL { get; set; }
  539. }
  540. }