immutable Pair, better performant HttpBearerAuth, consistent code-style (#20743)

* make Pair immutable and in google-code-style

* apply google-code-style to JavaTimeFormatter (to make it consistent with most other auto-generated java)

* move upperCaseBearer to ctor (scheme is final and private; only needs to be fixed once); also replaced Optional with ternary (perf and cleaner code)

* apply google-code-style to Authentication to make it consistent with rest of auth code

* fresh samples
This commit is contained in:
Ron Reynolds
2025-06-26 02:10:36 -07:00
committed by GitHub
parent d911a71be9
commit cfe476f32d
87 changed files with 2120 additions and 2738 deletions

View File

@@ -15,43 +15,23 @@ package org.openapitools.client;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class Pair {
private String name = "";
private String value = "";
private final String name;
private final String value;
public Pair (String name, String value) {
setName(name);
setValue(value);
}
public Pair(String name, String value) {
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
public String getName() {
return this.name;
}
this.name = name;
}
public String getValue() {
return this.value;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
}
public String getName() {
return this.name;
}
public String getValue() {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
}
private static boolean isValidString(String arg) {
return arg != null;
}
}