1515 */
1616public class Companies {
1717
18- private HTTPClient _defaultClient ;
19- private HTTPClient _securityClient ;
20- private String _serverUrl ;
21- private String _language ;
22- private String _sdkVersion ;
23- private String _genVersion ;
24-
25- public Companies (HTTPClient defaultClient , HTTPClient securityClient , String serverUrl , String language , String sdkVersion , String genVersion ) {
26- this ._defaultClient = defaultClient ;
27- this ._securityClient = securityClient ;
28- this ._serverUrl = serverUrl ;
29- this ._language = language ;
30- this ._sdkVersion = sdkVersion ;
31- this ._genVersion = genVersion ;
18+ private SDKConfiguration sdkConfiguration ;
19+
20+ public Companies (SDKConfiguration sdkConfiguration ) {
21+ this .sdkConfiguration = sdkConfiguration ;
3222 }
3323
3424 /**
@@ -38,17 +28,17 @@ public Companies(HTTPClient defaultClient, HTTPClient securityClient, String ser
3828 * @throws Exception if the API call fails
3929 */
4030 public structure .Structure .models .operations .EnrichCompanyResponse enrich (structure .Structure .models .operations .EnrichCompanyRequest request ) throws Exception {
41- String baseUrl = this ._serverUrl ;
31+ String baseUrl = this .sdkConfiguration . serverUrl ;
4232 String url = structure .Structure .utils .Utils .generateURL (structure .Structure .models .operations .EnrichCompanyRequest .class , baseUrl , "/companies/{id}/enrich" , request , null );
4333
4434 HTTPRequest req = new HTTPRequest ();
4535 req .setMethod ("GET" );
4636 req .setURL (url );
4737
4838 req .addHeader ("Accept" , "*/*" );
49- req .addHeader ("user-agent" , String .format ("speakeasy-sdk/%s %s %s" , this ._language , this ._sdkVersion , this ._genVersion ));
39+ req .addHeader ("user-agent" , String .format ("speakeasy-sdk/%s %s %s" , this .sdkConfiguration . language , this .sdkConfiguration . sdkVersion , this .sdkConfiguration . genVersion ));
5040
51- HTTPClient client = this ._securityClient ;
41+ HTTPClient client = this .sdkConfiguration . securityClient ;
5242
5343 HttpResponse <byte []> httpRes = client .send (req );
5444
@@ -78,23 +68,23 @@ else if (httpRes.statusCode() == 401 || httpRes.statusCode() == 403 || httpRes.s
7868 * @throws Exception if the API call fails
7969 */
8070 public structure .Structure .models .operations .ListEmployeesResponse listEmployees (structure .Structure .models .operations .ListEmployeesRequest request ) throws Exception {
81- String baseUrl = this ._serverUrl ;
71+ String baseUrl = this .sdkConfiguration . serverUrl ;
8272 String url = structure .Structure .utils .Utils .generateURL (structure .Structure .models .operations .ListEmployeesRequest .class , baseUrl , "/companies/{id}/employees" , request , null );
8373
8474 HTTPRequest req = new HTTPRequest ();
8575 req .setMethod ("GET" );
8676 req .setURL (url );
8777
8878 req .addHeader ("Accept" , "*/*" );
89- req .addHeader ("user-agent" , String .format ("speakeasy-sdk/%s %s %s" , this ._language , this ._sdkVersion , this ._genVersion ));
79+ req .addHeader ("user-agent" , String .format ("speakeasy-sdk/%s %s %s" , this .sdkConfiguration . language , this .sdkConfiguration . sdkVersion , this .sdkConfiguration . genVersion ));
9080 java .util .List <NameValuePair > queryParams = structure .Structure .utils .Utils .getQueryParams (structure .Structure .models .operations .ListEmployeesRequest .class , request , null );
9181 if (queryParams != null ) {
9282 for (NameValuePair queryParam : queryParams ) {
9383 req .addQueryParam (queryParam );
9484 }
9585 }
9686
97- HTTPClient client = this ._securityClient ;
87+ HTTPClient client = this .sdkConfiguration . securityClient ;
9888
9989 HttpResponse <byte []> httpRes = client .send (req );
10090
@@ -124,23 +114,23 @@ else if (httpRes.statusCode() == 401 || httpRes.statusCode() == 403 || httpRes.s
124114 * @throws Exception if the API call fails
125115 */
126116 public structure .Structure .models .operations .ListJobsResponse listJobs (structure .Structure .models .operations .ListJobsRequest request ) throws Exception {
127- String baseUrl = this ._serverUrl ;
117+ String baseUrl = this .sdkConfiguration . serverUrl ;
128118 String url = structure .Structure .utils .Utils .generateURL (structure .Structure .models .operations .ListJobsRequest .class , baseUrl , "/companies/{id}/jobs" , request , null );
129119
130120 HTTPRequest req = new HTTPRequest ();
131121 req .setMethod ("GET" );
132122 req .setURL (url );
133123
134124 req .addHeader ("Accept" , "*/*" );
135- req .addHeader ("user-agent" , String .format ("speakeasy-sdk/%s %s %s" , this ._language , this ._sdkVersion , this ._genVersion ));
125+ req .addHeader ("user-agent" , String .format ("speakeasy-sdk/%s %s %s" , this .sdkConfiguration . language , this .sdkConfiguration . sdkVersion , this .sdkConfiguration . genVersion ));
136126 java .util .List <NameValuePair > queryParams = structure .Structure .utils .Utils .getQueryParams (structure .Structure .models .operations .ListJobsRequest .class , request , null );
137127 if (queryParams != null ) {
138128 for (NameValuePair queryParam : queryParams ) {
139129 req .addQueryParam (queryParam );
140130 }
141131 }
142132
143- HTTPClient client = this ._securityClient ;
133+ HTTPClient client = this .sdkConfiguration . securityClient ;
144134
145135 HttpResponse <byte []> httpRes = client .send (req );
146136
@@ -170,7 +160,7 @@ else if (httpRes.statusCode() == 401 || httpRes.statusCode() == 403 || httpRes.s
170160 * @throws Exception if the API call fails
171161 */
172162 public structure .Structure .models .operations .SearchCompaniesResponse search (structure .Structure .models .operations .SearchCompaniesApplicationJSON request ) throws Exception {
173- String baseUrl = this ._serverUrl ;
163+ String baseUrl = this .sdkConfiguration . serverUrl ;
174164 String url = structure .Structure .utils .Utils .generateURL (baseUrl , "/companies/search" );
175165
176166 HTTPRequest req = new HTTPRequest ();
@@ -180,9 +170,9 @@ public structure.Structure.models.operations.SearchCompaniesResponse search(stru
180170 req .setBody (serializedRequestBody );
181171
182172 req .addHeader ("Accept" , "*/*" );
183- req .addHeader ("user-agent" , String .format ("speakeasy-sdk/%s %s %s" , this ._language , this ._sdkVersion , this ._genVersion ));
173+ req .addHeader ("user-agent" , String .format ("speakeasy-sdk/%s %s %s" , this .sdkConfiguration . language , this .sdkConfiguration . sdkVersion , this .sdkConfiguration . genVersion ));
184174
185- HTTPClient client = this ._securityClient ;
175+ HTTPClient client = this .sdkConfiguration . securityClient ;
186176
187177 HttpResponse <byte []> httpRes = client .send (req );
188178
0 commit comments