Skip to content

Commit b55b8a1

Browse files
committed
Deploy
1 parent c335c17 commit b55b8a1

File tree

487 files changed

+15647
-1373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

487 files changed

+15647
-1373
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<project><modelVersion>4.0.0</modelVersion><groupId>com.bandwidth.sdk</groupId><artifactId>bandwidth-sdk</artifactId><version>3.6.0</version><packaging>jar</packaging><name>BandwidthLib</name><build><pluginManagement><plugins><plugin><groupId>org.eclipse.m2e</groupId><artifactId>lifecycle-mapping</artifactId><version>1.0.0</version><configuration><lifecycleMappingMetadata><pluginExecutions><pluginExecution><pluginExecutionFilter><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><versionRange>[2.0.0,)</versionRange><goals><goal>enforce</goal></goals></pluginExecutionFilter><action><execute><runOnIncremental>true</runOnIncremental></execute></action></pluginExecution></pluginExecutions></lifecycleMappingMetadata></configuration></plugin></plugins></pluginManagement><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><version>3.0.0-M2</version><executions><execution><id>enforce-versions</id><goals><goal>enforce</goal></goals><configuration><fail>true</fail><rules><requireJavaVersion><version>1.8</version></requireJavaVersion></rules></configuration></execution></executions></plugin><plugin><artifactId>maven-assembly-plugin</artifactId><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs><appendAssemblyId>false</appendAssemblyId></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>3.1.0</version><executions><execution><id>attach-sources</id><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-gpg-plugin</artifactId><version>1.5</version><executions><execution><id>sign-artifacts</id><phase>verify</phase><goals><goal>sign</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><version>3.1.1</version><configuration><failOnError>false</failOnError></configuration><executions><execution><id>attach-javadocs</id><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><groupId>org.sonatype.plugins</groupId><artifactId>nexus-staging-maven-plugin</artifactId><version>1.6.2</version><extensions>true</extensions><configuration><serverId>ossrh</serverId><nexusUrl>https://oss.sonatype.org/</nexusUrl><autoReleaseAfterClose>true</autoReleaseAfterClose></configuration></plugin></plugins></build><properties><jackson.version>2.9.10</jackson.version><jackson.databind.version>2.9.10.4</jackson.databind.version><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><dependencies><dependency><groupId>javax.xml.bind</groupId><artifactId>jaxb-api</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-core</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-impl</artifactId><version>2.3.0</version></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.8</version></dependency><dependency><groupId>com.squareup.okhttp3</groupId><artifactId>okhttp</artifactId><version>3.12.1</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>${jackson.databind.version}</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>${jackson.version}</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId><version>${jackson.version}</version></dependency></dependencies><distributionManagement><snapshotRepository><id>ossrh</id><url>https://oss.sonatype.org/content/repositories/snapshots</url></snapshotRepository><repository><id>ossrh</id><url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url></repository></distributionManagement><parent><groupId>org.sonatype.oss</groupId><artifactId>oss-parent</artifactId><version>7</version></parent><licenses><license><name>Apache License, Version 2.0</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution></license></licenses><scm><url>https://github.com/Bandwidth/java-sdk</url><connection>scm:git:git@github.com:Bandwidth/java-sdk.git</connection><developerConnection>scm:git:git@github.com:Bandwidth/java-sdk.git</developerConnection></scm><developers><developer><id>support</id><name>Bandwidth Support</name><email>info@bandwidth.com</email><organization>Bandwidth, Inc.</organization><organizationUrl>http://bandwidth.com</organizationUrl><timezone>-5</timezone></developer></developers></project>
1+
<project><modelVersion>4.0.0</modelVersion><groupId>com.bandwidth.sdk</groupId><artifactId>bandwidth-sdk</artifactId><version>3.7.0</version><packaging>jar</packaging><name>BandwidthLib</name><build><pluginManagement><plugins><plugin><groupId>org.eclipse.m2e</groupId><artifactId>lifecycle-mapping</artifactId><version>1.0.0</version><configuration><lifecycleMappingMetadata><pluginExecutions><pluginExecution><pluginExecutionFilter><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><versionRange>[2.0.0,)</versionRange><goals><goal>enforce</goal></goals></pluginExecutionFilter><action><execute><runOnIncremental>true</runOnIncremental></execute></action></pluginExecution></pluginExecutions></lifecycleMappingMetadata></configuration></plugin></plugins></pluginManagement><plugins><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-enforcer-plugin</artifactId><version>3.0.0-M2</version><executions><execution><id>enforce-versions</id><goals><goal>enforce</goal></goals><configuration><fail>true</fail><rules><requireJavaVersion><version>1.8</version></requireJavaVersion></rules></configuration></execution></executions></plugin><plugin><artifactId>maven-assembly-plugin</artifactId><configuration><descriptorRefs><descriptorRef>jar-with-dependencies</descriptorRef></descriptorRefs><appendAssemblyId>false</appendAssemblyId></configuration></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-source-plugin</artifactId><version>3.1.0</version><executions><execution><id>attach-sources</id><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-gpg-plugin</artifactId><version>1.5</version><executions><execution><id>sign-artifacts</id><phase>verify</phase><goals><goal>sign</goal></goals></execution></executions></plugin><plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-javadoc-plugin</artifactId><version>3.1.1</version><configuration><failOnError>false</failOnError></configuration><executions><execution><id>attach-javadocs</id><goals><goal>jar</goal></goals></execution></executions></plugin><plugin><groupId>org.sonatype.plugins</groupId><artifactId>nexus-staging-maven-plugin</artifactId><version>1.6.2</version><extensions>true</extensions><configuration><serverId>ossrh</serverId><nexusUrl>https://oss.sonatype.org/</nexusUrl><autoReleaseAfterClose>true</autoReleaseAfterClose></configuration></plugin></plugins></build><properties><jackson.version>2.9.10</jackson.version><jackson.databind.version>2.9.10.4</jackson.databind.version><maven.compiler.source>1.8</maven.compiler.source><maven.compiler.target>1.8</maven.compiler.target><project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties><dependencies><dependency><groupId>javax.xml.bind</groupId><artifactId>jaxb-api</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-core</artifactId><version>2.3.0</version></dependency><dependency><groupId>com.sun.xml.bind</groupId><artifactId>jaxb-impl</artifactId><version>2.3.0</version></dependency><dependency><groupId>org.projectlombok</groupId><artifactId>lombok</artifactId><version>1.18.8</version></dependency><dependency><groupId>com.squareup.okhttp3</groupId><artifactId>okhttp</artifactId><version>3.12.1</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><version>${jackson.databind.version}</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-core</artifactId><version>${jackson.version}</version></dependency><dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId><version>${jackson.version}</version></dependency></dependencies><distributionManagement><snapshotRepository><id>ossrh</id><url>https://oss.sonatype.org/content/repositories/snapshots</url></snapshotRepository><repository><id>ossrh</id><url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url></repository></distributionManagement><parent><groupId>org.sonatype.oss</groupId><artifactId>oss-parent</artifactId><version>7</version></parent><licenses><license><name>Apache License, Version 2.0</name><url>http://www.apache.org/licenses/LICENSE-2.0.txt</url><distribution>repo</distribution></license></licenses><scm><url>https://github.com/Bandwidth/java-sdk</url><connection>scm:git:git@github.com:Bandwidth/java-sdk.git</connection><developerConnection>scm:git:git@github.com:Bandwidth/java-sdk.git</developerConnection></scm><developers><developer><id>support</id><name>Bandwidth Support</name><email>info@bandwidth.com</email><organization>Bandwidth, Inc.</organization><organizationUrl>http://bandwidth.com</organizationUrl><timezone>-5</timezone></developer></developers></project>

