#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 SegmentFile profile message.
///
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
///
/// Retrieves the MessageIndex field
/// Returns nullable ushort representing the MessageIndex field
public ushort? GetMessageIndex()
{
return (ushort?)GetFieldValue(254, 0, Fit.SubfieldIndexMainField);
}
///
/// Set MessageIndex field
/// Nullable field value to be set
public void SetMessageIndex(ushort? messageIndex_)
{
SetFieldValue(254, 0, messageIndex_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the FileUuid field
/// Comment: UUID of the segment file
/// Returns byte[] representing the FileUuid field
public byte[] GetFileUuid()
{
return (byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the FileUuid field
/// Comment: UUID of the segment file
/// Returns String representing the FileUuid field
public String GetFileUuidAsString()
{
return Encoding.UTF8.GetString((byte[])GetFieldValue(1, 0, Fit.SubfieldIndexMainField));
}
///
/// Set FileUuid field
/// Comment: UUID of the segment file
/// field value to be set
public void SetFileUuid(String fileUuid_)
{
SetFieldValue(1, 0, System.Text.Encoding.UTF8.GetBytes(fileUuid_), Fit.SubfieldIndexMainField);
}
///
/// Set FileUuid field
/// Comment: UUID of the segment file
/// field value to be set
public void SetFileUuid(byte[] fileUuid_)
{
SetFieldValue(1, 0, fileUuid_, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the Enabled field
/// Comment: Enabled state of the segment file
/// 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: Enabled state of the segment file
/// 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 file
/// 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 file
/// Nullable field value to be set
public void SetUserProfilePrimaryKey(uint? userProfilePrimaryKey_)
{
SetFieldValue(4, 0, userProfilePrimaryKey_, Fit.SubfieldIndexMainField);
}
///
///
///
/// returns number of elements in field LeaderType
public int GetNumLeaderType()
{
return GetNumFieldValues(7, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the LeaderType field
/// Comment: Leader type of each leader in the segment file
/// 0 based index of LeaderType element to retrieve
/// Returns nullable SegmentLeaderboardType enum representing the LeaderType field
public SegmentLeaderboardType? GetLeaderType(int index)
{
object obj = GetFieldValue(7, index, Fit.SubfieldIndexMainField);
SegmentLeaderboardType? value = obj == null ? (SegmentLeaderboardType?)null : (SegmentLeaderboardType)obj;
return value;
}
///
/// Set LeaderType field
/// Comment: Leader type of each leader in the segment file
/// 0 based index of leader_type
/// Nullable field value to be set
public void SetLeaderType(int index, SegmentLeaderboardType? leaderType_)
{
SetFieldValue(7, index, leaderType_, Fit.SubfieldIndexMainField);
}
///
///
///
/// returns number of elements in field LeaderGroupPrimaryKey
public int GetNumLeaderGroupPrimaryKey()
{
return GetNumFieldValues(8, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the LeaderGroupPrimaryKey field
/// Comment: Group primary key of each leader in the segment file
/// 0 based index of LeaderGroupPrimaryKey element to retrieve
/// Returns nullable uint representing the LeaderGroupPrimaryKey field
public uint? GetLeaderGroupPrimaryKey(int index)
{
return (uint?)GetFieldValue(8, index, Fit.SubfieldIndexMainField);
}
///
/// Set LeaderGroupPrimaryKey field
/// Comment: Group primary key of each leader in the segment file
/// 0 based index of leader_group_primary_key
/// Nullable field value to be set
public void SetLeaderGroupPrimaryKey(int index, uint? leaderGroupPrimaryKey_)
{
SetFieldValue(8, index, leaderGroupPrimaryKey_, Fit.SubfieldIndexMainField);
}
///
///
///
/// returns number of elements in field LeaderActivityId
public int GetNumLeaderActivityId()
{
return GetNumFieldValues(9, Fit.SubfieldIndexMainField);
}
///
/// Retrieves the LeaderActivityId field
/// Comment: Activity ID of each leader in the segment file
/// 0 based index of LeaderActivityId element to retrieve
/// Returns nullable uint representing the LeaderActivityId field
public uint? GetLeaderActivityId(int index)
{
return (uint?)GetFieldValue(9, index, Fit.SubfieldIndexMainField);
}
///
/// Set LeaderActivityId field
/// Comment: Activity ID of each leader in the segment file
/// 0 based index of leader_activity_id
/// Nullable field value to be set
public void SetLeaderActivityId(int index, uint? leaderActivityId_)
{
SetFieldValue(9, index, leaderActivityId_, Fit.SubfieldIndexMainField);
}
///
///
///
/// returns number of elements in field LeaderActivityIdString
public int GetNumLeaderActivityIdString()
{
return GetNumFieldValues(10, Fit.SubfieldIndexMainField);
}
///
/// 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
/// 0 based index of LeaderActivityIdString element to retrieve
/// Returns byte[] representing the LeaderActivityIdString field
public byte[] GetLeaderActivityIdString(int index)
{
return (byte[])GetFieldValue(10, index, Fit.SubfieldIndexMainField);
}
///
/// 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
/// 0 based index of LeaderActivityIdString element to retrieve
/// Returns String representing the LeaderActivityIdString field
public String GetLeaderActivityIdStringAsString(int index)
{
return Encoding.UTF8.GetString((byte[])GetFieldValue(10, index, Fit.SubfieldIndexMainField));
}
///
/// 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
/// 0 based index of LeaderActivityIdString element to retrieve
/// field value to be set
public void SetLeaderActivityIdString(int index, String leaderActivityIdString_)
{
SetFieldValue(10, index, System.Text.Encoding.UTF8.GetBytes(leaderActivityIdString_), Fit.SubfieldIndexMainField);
}
///
/// 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
/// 0 based index of leader_activity_id_string
/// field value to be set
public void SetLeaderActivityIdString(int index, byte[] leaderActivityIdString_)
{
SetFieldValue(10, index, leaderActivityIdString_, Fit.SubfieldIndexMainField);
}
#endregion // Methods
} // Class
} // namespace