Skip to content

Commit 21ec1c5

Browse files
authored
Merge pull request #16 from Bandwidth/release/2021-03-08-21-40-18
webrtc new field
2 parents 68862db + 752400d commit 21ec1c5

File tree

4 files changed

+103
-16
lines changed

4 files changed

+103
-16
lines changed

Bandwidth.Standard/Bandwidth.Standard.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
<PropertyGroup>
1010
<TargetFramework>netstandard1.3</TargetFramework>
1111
<AssemblyName>Bandwidth.Sdk</AssemblyName>
12-
<Version>5.0.0.0</Version>
12+
<Version>5.1.0.0</Version>
1313
<Authors></Authors>
1414
<Owners></Owners>
1515
<Product>Bandwidth.Standard</Product>
1616
<Copyright>Copyright © 2019</Copyright>
17-
<AssemblyVersion>5.0.0.0</AssemblyVersion>
18-
<FileVersion>5.0.0.0</FileVersion>
17+
<AssemblyVersion>5.1.0.0</AssemblyVersion>
18+
<FileVersion>5.1.0.0</FileVersion>
1919
<Description>.NET client library for the bandwidth API</Description>
2020
<LangVersion>7.3</LangVersion>
2121
</PropertyGroup>
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Bandwidth.Standard
3+
*
4+
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
5+
*/
6+
using System;
7+
using System.Linq;
8+
using System.Collections.Generic;
9+
using Newtonsoft.Json;
10+
using Newtonsoft.Json.Converters;
11+
using Bandwidth.Standard;
12+
using Bandwidth.Standard.Utilities;
13+
14+
namespace Bandwidth.Standard.WebRtc.Models
15+
{
16+
[JsonConverter(typeof(StringValuedEnumConverter))]
17+
public enum DeviceApiVersionEnum
18+
{
19+
V3,
20+
V2,
21+
}
22+
23+
/// <summary>
24+
/// Helper for the enum type DeviceApiVersionEnum
25+
/// </summary>
26+
public static class DeviceApiVersionEnumHelper
27+
{
28+
//string values corresponding the enum elements
29+
private static List<string> stringValues = new List<string> { "v3", "v2" };
30+
31+
/// <summary>
32+
/// Converts a DeviceApiVersionEnum value to a corresponding string value
33+
/// </summary>
34+
/// <param name="enumValue">The DeviceApiVersionEnum value to convert</param>
35+
/// <returns>The representative string value</returns>
36+
public static string ToValue(DeviceApiVersionEnum enumValue)
37+
{
38+
switch(enumValue)
39+
{
40+
//only valid enum elements can be used
41+
//this is necessary to avoid errors
42+
case DeviceApiVersionEnum.V3:
43+
case DeviceApiVersionEnum.V2:
44+
return stringValues[(int)enumValue];
45+
46+
//an invalid enum value was requested
47+
default:
48+
return null;
49+
}
50+
}
51+
52+
/// <summary>
53+
/// Convert a list of DeviceApiVersionEnum values to a list of strings
54+
/// </summary>
55+
/// <param name="enumValues">The list of DeviceApiVersionEnum values to convert</param>
56+
/// <returns>The list of representative string values</returns>
57+
public static List<string> ToValue(List<DeviceApiVersionEnum> enumValues)
58+
{
59+
if (null == enumValues)
60+
return null;
61+
62+
return enumValues.Select(eVal => ToValue(eVal)).ToList();
63+
}
64+
65+
/// <summary>
66+
/// Converts a string value into DeviceApiVersionEnum value
67+
/// </summary>
68+
/// <param name="value">The string value to parse</param>
69+
/// <returns>The parsed DeviceApiVersionEnum value</returns>
70+
public static DeviceApiVersionEnum ParseString(string value)
71+
{
72+
int index = stringValues.IndexOf(value);
73+
if(index < 0)
74+
throw new InvalidCastException(string.Format("Unable to cast value: {0} to type DeviceApiVersionEnum", value));
75+
76+
return (DeviceApiVersionEnum) index;
77+
}
78+
}
79+
}

