Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/alb/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
29ed135519d2a7b1b043cd0c8243bb8d423a784b
a0507fbc8a743f261058ef285885928d2e8e0355
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.alb.model.TargetPool.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.alb.model.TargetPoolTlsConfig.CustomTypeAdapterFactory());
new cloud.stackit.sdk.alb.model.TlsConfig.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new cloud.stackit.sdk.alb.model.UpdateCredentialsPayload
.CustomTypeAdapterFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
value = "org.openapitools.codegen.languages.JavaClientCodegen",
comments = "Generator version: 7.19.0")
public class ActiveHealthCheck {
public static final String SERIALIZED_NAME_ALT_PORT = "altPort";

@SerializedName(SERIALIZED_NAME_ALT_PORT)
@javax.annotation.Nullable private Integer altPort;

public static final String SERIALIZED_NAME_HEALTHY_THRESHOLD = "healthyThreshold";

@SerializedName(SERIALIZED_NAME_HEALTHY_THRESHOLD)
Expand Down Expand Up @@ -67,6 +72,24 @@ public class ActiveHealthCheck {

public ActiveHealthCheck() {}

public ActiveHealthCheck altPort(@javax.annotation.Nullable Integer altPort) {
this.altPort = altPort;
return this;
}

/**
* Overrides the default port used for health check probes.
*
* @return altPort
*/
@javax.annotation.Nullable public Integer getAltPort() {
return altPort;
}

public void setAltPort(@javax.annotation.Nullable Integer altPort) {
this.altPort = altPort;
}

public ActiveHealthCheck healthyThreshold(@javax.annotation.Nullable Integer healthyThreshold) {
this.healthyThreshold = healthyThreshold;
return this;
Expand Down Expand Up @@ -230,7 +253,8 @@ public boolean equals(Object o) {
return false;
}
ActiveHealthCheck activeHealthCheck = (ActiveHealthCheck) o;
return Objects.equals(this.healthyThreshold, activeHealthCheck.healthyThreshold)
return Objects.equals(this.altPort, activeHealthCheck.altPort)
&& Objects.equals(this.healthyThreshold, activeHealthCheck.healthyThreshold)
&& Objects.equals(this.httpHealthChecks, activeHealthCheck.httpHealthChecks)
&& Objects.equals(this.interval, activeHealthCheck.interval)
&& Objects.equals(this.intervalJitter, activeHealthCheck.intervalJitter)
Expand All @@ -243,6 +267,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
altPort,
healthyThreshold,
httpHealthChecks,
interval,
Expand All @@ -256,6 +281,7 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ActiveHealthCheck {\n");
sb.append(" altPort: ").append(toIndentedString(altPort)).append("\n");
sb.append(" healthyThreshold: ").append(toIndentedString(healthyThreshold)).append("\n");
sb.append(" httpHealthChecks: ").append(toIndentedString(httpHealthChecks)).append("\n");
sb.append(" interval: ").append(toIndentedString(interval)).append("\n");
Expand Down Expand Up @@ -290,6 +316,7 @@ private String toIndentedString(Object o) {
openapiFields =
new HashSet<String>(
Arrays.asList(
"altPort",
"healthyThreshold",
"httpHealthChecks",
"interval",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public class HttpHealthChecks {
@SerializedName(SERIALIZED_NAME_PATH)
@javax.annotation.Nullable private String path;

public static final String SERIALIZED_NAME_TLS = "tls";

@SerializedName(SERIALIZED_NAME_TLS)
@javax.annotation.Nullable private TlsConfig tls;

public HttpHealthChecks() {}

public HttpHealthChecks okStatuses(@javax.annotation.Nullable List<String> okStatuses) {
Expand Down Expand Up @@ -92,6 +97,24 @@ public void setPath(@javax.annotation.Nullable String path) {
this.path = path;
}

public HttpHealthChecks tls(@javax.annotation.Nullable TlsConfig tls) {
this.tls = tls;
return this;
}

/**
* Get tls
*
* @return tls
*/
@javax.annotation.Nullable public TlsConfig getTls() {
return tls;
}

public void setTls(@javax.annotation.Nullable TlsConfig tls) {
this.tls = tls;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -147,12 +170,13 @@ public boolean equals(Object o) {
HttpHealthChecks httpHealthChecks = (HttpHealthChecks) o;
return Objects.equals(this.okStatuses, httpHealthChecks.okStatuses)
&& Objects.equals(this.path, httpHealthChecks.path)
&& Objects.equals(this.tls, httpHealthChecks.tls)
&& Objects.equals(this.additionalProperties, httpHealthChecks.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(okStatuses, path, additionalProperties);
return Objects.hash(okStatuses, path, tls, additionalProperties);
}

@Override
Expand All @@ -161,6 +185,7 @@ public String toString() {
sb.append("class HttpHealthChecks {\n");
sb.append(" okStatuses: ").append(toIndentedString(okStatuses)).append("\n");
sb.append(" path: ").append(toIndentedString(path)).append("\n");
sb.append(" tls: ").append(toIndentedString(tls)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand All @@ -184,7 +209,7 @@ private String toIndentedString(Object o) {

static {
// a set of all properties/fields (JSON key names)
openapiFields = new HashSet<String>(Arrays.asList("okStatuses", "path"));
openapiFields = new HashSet<String>(Arrays.asList("okStatuses", "path", "tls"));

// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet<String>(0);
Expand Down Expand Up @@ -226,6 +251,10 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
"Expected the field `path` to be a primitive type in the JSON string but got `%s`",
jsonObj.get("path").toString()));
}
// validate the optional field `tls`
if (jsonObj.get("tls") != null && !jsonObj.get("tls").isJsonNull()) {
TlsConfig.validateJsonElement(jsonObj.get("tls"));
}
}

public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class TargetPool {
public static final String SERIALIZED_NAME_TLS_CONFIG = "tlsConfig";

@SerializedName(SERIALIZED_NAME_TLS_CONFIG)
@javax.annotation.Nullable private TargetPoolTlsConfig tlsConfig;
@javax.annotation.Nullable private TlsConfig tlsConfig;

public TargetPool() {}

Expand Down Expand Up @@ -147,7 +147,7 @@ public void setTargets(@javax.annotation.Nullable List<Target> targets) {
this.targets = targets;
}

public TargetPool tlsConfig(@javax.annotation.Nullable TargetPoolTlsConfig tlsConfig) {
public TargetPool tlsConfig(@javax.annotation.Nullable TlsConfig tlsConfig) {
this.tlsConfig = tlsConfig;
return this;
}
Expand All @@ -157,11 +157,11 @@ public TargetPool tlsConfig(@javax.annotation.Nullable TargetPoolTlsConfig tlsCo
*
* @return tlsConfig
*/
@javax.annotation.Nullable public TargetPoolTlsConfig getTlsConfig() {
@javax.annotation.Nullable public TlsConfig getTlsConfig() {
return tlsConfig;
}

public void setTlsConfig(@javax.annotation.Nullable TargetPoolTlsConfig tlsConfig) {
public void setTlsConfig(@javax.annotation.Nullable TlsConfig tlsConfig) {
this.tlsConfig = tlsConfig;
}

Expand Down Expand Up @@ -327,7 +327,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti
}
// validate the optional field `tlsConfig`
if (jsonObj.get("tlsConfig") != null && !jsonObj.get("tlsConfig").isJsonNull()) {
TargetPoolTlsConfig.validateJsonElement(jsonObj.get("tlsConfig"));
TlsConfig.validateJsonElement(jsonObj.get("tlsConfig"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
import java.util.Map;
import java.util.Objects;

/** TLSConfig used for the target pool. */
/** Set this to configure TLS settings. */
@javax.annotation.Generated(
value = "org.openapitools.codegen.languages.JavaClientCodegen",
comments = "Generator version: 7.19.0")
public class TargetPoolTlsConfig {
public class TlsConfig {
public static final String SERIALIZED_NAME_CUSTOM_CA = "customCa";

@SerializedName(SERIALIZED_NAME_CUSTOM_CA)
Expand All @@ -51,9 +51,9 @@ public class TargetPoolTlsConfig {
@SerializedName(SERIALIZED_NAME_SKIP_CERTIFICATE_VALIDATION)
@javax.annotation.Nullable private Boolean skipCertificateValidation;

public TargetPoolTlsConfig() {}
public TlsConfig() {}

public TargetPoolTlsConfig customCa(@javax.annotation.Nullable String customCa) {
public TlsConfig customCa(@javax.annotation.Nullable String customCa) {
this.customCa = customCa;
return this;
}
Expand All @@ -75,7 +75,7 @@ public void setCustomCa(@javax.annotation.Nullable String customCa) {
this.customCa = customCa;
}

public TargetPoolTlsConfig enabled(@javax.annotation.Nullable Boolean enabled) {
public TlsConfig enabled(@javax.annotation.Nullable Boolean enabled) {
this.enabled = enabled;
return this;
}
Expand All @@ -95,7 +95,7 @@ public void setEnabled(@javax.annotation.Nullable Boolean enabled) {
this.enabled = enabled;
}

public TargetPoolTlsConfig skipCertificateValidation(
public TlsConfig skipCertificateValidation(
@javax.annotation.Nullable Boolean skipCertificateValidation) {
this.skipCertificateValidation = skipCertificateValidation;
return this;
Expand Down Expand Up @@ -129,9 +129,9 @@ public void setSkipCertificateValidation(
*
* @param key name of the property
* @param value value of the property
* @return the TargetPoolTlsConfig instance itself
* @return the TlsConfig instance itself
*/
public TargetPoolTlsConfig putAdditionalProperty(String key, Object value) {
public TlsConfig putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap<String, Object>();
}
Expand Down Expand Up @@ -169,14 +169,12 @@ public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) {
return false;
}
TargetPoolTlsConfig targetPoolTlsConfig = (TargetPoolTlsConfig) o;
return Objects.equals(this.customCa, targetPoolTlsConfig.customCa)
&& Objects.equals(this.enabled, targetPoolTlsConfig.enabled)
TlsConfig tlsConfig = (TlsConfig) o;
return Objects.equals(this.customCa, tlsConfig.customCa)
&& Objects.equals(this.enabled, tlsConfig.enabled)
&& Objects.equals(
this.skipCertificateValidation,
targetPoolTlsConfig.skipCertificateValidation)
&& Objects.equals(
this.additionalProperties, targetPoolTlsConfig.additionalProperties);
this.skipCertificateValidation, tlsConfig.skipCertificateValidation)
&& Objects.equals(this.additionalProperties, tlsConfig.additionalProperties);
}

@Override
Expand All @@ -187,7 +185,7 @@ public int hashCode() {
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TargetPoolTlsConfig {\n");
sb.append("class TlsConfig {\n");
sb.append(" customCa: ").append(toIndentedString(customCa)).append("\n");
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
sb.append(" skipCertificateValidation: ")
Expand Down Expand Up @@ -228,17 +226,17 @@ private String toIndentedString(Object o) {
* Validates the JSON Element and throws an exception if issues found
*
* @param jsonElement JSON Element
* @throws IOException if the JSON Element is invalid with respect to TargetPoolTlsConfig
* @throws IOException if the JSON Element is invalid with respect to TlsConfig
*/
public static void validateJsonElement(JsonElement jsonElement) throws IOException {
if (jsonElement == null) {
if (!TargetPoolTlsConfig.openapiRequiredFields
if (!TlsConfig.openapiRequiredFields
.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(
String.format(
java.util.Locale.ROOT,
"The required field(s) %s in TargetPoolTlsConfig is not found in the empty JSON string",
TargetPoolTlsConfig.openapiRequiredFields.toString()));
"The required field(s) %s in TlsConfig is not found in the empty JSON string",
TlsConfig.openapiRequiredFields.toString()));
}
}
JsonObject jsonObj = jsonElement.getAsJsonObject();
Expand All @@ -256,18 +254,17 @@ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@SuppressWarnings("unchecked")
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
if (!TargetPoolTlsConfig.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'TargetPoolTlsConfig' and its subtypes
if (!TlsConfig.class.isAssignableFrom(type.getRawType())) {
return null; // this class only serializes 'TlsConfig' and its subtypes
}
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
final TypeAdapter<TargetPoolTlsConfig> thisAdapter =
gson.getDelegateAdapter(this, TypeToken.get(TargetPoolTlsConfig.class));
final TypeAdapter<TlsConfig> thisAdapter =
gson.getDelegateAdapter(this, TypeToken.get(TlsConfig.class));

return (TypeAdapter<T>)
new TypeAdapter<TargetPoolTlsConfig>() {
new TypeAdapter<TlsConfig>() {
@Override
public void write(JsonWriter out, TargetPoolTlsConfig value)
throws IOException {
public void write(JsonWriter out, TlsConfig value) throws IOException {
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
obj.remove("additionalProperties");
// serialize additional properties
Expand Down Expand Up @@ -297,12 +294,12 @@ else if (entry.getValue() instanceof Character)
}

@Override
public TargetPoolTlsConfig read(JsonReader in) throws IOException {
public TlsConfig read(JsonReader in) throws IOException {
JsonElement jsonElement = elementAdapter.read(in);
validateJsonElement(jsonElement);
JsonObject jsonObj = jsonElement.getAsJsonObject();
// store additional fields in the deserialized instance
TargetPoolTlsConfig instance = thisAdapter.fromJsonTree(jsonObj);
TlsConfig instance = thisAdapter.fromJsonTree(jsonObj);
for (Map.Entry<String, JsonElement> entry : jsonObj.entrySet()) {
if (!openapiFields.contains(entry.getKey())) {
if (entry.getValue().isJsonPrimitive()) { // primitive type
Expand Down Expand Up @@ -341,18 +338,18 @@ else if (entry.getValue().getAsJsonPrimitive().isBoolean())
}

/**
* Create an instance of TargetPoolTlsConfig given an JSON string
* Create an instance of TlsConfig given an JSON string
*
* @param jsonString JSON string
* @return An instance of TargetPoolTlsConfig
* @throws IOException if the JSON string is invalid with respect to TargetPoolTlsConfig
* @return An instance of TlsConfig
* @throws IOException if the JSON string is invalid with respect to TlsConfig
*/
public static TargetPoolTlsConfig fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, TargetPoolTlsConfig.class);
public static TlsConfig fromJson(String jsonString) throws IOException {
return JSON.getGson().fromJson(jsonString, TlsConfig.class);
}

/**
* Convert an instance of TargetPoolTlsConfig to an JSON string
* Convert an instance of TlsConfig to an JSON string
*
* @return JSON string
*/
Expand Down
Loading