Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/WebRtc/Models/DeviceApiVersionEnum.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/*
* BandwidthLib
*
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
*/

namespace BandwidthLib\WebRtc\Models;

/**
* Optional field to define the device api version of this participant
*/
class DeviceApiVersionEnum
{
/**
* TODO: Write general description for this element
*/
const V3 = "v3";

/**
* TODO: Write general description for this element
*/
const V2 = "v2";
}
28 changes: 21 additions & 7 deletions src/WebRtc/Models/Participant.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,31 @@ class Participant implements \JsonSerializable
*/
public $tag;

/**
* Optional field to define the device api version of this participant
* @var string|null $deviceApiVersion public property
*/
public $deviceApiVersion;

/**
* Constructor to set initial or default values of member properties
*/
public function __construct()
{
if (6 == func_num_args()) {
$this->id = func_get_arg(0);
$this->callbackUrl = func_get_arg(1);
$this->publishPermissions = func_get_arg(2);
$this->sessions = func_get_arg(3);
$this->subscriptions = func_get_arg(4);
$this->tag = func_get_arg(5);
switch (func_num_args()) {
case 7:
$this->id = func_get_arg(0);
$this->callbackUrl = func_get_arg(1);
$this->publishPermissions = func_get_arg(2);
$this->sessions = func_get_arg(3);
$this->subscriptions = func_get_arg(4);
$this->tag = func_get_arg(5);
$this->deviceApiVersion = func_get_arg(6);
break;

default:
$this->deviceApiVersion = DeviceApiVersionEnum::V2;
break;
}
}

Expand All @@ -80,6 +93,7 @@ public function jsonSerialize()
array_values($this->sessions) : null;
$json['subscriptions'] = $this->subscriptions;
$json['tag'] = $this->tag;
$json['deviceApiVersion'] = $this->deviceApiVersion;

return array_filter($json);
}
Expand Down