src/main/java/com/bandwidth/BandwidthClient.java

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public final class BandwidthClient implements Configuration {
2424
private MessagingClient messagingClient;
2525
private TwoFactorAuthClient twoFactorAuthClient;
2626
private VoiceClient voiceClient;
27+
private WebRtcClient webRtcClient;
2728

2829
/**
2930
* Provides access to messagingClient Client
@@ -49,6 +50,14 @@ public VoiceClient getVoiceClient() {
4950
return voiceClient;
5051
}
5152

53+
/**
54+
* Provides access to webRtcClient Client
55+
* @return Returns the WebRtcClient instance
56+
*/
57+
public WebRtcClient getWebRtcClient() {
58+
return webRtcClient;
59+
}
60+
5261

5362
/**
5463
* Shutdown the underlying HttpClient instance
@@ -60,8 +69,8 @@ public static void shutdown() {
6069
private BandwidthClient(Environment environment, String messagingBasicAuthUserName,
6170
String messagingBasicAuthPassword, String twoFactorAuthBasicAuthUserName,
6271
String twoFactorAuthBasicAuthPassword, String voiceBasicAuthUserName, String voiceBasicAuthPassword,
63-
HttpClient httpClient, long timeout, ReadonlyHttpClientConfiguration httpClientConfig,
64-
Map<String, AuthManager> authManagers) {
72+
String webRtcBasicAuthUserName, String webRtcBasicAuthPassword, HttpClient httpClient, long timeout,
73+
ReadonlyHttpClientConfiguration httpClientConfig, Map<String, AuthManager> authManagers) {
6574
this.environment = environment;
6675
this.httpClient = httpClient;
6776
this.timeout = timeout;
@@ -95,12 +104,22 @@ private BandwidthClient(Environment environment, String messagingBasicAuthUserNa
95104
this.voiceBasicAuthManager = new VoiceBasicAuthManager(voiceBasicAuthUserName, voiceBasicAuthPassword);
96105
this.authManagers.put("voice", voiceBasicAuthManager);
97106
}
107+
if (this.authManagers.containsKey("webRtc")) {
108+
this.webRtcBasicAuthManager = (WebRtcBasicAuthManager)this.authManagers.get("webRtc");
109+
}
110+
if (!this.authManagers.containsKey("webRtc")
111+
|| getWebRtcBasicAuthCredentials().getWebRtcBasicAuthUserName() != webRtcBasicAuthUserName
112+
|| getWebRtcBasicAuthCredentials().getWebRtcBasicAuthPassword() != webRtcBasicAuthPassword) {
113+
this.webRtcBasicAuthManager = new WebRtcBasicAuthManager(webRtcBasicAuthUserName, webRtcBasicAuthPassword);
114+
this.authManagers.put("webRtc", webRtcBasicAuthManager);
115+
}
98116

99117

100118

101119
messagingClient = new MessagingClient(this);
102120
twoFactorAuthClient = new TwoFactorAuthClient(this);
103121
voiceClient = new VoiceClient(this);
122+
webRtcClient = new WebRtcClient(this);
104123
}
105124

106125
/**
@@ -143,6 +162,11 @@ private BandwidthClient(Environment environment, String messagingBasicAuthUserNa
143162
*/
144163
private VoiceBasicAuthManager voiceBasicAuthManager;
145164

165+
/**
166+
* WebRtcBasicAuthManager
167+
*/
168+
private WebRtcBasicAuthManager webRtcBasicAuthManager;
169+
146170
/**
147171
* Current API environment
148172
* @return environment
@@ -223,6 +247,22 @@ public VoiceBasicAuthCredentials getVoiceBasicAuthCredentials() {
223247
return voiceBasicAuthManager;
224248
}
225249

250+
private String getWebRtcBasicAuthUserName() {
251+
return getWebRtcBasicAuthCredentials().getWebRtcBasicAuthUserName();
252+
}
253+
254+
private String getWebRtcBasicAuthPassword() {
255+
return getWebRtcBasicAuthCredentials().getWebRtcBasicAuthPassword();
256+
}
257+
258+
/**
259+
* The credentials to use with basic authentication
260+
* @return webRtcBasicAuthCredentials
261+
*/
262+
public WebRtcBasicAuthCredentials getWebRtcBasicAuthCredentials() {
263+
return webRtcBasicAuthManager;
264+
}
265+
226266
/**
227267
* The list of auth managers
228268
* @return authManagers
@@ -271,6 +311,9 @@ private static String environmentMapper(Environment environment, Server server)
271311
if (server.equals(Server.VOICEDEFAULT)) {
272312
return "https://voice.bandwidth.com";
273313
}
314+
if (server.equals(Server.WEBRTCDEFAULT)) {
315+
return "https://api.webrtc.bandwidth.com/v1";
316+
}
274317
}
275318
return "api.bandwidth.com";
276319
}
@@ -290,6 +333,8 @@ public Builder newBuilder() {
290333
builder.twoFactorAuthBasicAuthPassword = getTwoFactorAuthBasicAuthPassword();
291334
builder.voiceBasicAuthUserName = getVoiceBasicAuthUserName();
292335
builder.voiceBasicAuthPassword = getVoiceBasicAuthPassword();
336+
builder.webRtcBasicAuthUserName = getWebRtcBasicAuthUserName();
337+
builder.webRtcBasicAuthPassword = getWebRtcBasicAuthPassword();
293338
builder.httpClient = getHttpClient();
294339
builder.timeout = getTimeout();
295340
builder.authManagers = authManagers;
@@ -308,6 +353,8 @@ public static class Builder {
308353
private String twoFactorAuthBasicAuthPassword = "TODO: Replace";
309354
private String voiceBasicAuthUserName = "TODO: Replace";
310355
private String voiceBasicAuthPassword = "TODO: Replace";
356+
private String webRtcBasicAuthUserName = "TODO: Replace";
357+
private String webRtcBasicAuthPassword = "TODO: Replace";
311358
private HttpClient httpClient;
312359
private long timeout = 0;
313360
private Map<String, AuthManager> authManagers = null;
@@ -362,6 +409,22 @@ public Builder voiceBasicAuthCredentials(String voiceBasicAuthUserName, String v
362409
this.voiceBasicAuthPassword = voiceBasicAuthPassword;
363410
return this;
364411
}
412+
/**
413+
* The username and password to use with basic authentication
414+
* @param webRtcBasicAuthUserName
415+
* @param webRtcBasicAuthPassword
416+
*/
417+
public Builder webRtcBasicAuthCredentials(String webRtcBasicAuthUserName, String webRtcBasicAuthPassword) {
418+
if (webRtcBasicAuthUserName == null) {
419+
throw new NullPointerException("Username cannot be null.");
420+
}
421+
if (webRtcBasicAuthPassword == null) {
422+
throw new NullPointerException("Password cannot be null.");
423+
}
424+
this.webRtcBasicAuthUserName = webRtcBasicAuthUserName;
425+
this.webRtcBasicAuthPassword = webRtcBasicAuthPassword;
426+
return this;
427+
}
365428
/**
366429
* Current API environment
367430
* @param environment
@@ -396,7 +459,8 @@ public BandwidthClient build() {
396459

397460
return new BandwidthClient(environment, messagingBasicAuthUserName, messagingBasicAuthPassword,
398461
twoFactorAuthBasicAuthUserName, twoFactorAuthBasicAuthPassword, voiceBasicAuthUserName,
399-
voiceBasicAuthPassword, httpClient, timeout, httpClientConfig, authManagers);
462+
voiceBasicAuthPassword, webRtcBasicAuthUserName, webRtcBasicAuthPassword, httpClient, timeout,
463+
httpClientConfig, authManagers);
400464
}
401465
}
402466
}

src/main/java/com/bandwidth/Configuration.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ public interface Configuration {
4848
*/
4949
VoiceBasicAuthCredentials getVoiceBasicAuthCredentials();
5050

51+
/**
52+
* The credentials to use with basic authentication
53+
* @return basicAuthCredentials
54+
*/
55+
WebRtcBasicAuthCredentials getWebRtcBasicAuthCredentials();
56+
5157
/**
5258
* Get base URI by current environment
5359
* @param server Server for which to get the base URI

src/main/java/com/bandwidth/Server.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ public enum Server {
1919

2020
TWOFACTORAUTHDEFAULT,
2121

22-
VOICEDEFAULT;
22+
VOICEDEFAULT,
23+
24+
WEBRTCDEFAULT;
2325

2426

2527
private static TreeMap<String, Server> valueMap = new TreeMap<>();
@@ -30,11 +32,13 @@ public enum Server {
3032
MESSAGINGDEFAULT.value = "MessagingDefault";
3133
TWOFACTORAUTHDEFAULT.value = "TwoFactorAuthDefault";
3234
VOICEDEFAULT.value = "VoiceDefault";
35+
WEBRTCDEFAULT.value = "WebRtcDefault";
3336

3437
valueMap.put("default", ENUM_DEFAULT);
3538
valueMap.put("MessagingDefault", MESSAGINGDEFAULT);
3639
valueMap.put("TwoFactorAuthDefault", TWOFACTORAUTHDEFAULT);
3740
valueMap.put("VoiceDefault", VOICEDEFAULT);
41+
valueMap.put("WebRtcDefault", WEBRTCDEFAULT);
3842
}
3943

4044
/**
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/*
2+
* BandwidthLib
3+
*
4+
* This file was automatically generated by APIMATIC v2.0 ( https://apimatic.io ).
5+
*/
6+
package com.bandwidth;
7+
8+
public interface WebRtcBasicAuthCredentials {
9+
10+
/**
11+
* @return username
12+
*/
13+
String getWebRtcBasicAuthUserName();
14+
15+
/**
16+
* @return password
17+
*/
18+
String getWebRtcBasicAuthPassword();
19+
}

0 commit comments

Comments
 (0)