Skip to content

Commit b67c610

Browse files
committed
Format code
1 parent 5dcfbbd commit b67c610

File tree

1,904 files changed

+40545
-57777
lines changed

Some content is hidden

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

1,904 files changed

+40545
-57777
lines changed

config/checkstyle/checkstyle.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,13 @@
55
<module name="Checker">
66
<property name="severity" value="error"/>
77

8+
<!-- Minimal baseline: let Spotless handle formatting, keep only core lint checks. -->
89
<module name="FileTabCharacter">
910
<property name="eachLine" value="true"/>
1011
</module>
1112

1213
<module name="TreeWalker">
1314
<module name="UnusedImports"/>
1415
<module name="NeedBraces"/>
15-
<module name="OneTopLevelClass"/>
16-
<module name="EmptyBlock"/>
17-
<module name="EqualsHashCode"/>
18-
<module name="FallThrough"/>
19-
<module name="MissingSwitchDefault"/>
2016
</module>
2117
</module>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.ringcentral;
22

33
public enum ContentType {
4-
JSON, FORM, MULTIPART
4+
JSON,
5+
FORM,
6+
MULTIPART
57
}
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
package com.ringcentral;
22

33
public enum HttpMethod {
4-
GET, POST, PUT, PATCH, DELETE
5-
}
4+
GET,
5+
POST,
6+
PUT,
7+
PATCH,
8+
DELETE
9+
}

src/main/java/com/ringcentral/RestClient.java

Lines changed: 137 additions & 75 deletions
Large diffs are not rendered by default.

src/main/java/com/ringcentral/RestException.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
package com.ringcentral;
22

3+
import java.io.IOException;
34
import okhttp3.Request;
45
import okhttp3.Response;
56

