123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314 |
- #region Copyright
- ////////////////////////////////////////////////////////////////////////////////
- // The following FIT Protocol software provided may be used with FIT protocol
- // devices only and remains the copyrighted property of Dynastream Innovations Inc.
- // The software is being provided on an "as-is" basis and as an accommodation,
- // and therefore all warranties, representations, or guarantees of any kind
- // (whether express, implied or statutory) including, without limitation,
- // warranties of merchantability, non-infringement, or fitness for a particular
- // purpose, are specifically disclaimed.
- //
- // Copyright 2016 Dynastream Innovations Inc.
- ////////////////////////////////////////////////////////////////////////////////
- // ****WARNING**** This file is auto-generated! Do NOT edit this file.
- // Profile Version = 16.60Release
- // Tag = production-akw-16.60.00-0-g5d3d436
- ////////////////////////////////////////////////////////////////////////////////
- #endregion
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Text;
- using System.IO;
- namespace Dynastream.Fit
- {
- /// <summary>
- /// Implements the SegmentFile profile message.
- /// </summary>
- public class SegmentFileMesg : Mesg
- {
- #region Fields
- #endregion
- #region Constructors
- public SegmentFileMesg() : base(Profile.GetMesg(MesgNum.SegmentFile))
- {
- }
- public SegmentFileMesg(Mesg mesg) : base(mesg)
- {
- }
- #endregion // Constructors
- #region Methods
- ///<summary>
- /// Retrieves the MessageIndex field</summary>
- /// <returns>Returns nullable ushort representing the MessageIndex field</returns>
- public ushort? GetMessageIndex()
- {
- return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set MessageIndex field</summary>
- /// <param name="messageIndex_">Nullable field value to be set</param>
- public void SetMessageIndex(ushort? messageIndex_)
- {
- SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the FileUuid field
- /// Comment: UUID of the segment file</summary>
- /// <returns>Returns byte[] representing the FileUuid field</returns>
- public byte[] GetFileUuid()
- {
- return (byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the FileUuid field
- /// Comment: UUID of the segment file</summary>
- /// <returns>Returns String representing the FileUuid field</returns>
- public String GetFileUuidAsString()
- {
- return Encoding.UTF8.GetString((byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField));
- }
-
-
- ///<summary>
- /// Set FileUuid field
- /// Comment: UUID of the segment file</summary>
- /// <param name="fileUuid_"> field value to be set</param>
- public void SetFileUuid(String fileUuid_)
- {
- SetFieldValue(1, 0, System.Text.Encoding.UTF8.GetBytes(fileUuid_), Fit.SubfieldIndexMainField);
- }
-
- /// <summary>
- /// Set FileUuid field
- /// Comment: UUID of the segment file</summary>
- /// <param name="fileUuid_">field value to be set</param>
- public void SetFileUuid(byte[] fileUuid_)
- {
- SetFieldValue(1, 0, fileUuid_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Enabled field
- /// Comment: Enabled state of the segment file</summary>
- /// <returns>Returns nullable Bool enum representing the Enabled field</returns>
- public Bool? GetEnabled()
- {
- object obj = GetFieldValue(3, 0, Fit.SubfieldIndexMainField);
- Bool? value = obj == null ? (Bool?)null : (Bool)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set Enabled field
- /// Comment: Enabled state of the segment file</summary>
- /// <param name="enabled_">Nullable field value to be set</param>
- public void SetEnabled(Bool? enabled_)
- {
- SetFieldValue(3, 0, enabled_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the UserProfilePrimaryKey field
- /// Comment: Primary key of the user that created the segment file</summary>
- /// <returns>Returns nullable uint representing the UserProfilePrimaryKey field</returns>
- public uint? GetUserProfilePrimaryKey()
- {
- return (uint?)GetFieldValue(4, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set UserProfilePrimaryKey field
- /// Comment: Primary key of the user that created the segment file</summary>
- /// <param name="userProfilePrimaryKey_">Nullable field value to be set</param>
- public void SetUserProfilePrimaryKey(uint? userProfilePrimaryKey_)
- {
- SetFieldValue(4, 0, userProfilePrimaryKey_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field LeaderType</returns>
- public int GetNumLeaderType()
- {
- return GetNumFieldValues(7, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the LeaderType field
- /// Comment: Leader type of each leader in the segment file</summary>
- /// <param name="index">0 based index of LeaderType element to retrieve</param>
- /// <returns>Returns nullable SegmentLeaderboardType enum representing the LeaderType field</returns>
- public SegmentLeaderboardType? GetLeaderType(int index)
- {
- object obj = GetFieldValue(7, index, Fit.SubfieldIndexMainField);
- SegmentLeaderboardType? value = obj == null ? (SegmentLeaderboardType?)null : (SegmentLeaderboardType)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set LeaderType field
- /// Comment: Leader type of each leader in the segment file</summary>
- /// <param name="index">0 based index of leader_type</param>
- /// <param name="leaderType_">Nullable field value to be set</param>
- public void SetLeaderType(int index, SegmentLeaderboardType? leaderType_)
- {
- SetFieldValue(7, index, leaderType_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field LeaderGroupPrimaryKey</returns>
- public int GetNumLeaderGroupPrimaryKey()
- {
- return GetNumFieldValues(8, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the LeaderGroupPrimaryKey field
- /// Comment: Group primary key of each leader in the segment file</summary>
- /// <param name="index">0 based index of LeaderGroupPrimaryKey element to retrieve</param>
- /// <returns>Returns nullable uint representing the LeaderGroupPrimaryKey field</returns>
- public uint? GetLeaderGroupPrimaryKey(int index)
- {
- return (uint?)GetFieldValue(8, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set LeaderGroupPrimaryKey field
- /// Comment: Group primary key of each leader in the segment file</summary>
- /// <param name="index">0 based index of leader_group_primary_key</param>
- /// <param name="leaderGroupPrimaryKey_">Nullable field value to be set</param>
- public void SetLeaderGroupPrimaryKey(int index, uint? leaderGroupPrimaryKey_)
- {
- SetFieldValue(8, index, leaderGroupPrimaryKey_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field LeaderActivityId</returns>
- public int GetNumLeaderActivityId()
- {
- return GetNumFieldValues(9, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the LeaderActivityId field
- /// Comment: Activity ID of each leader in the segment file</summary>
- /// <param name="index">0 based index of LeaderActivityId element to retrieve</param>
- /// <returns>Returns nullable uint representing the LeaderActivityId field</returns>
- public uint? GetLeaderActivityId(int index)
- {
- return (uint?)GetFieldValue(9, index, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set LeaderActivityId field
- /// Comment: Activity ID of each leader in the segment file</summary>
- /// <param name="index">0 based index of leader_activity_id</param>
- /// <param name="leaderActivityId_">Nullable field value to be set</param>
- public void SetLeaderActivityId(int index, uint? leaderActivityId_)
- {
- SetFieldValue(9, index, leaderActivityId_, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- ///
- /// </summary>
- /// <returns>returns number of elements in field LeaderActivityIdString</returns>
- public int GetNumLeaderActivityIdString()
- {
- return GetNumFieldValues(10, Fit.SubfieldIndexMainField);
- }
- ///<summary>
- /// Retrieves the LeaderActivityIdString field
- /// Comment: String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal</summary>
- /// <param name="index">0 based index of LeaderActivityIdString element to retrieve</param>
- /// <returns>Returns byte[] representing the LeaderActivityIdString field</returns>
- public byte[] GetLeaderActivityIdString(int index)
- {
- return (byte[])GetFieldValue(10, index, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the LeaderActivityIdString field
- /// Comment: String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal</summary>
- /// <param name="index">0 based index of LeaderActivityIdString element to retrieve</param>
- /// <returns>Returns String representing the LeaderActivityIdString field</returns>
- public String GetLeaderActivityIdStringAsString(int index)
- {
- return Encoding.UTF8.GetString((byte[])GetFieldValue(10, index, Fit.SubfieldIndexMainField));
- }
-
-
- ///<summary>
- /// Set LeaderActivityIdString field
- /// Comment: String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal</summary>
- /// <param name="index">0 based index of LeaderActivityIdString element to retrieve</param>
- /// <param name="leaderActivityIdString_"> field value to be set</param>
- public void SetLeaderActivityIdString(int index, String leaderActivityIdString_)
- {
- SetFieldValue(10, index, System.Text.Encoding.UTF8.GetBytes(leaderActivityIdString_), Fit.SubfieldIndexMainField);
- }
-
- /// <summary>
- /// Set LeaderActivityIdString field
- /// Comment: String version of the activity ID of each leader in the segment file. 21 characters long for each ID, express in decimal</summary>
- /// <param name="index">0 based index of leader_activity_id_string</param>
- /// <param name="leaderActivityIdString_">field value to be set</param>
- public void SetLeaderActivityIdString(int index, byte[] leaderActivityIdString_)
- {
- SetFieldValue(10, index, leaderActivityIdString_, Fit.SubfieldIndexMainField);
- }
-
- #endregion // Methods
- } // Class
- } // namespace
|