Skip to content

Commit 838c039

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 6eef7f0 of spec repo (#364)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3e64748 commit 838c039

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.2.0",
7-
"regenerated": "2020-07-01 12:47:46.646603",
8-
"spec_repo_commit": "d472ef7"
7+
"regenerated": "2020-07-02 07:21:17.692989",
8+
"spec_repo_commit": "6eef7f0"
99
},
1010
"v2": {
1111
"apigentools_version": "1.2.0",
12-
"regenerated": "2020-07-01 12:47:53.179842",
13-
"spec_repo_commit": "d472ef7"
12+
"regenerated": "2020-07-02 07:21:25.094349",
13+
"spec_repo_commit": "6eef7f0"
1414
}
1515
}
1616
}

src/main/java/com/datadog/api/v1/client/ApiClient.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class ApiClient {
6161
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
6262
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
6363
protected String basePath = "https://api.datadoghq.com";
64+
protected String userAgent;
6465
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
6566

6667
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
@@ -435,10 +436,19 @@ public ApiClient setBearerToken(String bearerToken) {
435436
* @return API client
436437
*/
437438
public ApiClient setUserAgent(String userAgent) {
439+
userAgent = userAgent;
438440
addDefaultHeader("User-Agent", userAgent);
439441
return this;
440442
}
441443

444+
/**
445+
* Get the User-Agent header's value.
446+
* @return User-Agent string
447+
*/
448+
public String getUserAgent(){
449+
return userAgent;
450+
}
451+
442452
/**
443453
* Set the default User-Agent header's value with telemetry information (by adding to the default header map).
444454
* @return API client
@@ -460,6 +470,7 @@ public ApiClient setUserAgent() {
460470
+ "arch " + System.getProperty("os.arch")
461471
+ ")";
462472
addDefaultHeader("User-Agent", userAgent);
473+
this.userAgent = userAgent;
463474
return this;
464475
}
465476

src/main/java/com/datadog/api/v2/client/ApiClient.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public class ApiClient {
6161
protected Map<String, String> defaultHeaderMap = new HashMap<String, String>();
6262
protected Map<String, String> defaultCookieMap = new HashMap<String, String>();
6363
protected String basePath = "https://api.datadoghq.com";
64+
protected String userAgent;
6465
private static final Logger log = Logger.getLogger(ApiClient.class.getName());
6566

6667
protected List<ServerConfiguration> servers = new ArrayList<ServerConfiguration>(Arrays.asList(
@@ -373,10 +374,19 @@ public ApiClient setBearerToken(String bearerToken) {
373374
* @return API client
374375
*/
375376
public ApiClient setUserAgent(String userAgent) {
377+
userAgent = userAgent;
376378
addDefaultHeader("User-Agent", userAgent);
377379
return this;
378380
}
379381

382+
/**
383+
* Get the User-Agent header's value.
384+
* @return User-Agent string
385+
*/
386+
public String getUserAgent(){
387+
return userAgent;
388+
}
389+
380390
/**
381391
* Set the default User-Agent header's value with telemetry information (by adding to the default header map).
382392
* @return API client
@@ -398,6 +408,7 @@ public ApiClient setUserAgent() {
398408
+ "arch " + System.getProperty("os.arch")
399409
+ ")";
400410
addDefaultHeader("User-Agent", userAgent);
411+
this.userAgent = userAgent;
401412
return this;
402413
}
403414

0 commit comments

Comments
 (0)