Skip to content

Commit

Permalink
Merge pull request #26 from Bandwidth/release/2021-03-08-21-39-37
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 94da26f + 4568d6e commit 5d20cfc
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/*
* BandwidthLib
*
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
*/

package com.bandwidth.webrtc.models;

import java.util.ArrayList;
import java.util.List;
import java.util.TreeMap;

/**
* DeviceApiVersionEnum to be used.
*/
public enum DeviceApiVersionEnum {
V3,

V2;


private static TreeMap<String, DeviceApiVersionEnum> valueMap = new TreeMap<>();
private String value;

static {
V3.value = "v3";
V2.value = "v2";

valueMap.put("v3", V3);
valueMap.put("v2", V2);
}

/**
* Returns the enum member associated with the given string value.
* @param toConvert String value to get enum member.
* @return The enum member against the given string value.
*/
@com.fasterxml.jackson.annotation.JsonCreator
public static DeviceApiVersionEnum fromString(String toConvert) {
return valueMap.get(toConvert);
}

/**
* Returns the string value associated with the enum member.
* @return The string value against enum member.
*/
@com.fasterxml.jackson.annotation.JsonValue
public String value() {
return value;
}

/**
* Get string representation of this enum.
*/
@Override
public String toString() {
return value.toString();
}

/**
* Convert list of DeviceApiVersionEnum values to list of string values.
* @param toConvert The list of DeviceApiVersionEnum values to convert.
* @return List of representative string values.
*/
public static List<String> toValue(List<DeviceApiVersionEnum> toConvert) {
if (toConvert == null) {
return null;
}
List<String> convertedValues = new ArrayList<>();
for (DeviceApiVersionEnum enumValue : toConvert) {
convertedValues.add(enumValue.value);
}
return convertedValues;
}
}
45 changes: 41 additions & 4 deletions src/main/java/com/bandwidth/webrtc/models/Participant.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class Participant {
private List<String> sessions;
private Subscriptions subscriptions;
private String tag;
private DeviceApiVersionEnum deviceApiVersion;

/**
* Default constructor.
Expand All @@ -35,20 +36,23 @@ public Participant() {
* @param sessions List of String value for sessions.
* @param subscriptions Subscriptions value for subscriptions.
* @param tag String value for tag.
* @param deviceApiVersion DeviceApiVersionEnum value for deviceApiVersion.
*/
public Participant(
String id,
String callbackUrl,
List<PublishPermissionEnum> publishPermissions,
List<String> sessions,
Subscriptions subscriptions,
String tag) {
String tag,
DeviceApiVersionEnum deviceApiVersion) {
this.id = id;
this.callbackUrl = callbackUrl;
this.publishPermissions = publishPermissions;
this.sessions = sessions;
this.subscriptions = subscriptions;
this.tag = tag;
this.deviceApiVersion = deviceApiVersion;
}

/**
Expand Down Expand Up @@ -169,6 +173,26 @@ public void setTag(String tag) {
this.tag = tag;
}

/**
* Getter for DeviceApiVersion.
* Optional field to define the device api version of this participant
* @return Returns the DeviceApiVersionEnum
*/
@JsonGetter("deviceApiVersion")
public DeviceApiVersionEnum getDeviceApiVersion() {
return this.deviceApiVersion;
}

/**
* Setter for DeviceApiVersion.
* Optional field to define the device api version of this participant
* @param deviceApiVersion Value for DeviceApiVersionEnum
*/
@JsonSetter("deviceApiVersion")
public void setDeviceApiVersion(DeviceApiVersionEnum deviceApiVersion) {
this.deviceApiVersion = deviceApiVersion;
}

/**
* Converts this Participant into string format.
* @return String representation of this class
Expand All @@ -177,7 +201,8 @@ public void setTag(String tag) {
public String toString() {
return "Participant [" + "id=" + id + ", callbackUrl=" + callbackUrl
+ ", publishPermissions=" + publishPermissions + ", sessions=" + sessions
+ ", subscriptions=" + subscriptions + ", tag=" + tag + "]";
+ ", subscriptions=" + subscriptions + ", tag=" + tag + ", deviceApiVersion="
+ deviceApiVersion + "]";
}

/**
Expand All @@ -192,7 +217,8 @@ public Builder toBuilder() {
.publishPermissions(getPublishPermissions())
.sessions(getSessions())
.subscriptions(getSubscriptions())
.tag(getTag());
.tag(getTag())
.deviceApiVersion(getDeviceApiVersion());
return builder;
}

Expand All @@ -206,6 +232,7 @@ public static class Builder {
private List<String> sessions;
private Subscriptions subscriptions;
private String tag;
private DeviceApiVersionEnum deviceApiVersion = DeviceApiVersionEnum.V2;



Expand Down Expand Up @@ -269,13 +296,23 @@ public Builder tag(String tag) {
return this;
}

/**
* Setter for deviceApiVersion.
* @param deviceApiVersion DeviceApiVersionEnum value for deviceApiVersion.
* @return Builder
*/
public Builder deviceApiVersion(DeviceApiVersionEnum deviceApiVersion) {
this.deviceApiVersion = deviceApiVersion;
return this;
}

/**
* Builds a new {@link Participant} object using the set fields.
* @return {@link Participant}
*/
public Participant build() {
return new Participant(id, callbackUrl, publishPermissions, sessions, subscriptions,
tag);
tag, deviceApiVersion);
}
}
}

0 comments on commit 5d20cfc

Please sign in to comment.