Bandwidth.Standard/WebRtc/Models/Participant.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*
44
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
55
*/
6+
67
using System;
78
using System.IO;
89
using System.Collections.Generic;
@@ -26,14 +27,16 @@ public Participant(string id = null,
2627
List<Models.PublishPermissionEnum> publishPermissions = null,
2728
List<string> sessions = null,
2829
Models.Subscriptions subscriptions = null,
29-
string tag = null)
30+
string tag = null,
31+
Models.DeviceApiVersionEnum? deviceApiVersion = Models.DeviceApiVersionEnum.V2)
3032
{
3133
Id = id;
3234
CallbackUrl = callbackUrl;
3335
PublishPermissions = publishPermissions;
3436
Sessions = sessions;
3537
Subscriptions = subscriptions;
3638
Tag = tag;
39+
DeviceApiVersion = deviceApiVersion;
3740
}
3841

3942
/// <summary>
@@ -72,6 +75,11 @@ public Participant(string id = null,
7275
/// </summary>
7376
[JsonProperty("tag", NullValueHandling = NullValueHandling.Ignore)]
7477
public string Tag { get; set; }
75-
78+
79+
/// <summary>
80+
/// Optional field to define the device api version of this participant
81+
/// </summary>
82+
[JsonProperty("deviceApiVersion", ItemConverterType = typeof(StringValuedEnumConverter), NullValueHandling = NullValueHandling.Ignore)]
83+
public Models.DeviceApiVersionEnum? DeviceApiVersion { get; set; }
7684
}
77-
}
85+
}

Bandwidth.sln

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
22
# Visual Studio 15
33
VisualStudioVersion = 15.0.26430.14
44
MinimumVisualStudioVersion = 10.0.40219.1
5-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "Bandwidth.Standard/Bandwidth.Standard.csproj", "{46a9d15b-749f-41bb-8321-58e4e1274a15}"
5+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Standard", "Bandwidth.Standard/Bandwidth.Standard.csproj", "{92456a14-19a8-4a39-b80d-4c0135acd222}"
66
EndProject
7-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Tests", "Bandwidth.Tests/Bandwidth.Tests.csproj", "{8e40b91a-7b00-47b9-abbe-8307d4299fe3}"
7+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bandwidth.Tests", "Bandwidth.Tests/Bandwidth.Tests.csproj", "{309d88f6-32d3-4d5e-a798-fff2991333ae}"
88
EndProject
99
Global
1010
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1111
Debug|Any CPU = Debug|Any CPU
1212
Release|Any CPU = Release|Any CPU
1313
EndGlobalSection
1414
GlobalSection(ProjectConfigurationPlatforms) = postSolution
15-
{46a9d15b-749f-41bb-8321-58e4e1274a15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16-
{46a9d15b-749f-41bb-8321-58e4e1274a15}.Debug|Any CPU.Build.0 = Debug|Any CPU
17-
{46a9d15b-749f-41bb-8321-58e4e1274a15}.Release|Any CPU.ActiveCfg = Release|Any CPU
18-
{46a9d15b-749f-41bb-8321-58e4e1274a15}.Release|Any CPU.Build.0 = Release|Any CPU
19-
{8e40b91a-7b00-47b9-abbe-8307d4299fe3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20-
{8e40b91a-7b00-47b9-abbe-8307d4299fe3}.Debug|Any CPU.Build.0 = Debug|Any CPU
21-
{8e40b91a-7b00-47b9-abbe-8307d4299fe3}.Release|Any CPU.ActiveCfg = Release|Any CPU
22-
{8e40b91a-7b00-47b9-abbe-8307d4299fe3}.Release|Any CPU.Build.0 = Release|Any CPU
15+
{92456a14-19a8-4a39-b80d-4c0135acd222}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
16+
{92456a14-19a8-4a39-b80d-4c0135acd222}.Debug|Any CPU.Build.0 = Debug|Any CPU
17+
{92456a14-19a8-4a39-b80d-4c0135acd222}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{92456a14-19a8-4a39-b80d-4c0135acd222}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{309d88f6-32d3-4d5e-a798-fff2991333ae}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{309d88f6-32d3-4d5e-a798-fff2991333ae}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{309d88f6-32d3-4d5e-a798-fff2991333ae}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{309d88f6-32d3-4d5e-a798-fff2991333ae}.Release|Any CPU.Build.0 = Release|Any CPU
2323
EndGlobalSection
2424
GlobalSection(SolutionProperties) = preSolution
2525
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)