|
6 | 6 |
|
7 | 7 | public class GitHubSchemas { |
8 | 8 |
|
9 | | - public static String NEXT_PAGE_FIELD = "next_page"; |
| 9 | + public static final String NEXT_PAGE_FIELD = "next_page"; |
10 | 10 |
|
11 | 11 | // Issue fields |
12 | | - public static String OWNER_FIELD = "owner"; |
13 | | - public static String REPOSITORY_FIELD = "repository"; |
14 | | - public static String CREATED_AT_FIELD = "created_at"; |
15 | | - public static String UPDATED_AT_FIELD = "updated_at"; |
16 | | - public static String NUMBER_FIELD = "number"; |
17 | | - public static String URL_FIELD = "url"; |
18 | | - public static String HTML_URL_FIELD = "html_url"; |
19 | | - public static String TITLE_FIELD = "title"; |
20 | | - public static String STATE_FIELD = "state"; |
| 12 | + public static final String OWNER_FIELD = "owner"; |
| 13 | + public static final String REPOSITORY_FIELD = "repository"; |
| 14 | + public static final String CREATED_AT_FIELD = "created_at"; |
| 15 | + public static final String UPDATED_AT_FIELD = "updated_at"; |
| 16 | + public static final String NUMBER_FIELD = "number"; |
| 17 | + public static final String URL_FIELD = "url"; |
| 18 | + public static final String HTML_URL_FIELD = "html_url"; |
| 19 | + public static final String TITLE_FIELD = "title"; |
| 20 | + public static final String STATE_FIELD = "state"; |
21 | 21 |
|
22 | 22 | // User fields |
23 | | - public static String USER_FIELD = "user"; |
24 | | - public static String USER_URL_FIELD = "url"; |
25 | | - public static String USER_HTML_URL_FIELD = "html_url"; |
26 | | - public static String USER_ID_FIELD = "id"; |
27 | | - public static String USER_LOGIN_FIELD = "login"; |
| 23 | + public static final String USER_FIELD = "user"; |
| 24 | + public static final String USER_URL_FIELD = "url"; |
| 25 | + public static final String USER_HTML_URL_FIELD = "html_url"; |
| 26 | + public static final String USER_ID_FIELD = "id"; |
| 27 | + public static final String USER_LOGIN_FIELD = "login"; |
28 | 28 |
|
29 | 29 | // PR fields |
30 | | - public static String PR_FIELD = "pull_request"; |
31 | | - public static String PR_URL_FIELD = "url"; |
32 | | - public static String PR_HTML_URL_FIELD = "html_url"; |
| 30 | + public static final String PR_FIELD = "pull_request"; |
| 31 | + public static final String PR_URL_FIELD = "url"; |
| 32 | + public static final String PR_HTML_URL_FIELD = "html_url"; |
33 | 33 |
|
34 | 34 | // Schema names |
35 | | - public static String SCHEMA_KEY = "com.simplesteph.kafka.connect.github.IssueKey"; |
36 | | - public static String SCHEMA_VALUE_ISSUE = "com.simplesteph.kafka.connect.github.IssueValue"; |
37 | | - public static String SCHEMA_VALUE_USER = "com.simplesteph.kafka.connect.github.UserValue"; |
38 | | - public static String SCHEMA_VALUE_PR = "com.simplesteph.kafka.connect.github.PrValue"; |
| 35 | + public static final String SCHEMA_KEY = "com.simplesteph.kafka.connect.github.IssueKey"; |
| 36 | + public static final String SCHEMA_VALUE_ISSUE = "com.simplesteph.kafka.connect.github.IssueValue"; |
| 37 | + public static final String SCHEMA_VALUE_USER = "com.simplesteph.kafka.connect.github.UserValue"; |
| 38 | + public static final String SCHEMA_VALUE_PR = "com.simplesteph.kafka.connect.github.PrValue"; |
39 | 39 |
|
40 | 40 | // Key Schema |
41 | | - public static Schema KEY_SCHEMA = SchemaBuilder.struct().name(SCHEMA_KEY) |
| 41 | + public static final Schema KEY_SCHEMA = SchemaBuilder.struct().name(SCHEMA_KEY) |
42 | 42 | .version(1) |
43 | 43 | .field(OWNER_FIELD, Schema.STRING_SCHEMA) |
44 | 44 | .field(REPOSITORY_FIELD, Schema.STRING_SCHEMA) |
45 | 45 | .field(NUMBER_FIELD, Schema.INT32_SCHEMA) |
46 | 46 | .build(); |
47 | 47 |
|
48 | 48 | // Value Schema |
49 | | - public static Schema USER_SCHEMA = SchemaBuilder.struct().name(SCHEMA_VALUE_USER) |
| 49 | + public static final Schema USER_SCHEMA = SchemaBuilder.struct().name(SCHEMA_VALUE_USER) |
50 | 50 | .version(1) |
51 | 51 | .field(USER_URL_FIELD, Schema.STRING_SCHEMA) |
52 | 52 | .field(USER_ID_FIELD, Schema.INT32_SCHEMA) |
53 | 53 | .field(USER_LOGIN_FIELD, Schema.STRING_SCHEMA) |
54 | 54 | .build(); |
55 | 55 |
|
56 | 56 | // optional schema |
57 | | - public static Schema PR_SCHEMA = SchemaBuilder.struct().name(SCHEMA_VALUE_PR) |
| 57 | + public static final Schema PR_SCHEMA = SchemaBuilder.struct().name(SCHEMA_VALUE_PR) |
58 | 58 | .version(1) |
59 | 59 | .field(PR_URL_FIELD, Schema.STRING_SCHEMA) |
60 | 60 | .field(PR_HTML_URL_FIELD, Schema.STRING_SCHEMA) |
61 | 61 | .optional() |
62 | 62 | .build(); |
63 | 63 |
|
64 | | - public static Schema VALUE_SCHEMA = SchemaBuilder.struct().name(SCHEMA_VALUE_ISSUE) |
| 64 | + public static final Schema VALUE_SCHEMA = SchemaBuilder.struct().name(SCHEMA_VALUE_ISSUE) |
65 | 65 | .version(2) |
66 | 66 | .field(URL_FIELD, Schema.STRING_SCHEMA) |
67 | 67 | .field(TITLE_FIELD, Schema.STRING_SCHEMA) |
|
0 commit comments