@@ -21,25 +21,23 @@ public class Airbyte {
2121 public Connections connections ;
2222 public Destinations destinations ;
2323 public Jobs jobs ;
24- public OAuth oAuth ;
2524 public Sources sources ;
2625 public Streams streams ;
27- public Workspaces workspaces ;
28- public Health health ;
26+ public Workspaces workspaces ;
2927
3028 private HTTPClient _defaultClient ;
3129 private HTTPClient _securityClient ;
32-
30+ private com . airbyte . api . models . shared . Security _security ;
3331 private String _serverUrl ;
3432 private String _language = "java" ;
35- private String _sdkVersion = "0.0.6 " ;
36- private String _genVersion = "2.18.0 " ;
33+ private String _sdkVersion = "0.0.1 " ;
34+ private String _genVersion = "2.18.2 " ;
3735 /**
3836 * The Builder class allows the configuration of a new instance of the SDK.
3937 */
4038 public static class Builder {
4139 private HTTPClient client ;
42-
40+ private com . airbyte . api . models . shared . Security security ;
4341 private String serverUrl ;
4442 private java .util .Map <String , String > params = new java .util .HashMap <String , String >();
4543
@@ -56,6 +54,16 @@ public Builder setClient(HTTPClient client) {
5654 return this ;
5755 }
5856
57+ /**
58+ * Configures the SDK to use the provided security details.
59+ * @param security The security details to use for all requests.
60+ * @return The builder instance.
61+ */
62+ public Builder setSecurity (com .airbyte .api .models .shared .Security security ) {
63+ this .security = security ;
64+ return this ;
65+ }
66+
5967 /**
6068 * Allows the overriding of the default server URL.
6169 * @param serverUrl The server URL to use for all requests.
@@ -84,7 +92,7 @@ public Builder setServerURL(String serverUrl, java.util.Map<String, String> para
8492 * @throws Exception Thrown if the SDK could not be built.
8593 */
8694 public Airbyte build () throws Exception {
87- return new Airbyte (this .client , this .serverUrl , this .params );
95+ return new Airbyte (this .client , this .security , this . serverUrl , this .params );
8896 }
8997 }
9098
@@ -96,13 +104,18 @@ public static Builder builder() {
96104 return new Builder ();
97105 }
98106
99- private Airbyte (HTTPClient client , String serverUrl , java .util .Map <String , String > params ) throws Exception {
107+ private Airbyte (HTTPClient client , com . airbyte . api . models . shared . Security security , String serverUrl , java .util .Map <String , String > params ) throws Exception {
100108 this ._defaultClient = client ;
101109
102110 if (this ._defaultClient == null ) {
103111 this ._defaultClient = new SpeakeasyHTTPClient ();
104112 }
105113
114+ if (security != null ) {
115+ this ._security = security ;
116+ this ._securityClient = com .airbyte .api .utils .Utils .configureSecurityClient (this ._defaultClient , this ._security );
117+ }
118+
106119 if (this ._securityClient == null ) {
107120 this ._securityClient = this ._defaultClient ;
108121 }
@@ -143,15 +156,6 @@ private Airbyte(HTTPClient client, String serverUrl, java.util.Map<String, Strin
143156 this ._genVersion
144157 );
145158
146- this .oAuth = new OAuth (
147- this ._defaultClient ,
148- this ._securityClient ,
149- this ._serverUrl ,
150- this ._language ,
151- this ._sdkVersion ,
152- this ._genVersion
153- );
154-
155159 this .sources = new Sources (
156160 this ._defaultClient ,
157161 this ._securityClient ,
@@ -178,14 +182,5 @@ private Airbyte(HTTPClient client, String serverUrl, java.util.Map<String, Strin
178182 this ._sdkVersion ,
179183 this ._genVersion
180184 );
181-
182- this .health = new Health (
183- this ._defaultClient ,
184- this ._securityClient ,
185- this ._serverUrl ,
186- this ._language ,
187- this ._sdkVersion ,
188- this ._genVersion
189- );
190185 }
191186}
0 commit comments