• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

box / box-java-sdk / #5838

16 Dec 2025 01:57PM UTC coverage: 12.903% (-0.4%) from 13.282%
#5838

Pull #1633

github

web-flow
Merge 39eadee31 into af4861f83
Pull Request #1633: feat(boxsdkgen): Treat nullable fields as Optional (box/box-codegen#906)

0 of 1897 new or added lines in 73 files covered. (0.0%)

19 existing lines in 10 files now uncovered.

8374 of 64898 relevant lines covered (12.9%)

0.13 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/com/box/sdkgen/managers/metadatataxonomies/MetadataTaxonomiesManager.java
1
package com.box.sdkgen.managers.metadatataxonomies;
2

3
import static com.box.sdkgen.internal.utils.UtilsManager.convertToString;
4
import static com.box.sdkgen.internal.utils.UtilsManager.entryOf;
5
import static com.box.sdkgen.internal.utils.UtilsManager.mapOf;
6
import static com.box.sdkgen.internal.utils.UtilsManager.mergeMaps;
7
import static com.box.sdkgen.internal.utils.UtilsManager.prepareParams;
8

9
import com.box.sdkgen.networking.auth.Authentication;
10
import com.box.sdkgen.networking.fetchoptions.FetchOptions;
11
import com.box.sdkgen.networking.fetchoptions.ResponseFormat;
12
import com.box.sdkgen.networking.fetchresponse.FetchResponse;
13
import com.box.sdkgen.networking.network.NetworkSession;
14
import com.box.sdkgen.schemas.metadatataxonomies.MetadataTaxonomies;
15
import com.box.sdkgen.schemas.metadatataxonomy.MetadataTaxonomy;
16
import com.box.sdkgen.schemas.metadatataxonomylevel.MetadataTaxonomyLevel;
17
import com.box.sdkgen.schemas.metadatataxonomylevels.MetadataTaxonomyLevels;
18
import com.box.sdkgen.schemas.metadatataxonomynode.MetadataTaxonomyNode;
19
import com.box.sdkgen.schemas.metadatataxonomynodes.MetadataTaxonomyNodes;
20
import com.box.sdkgen.serialization.json.JsonManager;
21
import java.util.List;
22
import java.util.Map;
23

