SegmentFileMesg.cs 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314
  1. #region Copyright
  2. ////////////////////////////////////////////////////////////////////////////////
  3. // The following FIT Protocol software provided may be used with FIT protocol
  4. // devices only and remains the copyrighted property of Dynastream Innovations Inc.
  5. // The software is being provided on an "as-is" basis and as an accommodation,
  6. // and therefore all warranties, representations, or guarantees of any kind
  7. // (whether express, implied or statutory) including, without limitation,
  8. // warranties of merchantability, non-infringement, or fitness for a particular
  9. // purpose, are specifically disclaimed.
  10. //
  11. // Copyright 2016 Dynastream Innovations Inc.
  12. ////////////////////////////////////////////////////////////////////////////////
  13. // ****WARNING**** This file is auto-generated! Do NOT edit this file.
  14. // Profile Version = 16.60Release
  15. // Tag = production-akw-16.60.00-0-g5d3d436
  16. ////////////////////////////////////////////////////////////////////////////////
  17. #endregion
  18. using System;
  19. using System.Collections.Generic;
  20. using System.Diagnostics;
  21. using System.Text;
  22. using System.IO;
  23. namespace Dynastream.Fit
  24. {
  25. /// <summary>
  26. /// Implements the SegmentFile profile message.
  27. /// </summary>
  28. public class SegmentFileMesg : Mesg
  29. {
  30. #region Fields
  31. #endregion
  32. #region Constructors
  33. public SegmentFileMesg() : base(Profile.GetMesg(MesgNum.SegmentFile))
  34. {
  35. }
  36. public SegmentFileMesg(Mesg mesg) : base(mesg)
  37. {
  38. }
  39. #endregion // Constructors
  40. #region Methods
  41. ///<summary>
  42. /// Retrieves the MessageIndex field</summary>
  43. /// <returns>Returns nullable ushort representing the MessageIndex field</returns>
  44. public ushort? GetMessageIndex()
  45. {
  46. return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
  47. }
  48. /// <summary>
  49. /// Set MessageIndex field</summary>
  50. /// <param name="messageIndex_">Nullable field value to be set</param>
  51. public void SetMessageIndex(ushort? messageIndex_)
  52. {
  53. SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
  54. }
  55. ///<summary>
  56. /// Retrieves the FileUuid field
  57. /// Comment: UUID of the segment file</summary>
  58. /// <returns>Returns byte[] representing the FileUuid field</returns>
  59. public byte[] GetFileUuid()
  60. {
  61. return (byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
  62. }
  63. ///<summary>
  64. /// Retrieves the FileUuid field
  65. /// Comment: UUID of the segment file</summary>
  66. /// <returns>Returns String representing the FileUuid field</returns>
  67. public String GetFileUuidAsString()
  68. {
  69. return Encoding.UTF8.GetString((byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField));
  70. }
  71. ///<summary>
  72. /// Set FileUuid field
  73. /// Comment: UUID of the segment file</summary>
  74. /// <param name="fileUuid_"> field value to be set</param>
  75. public void SetFileUuid(String fileUuid_)
  76. {
  77. SetFieldValue(1, 0, System.Text.Encoding.UTF8.GetBytes(fileUuid_), Fit.SubfieldIndexMainField);
  78. }
  79. /// <summary>
  80. /// Set FileUuid field
  81. /// Comment: UUID of the segment file</summary>
  82. /// <param name="fileUuid_">field value to be set</param>
  83. public void SetFileUuid(byte[] fileUuid_)
  84. {
  85. SetFieldValue(1, 0, fileUuid_, Fit.SubfieldIndexMainField);
  86. }
  87. ///<summary>
  88. /// Retrieves the Enabled field
  89. /// Comment: Enabled state of the segment file</summary>
  90. /// <returns>Returns nullable Bool enum representing the Enabled field</returns>
  91. public Bool? GetEnabled()
  92. {
  93. object obj = GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
  94. Bool? value = obj == null ? (Bool?)null : (Bool)obj;
  95. return value;
  96. }
  97. /// <summary>
  98. /// Set Enabled field
  99. /// Comment: Enabled state of the segment file</summary>
  100. /// <param name="enabled_">Nullable field value to be set</param>
  101. public void SetEnabled(Bool? enabled_)
  102. {
  103. SetFieldValue(3, 0, enabled_, Fit.SubfieldIndexMainField);
  104. }
  105. ///<summary>
  106. /// Retrieves the UserProfilePrimaryKey field
  107. /// Comment: Primary key of the user that created the segment file</summary>
  108. /// <returns>Returns nullable uint representing the UserProfilePrimaryKey field</returns>
  109. public uint? GetUserProfilePrimaryKey()
  110. {
  111. return (uint?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
  112. }
  113. /// <summary>
  114. /// Set UserProfilePrimaryKey field
  115. /// Comment: Primary key of the user that created the segment file</summary>
  116. /// <param name="userProfilePrimaryKey_">Nullable field value to be set</param>
  117. public void SetUserProfilePrimaryKey(uint? userProfilePrimaryKey_)
  118. {
  119. SetFieldValue(4, 0, userProfilePrimaryKey_, Fit.SubfieldIndexMainField);
  120. }
  121. /// <summary>
  122. ///
  123. /// </summary>
  124. /// <returns>returns number of elements in field LeaderType</returns>
  125. public int GetNumLeaderType()
  126. {
  127. return GetNumFieldValues(7, Fit.SubfieldIndexMainField);
  128. }
  129. ///<summary>
  130. /// Retrieves the LeaderType field
  131. /// Comment: Leader type of each leader in the segment file</summary>
  132. /// <param name="index">0 based index of LeaderType element to retrieve</param>
  133. /// <returns>Returns nullable SegmentLeaderboardType enum representing the LeaderType field</returns>
  134. public SegmentLeaderboardType? GetLeaderType(int index)
  135. {
  136. object obj = GetFieldValue(7, index, Fit.SubfieldIndexMainField);
  137. SegmentLeaderboardType? value = obj == null ? (SegmentLeaderboardType?)null : (SegmentLeaderboardType)obj;
  138. return value;
  139. }
  140. /// <summary>
  141. /// Set LeaderType field
  142. /// Comment: Leader type of each leader in the segment file</summary>
  143. /// <param name="index">0 based index of leader_type</param>
  144. /// <param name="leaderType_">Nullable field value to be set</param>
  145. public void SetLeaderType(int index, SegmentLeaderboardType? leaderType_)
  146. {
  147. SetFieldValue(7, index, leaderType_, Fit.SubfieldIndexMainField);
  148. }
  149. /// <summary>
  150. ///
  151. /// </summary>
  152. /// <returns>returns number of elements in field LeaderGroupPrimaryKey</returns>
  153. public int GetNumLeaderGroupPrimaryKey()
  154. {
  155. return GetNumFieldValues(8, Fit.SubfieldIndexMainField);
  156. }
  157. ///<summary>
  158. /// Retrieves the LeaderGroupPrimaryKey field
  159. /// Comment: Group primary key of each leader in the segment file</summary>
  160. /// <param name="index">0 based index of LeaderGroupPrimaryKey element to retrieve</param>
  161. /// <returns>Returns nullable uint representing the LeaderGroupPrimaryKey field</returns>
  162. public uint? GetLeaderGroupPrimaryKey(int index)
  163. {
  164. return (uint?)GetFieldValue(8, index, Fit.SubfieldIndexMainField);
  165. }
  166. /// <summary>
  167. /// Set LeaderGroupPrimaryKey field
  168. /// Comment: Group primary key of each leader in the segment file</summary>
  169. /// <param name="index">0 based index of leader_group_primary_key</param>
  170. /// <param name="leaderGroupPrimaryKey_">Nullable field value to be set</param>
  171. public void SetLeaderGroupPrimaryKey(int index, uint? leaderGroupPrimaryKey_)
  172. {
  173. SetFieldValue(8, index, leaderGroupPrimaryKey_, Fit.SubfieldIndexMainField);
  174. }
  175. /// <summary>
  176. ///
  177. /// </summary>
  178. /// <returns>returns number of elements in field LeaderActivityId</returns>
  179. public int GetNumLeaderActivityId()
  180. {
  181. return GetNumFieldValues(9, Fit.SubfieldIndexMainField);
  182. }
  183. ///<summary>
  184. /// Retrieves the LeaderActivityId field
  185. /// Comment: Activity ID of each leader in the segment file</summary>
  186. /// <param name="index">0 based index of LeaderActivityId element to retrieve</param>
  187. /// <returns>Returns nullable uint representing the LeaderActivityId field</returns>
  188. public uint? GetLeaderActivityId(int index)
  189. {
  190. return (uint?)GetFieldValue(9, index, Fit.SubfieldIndexMainField);
  191. }
  192. /// <summary>
  193. /// Set LeaderActivityId field
  194. /// Comment: Activity ID of each leader in the segment file</summary>
  195. /// <param name="index">0 based index of leader_activity_id</param>
  196. /// <param name="leaderActivityId_">Nullable field value to be set</param>
  197. public void SetLeaderActivityId(int index, uint? leaderActivityId_)
  198. {
  199. SetFieldValue(9, index, leaderActivityId_, Fit.SubfieldIndexMainField);
  200. }
  201. /// <summary>
  202. ///
  203. /// </summary>
  204. /// <returns>returns number of elements in field LeaderActivityIdString</returns>
  205. public int GetNumLeaderActivityIdString()
  206. {
  207. return GetNumFieldValues(10, Fit.SubfieldIndexMainField);
  208. }
  209. ///<summary>
  210. /// Retrieves the LeaderActivityIdString field
  211. /// Comment: String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal</summary>
  212. /// <param name="index">0 based index of LeaderActivityIdString element to retrieve</param>
  213. /// <returns>Returns byte[] representing the LeaderActivityIdString field</returns>
  214. public byte[] GetLeaderActivityIdString(int index)
  215. {
  216. return (byte[])GetFieldValue(10, index, Fit.SubfieldIndexMainField);
  217. }
  218. ///<summary>
  219. /// Retrieves the LeaderActivityIdString field
  220. /// Comment: String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal</summary>
  221. /// <param name="index">0 based index of LeaderActivityIdString element to retrieve</param>
  222. /// <returns>Returns String representing the LeaderActivityIdString field</returns>
  223. public String GetLeaderActivityIdStringAsString(int index)
  224. {
  225. return Encoding.UTF8.GetString((byte[])GetFieldValue(10, index, Fit.SubfieldIndexMainField));
  226. }
  227. ///<summary>
  228. /// Set LeaderActivityIdString field
  229. /// Comment: String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal</summary>
  230. /// <param name="index">0 based index of LeaderActivityIdString element to retrieve</param>
  231. /// <param name="leaderActivityIdString_"> field value to be set</param>
  232. public void SetLeaderActivityIdString(int index, String leaderActivityIdString_)
  233. {
  234. SetFieldValue(10, index, System.Text.Encoding.UTF8.GetBytes(leaderActivityIdString_), Fit.SubfieldIndexMainField);
  235. }
  236. /// <summary>
  237. /// Set LeaderActivityIdString field
  238. /// Comment: String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal</summary>
  239. /// <param name="index">0 based index of leader_activity_id_string</param>
  240. /// <param name="leaderActivityIdString_">field value to be set</param>
  241. public void SetLeaderActivityIdString(int index, byte[] leaderActivityIdString_)
  242. {
  243. SetFieldValue(10, index, leaderActivityIdString_, Fit.SubfieldIndexMainField);
  244. }
  245. #endregion // Methods
  246. } // Class
  247. } // namespace