6-
import java.io.IOException;
7-
87
public class RestException extends Exception {
98
public Request request;
109
public Response response;

src/main/java/com/ringcentral/Utils.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
package com.ringcentral;
22

33
import com.google.gson.Gson;
4+
import java.io.IOException;
5+
import java.text.MessageFormat;
46
import okhttp3.Request;
57
import okhttp3.RequestBody;
68
import okhttp3.Response;
79
import okio.Buffer;
810

9-
import java.io.IOException;
10-
import java.text.MessageFormat;
11-
1211
public class Utils {
1312
public static Gson gson = new Gson();
1413

@@ -19,15 +18,15 @@ public static String formatHttpMessage(Response response, Request request) {
1918
} catch (IOException e) {
2019
e.printStackTrace();
2120
}
22-
return MessageFormat.format("HTTP Response\n=============\nstatus code: {0}\n\n{1}\n{2}\n\nHTTP Request\n============\nHTTP {3} {4}\n\n{5}\n{6}",
23-
response.code(),
24-
response.headers().toString(),
25-
responseBodyString,
26-
request.method(),
27-
request.url().toString(),
28-
request.headers().toString(),
29-
requestBodyToString(request.body())
30-
);
21+
return MessageFormat.format(
22+
"HTTP Response\n=============\nstatus code: {0}\n\n{1}\n{2}\n\nHTTP Request\n============\nHTTP {3} {4}\n\n{5}\n{6}",
23+
response.code(),
24+
response.headers().toString(),
25+
responseBodyString,
26+
request.method(),
27+
request.url().toString(),
28+
request.headers().toString(),
29+
requestBodyToString(request.body()));
3130
}
3231

3332
private static String requestBodyToString(RequestBody requestBody) {
Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,39 @@
11
package com.ringcentral.definitions;
22

3-
4-
/**
5-
* Description of an error occurred during request processing. This data type can be used only in readonly mode, no writing is allowed
6-
*/
7-
public class ADGError
8-
{
3+
/**
4+
* Description of an error occurred during request processing. This data type can be used only in
5+
* readonly mode, no writing is allowed
6+
*/
7+
public class ADGError {
98
/**
10-
* Code that characterizes this error. Code uniquely identifies the source of the error.
11-
* Enum: ErrorCode{code='ADG-000', httpStatus=503, description='Service temporary unavailable.'}, ErrorCode{code='ADG-010', httpStatus=503, description='Federation data temporary unavailable.'}, ErrorCode{code='ADG-001', httpStatus=500, description='Service internal error.'}, ErrorCode{code='ADG-100', httpStatus=403, description='Insufficient permissions.'}, ErrorCode{code='ADG-101', httpStatus=403, description='Unauthorized access.'}, ErrorCode{code='ADG-102', httpStatus=405, description='Method not allowed.'}, ErrorCode{code='ADG-111', httpStatus=400, description='Need Content-Type header.'}, ErrorCode{code='ADG-112', httpStatus=400, description='Request body is invalid.'}, ErrorCode{code='ADG-121', httpStatus=400, description='Parameter [${paramName}] is invalid. ${additionalInfo:-}'}, ErrorCode{code='ADG-115', httpStatus=415, description='Unsupported Media Type.'}, ErrorCode{code='ADG-105', httpStatus=404, description='Current account is not linked to any federation.'}, ErrorCode{code='ADG-107', httpStatus=404, description='Account not found.'}, ErrorCode{code='ADG-122', httpStatus=404, description='Contact not found.'}, ErrorCode{code='ADG-200', httpStatus=404, description='Invalid URI'}
9+
* Code that characterizes this error. Code uniquely identifies the source of the error. Enum:
10+
* ErrorCode{code='ADG-000', httpStatus=503, description='Service temporary unavailable.'},
11+
* ErrorCode{code='ADG-010', httpStatus=503, description='Federation data temporary
12+
* unavailable.'}, ErrorCode{code='ADG-001', httpStatus=500, description='Service internal
13+
* error.'}, ErrorCode{code='ADG-100', httpStatus=403, description='Insufficient permissions.'},
14+
* ErrorCode{code='ADG-101', httpStatus=403, description='Unauthorized access.'},
15+
* ErrorCode{code='ADG-102', httpStatus=405, description='Method not allowed.'},
16+
* ErrorCode{code='ADG-111', httpStatus=400, description='Need Content-Type header.'},
17+
* ErrorCode{code='ADG-112', httpStatus=400, description='Request body is invalid.'},
18+
* ErrorCode{code='ADG-121', httpStatus=400, description='Parameter [${paramName}] is invalid.
19+
* ${additionalInfo:-}'}, ErrorCode{code='ADG-115', httpStatus=415, description='Unsupported
20+
* Media Type.'}, ErrorCode{code='ADG-105', httpStatus=404, description='Current account is not
21+
* linked to any federation.'}, ErrorCode{code='ADG-107', httpStatus=404, description='Account
22+
* not found.'}, ErrorCode{code='ADG-122', httpStatus=404, description='Contact not found.'},
23+
* ErrorCode{code='ADG-200', httpStatus=404, description='Invalid URI'}
1224
*/
1325
public String errorCode;
14-
public ADGError errorCode(String errorCode)
15-
{
26+
27+
public ADGError errorCode(String errorCode) {
1628
this.errorCode = errorCode;
1729
return this;
1830
}
1931

20-
/**
21-
* Message that describes the error. This message can be used in UI.
22-
*/
32+
/** Message that describes the error. This message can be used in UI. */
2333
public String message;
24-
public ADGError message(String message)
25-
{
34+
35+
public ADGError message(String message) {
2636
this.message = message;
2737
return this;
2838
}
29-
}
39+
}
Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
11
package com.ringcentral.definitions;
22

3-
4-
/**
5-
* Format of response in case that any error occurred during request processing
6-
*/
7-
public class ADGErrorResponse
8-
{
9-
/**
10-
* Collection of all gathered errors
11-
*/
3+
/** Format of response in case that any error occurred during request processing */
4+
public class ADGErrorResponse {
5+
/** Collection of all gathered errors */
126
public ADGError[] errors;
13-
public ADGErrorResponse errors(ADGError[] errors)
14-
{
7+
8+
public ADGErrorResponse errors(ADGError[] errors) {
159
this.errors = errors;
1610
return this;
1711
}
18-
}
12+
}
Lines changed: 26 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,67 @@
11
package com.ringcentral.definitions;
22

3-
4-
public class AIInsights
5-
{
6-
/**
7-
*/
3+
public class AIInsights {
4+
/** */
85
public TranscriptInsightUnit[] Transcript;
9-
public AIInsights Transcript(TranscriptInsightUnit[] Transcript)
10-
{
6+
7+
public AIInsights Transcript(TranscriptInsightUnit[] Transcript) {
118
this.Transcript = Transcript;
129
return this;
1310
}
1411

15-
/**
16-
*/
12+
/** */
1713
public SummaryInsightUnit[] Summary;
18-
public AIInsights Summary(SummaryInsightUnit[] Summary)
19-
{
14+
15+
public AIInsights Summary(SummaryInsightUnit[] Summary) {
2016
this.Summary = Summary;
2117
return this;
2218
}
2319

24-
/**
25-
*/
20+
/** */
2621
public HighlightsInsightUnit[] Highlights;
27-
public AIInsights Highlights(HighlightsInsightUnit[] Highlights)
28-
{
22+
23+
public AIInsights Highlights(HighlightsInsightUnit[] Highlights) {
2924
this.Highlights = Highlights;
3025
return this;
3126
}
3227

33-
/**
34-
*/
28+
/** */
3529
public NextStepsInsightUnit[] NextSteps;
36-
public AIInsights NextSteps(NextStepsInsightUnit[] NextSteps)
37-
{
30+
31+
public AIInsights NextSteps(NextStepsInsightUnit[] NextSteps) {
3832
this.NextSteps = NextSteps;
3933
return this;
4034
}
4135

42-
/**
43-
*/
36+
/** */
4437
public BulletedSummaryInsightUnit[] BulletedSummary;
45-
public AIInsights BulletedSummary(BulletedSummaryInsightUnit[] BulletedSummary)
46-
{
38+
39+
public AIInsights BulletedSummary(BulletedSummaryInsightUnit[] BulletedSummary) {
4740
this.BulletedSummary = BulletedSummary;
4841
return this;
4942
}
5043

51-
/**
52-
*/
44+
/** */
5345
public AIScoreInsightUnit[] AIScore;
54-
public AIInsights AIScore(AIScoreInsightUnit[] AIScore)
55-
{
46+
47+
public AIInsights AIScore(AIScoreInsightUnit[] AIScore) {
5648
this.AIScore = AIScore;
5749
return this;
5850
}
5951

60-
/**
61-
*/
52+
/** */
6253
public CallNotesInsightUnit[] CallNotes;
63-
public AIInsights CallNotes(CallNotesInsightUnit[] CallNotes)
64-
{
54+
55+
public AIInsights CallNotes(CallNotesInsightUnit[] CallNotes) {
6556
this.CallNotes = CallNotes;
6657
return this;
6758
}
6859

69-
/**
70-
*/
60+
/** */
7161
public SentimentInsightUnit[] Sentiment;
72-
public AIInsights Sentiment(SentimentInsightUnit[] Sentiment)
73-
{
62+
63+
public AIInsights Sentiment(SentimentInsightUnit[] Sentiment) {
7464
this.Sentiment = Sentiment;
7565
return this;
7666
}
77-
}
67+
}
Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
package com.ringcentral.definitions;
22

3-
4-
public class AIScoreInsightUnit
5-
{
6-
/**
7-
* Value of the score
8-
* Required
9-
* Example: 7
10-
*/
3+
public class AIScoreInsightUnit {
4+
/** Value of the score Required Example: 7 */
115
public String value;
12-
public AIScoreInsightUnit value(String value)
13-
{
6+
7+
public AIScoreInsightUnit value(String value) {
148
this.value = value;
159
return this;
1610
}
17-
}
11+
}

0 commit comments

Comments
 (0)