24
public class MetadataTaxonomiesManager {
25

26
  public Authentication auth;
27

28
  public NetworkSession networkSession;
29

NEW
30
  public MetadataTaxonomiesManager() {
×
NEW
31
    this.networkSession = new NetworkSession();
×
NEW
32
  }
×
33

NEW
34
  protected MetadataTaxonomiesManager(Builder builder) {
×
NEW
35
    this.auth = builder.auth;
×
NEW
36
    this.networkSession = builder.networkSession;
×
NEW
37
  }
×
38

39
  /**
40
   * Creates a new metadata taxonomy that can be used in metadata templates.
41
   *
42
   * @param requestBody Request body of createMetadataTaxonomy method
43
   */
44
  public MetadataTaxonomy createMetadataTaxonomy(CreateMetadataTaxonomyRequestBody requestBody) {
NEW
45
    return createMetadataTaxonomy(requestBody, new CreateMetadataTaxonomyHeaders());
×
46
  }
47

48
  /**
49
   * Creates a new metadata taxonomy that can be used in metadata templates.
50
   *
51
   * @param requestBody Request body of createMetadataTaxonomy method
52
   * @param headers Headers of createMetadataTaxonomy method
53
   */
54
  public MetadataTaxonomy createMetadataTaxonomy(
55
      CreateMetadataTaxonomyRequestBody requestBody, CreateMetadataTaxonomyHeaders headers) {
NEW
56
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
57
    FetchResponse response =
×
58
        this.networkSession
NEW
59
            .getNetworkClient()
×
NEW
60
            .fetch(
×
61
                new FetchOptions.Builder(
NEW
62
                        String.join(
×
63
                            "",
NEW
64
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
65
                            "/2.0/metadata_taxonomies"),
66
                        "POST")
NEW
67
                    .headers(headersMap)
×
NEW
68
                    .data(JsonManager.serialize(requestBody))
×
NEW
69
                    .contentType("application/json")
×
NEW
70
                    .responseFormat(ResponseFormat.JSON)
×
NEW
71
                    .auth(this.auth)
×
NEW
72
                    .networkSession(this.networkSession)
×
NEW
73
                    .build());
×
NEW
74
    return JsonManager.deserialize(response.getData(), MetadataTaxonomy.class);
×
75
  }
76

77
  /**
78
   * Used to retrieve all metadata taxonomies in a namespace.
79
   *
80
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
81
   */
82
  public MetadataTaxonomies getMetadataTaxonomies(String namespace) {
NEW
83
    return getMetadataTaxonomies(
×
84
        namespace, new GetMetadataTaxonomiesQueryParams(), new GetMetadataTaxonomiesHeaders());
85
  }
86

87
  /**
88
   * Used to retrieve all metadata taxonomies in a namespace.
89
   *
90
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
91
   * @param queryParams Query parameters of getMetadataTaxonomies method
92
   */
93
  public MetadataTaxonomies getMetadataTaxonomies(
94
      String namespace, GetMetadataTaxonomiesQueryParams queryParams) {
NEW
95
    return getMetadataTaxonomies(namespace, queryParams, new GetMetadataTaxonomiesHeaders());
×
96
  }
97

98
  /**
99
   * Used to retrieve all metadata taxonomies in a namespace.
100
   *
101
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
102
   * @param headers Headers of getMetadataTaxonomies method
103
   */
104
  public MetadataTaxonomies getMetadataTaxonomies(
105
      String namespace, GetMetadataTaxonomiesHeaders headers) {
NEW
106
    return getMetadataTaxonomies(namespace, new GetMetadataTaxonomiesQueryParams(), headers);
×
107
  }
108

109
  /**
110
   * Used to retrieve all metadata taxonomies in a namespace.
111
   *
112
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
113
   * @param queryParams Query parameters of getMetadataTaxonomies method
114
   * @param headers Headers of getMetadataTaxonomies method
115
   */
116
  public MetadataTaxonomies getMetadataTaxonomies(
117
      String namespace,
118
      GetMetadataTaxonomiesQueryParams queryParams,
119
      GetMetadataTaxonomiesHeaders headers) {
NEW
120
    Map<String, String> queryParamsMap =
×
NEW
121
        prepareParams(
×
NEW
122
            mapOf(
×
NEW
123
                entryOf("marker", convertToString(queryParams.getMarker())),
×
NEW
124
                entryOf("limit", convertToString(queryParams.getLimit()))));
×
NEW
125
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
126
    FetchResponse response =
×
127
        this.networkSession
NEW
128
            .getNetworkClient()
×
NEW
129
            .fetch(
×
130
                new FetchOptions.Builder(
NEW
131
                        String.join(
×
132
                            "",
NEW
133
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
134
                            "/2.0/metadata_taxonomies/",
NEW
135
                            convertToString(namespace)),
×
136
                        "GET")
NEW
137
                    .params(queryParamsMap)
×
NEW
138
                    .headers(headersMap)
×
NEW
139
                    .responseFormat(ResponseFormat.JSON)
×
NEW
140
                    .auth(this.auth)
×
NEW
141
                    .networkSession(this.networkSession)
×
NEW
142
                    .build());
×
NEW
143
    return JsonManager.deserialize(response.getData(), MetadataTaxonomies.class);
×
144
  }
145

146
  /**
147
   * Used to retrieve a metadata taxonomy by taxonomy key.
148
   *
149
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
150
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
151
   */
152
  public MetadataTaxonomy getMetadataTaxonomyByKey(String namespace, String taxonomyKey) {
NEW
153
    return getMetadataTaxonomyByKey(namespace, taxonomyKey, new GetMetadataTaxonomyByKeyHeaders());
×
154
  }
155

156
  /**
157
   * Used to retrieve a metadata taxonomy by taxonomy key.
158
   *
159
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
160
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
161
   * @param headers Headers of getMetadataTaxonomyByKey method
162
   */
163
  public MetadataTaxonomy getMetadataTaxonomyByKey(
164
      String namespace, String taxonomyKey, GetMetadataTaxonomyByKeyHeaders headers) {
NEW
165
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
166
    FetchResponse response =
×
167
        this.networkSession
NEW
168
            .getNetworkClient()
×
NEW
169
            .fetch(
×
170
                new FetchOptions.Builder(
NEW
171
                        String.join(
×
172
                            "",
NEW
173
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
174
                            "/2.0/metadata_taxonomies/",
NEW
175
                            convertToString(namespace),
×
176
                            "/",
NEW
177
                            convertToString(taxonomyKey)),
×
178
                        "GET")
NEW
179
                    .headers(headersMap)
×
NEW
180
                    .responseFormat(ResponseFormat.JSON)
×
NEW
181
                    .auth(this.auth)
×
NEW
182
                    .networkSession(this.networkSession)
×
NEW
183
                    .build());
×
NEW
184
    return JsonManager.deserialize(response.getData(), MetadataTaxonomy.class);
×
185
  }
186

187
  /**
188
   * Updates an existing metadata taxonomy.
189
   *
190
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
191
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
192
   * @param requestBody Request body of updateMetadataTaxonomy method
193
   */
194
  public MetadataTaxonomy updateMetadataTaxonomy(
195
      String namespace, String taxonomyKey, UpdateMetadataTaxonomyRequestBody requestBody) {
NEW
196
    return updateMetadataTaxonomy(
×
197
        namespace, taxonomyKey, requestBody, new UpdateMetadataTaxonomyHeaders());
198
  }
199

200
  /**
201
   * Updates an existing metadata taxonomy.
202
   *
203
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
204
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
205
   * @param requestBody Request body of updateMetadataTaxonomy method
206
   * @param headers Headers of updateMetadataTaxonomy method
207
   */
208
  public MetadataTaxonomy updateMetadataTaxonomy(
209
      String namespace,
210
      String taxonomyKey,
211
      UpdateMetadataTaxonomyRequestBody requestBody,
212
      UpdateMetadataTaxonomyHeaders headers) {
NEW
213
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
214
    FetchResponse response =
×
215
        this.networkSession
NEW
216
            .getNetworkClient()
×
NEW
217
            .fetch(
×
218
                new FetchOptions.Builder(
NEW
219
                        String.join(
×
220
                            "",
NEW
221
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
222
                            "/2.0/metadata_taxonomies/",
NEW
223
                            convertToString(namespace),
×
224
                            "/",
NEW
225
                            convertToString(taxonomyKey)),
×
226
                        "PATCH")
NEW
227
                    .headers(headersMap)
×
NEW
228
                    .data(JsonManager.serialize(requestBody))
×
NEW
229
                    .contentType("application/json")
×
NEW
230
                    .responseFormat(ResponseFormat.JSON)
×
NEW
231
                    .auth(this.auth)
×
NEW
232
                    .networkSession(this.networkSession)
×
NEW
233
                    .build());
×
NEW
234
    return JsonManager.deserialize(response.getData(), MetadataTaxonomy.class);
×
235
  }
236

237
  /**
238
   * Delete a metadata taxonomy. This deletion is permanent and cannot be reverted.
239
   *
240
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
241
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
242
   */
243
  public void deleteMetadataTaxonomy(String namespace, String taxonomyKey) {
NEW
244
    deleteMetadataTaxonomy(namespace, taxonomyKey, new DeleteMetadataTaxonomyHeaders());
×
NEW
245
  }
×
246

247
  /**
248
   * Delete a metadata taxonomy. This deletion is permanent and cannot be reverted.
249
   *
250
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
251
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
252
   * @param headers Headers of deleteMetadataTaxonomy method
253
   */
254
  public void deleteMetadataTaxonomy(
255
      String namespace, String taxonomyKey, DeleteMetadataTaxonomyHeaders headers) {
NEW
256
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
257
    FetchResponse response =
×
258
        this.networkSession
NEW
259
            .getNetworkClient()
×
NEW
260
            .fetch(
×
261
                new FetchOptions.Builder(
NEW
262
                        String.join(
×
263
                            "",
NEW
264
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
265
                            "/2.0/metadata_taxonomies/",
NEW
266
                            convertToString(namespace),
×
267
                            "/",
NEW
268
                            convertToString(taxonomyKey)),
×
269
                        "DELETE")
NEW
270
                    .headers(headersMap)
×
NEW
271
                    .responseFormat(ResponseFormat.NO_CONTENT)
×
NEW
272
                    .auth(this.auth)
×
NEW
273
                    .networkSession(this.networkSession)
×
NEW
274
                    .build());
×
NEW
275
  }
×
276

277
  /**
278
   * Creates new metadata taxonomy levels.
279
   *
280
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
281
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
282
   * @param requestBody Request body of createMetadataTaxonomyLevel method
283
   */
284
  public MetadataTaxonomyLevels createMetadataTaxonomyLevel(
285
      String namespace, String taxonomyKey, List<MetadataTaxonomyLevel> requestBody) {
NEW
286
    return createMetadataTaxonomyLevel(
×
287
        namespace, taxonomyKey, requestBody, new CreateMetadataTaxonomyLevelHeaders());
288
  }
289

290
  /**
291
   * Creates new metadata taxonomy levels.
292
   *
293
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
294
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
295
   * @param requestBody Request body of createMetadataTaxonomyLevel method
296
   * @param headers Headers of createMetadataTaxonomyLevel method
297
   */
298
  public MetadataTaxonomyLevels createMetadataTaxonomyLevel(
299
      String namespace,
300
      String taxonomyKey,
301
      List<MetadataTaxonomyLevel> requestBody,
302
      CreateMetadataTaxonomyLevelHeaders headers) {
NEW
303
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
304
    FetchResponse response =
×
305
        this.networkSession
NEW
306
            .getNetworkClient()
×
NEW
307
            .fetch(
×
308
                new FetchOptions.Builder(
NEW
309
                        String.join(
×
310
                            "",
NEW
311
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
312
                            "/2.0/metadata_taxonomies/",
NEW
313
                            convertToString(namespace),
×
314
                            "/",
NEW
315
                            convertToString(taxonomyKey),
×
316
                            "/levels"),
317
                        "POST")
NEW
318
                    .headers(headersMap)
×
NEW
319
                    .data(JsonManager.serialize(requestBody))
×
NEW
320
                    .contentType("application/json")
×
NEW
321
                    .responseFormat(ResponseFormat.JSON)
×
NEW
322
                    .auth(this.auth)
×
NEW
323
                    .networkSession(this.networkSession)
×
NEW
324
                    .build());
×
NEW
325
    return JsonManager.deserialize(response.getData(), MetadataTaxonomyLevels.class);
×
326
  }
327

328
  /**
329
   * Updates an existing metadata taxonomy level.
330
   *
331
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
332
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
333
   * @param levelIndex The index of the metadata taxonomy level. Example: 1
334
   * @param requestBody Request body of patchMetadataTaxonomiesIdIdLevelsId method
335
   */
336
  public MetadataTaxonomyLevel patchMetadataTaxonomiesIdIdLevelsId(
337
      String namespace,
338
      String taxonomyKey,
339
      long levelIndex,
340
      PatchMetadataTaxonomiesIdIdLevelsIdRequestBody requestBody) {
NEW
341
    return patchMetadataTaxonomiesIdIdLevelsId(
×
342
        namespace,
343
        taxonomyKey,
344
        levelIndex,
345
        requestBody,
346
        new PatchMetadataTaxonomiesIdIdLevelsIdHeaders());
347
  }
348

349
  /**
350
   * Updates an existing metadata taxonomy level.
351
   *
352
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
353
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
354
   * @param levelIndex The index of the metadata taxonomy level. Example: 1
355
   * @param requestBody Request body of patchMetadataTaxonomiesIdIdLevelsId method
356
   * @param headers Headers of patchMetadataTaxonomiesIdIdLevelsId method
357
   */
358
  public MetadataTaxonomyLevel patchMetadataTaxonomiesIdIdLevelsId(
359
      String namespace,
360
      String taxonomyKey,
361
      long levelIndex,
362
      PatchMetadataTaxonomiesIdIdLevelsIdRequestBody requestBody,
363
      PatchMetadataTaxonomiesIdIdLevelsIdHeaders headers) {
NEW
364
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
365
    FetchResponse response =
×
366
        this.networkSession
NEW
367
            .getNetworkClient()
×
NEW
368
            .fetch(
×
369
                new FetchOptions.Builder(
NEW
370
                        String.join(
×
371
                            "",
NEW
372
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
373
                            "/2.0/metadata_taxonomies/",
NEW
374
                            convertToString(namespace),
×
375
                            "/",
NEW
376
                            convertToString(taxonomyKey),
×
377
                            "/levels/",
NEW
378
                            convertToString(levelIndex)),
×
379
                        "PATCH")
NEW
380
                    .headers(headersMap)
×
NEW
381
                    .data(JsonManager.serialize(requestBody))
×
NEW
382
                    .contentType("application/json")
×
NEW
383
                    .responseFormat(ResponseFormat.JSON)
×
NEW
384
                    .auth(this.auth)
×
NEW
385
                    .networkSession(this.networkSession)
×
NEW
386
                    .build());
×
NEW
387
    return JsonManager.deserialize(response.getData(), MetadataTaxonomyLevel.class);
×
388
  }
389

390
  /**
391
   * Creates a new metadata taxonomy level and appends it to the existing levels. If there are no
392
   * levels defined yet, this will create the first level.
393
   *
394
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
395
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
396
   * @param requestBody Request body of addMetadataTaxonomyLevel method
397
   */
398
  public MetadataTaxonomyLevels addMetadataTaxonomyLevel(
399
      String namespace, String taxonomyKey, AddMetadataTaxonomyLevelRequestBody requestBody) {
NEW
400
    return addMetadataTaxonomyLevel(
×
401
        namespace, taxonomyKey, requestBody, new AddMetadataTaxonomyLevelHeaders());
402
  }
403

404
  /**
405
   * Creates a new metadata taxonomy level and appends it to the existing levels. If there are no
406
   * levels defined yet, this will create the first level.
407
   *
408
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
409
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
410
   * @param requestBody Request body of addMetadataTaxonomyLevel method
411
   * @param headers Headers of addMetadataTaxonomyLevel method
412
   */
413
  public MetadataTaxonomyLevels addMetadataTaxonomyLevel(
414
      String namespace,
415
      String taxonomyKey,
416
      AddMetadataTaxonomyLevelRequestBody requestBody,
417
      AddMetadataTaxonomyLevelHeaders headers) {
NEW
418
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
419
    FetchResponse response =
×
420
        this.networkSession
NEW
421
            .getNetworkClient()
×
NEW
422
            .fetch(
×
423
                new FetchOptions.Builder(
NEW
424
                        String.join(
×
425
                            "",
NEW
426
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
427
                            "/2.0/metadata_taxonomies/",
NEW
428
                            convertToString(namespace),
×
429
                            "/",
NEW
430
                            convertToString(taxonomyKey),
×
431
                            "/levels:append"),
432
                        "POST")
NEW
433
                    .headers(headersMap)
×
NEW
434
                    .data(JsonManager.serialize(requestBody))
×
NEW
435
                    .contentType("application/json")
×
NEW
436
                    .responseFormat(ResponseFormat.JSON)
×
NEW
437
                    .auth(this.auth)
×
NEW
438
                    .networkSession(this.networkSession)
×
NEW
439
                    .build());
×
NEW
440
    return JsonManager.deserialize(response.getData(), MetadataTaxonomyLevels.class);
×
441
  }
442

443
  /**
444
   * Deletes the last level of the metadata taxonomy.
445
   *
446
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
447
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
448
   */
449
  public MetadataTaxonomyLevels deleteMetadataTaxonomyLevel(String namespace, String taxonomyKey) {
NEW
450
    return deleteMetadataTaxonomyLevel(
×
451
        namespace, taxonomyKey, new DeleteMetadataTaxonomyLevelHeaders());
452
  }
453

454
  /**
455
   * Deletes the last level of the metadata taxonomy.
456
   *
457
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
458
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
459
   * @param headers Headers of deleteMetadataTaxonomyLevel method
460
   */
461
  public MetadataTaxonomyLevels deleteMetadataTaxonomyLevel(
462
      String namespace, String taxonomyKey, DeleteMetadataTaxonomyLevelHeaders headers) {
NEW
463
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
464
    FetchResponse response =
×
465
        this.networkSession
NEW
466
            .getNetworkClient()
×
NEW
467
            .fetch(
×
468
                new FetchOptions.Builder(
NEW
469
                        String.join(
×
470
                            "",
NEW
471
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
472
                            "/2.0/metadata_taxonomies/",
NEW
473
                            convertToString(namespace),
×
474
                            "/",
NEW
475
                            convertToString(taxonomyKey),
×
476
                            "/levels:trim"),
477
                        "POST")
NEW
478
                    .headers(headersMap)
×
NEW
479
                    .responseFormat(ResponseFormat.JSON)
×
NEW
480
                    .auth(this.auth)
×
NEW
481
                    .networkSession(this.networkSession)
×
NEW
482
                    .build());
×
NEW
483
    return JsonManager.deserialize(response.getData(), MetadataTaxonomyLevels.class);
×
484
  }
485

486
  /**
487
   * Used to retrieve metadata taxonomy nodes based on the parameters specified. Results are sorted
488
   * in lexicographic order unless a `query` parameter is passed. With a `query` parameter
489
   * specified, results are sorted in order of relevance.
490
   *
491
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
492
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
493
   */
494
  public MetadataTaxonomyNodes getMetadataTaxonomyNodes(String namespace, String taxonomyKey) {
NEW
495
    return getMetadataTaxonomyNodes(
×
496
        namespace,
497
        taxonomyKey,
498
        new GetMetadataTaxonomyNodesQueryParams(),
499
        new GetMetadataTaxonomyNodesHeaders());
500
  }
501

502
  /**
503
   * Used to retrieve metadata taxonomy nodes based on the parameters specified. Results are sorted
504
   * in lexicographic order unless a `query` parameter is passed. With a `query` parameter
505
   * specified, results are sorted in order of relevance.
506
   *
507
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
508
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
509
   * @param queryParams Query parameters of getMetadataTaxonomyNodes method
510
   */
511
  public MetadataTaxonomyNodes getMetadataTaxonomyNodes(
512
      String namespace, String taxonomyKey, GetMetadataTaxonomyNodesQueryParams queryParams) {
NEW
513
    return getMetadataTaxonomyNodes(
×
514
        namespace, taxonomyKey, queryParams, new GetMetadataTaxonomyNodesHeaders());
515
  }
516

517
  /**
518
   * Used to retrieve metadata taxonomy nodes based on the parameters specified. Results are sorted
519
   * in lexicographic order unless a `query` parameter is passed. With a `query` parameter
520
   * specified, results are sorted in order of relevance.
521
   *
522
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
523
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
524
   * @param headers Headers of getMetadataTaxonomyNodes method
525
   */
526
  public MetadataTaxonomyNodes getMetadataTaxonomyNodes(
527
      String namespace, String taxonomyKey, GetMetadataTaxonomyNodesHeaders headers) {
NEW
528
    return getMetadataTaxonomyNodes(
×
529
        namespace, taxonomyKey, new GetMetadataTaxonomyNodesQueryParams(), headers);
530
  }
531

532
  /**
533
   * Used to retrieve metadata taxonomy nodes based on the parameters specified. Results are sorted
534
   * in lexicographic order unless a `query` parameter is passed. With a `query` parameter
535
   * specified, results are sorted in order of relevance.
536
   *
537
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
538
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
539
   * @param queryParams Query parameters of getMetadataTaxonomyNodes method
540
   * @param headers Headers of getMetadataTaxonomyNodes method
541
   */
542
  public MetadataTaxonomyNodes getMetadataTaxonomyNodes(
543
      String namespace,
544
      String taxonomyKey,
545
      GetMetadataTaxonomyNodesQueryParams queryParams,
546
      GetMetadataTaxonomyNodesHeaders headers) {
NEW
547
    Map<String, String> queryParamsMap =
×
NEW
548
        prepareParams(
×
NEW
549
            mapOf(
×
NEW
550
                entryOf("level", convertToString(queryParams.getLevel())),
×
NEW
551
                entryOf("parent", convertToString(queryParams.getParent())),
×
NEW
552
                entryOf("ancestor", convertToString(queryParams.getAncestor())),
×
NEW
553
                entryOf("query", convertToString(queryParams.getQuery())),
×
NEW
554
                entryOf(
×
555
                    "include-total-result-count",
NEW
556
                    convertToString(queryParams.getIncludeTotalResultCount())),
×
NEW
557
                entryOf("marker", convertToString(queryParams.getMarker())),
×
NEW
558
                entryOf("limit", convertToString(queryParams.getLimit()))));
×
NEW
559
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
560
    FetchResponse response =
×
561
        this.networkSession
NEW
562
            .getNetworkClient()
×
NEW
563
            .fetch(
×
564
                new FetchOptions.Builder(
NEW
565
                        String.join(
×
566
                            "",
NEW
567
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
568
                            "/2.0/metadata_taxonomies/",
NEW
569
                            convertToString(namespace),
×
570
                            "/",
NEW
571
                            convertToString(taxonomyKey),
×
572
                            "/nodes"),
573
                        "GET")
NEW
574
                    .params(queryParamsMap)
×
NEW
575
                    .headers(headersMap)
×
NEW
576
                    .responseFormat(ResponseFormat.JSON)
×
NEW
577
                    .auth(this.auth)
×
NEW
578
                    .networkSession(this.networkSession)
×
NEW
579
                    .build());
×
NEW
580
    return JsonManager.deserialize(response.getData(), MetadataTaxonomyNodes.class);
×
581
  }
582

583
  /**
584
   * Creates a new metadata taxonomy node.
585
   *
586
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
587
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
588
   * @param requestBody Request body of createMetadataTaxonomyNode method
589
   */
590
  public MetadataTaxonomyNode createMetadataTaxonomyNode(
591
      String namespace, String taxonomyKey, CreateMetadataTaxonomyNodeRequestBody requestBody) {
NEW
592
    return createMetadataTaxonomyNode(
×
593
        namespace, taxonomyKey, requestBody, new CreateMetadataTaxonomyNodeHeaders());
594
  }
595

596
  /**
597
   * Creates a new metadata taxonomy node.
598
   *
599
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
600
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
601
   * @param requestBody Request body of createMetadataTaxonomyNode method
602
   * @param headers Headers of createMetadataTaxonomyNode method
603
   */
604
  public MetadataTaxonomyNode createMetadataTaxonomyNode(
605
      String namespace,
606
      String taxonomyKey,
607
      CreateMetadataTaxonomyNodeRequestBody requestBody,
608
      CreateMetadataTaxonomyNodeHeaders headers) {
NEW
609
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
610
    FetchResponse response =
×
611
        this.networkSession
NEW
612
            .getNetworkClient()
×
NEW
613
            .fetch(
×
614
                new FetchOptions.Builder(
NEW
615
                        String.join(
×
616
                            "",
NEW
617
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
618
                            "/2.0/metadata_taxonomies/",
NEW
619
                            convertToString(namespace),
×
620
                            "/",
NEW
621
                            convertToString(taxonomyKey),
×
622
                            "/nodes"),
623
                        "POST")
NEW
624
                    .headers(headersMap)
×
NEW
625
                    .data(JsonManager.serialize(requestBody))
×
NEW
626
                    .contentType("application/json")
×
NEW
627
                    .responseFormat(ResponseFormat.JSON)
×
NEW
628
                    .auth(this.auth)
×
NEW
629
                    .networkSession(this.networkSession)
×
NEW
630
                    .build());
×
NEW
631
    return JsonManager.deserialize(response.getData(), MetadataTaxonomyNode.class);
×
632
  }
633

634
  /**
635
   * Retrieves a metadata taxonomy node by its identifier.
636
   *
637
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
638
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
639
   * @param nodeId The identifier of the metadata taxonomy node. Example:
640
   *     "14d3d433-c77f-49c5-b146-9dea370f6e32"
641
   */
642
  public MetadataTaxonomyNode getMetadataTaxonomyNodeById(
643
      String namespace, String taxonomyKey, String nodeId) {
NEW
644
    return getMetadataTaxonomyNodeById(
×
645
        namespace, taxonomyKey, nodeId, new GetMetadataTaxonomyNodeByIdHeaders());
646
  }
647

648
  /**
649
   * Retrieves a metadata taxonomy node by its identifier.
650
   *
651
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
652
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
653
   * @param nodeId The identifier of the metadata taxonomy node. Example:
654
   *     "14d3d433-c77f-49c5-b146-9dea370f6e32"
655
   * @param headers Headers of getMetadataTaxonomyNodeById method
656
   */
657
  public MetadataTaxonomyNode getMetadataTaxonomyNodeById(
658
      String namespace,
659
      String taxonomyKey,
660
      String nodeId,
661
      GetMetadataTaxonomyNodeByIdHeaders headers) {
NEW
662
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
663
    FetchResponse response =
×
664
        this.networkSession
NEW
665
            .getNetworkClient()
×
NEW
666
            .fetch(
×
667
                new FetchOptions.Builder(
NEW
668
                        String.join(
×
669
                            "",
NEW
670
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
671
                            "/2.0/metadata_taxonomies/",
NEW
672
                            convertToString(namespace),
×
673
                            "/",
NEW
674
                            convertToString(taxonomyKey),
×
675
                            "/nodes/",
NEW
676
                            convertToString(nodeId)),
×
677
                        "GET")
NEW
678
                    .headers(headersMap)
×
NEW
679
                    .responseFormat(ResponseFormat.JSON)
×
NEW
680
                    .auth(this.auth)
×
NEW
681
                    .networkSession(this.networkSession)
×
NEW
682
                    .build());
×
NEW
683
    return JsonManager.deserialize(response.getData(), MetadataTaxonomyNode.class);
×
684
  }
685

686
  /**
687
   * Updates an existing metadata taxonomy node.
688
   *
689
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
690
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
691
   * @param nodeId The identifier of the metadata taxonomy node. Example:
692
   *     "14d3d433-c77f-49c5-b146-9dea370f6e32"
693
   */
694
  public MetadataTaxonomyNode updateMetadataTaxonomyNode(
695
      String namespace, String taxonomyKey, String nodeId) {
NEW
696
    return updateMetadataTaxonomyNode(
×
697
        namespace,
698
        taxonomyKey,
699
        nodeId,
700
        new UpdateMetadataTaxonomyNodeRequestBody(),
701
        new UpdateMetadataTaxonomyNodeHeaders());
702
  }
703

704
  /**
705
   * Updates an existing metadata taxonomy node.
706
   *
707
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
708
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
709
   * @param nodeId The identifier of the metadata taxonomy node. Example:
710
   *     "14d3d433-c77f-49c5-b146-9dea370f6e32"
711
   * @param requestBody Request body of updateMetadataTaxonomyNode method
712
   */
713
  public MetadataTaxonomyNode updateMetadataTaxonomyNode(
714
      String namespace,
715
      String taxonomyKey,
716
      String nodeId,
717
      UpdateMetadataTaxonomyNodeRequestBody requestBody) {
NEW
718
    return updateMetadataTaxonomyNode(
×
719
        namespace, taxonomyKey, nodeId, requestBody, new UpdateMetadataTaxonomyNodeHeaders());
720
  }
721

722
  /**
723
   * Updates an existing metadata taxonomy node.
724
   *
725
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
726
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
727
   * @param nodeId The identifier of the metadata taxonomy node. Example:
728
   *     "14d3d433-c77f-49c5-b146-9dea370f6e32"
729
   * @param headers Headers of updateMetadataTaxonomyNode method
730
   */
731
  public MetadataTaxonomyNode updateMetadataTaxonomyNode(
732
      String namespace,
733
      String taxonomyKey,
734
      String nodeId,
735
      UpdateMetadataTaxonomyNodeHeaders headers) {
NEW
736
    return updateMetadataTaxonomyNode(
×
737
        namespace, taxonomyKey, nodeId, new UpdateMetadataTaxonomyNodeRequestBody(), headers);
738
  }
739

740
  /**
741
   * Updates an existing metadata taxonomy node.
742
   *
743
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
744
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
745
   * @param nodeId The identifier of the metadata taxonomy node. Example:
746
   *     "14d3d433-c77f-49c5-b146-9dea370f6e32"
747
   * @param requestBody Request body of updateMetadataTaxonomyNode method
748
   * @param headers Headers of updateMetadataTaxonomyNode method
749
   */
750
  public MetadataTaxonomyNode updateMetadataTaxonomyNode(
751
      String namespace,
752
      String taxonomyKey,
753
      String nodeId,
754
      UpdateMetadataTaxonomyNodeRequestBody requestBody,
755
      UpdateMetadataTaxonomyNodeHeaders headers) {
NEW
756
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
757
    FetchResponse response =
×
758
        this.networkSession
NEW
759
            .getNetworkClient()
×
NEW
760
            .fetch(
×
761
                new FetchOptions.Builder(
NEW
762
                        String.join(
×
763
                            "",
NEW
764
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
765
                            "/2.0/metadata_taxonomies/",
NEW
766
                            convertToString(namespace),
×
767
                            "/",
NEW
768
                            convertToString(taxonomyKey),
×
769
                            "/nodes/",
NEW
770
                            convertToString(nodeId)),
×
771
                        "PATCH")
NEW
772
                    .headers(headersMap)
×
NEW
773
                    .data(JsonManager.serialize(requestBody))
×
NEW
774
                    .contentType("application/json")
×
NEW
775
                    .responseFormat(ResponseFormat.JSON)
×
NEW
776
                    .auth(this.auth)
×
NEW
777
                    .networkSession(this.networkSession)
×
NEW
778
                    .build());
×
NEW
779
    return JsonManager.deserialize(response.getData(), MetadataTaxonomyNode.class);
×
780
  }
781

782
  /**
783
   * Delete a metadata taxonomy node. This deletion is permanent and cannot be reverted. Only
784
   * metadata taxonomy nodes without any children can be deleted.
785
   *
786
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
787
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
788
   * @param nodeId The identifier of the metadata taxonomy node. Example:
789
   *     "14d3d433-c77f-49c5-b146-9dea370f6e32"
790
   */
791
  public void deleteMetadataTaxonomyNode(String namespace, String taxonomyKey, String nodeId) {
NEW
792
    deleteMetadataTaxonomyNode(
×
793
        namespace, taxonomyKey, nodeId, new DeleteMetadataTaxonomyNodeHeaders());
NEW
794
  }
×
795

796
  /**
797
   * Delete a metadata taxonomy node. This deletion is permanent and cannot be reverted. Only
798
   * metadata taxonomy nodes without any children can be deleted.
799
   *
800
   * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456"
801
   * @param taxonomyKey The key of the metadata taxonomy. Example: "geography"
802
   * @param nodeId The identifier of the metadata taxonomy node. Example:
803
   *     "14d3d433-c77f-49c5-b146-9dea370f6e32"
804
   * @param headers Headers of deleteMetadataTaxonomyNode method
805
   */
806
  public void deleteMetadataTaxonomyNode(
807
      String namespace,
808
      String taxonomyKey,
809
      String nodeId,
810
      DeleteMetadataTaxonomyNodeHeaders headers) {
NEW
811
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
812
    FetchResponse response =
×
813
        this.networkSession
NEW
814
            .getNetworkClient()
×
NEW
815
            .fetch(
×
816
                new FetchOptions.Builder(
NEW
817
                        String.join(
×
818
                            "",
NEW
819
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
820
                            "/2.0/metadata_taxonomies/",
NEW
821
                            convertToString(namespace),
×
822
                            "/",
NEW
823
                            convertToString(taxonomyKey),
×
824
                            "/nodes/",
NEW
825
                            convertToString(nodeId)),
×
826
                        "DELETE")
NEW
827
                    .headers(headersMap)
×
NEW
828
                    .responseFormat(ResponseFormat.NO_CONTENT)
×
NEW
829
                    .auth(this.auth)
×
NEW
830
                    .networkSession(this.networkSession)
×
NEW
831
                    .build());
×
NEW
832
  }
×
833

834
  /**
835
   * Used to retrieve metadata taxonomy nodes which are available for the taxonomy field based on
836
   * its configuration and the parameters specified. Results are sorted in lexicographic order
837
   * unless a `query` parameter is passed. With a `query` parameter specified, results are sorted in
838
   * order of relevance.
839
   *
840
   * @param scope The scope of the metadata template. Example: "global"
841
   * @param templateKey The name of the metadata template. Example: "properties"
842
   * @param fieldKey The key of the metadata taxonomy field in the template. Example: "geography"
843
   */
844
  public MetadataTaxonomyNodes getMetadataTemplateFieldOptions(
845
      GetMetadataTemplateFieldOptionsScope scope, String templateKey, String fieldKey) {
NEW
846
    return getMetadataTemplateFieldOptions(
×
847
        scope,
848
        templateKey,
849
        fieldKey,
850
        new GetMetadataTemplateFieldOptionsQueryParams(),
851
        new GetMetadataTemplateFieldOptionsHeaders());
852
  }
853

854
  /**
855
   * Used to retrieve metadata taxonomy nodes which are available for the taxonomy field based on
856
   * its configuration and the parameters specified. Results are sorted in lexicographic order
857
   * unless a `query` parameter is passed. With a `query` parameter specified, results are sorted in
858
   * order of relevance.
859
   *
860
   * @param scope The scope of the metadata template. Example: "global"
861
   * @param templateKey The name of the metadata template. Example: "properties"
862
   * @param fieldKey The key of the metadata taxonomy field in the template. Example: "geography"
863
   * @param queryParams Query parameters of getMetadataTemplateFieldOptions method
864
   */
865
  public MetadataTaxonomyNodes getMetadataTemplateFieldOptions(
866
      GetMetadataTemplateFieldOptionsScope scope,
867
      String templateKey,
868
      String fieldKey,
869
      GetMetadataTemplateFieldOptionsQueryParams queryParams) {
NEW
870
    return getMetadataTemplateFieldOptions(
×
871
        scope, templateKey, fieldKey, queryParams, new GetMetadataTemplateFieldOptionsHeaders());
872
  }
873

874
  /**
875
   * Used to retrieve metadata taxonomy nodes which are available for the taxonomy field based on
876
   * its configuration and the parameters specified. Results are sorted in lexicographic order
877
   * unless a `query` parameter is passed. With a `query` parameter specified, results are sorted in
878
   * order of relevance.
879
   *
880
   * @param scope The scope of the metadata template. Example: "global"
881
   * @param templateKey The name of the metadata template. Example: "properties"
882
   * @param fieldKey The key of the metadata taxonomy field in the template. Example: "geography"
883
   * @param headers Headers of getMetadataTemplateFieldOptions method
884
   */
885
  public MetadataTaxonomyNodes getMetadataTemplateFieldOptions(
886
      GetMetadataTemplateFieldOptionsScope scope,
887
      String templateKey,
888
      String fieldKey,
889
      GetMetadataTemplateFieldOptionsHeaders headers) {
NEW
890
    return getMetadataTemplateFieldOptions(
×
891
        scope, templateKey, fieldKey, new GetMetadataTemplateFieldOptionsQueryParams(), headers);
892
  }
893

894
  /**
895
   * Used to retrieve metadata taxonomy nodes which are available for the taxonomy field based on
896
   * its configuration and the parameters specified. Results are sorted in lexicographic order
897
   * unless a `query` parameter is passed. With a `query` parameter specified, results are sorted in
898
   * order of relevance.
899
   *
900
   * @param scope The scope of the metadata template. Example: "global"
901
   * @param templateKey The name of the metadata template. Example: "properties"
902
   * @param fieldKey The key of the metadata taxonomy field in the template. Example: "geography"
903
   * @param queryParams Query parameters of getMetadataTemplateFieldOptions method
904
   * @param headers Headers of getMetadataTemplateFieldOptions method
905
   */
906
  public MetadataTaxonomyNodes getMetadataTemplateFieldOptions(
907
      GetMetadataTemplateFieldOptionsScope scope,
908
      String templateKey,
909
      String fieldKey,
910
      GetMetadataTemplateFieldOptionsQueryParams queryParams,
911
      GetMetadataTemplateFieldOptionsHeaders headers) {
NEW
912
    Map<String, String> queryParamsMap =
×
NEW
913
        prepareParams(
×
NEW
914
            mapOf(
×
NEW
915
                entryOf("level", convertToString(queryParams.getLevel())),
×
NEW
916
                entryOf("parent", convertToString(queryParams.getParent())),
×
NEW
917
                entryOf("ancestor", convertToString(queryParams.getAncestor())),
×
NEW
918
                entryOf("query", convertToString(queryParams.getQuery())),
×
NEW
919
                entryOf(
×
920
                    "include-total-result-count",
NEW
921
                    convertToString(queryParams.getIncludeTotalResultCount())),
×
NEW
922
                entryOf(
×
923
                    "only-selectable-options",
NEW
924
                    convertToString(queryParams.getOnlySelectableOptions())),
×
NEW
925
                entryOf("marker", convertToString(queryParams.getMarker())),
×
NEW
926
                entryOf("limit", convertToString(queryParams.getLimit()))));
×
NEW
927
    Map<String, String> headersMap = prepareParams(mergeMaps(mapOf(), headers.getExtraHeaders()));
×
NEW
928
    FetchResponse response =
×
929
        this.networkSession
NEW
930
            .getNetworkClient()
×
NEW
931
            .fetch(
×
932
                new FetchOptions.Builder(
NEW
933
                        String.join(
×
934
                            "",
NEW
935
                            this.networkSession.getBaseUrls().getBaseUrl(),
×
936
                            "/2.0/metadata_templates/",
NEW
937
                            convertToString(scope),
×
938
                            "/",
NEW
939
                            convertToString(templateKey),
×
940
                            "/fields/",
NEW
941
                            convertToString(fieldKey),
×
942
                            "/options"),
943
                        "GET")
NEW
944
                    .params(queryParamsMap)
×
NEW
945
                    .headers(headersMap)
×
NEW
946
                    .responseFormat(ResponseFormat.JSON)
×
NEW
947
                    .auth(this.auth)
×
NEW
948
                    .networkSession(this.networkSession)
×
NEW
949
                    .build());
×
NEW
950
    return JsonManager.deserialize(response.getData(), MetadataTaxonomyNodes.class);
×
951
  }
952

953
  public Authentication getAuth() {
NEW
954
    return auth;
×
955
  }
956

957
  public NetworkSession getNetworkSession() {
NEW
958
    return networkSession;
×
959
  }
960

961
  public static class Builder {
962

963
    protected Authentication auth;
964

965
    protected NetworkSession networkSession;
966

NEW
967
    public Builder() {
×
NEW
968
      this.networkSession = new NetworkSession();
×
NEW
969
    }
×
970

971
    public Builder auth(Authentication auth) {
NEW
972
      this.auth = auth;
×
NEW
973
      return this;
×
974
    }
975

976
    public Builder networkSession(NetworkSession networkSession) {
NEW
977
      this.networkSession = networkSession;
×
NEW
978
      return this;
×
979
    }
980

981
    public MetadataTaxonomiesManager build() {
NEW
982
      return new MetadataTaxonomiesManager(this);
×
983
    }
984
  }
985
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc