@@ -24,4 +24,113 @@ public class HttpBatchSourceConfig extends BaseHttpSourceConfig {
2424 protected HttpBatchSourceConfig (String referenceName ) {
2525 super (referenceName );
2626 }
27+
28+ private HttpBatchSourceConfig (HttpBatchSourceConfigBuilder builder ) {
29+ super (builder .referenceName );
30+ this .url = builder .url ;
31+ this .httpMethod = builder .httpMethod ;
32+ this .headers = builder .headers ;
33+ this .format = builder .format ;
34+ this .oauth2Enabled = builder .oauth2Enabled ;
35+ this .errorHandling = builder .errorHandling ;
36+ this .retryPolicy = builder .retryPolicy ;
37+ this .maxRetryDuration = builder .maxRetryDuration ;
38+ this .connectTimeout = builder .connectTimeout ;
39+ this .readTimeout = builder .readTimeout ;
40+ this .paginationType = builder .paginationType ;
41+ this .verifyHttps = builder .verifyHttps ;
42+ }
43+
44+ public static HttpBatchSourceConfigBuilder builder () {
45+ return new HttpBatchSourceConfigBuilder ();
46+ }
47+
48+ /**
49+ * Builder for HttpBatchSourceConfig
50+ */
51+ public static class HttpBatchSourceConfigBuilder {
52+
53+ private String referenceName ;
54+ private String url ;
55+ private String httpMethod ;
56+ private String headers ;
57+ private String format ;
58+ private String oauth2Enabled ;
59+ private String errorHandling ;
60+ private String retryPolicy ;
61+ private Long maxRetryDuration ;
62+ private Integer connectTimeout ;
63+ private Integer readTimeout ;
64+ private String paginationType ;
65+ private String verifyHttps ;
66+
67+ public HttpBatchSourceConfigBuilder setReferenceName (String referenceName ) {
68+ this .referenceName = referenceName ;
69+ return this ;
70+ }
71+
72+ public HttpBatchSourceConfigBuilder setUrl (String url ) {
73+ this .url = url ;
74+ return this ;
75+ }
76+
77+ public HttpBatchSourceConfigBuilder setHttpMethod (String httpMethod ) {
78+ this .httpMethod = httpMethod ;
79+ return this ;
80+ }
81+
82+ public HttpBatchSourceConfigBuilder setHeaders (String headers ) {
83+ this .headers = headers ;
84+ return this ;
85+ }
86+
87+ public HttpBatchSourceConfigBuilder setFormat (String format ) {
88+ this .format = format ;
89+ return this ;
90+ }
91+
92+ public HttpBatchSourceConfigBuilder setOauth2Enabled (String oauth2Enabled ) {
93+ this .oauth2Enabled = oauth2Enabled ;
94+ return this ;
95+ }
96+
97+ public HttpBatchSourceConfigBuilder setErrorHandling (String errorHandling ) {
98+ this .errorHandling = errorHandling ;
99+ return this ;
100+ }
101+
102+ public HttpBatchSourceConfigBuilder setRetryPolicy (String retryPolicy ) {
103+ this .retryPolicy = retryPolicy ;
104+ return this ;
105+ }
106+
107+ public HttpBatchSourceConfigBuilder setMaxRetryDuration (Long maxRetryDuration ) {
108+ this .maxRetryDuration = maxRetryDuration ;
109+ return this ;
110+ }
111+
112+ public HttpBatchSourceConfigBuilder setConnectTimeout (Integer connectTimeout ) {
113+ this .connectTimeout = connectTimeout ;
114+ return this ;
115+ }
116+
117+ public HttpBatchSourceConfigBuilder setReadTimeout (Integer readTimeout ) {
118+ this .readTimeout = readTimeout ;
119+ return this ;
120+ }
121+
122+ public HttpBatchSourceConfigBuilder setPaginationType (String paginationType ) {
123+ this .paginationType = paginationType ;
124+ return this ;
125+ }
126+
127+ public HttpBatchSourceConfigBuilder setVerifyHttps (String verifyHttps ) {
128+ this .verifyHttps = verifyHttps ;
129+ return this ;
130+ }
131+
132+ public HttpBatchSourceConfig build () {
133+ return new HttpBatchSourceConfig (this );
134+ }
135+ }
27136}
0 commit comments