diff --git a/src/main/java/com/bandwidth/webrtc/models/DeviceApiVersionEnum.java b/src/main/java/com/bandwidth/webrtc/models/DeviceApiVersionEnum.java new file mode 100644 index 00000000..70e86738 --- /dev/null +++ b/src/main/java/com/bandwidth/webrtc/models/DeviceApiVersionEnum.java @@ -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 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 toValue(List toConvert) { + if (toConvert == null) { + return null; + } + List convertedValues = new ArrayList<>(); + for (DeviceApiVersionEnum enumValue : toConvert) { + convertedValues.add(enumValue.value); + } + return convertedValues; + } +} \ No newline at end of file diff --git a/src/main/java/com/bandwidth/webrtc/models/Participant.java b/src/main/java/com/bandwidth/webrtc/models/Participant.java index 33f14ea1..429cfaac 100644 --- a/src/main/java/com/bandwidth/webrtc/models/Participant.java +++ b/src/main/java/com/bandwidth/webrtc/models/Participant.java @@ -20,6 +20,7 @@ public class Participant { private List sessions; private Subscriptions subscriptions; private String tag; + private DeviceApiVersionEnum deviceApiVersion; /** * Default constructor. @@ -35,6 +36,7 @@ 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, @@ -42,13 +44,15 @@ public Participant( List publishPermissions, List 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; } /** @@ -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 @@ -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 + "]"; } /** @@ -192,7 +217,8 @@ public Builder toBuilder() { .publishPermissions(getPublishPermissions()) .sessions(getSessions()) .subscriptions(getSubscriptions()) - .tag(getTag()); + .tag(getTag()) + .deviceApiVersion(getDeviceApiVersion()); return builder; } @@ -206,6 +232,7 @@ public static class Builder { private List sessions; private Subscriptions subscriptions; private String tag; + private DeviceApiVersionEnum deviceApiVersion = DeviceApiVersionEnum.V2; @@ -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); } } }