123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292 |
- #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 SegmentId profile message.
- /// </summary>
- public class SegmentIdMesg : Mesg
- {
- #region Fields
- #endregion
- #region Constructors
- public SegmentIdMesg() : base(Profile.GetMesg(MesgNum.SegmentId))
- {
- }
- public SegmentIdMesg(Mesg mesg) : base(mesg)
- {
- }
- #endregion // Constructors
- #region Methods
- ///<summary>
- /// Retrieves the Name field
- /// Comment: Friendly name assigned to segment</summary>
- /// <returns>Returns byte[] representing the Name field</returns>
- public byte[] GetName()
- {
- return (byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Name field
- /// Comment: Friendly name assigned to segment</summary>
- /// <returns>Returns String representing the Name field</returns>
- public String GetNameAsString()
- {
- return Encoding.UTF8.GetString((byte[])GetFieldValue(0, 0, Fit.SubfieldIndexMainField));
- }
-
-
- ///<summary>
- /// Set Name field
- /// Comment: Friendly name assigned to segment</summary>
- /// <param name="name_"> field value to be set</param>
- public void SetName(String name_)
- {
- SetFieldValue(0, 0, System.Text.Encoding.UTF8.GetBytes(name_), Fit.SubfieldIndexMainField);
- }
-
- /// <summary>
- /// Set Name field
- /// Comment: Friendly name assigned to segment</summary>
- /// <param name="name_">field value to be set</param>
- public void SetName(byte[] name_)
- {
- SetFieldValue(0, 0, name_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Uuid field
- /// Comment: UUID of the segment</summary>
- /// <returns>Returns byte[] representing the Uuid field</returns>
- public byte[] GetUuid()
- {
- return (byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Uuid field
- /// Comment: UUID of the segment</summary>
- /// <returns>Returns String representing the Uuid field</returns>
- public String GetUuidAsString()
- {
- return Encoding.UTF8.GetString((byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField));
- }
-
-
- ///<summary>
- /// Set Uuid field
- /// Comment: UUID of the segment</summary>
- /// <param name="uuid_"> field value to be set</param>
- public void SetUuid(String uuid_)
- {
- SetFieldValue(1, 0, System.Text.Encoding.UTF8.GetBytes(uuid_), Fit.SubfieldIndexMainField);
- }
-
- /// <summary>
- /// Set Uuid field
- /// Comment: UUID of the segment</summary>
- /// <param name="uuid_">field value to be set</param>
- public void SetUuid(byte[] uuid_)
- {
- SetFieldValue(1, 0, uuid_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Sport field
- /// Comment: Sport associated with the segment</summary>
- /// <returns>Returns nullable Sport enum representing the Sport field</returns>
- public Sport? GetSport()
- {
- object obj = GetFieldValue(2, 0, Fit.SubfieldIndexMainField);
- Sport? value = obj == null ? (Sport?)null : (Sport)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set Sport field
- /// Comment: Sport associated with the segment</summary>
- /// <param name="sport_">Nullable field value to be set</param>
- public void SetSport(Sport? sport_)
- {
- SetFieldValue(2, 0, sport_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the Enabled field
- /// Comment: Segment enabled for evaluation</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: Segment enabled for evaluation</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 </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 </summary>
- /// <param name="userProfilePrimaryKey_">Nullable field value to be set</param>
- public void SetUserProfilePrimaryKey(uint? userProfilePrimaryKey_)
- {
- SetFieldValue(4, 0, userProfilePrimaryKey_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the DeviceId field
- /// Comment: ID of the device that created the segment</summary>
- /// <returns>Returns nullable uint representing the DeviceId field</returns>
- public uint? GetDeviceId()
- {
- return (uint?)GetFieldValue(5, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set DeviceId field
- /// Comment: ID of the device that created the segment</summary>
- /// <param name="deviceId_">Nullable field value to be set</param>
- public void SetDeviceId(uint? deviceId_)
- {
- SetFieldValue(5, 0, deviceId_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the DefaultRaceLeader field
- /// Comment: Index for the Leader Board entry selected as the default race participant</summary>
- /// <returns>Returns nullable byte representing the DefaultRaceLeader field</returns>
- public byte? GetDefaultRaceLeader()
- {
- return (byte?)GetFieldValue(6, 0, Fit.SubfieldIndexMainField);
- }
-
-
- /// <summary>
- /// Set DefaultRaceLeader field
- /// Comment: Index for the Leader Board entry selected as the default race participant</summary>
- /// <param name="defaultRaceLeader_">Nullable field value to be set</param>
- public void SetDefaultRaceLeader(byte? defaultRaceLeader_)
- {
- SetFieldValue(6, 0, defaultRaceLeader_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the DeleteStatus field
- /// Comment: Indicates if any segments should be deleted</summary>
- /// <returns>Returns nullable SegmentDeleteStatus enum representing the DeleteStatus field</returns>
- public SegmentDeleteStatus? GetDeleteStatus()
- {
- object obj = GetFieldValue(7, 0, Fit.SubfieldIndexMainField);
- SegmentDeleteStatus? value = obj == null ? (SegmentDeleteStatus?)null : (SegmentDeleteStatus)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set DeleteStatus field
- /// Comment: Indicates if any segments should be deleted</summary>
- /// <param name="deleteStatus_">Nullable field value to be set</param>
- public void SetDeleteStatus(SegmentDeleteStatus? deleteStatus_)
- {
- SetFieldValue(7, 0, deleteStatus_, Fit.SubfieldIndexMainField);
- }
-
- ///<summary>
- /// Retrieves the SelectionType field
- /// Comment: Indicates how the segment was selected to be sent to the device</summary>
- /// <returns>Returns nullable SegmentSelectionType enum representing the SelectionType field</returns>
- public SegmentSelectionType? GetSelectionType()
- {
- object obj = GetFieldValue(8, 0, Fit.SubfieldIndexMainField);
- SegmentSelectionType? value = obj == null ? (SegmentSelectionType?)null : (SegmentSelectionType)obj;
- return value;
- }
-
-
- /// <summary>
- /// Set SelectionType field
- /// Comment: Indicates how the segment was selected to be sent to the device</summary>
- /// <param name="selectionType_">Nullable field value to be set</param>
- public void SetSelectionType(SegmentSelectionType? selectionType_)
- {
- SetFieldValue(8, 0, selectionType_, Fit.SubfieldIndexMainField);
- }
-
- #endregion // Methods
- } // Class
- } // namespace
|