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