Skip to content

Commit 452b1f3

Browse files
authored
apply google-java-format for generated code (#1146)
1 parent 85f5804 commit 452b1f3

File tree

267 files changed

+17590
-26977
lines changed

Some content is hidden

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

267 files changed

+17590
-26977
lines changed

clients/line-bot-insight-client/src/main/java/com/linecorp/bot/insight/client/InsightClient.java

Lines changed: 93 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -16,128 +16,112 @@
1616

1717
/**
1818
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19-
* https://openapi-generator.tech
20-
* Do not edit the class manually.
19+
* https://openapi-generator.tech Do not edit the class manually.
2120
*/
22-
2321
package com.linecorp.bot.insight.client;
24-
import java.net.URI;
25-
26-
import java.util.concurrent.CompletableFuture;
2722

2823
import com.linecorp.bot.client.base.ApiAuthenticatedClientBuilder;
29-
import com.linecorp.bot.client.base.ApiClientBuilder;
3024
import com.linecorp.bot.client.base.Result;
31-
import com.linecorp.bot.client.base.BlobContent;
32-
import com.linecorp.bot.client.base.UploadFile;
3325
import com.linecorp.bot.client.base.channel.ChannelTokenSupplier;
34-
35-
import retrofit2.Call;
36-
import retrofit2.http.*;
37-
38-
import okhttp3.RequestBody;
39-
import okhttp3.MultipartBody;
40-
4126
import com.linecorp.bot.insight.model.GetFriendsDemographicsResponse;
4227
import com.linecorp.bot.insight.model.GetMessageEventResponse;
4328
import com.linecorp.bot.insight.model.GetNumberOfFollowersResponse;
4429
import com.linecorp.bot.insight.model.GetNumberOfMessageDeliveriesResponse;
4530
import com.linecorp.bot.insight.model.GetStatisticsPerUnitResponse;
46-
47-
48-
import java.util.ArrayList;
49-
import java.util.HashMap;
50-
import java.util.List;
51-
import java.util.Map;
52-
import java.util.Set;
31+
import java.net.URI;
32+
import java.util.concurrent.CompletableFuture;
33+
import retrofit2.http.*;
5334

5435
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
5536
public interface InsightClient {
5637

57-
/**
58-
*
59-
* Retrieves the demographic attributes for a LINE Official Account's friends.You can only retrieve information about friends for LINE Official Accounts created by users in Japan (JP), Thailand (TH), Taiwan (TW) and Indonesia (ID).
60-
*
61-
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-demographic"> Documentation</a>
62-
*/
63-
64-
65-
@GET("/v2/bot/insight/demographic")
66-
67-
CompletableFuture<Result<GetFriendsDemographicsResponse>> getFriendsDemographics(
68-
);
69-
70-
71-
/**
72-
* Get user interaction statistics
73-
* Returns statistics about how users interact with narrowcast messages or broadcast messages sent from your LINE Official Account.
74-
* @param requestId Request ID of a narrowcast message or broadcast message. Each Messaging API request has a request ID. (required)
75-
*
76-
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-message-event">Get user interaction statistics Documentation</a>
77-
*/
78-
79-
80-
@GET("/v2/bot/insight/message/event")
81-
82-
CompletableFuture<Result<GetMessageEventResponse>> getMessageEvent(@Query("requestId") String requestId
83-
);
84-
85-
86-
/**
87-
* Get number of followers
88-
* Returns the number of users who have added the LINE Official Account on or before a specified date.
89-
* @param date Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g. 20191231) Timezone: UTC+9 (optional)
90-
*
91-
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-number-of-followers">Get number of followers Documentation</a>
92-
*/
93-
94-
95-
@GET("/v2/bot/insight/followers")
96-
97-
CompletableFuture<Result<GetNumberOfFollowersResponse>> getNumberOfFollowers(@Query("date") String date
98-
);
99-
100-
101-
/**
102-
* Get number of message deliveries
103-
* Returns the number of messages sent from LINE Official Account on a specified day.
104-
* @param date Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g. 20191231) - Timezone: UTC+9 (required)
105-
*
106-
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-number-of-delivery-messages">Get number of message deliveries Documentation</a>
107-
*/
108-
109-
110-
@GET("/v2/bot/insight/message/delivery")
111-
112-
CompletableFuture<Result<GetNumberOfMessageDeliveriesResponse>> getNumberOfMessageDeliveries(@Query("date") String date
113-
);
114-
115-
116-
/**
117-
*
118-
* You can check the per-unit statistics of how users interact with push messages and multicast messages sent from your LINE Official Account.
119-
* @param customAggregationUnit Name of aggregation unit specified when sending the message. Case-sensitive. For example, &#x60;Promotion_a&#x60; and &#x60;Promotion_A&#x60; are regarded as different unit names. (required)
120-
* @param from Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 (required)
121-
* @param to End date of aggregation period. The end date can be specified for up to 30 days later. For example, if the start date is 20210301, the latest end date is 20210331. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9 (required)
122-
*
123-
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-statistics-per-unit"> Documentation</a>
124-
*/
125-
126-
127-
@GET("/v2/bot/insight/message/event/aggregation")
128-
129-
CompletableFuture<Result<GetStatisticsPerUnitResponse>> getStatisticsPerUnit(@Query("customAggregationUnit") String customAggregationUnit, @Query("from") String from, @Query("to") String to
130-
);
131-
132-
133-
134-
135-
public static ApiAuthenticatedClientBuilder<InsightClient> builder(String channelToken) {
136-
return new ApiAuthenticatedClientBuilder<>(URI.create("https://api.line.me"), InsightClient.class, new InsightExceptionBuilder(), channelToken);
137-
}
138-
public static ApiAuthenticatedClientBuilder<InsightClient> builder(ChannelTokenSupplier channelTokenSupplier) {
139-
return new ApiAuthenticatedClientBuilder<>(URI.create("https://api.line.me"), InsightClient.class, new InsightExceptionBuilder(), channelTokenSupplier);
140-
}
141-
142-
38+
/**
39+
* Retrieves the demographic attributes for a LINE Official Account&#39;s friends.You can only
40+
* retrieve information about friends for LINE Official Accounts created by users in Japan (JP),
41+
* Thailand (TH), Taiwan (TW) and Indonesia (ID).
42+
*
43+
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-demographic">
44+
* Documentation</a>
45+
*/
46+
@GET("/v2/bot/insight/demographic")
47+
CompletableFuture<Result<GetFriendsDemographicsResponse>> getFriendsDemographics();
48+
49+
/**
50+
* Get user interaction statistics Returns statistics about how users interact with narrowcast
51+
* messages or broadcast messages sent from your LINE Official Account.
52+
*
53+
* @param requestId Request ID of a narrowcast message or broadcast message. Each Messaging API
54+
* request has a request ID. (required)
55+
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-message-event">Get
56+
* user interaction statistics Documentation</a>
57+
*/
58+
@GET("/v2/bot/insight/message/event")
59+
CompletableFuture<Result<GetMessageEventResponse>> getMessageEvent(
60+
@Query("requestId") String requestId);
61+
62+
/**
63+
* Get number of followers Returns the number of users who have added the LINE Official Account on
64+
* or before a specified date.
65+
*
66+
* @param date Date for which to retrieve the number of followers. Format: yyyyMMdd (e.g.
67+
* 20191231) Timezone: UTC+9 (optional)
68+
* @see <a
69+
* href="https://developers.line.biz/en/reference/messaging-api/#get-number-of-followers">Get
70+
* number of followers Documentation</a>
71+
*/
72+
@GET("/v2/bot/insight/followers")
73+
CompletableFuture<Result<GetNumberOfFollowersResponse>> getNumberOfFollowers(
74+
@Query("date") String date);
75+
76+
/**
77+
* Get number of message deliveries Returns the number of messages sent from LINE Official Account
78+
* on a specified day.
79+
*
80+
* @param date Date for which to retrieve number of sent messages. - Format: yyyyMMdd (e.g.
81+
* 20191231) - Timezone: UTC+9 (required)
82+
* @see <a
83+
* href="https://developers.line.biz/en/reference/messaging-api/#get-number-of-delivery-messages">Get
84+
* number of message deliveries Documentation</a>
85+
*/
86+
@GET("/v2/bot/insight/message/delivery")
87+
CompletableFuture<Result<GetNumberOfMessageDeliveriesResponse>> getNumberOfMessageDeliveries(
88+
@Query("date") String date);
89+
90+
/**
91+
* You can check the per-unit statistics of how users interact with push messages and multicast
92+
* messages sent from your LINE Official Account.
93+
*
94+
* @param customAggregationUnit Name of aggregation unit specified when sending the message.
95+
* Case-sensitive. For example, &#x60;Promotion_a&#x60; and &#x60;Promotion_A&#x60; are
96+
* regarded as different unit names. (required)
97+
* @param from Start date of aggregation period. Format: yyyyMMdd (e.g. 20210301) Time zone: UTC+9
98+
* (required)
99+
* @param to End date of aggregation period. The end date can be specified for up to 30 days
100+
* later. For example, if the start date is 20210301, the latest end date is 20210331. Format:
101+
* yyyyMMdd (e.g. 20210301) Time zone: UTC+9 (required)
102+
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-statistics-per-unit">
103+
* Documentation</a>
104+
*/
105+
@GET("/v2/bot/insight/message/event/aggregation")
106+
CompletableFuture<Result<GetStatisticsPerUnitResponse>> getStatisticsPerUnit(
107+
@Query("customAggregationUnit") String customAggregationUnit,
108+
@Query("from") String from,
109+
@Query("to") String to);
110+
111+
public static ApiAuthenticatedClientBuilder<InsightClient> builder(String channelToken) {
112+
return new ApiAuthenticatedClientBuilder<>(
113+
URI.create("https://api.line.me"),
114+
InsightClient.class,
115+
new InsightExceptionBuilder(),
116+
channelToken);
117+
}
118+
119+
public static ApiAuthenticatedClientBuilder<InsightClient> builder(
120+
ChannelTokenSupplier channelTokenSupplier) {
121+
return new ApiAuthenticatedClientBuilder<>(
122+
URI.create("https://api.line.me"),
123+
InsightClient.class,
124+
new InsightExceptionBuilder(),
125+
channelTokenSupplier);
126+
}
143127
}

clients/line-bot-insight-client/src/main/java/com/linecorp/bot/insight/model/AgeTile.java

Lines changed: 40 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -16,112 +16,75 @@
1616

1717
/**
1818
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19-
* https://openapi-generator.tech
20-
* Do not edit the class manually.
19+
* https://openapi-generator.tech Do not edit the class manually.
2120
*/
22-
23-
2421
package com.linecorp.bot.insight.model;
2522

26-
import java.time.Instant;
2723

28-
import java.util.Objects;
29-
import java.util.Arrays;
30-
import java.util.Map;
31-
import java.util.HashMap;
3224

3325
import com.fasterxml.jackson.annotation.JsonEnumDefaultValue;
34-
import com.fasterxml.jackson.annotation.JsonInclude.Include;
3526
import com.fasterxml.jackson.annotation.JsonInclude;
27+
import com.fasterxml.jackson.annotation.JsonInclude.Include;
3628
import com.fasterxml.jackson.annotation.JsonProperty;
37-
import com.fasterxml.jackson.annotation.JsonSubTypes;
38-
import com.fasterxml.jackson.annotation.JsonTypeInfo;
39-
import com.fasterxml.jackson.annotation.JsonTypeName;
40-
41-
42-
43-
/**
44-
* AgeTile
45-
*/
4629

30+
/** AgeTile */
4731
@JsonInclude(Include.NON_NULL)
4832
@javax.annotation.Generated(value = "com.linecorp.bot.codegen.LineJavaCodegenGenerator")
49-
public record AgeTile (
50-
/**
51-
* users&#39; age
52-
*/
53-
54-
@JsonProperty("age")
55-
Age age,
56-
/**
57-
* Percentage
58-
*/
59-
60-
@JsonProperty("percentage")
61-
Double percentage
62-
63-
) {
64-
/**
65-
* users&#39; age
66-
*/
67-
public enum Age {
68-
@JsonProperty("from0to14")
69-
FROM0TO14,
33+
public record AgeTile(
34+
/** users&#39; age */
35+
@JsonProperty("age") Age age,
36+
/** Percentage */
37+
@JsonProperty("percentage") Double percentage) {
38+
39+
/** users&#39; age */
40+
public enum Age {
41+
@JsonProperty("from0to14")
42+
FROM0TO14,
7043
@JsonProperty("from15to19")
71-
FROM15TO19,
44+
FROM15TO19,
7245
@JsonProperty("from20to24")
73-
FROM20TO24,
46+
FROM20TO24,
7447
@JsonProperty("from25to29")
75-
FROM25TO29,
48+
FROM25TO29,
7649
@JsonProperty("from30to34")
77-
FROM30TO34,
50+
FROM30TO34,
7851
@JsonProperty("from35to39")
79-
FROM35TO39,
52+
FROM35TO39,
8053
@JsonProperty("from40to44")
81-
FROM40TO44,
54+
FROM40TO44,
8255
@JsonProperty("from45to49")
83-
FROM45TO49,
56+
FROM45TO49,
8457
@JsonProperty("from50")
85-
FROM50,
58+
FROM50,
8659
@JsonProperty("unknown")
87-
UNKNOWN,
88-
60+
UNKNOWN,
8961

90-
@JsonEnumDefaultValue
91-
UNDEFINED;
92-
}
62+
@JsonEnumDefaultValue
63+
UNDEFINED;
64+
}
9365

66+
public static class Builder {
67+
private Age age;
9468

95-
public static class Builder {
96-
private Age age;
97-
98-
private Double percentage;
99-
69+
private Double percentage;
10070

71+
public Builder() {}
10172

102-
public Builder() {
103-
}
73+
public Builder age(Age age) {
74+
this.age = age;
10475

105-
public Builder age(Age age) {
106-
this.age = age;
107-
108-
return this;
109-
}
110-
public Builder percentage(Double percentage) {
111-
this.percentage = percentage;
112-
113-
return this;
114-
}
115-
116-
117-
public AgeTile build() {
76+
return this;
77+
}
11878

79+
public Builder percentage(Double percentage) {
80+
this.percentage = percentage;
11981

82+
return this;
83+
}
12084

85+
public AgeTile build() {
12186

122-
return new AgeTile(
123-
age,percentage
124-
);
125-
}
87+
return new AgeTile(age, percentage);
12688
}
89+
}
12790
}

0 commit comments

Comments
 (0)