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

@@ -11,11 +11,11 @@ import java.time.format.DateTimeParseException;
*/
{{>generatedAnnotation}}
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -24,6 +24,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -32,6 +33,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -42,8 +44,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -4,28 +4,12 @@ package {{invokerPackage}};
{{>generatedAnnotation}}
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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -36,11 +20,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -6,7 +6,6 @@ import {{invokerPackage}}.Pair;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Supplier;
{{>generatedAnnotation}}
@@ -15,7 +14,7 @@ public class HttpBearerAuth implements Authentication {
private Supplier<String> tokenSupplier;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
this.scheme = upperCaseBearer(scheme);
}
/**
@@ -47,15 +46,14 @@ public class HttpBearerAuth implements Authentication {
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null);
String bearerToken = tokenSupplier != null ? tokenSupplier.get() : null;
if (bearerToken == null) {
return;
}
headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
headerParams.put("Authorization", (scheme != null ? scheme + " " : "") + bearerToken);
}
private static String upperCaseBearer(String scheme) {
return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
return "bearer".equalsIgnoreCase(scheme) ? "Bearer" : scheme;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -17,7 +17,6 @@ import org.openapitools.client.Pair;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Supplier;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@@ -26,7 +25,7 @@ public class HttpBearerAuth implements Authentication {
private Supplier<String> tokenSupplier;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
this.scheme = upperCaseBearer(scheme);
}
/**
@@ -58,15 +57,14 @@ public class HttpBearerAuth implements Authentication {
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null);
String bearerToken = tokenSupplier != null ? tokenSupplier.get() : null;
if (bearerToken == null) {
return;
}
headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
headerParams.put("Authorization", (scheme != null ? scheme + " " : "") + bearerToken);
}
private static String upperCaseBearer(String scheme) {
return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
return "bearer".equalsIgnoreCase(scheme) ? "Bearer" : scheme;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -17,7 +17,6 @@ import org.openapitools.client.Pair;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Supplier;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@@ -26,7 +25,7 @@ public class HttpBearerAuth implements Authentication {
private Supplier<String> tokenSupplier;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
this.scheme = upperCaseBearer(scheme);
}
/**
@@ -58,15 +57,14 @@ public class HttpBearerAuth implements Authentication {
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null);
String bearerToken = tokenSupplier != null ? tokenSupplier.get() : null;
if (bearerToken == null) {
return;
}
headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
headerParams.put("Authorization", (scheme != null ? scheme + " " : "") + bearerToken);
}
private static String upperCaseBearer(String scheme) {
return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
return "bearer".equalsIgnoreCase(scheme) ? "Bearer" : scheme;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -17,7 +17,6 @@ import org.openapitools.client.Pair;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Supplier;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@@ -26,7 +25,7 @@ public class HttpBearerAuth implements Authentication {
private Supplier<String> tokenSupplier;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
this.scheme = upperCaseBearer(scheme);
}
/**
@@ -58,15 +57,14 @@ public class HttpBearerAuth implements Authentication {
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null);
String bearerToken = tokenSupplier != null ? tokenSupplier.get() : null;
if (bearerToken == null) {
return;
}
headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
headerParams.put("Authorization", (scheme != null ? scheme + " " : "") + bearerToken);
}
private static String upperCaseBearer(String scheme) {
return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
return "bearer".equalsIgnoreCase(scheme) ? "Bearer" : scheme;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ package org.openapitools.client;
@jakarta.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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ package org.openapitools.client;
@jakarta.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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ package org.openapitools.client;
@jakarta.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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -17,7 +17,6 @@ import org.openapitools.client.Pair;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.function.Supplier;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
@@ -26,7 +25,7 @@ public class HttpBearerAuth implements Authentication {
private Supplier<String> tokenSupplier;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
this.scheme = upperCaseBearer(scheme);
}
/**
@@ -58,15 +57,14 @@ public class HttpBearerAuth implements Authentication {
@Override
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) {
String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null);
String bearerToken = tokenSupplier != null ? tokenSupplier.get() : null;
if (bearerToken == null) {
return;
}
headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
headerParams.put("Authorization", (scheme != null ? scheme + " " : "") + bearerToken);
}
private static String upperCaseBearer(String scheme) {
return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
return "bearer".equalsIgnoreCase(scheme) ? "Bearer" : scheme;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ package org.openapitools.client;
@jakarta.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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}

View File

@@ -22,11 +22,11 @@ import java.time.format.DateTimeParseException;
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.15.0-SNAPSHOT")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
@@ -35,6 +35,7 @@ public class JavaTimeFormatter {
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
*
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
@@ -43,6 +44,7 @@ public class JavaTimeFormatter {
/**
* Parse the given string into {@code OffsetDateTime} object.
*
* @param str String
* @return {@code OffsetDateTime}
*/
@@ -53,8 +55,10 @@ public class JavaTimeFormatter {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
*
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/

View File

@@ -15,28 +15,12 @@ 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);
}
private void setName(String name) {
if (!isValidString(name)) {
return;
}
this.name = name;
}
private void setValue(String value) {
if (!isValidString(value)) {
return;
}
this.value = value;
this.name = isValidString(name) ? name : "";
this.value = isValidString(value) ? value : "";
}
public String getName() {
@@ -47,11 +31,7 @@ public class Pair {
return this.value;
}
private boolean isValidString(String arg) {
if (arg == null) {
return false;
}
return true;
private static boolean isValidString(String arg) {
return arg != null;
}
}