Skip to content

Commit

Permalink
Merge pull request #16 from Bandwidth/release/2021-03-08-21-40-18
Browse files Browse the repository at this point in the history
webrtc new field
  • Loading branch information
jmulford-bw authored Mar 23, 2021
2 parents 68862db + 752400d commit 21ec1c5
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 16 deletions.
6 changes: 3 additions & 3 deletions Bandwidth.Standard/Bandwidth.Standard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
<PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework>
<AssemblyName>Bandwidth.Sdk</AssemblyName>
<Version>5.0.0.0</Version>
<Version>5.1.0.0</Version>
<Authors></Authors>
<Owners></Owners>
<Product>Bandwidth.Standard</Product>
<Copyright>Copyright © 2019</Copyright>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<FileVersion>5.0.0.0</FileVersion>
<AssemblyVersion>5.1.0.0</AssemblyVersion>
<FileVersion>5.1.0.0</FileVersion>
<Description>.NET client library for the bandwidth API</Description>
<LangVersion>7.3</LangVersion>
</PropertyGroup>
Expand Down
79 changes: 79 additions & 0 deletions Bandwidth.Standard/WebRtc/Models/DeviceApiVersionEnum.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* Bandwidth.Standard
*
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
*/
using System;
using System.Linq;
using System.Collections.Generic;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Bandwidth.Standard;
using Bandwidth.Standard.Utilities;

namespace Bandwidth.Standard.WebRtc.Models
{
[JsonConverter(typeof(StringValuedEnumConverter))]
public enum DeviceApiVersionEnum
{
V3,
V2,
}

/// <summary>
/// Helper for the enum type DeviceApiVersionEnum
/// </summary>
public static class DeviceApiVersionEnumHelper
{
//string values corresponding the enum elements
private static List<string> stringValues = new List<string> { "v3", "v2" };

/// <summary>
/// Converts a DeviceApiVersionEnum value to a corresponding string value
/// </summary>
/// <param name="enumValue">The DeviceApiVersionEnum value to convert</param>
/// <returns>The representative string value</returns>
public static string ToValue(DeviceApiVersionEnum enumValue)
{
switch(enumValue)
{
//only valid enum elements can be used
//this is necessary to avoid errors
case DeviceApiVersionEnum.V3:
case DeviceApiVersionEnum.V2:
return stringValues[(int)enumValue];

//an invalid enum value was requested
default:
return null;
}
}

/// <summary>
/// Convert a list of DeviceApiVersionEnum values to a list of strings
/// </summary>
/// <param name="enumValues">The list of DeviceApiVersionEnum values to convert</param>
/// <returns>The list of representative string values</returns>
public static List<string> ToValue(List<DeviceApiVersionEnum> enumValues)
{
if (null == enumValues)
return null;

return enumValues.Select(eVal => ToValue(eVal)).ToList();
}

/// <summary>
/// Converts a string value into DeviceApiVersionEnum value
/// </summary>
/// <param name="value">The string value to parse</param>
/// <returns>The parsed DeviceApiVersionEnum value</returns>
public static DeviceApiVersionEnum ParseString(string value)
{
int index = stringValues.IndexOf(value);
if(index < 0)
throw new InvalidCastException(string.Format("Unable to cast value: {0} to type DeviceApiVersionEnum", value));

return (DeviceApiVersionEnum) index;
}
}
}
14 changes: 11 additions & 3 deletions Bandwidth.Standard/WebRtc/Models/Participant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
*/

using System;
using System.IO;
using System.Collections.Generic;
Expand All @@ -26,14 +27,16 @@ public Participant(string id = null,
List<Models.PublishPermissionEnum> publishPermissions = null,
List<string> sessions = null,
Models.Subscriptions subscriptions = null,
string tag = null)
string tag = null,
Models.DeviceApiVersionEnum? deviceApiVersion = Models.DeviceApiVersionEnum.V2)
{
Id = id;
CallbackUrl = callbackUrl;
PublishPermissions = publishPermissions;
Sessions = sessions;
Subscriptions = subscriptions;
Tag = tag;
DeviceApiVersion = deviceApiVersion;
}

/// <summary>
Expand Down Expand Up @@ -72,6 +75,11 @@ public Participant(string id = null,
/// </summary>
[JsonProperty("tag", NullValueHandling = NullValueHandling.Ignore)]
public string Tag { get; set; }


/// <summary>
/// Optional field to define the device api version of this participant
/// </summary>
[JsonProperty("deviceApiVersion", ItemConverterType = typeof(StringValuedEnumConverter), NullValueHandling = NullValueHandling.Ignore)]
public Models.DeviceApiVersionEnum? DeviceApiVersion { get; set; }
}
}
}
20 changes: 10 additions & 10 deletions Bandwidth.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "Bandwidth.Standard/Bandwidth.Standard.csproj", "{46a9d15b-749f-41bb-8321-58e4e1274a15}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "Bandwidth.Standard/Bandwidth.Standard.csproj", "{92456a14-19a8-4a39-b80d-4c0135acd222}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Tests", "Bandwidth.Tests/Bandwidth.Tests.csproj", "{8e40b91a-7b00-47b9-abbe-8307d4299fe3}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Tests", "Bandwidth.Tests/Bandwidth.Tests.csproj", "{309d88f6-32d3-4d5e-a798-fff2991333ae}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{46a9d15b-749f-41bb-8321-58e4e1274a15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{46a9d15b-749f-41bb-8321-58e4e1274a15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{46a9d15b-749f-41bb-8321-58e4e1274a15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{46a9d15b-749f-41bb-8321-58e4e1274a15}.Release|Any CPU.Build.0 = Release|Any CPU
{8e40b91a-7b00-47b9-abbe-8307d4299fe3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8e40b91a-7b00-47b9-abbe-8307d4299fe3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8e40b91a-7b00-47b9-abbe-8307d4299fe3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8e40b91a-7b00-47b9-abbe-8307d4299fe3}.Release|Any CPU.Build.0 = Release|Any CPU
{92456a14-19a8-4a39-b80d-4c0135acd222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{92456a14-19a8-4a39-b80d-4c0135acd222}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92456a14-19a8-4a39-b80d-4c0135acd222}.Release|Any CPU.ActiveCfg = Release|Any CPU
{92456a14-19a8-4a39-b80d-4c0135acd222}.Release|Any CPU.Build.0 = Release|Any CPU
{309d88f6-32d3-4d5e-a798-fff2991333ae}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{309d88f6-32d3-4d5e-a798-fff2991333ae}.Debug|Any CPU.Build.0 = Debug|Any CPU
{309d88f6-32d3-4d5e-a798-fff2991333ae}.Release|Any CPU.ActiveCfg = Release|Any CPU
{309d88f6-32d3-4d5e-a798-fff2991333ae}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down

0 comments on commit 21ec1c5

Please sign in to comment.