io.kroxylicious.proxy.config.tls.KeyStoreFluent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kroxylicious-integration-test-support Show documentation
Show all versions of kroxylicious-integration-test-support Show documentation
Support code to simplify writing integration tests for filters
package io.kroxylicious.proxy.config.tls;
import io.kroxylicious.proxy.config.secret.InlinePasswordFluent;
import io.kroxylicious.proxy.config.model.VisitableBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.SuppressWarnings;
import io.kroxylicious.proxy.config.model.Nested;
import io.kroxylicious.proxy.config.secret.InlinePassword;
import java.lang.String;
import com.fasterxml.jackson.annotation.JsonAlias;
import io.kroxylicious.proxy.config.secret.FilePassword;
import io.kroxylicious.proxy.config.model.BaseFluent;
import io.kroxylicious.proxy.config.secret.FilePasswordFluent;
import io.kroxylicious.proxy.config.secret.PasswordProvider;
import io.kroxylicious.proxy.config.secret.InlinePasswordBuilder;
import java.lang.Object;
import io.kroxylicious.proxy.config.secret.FilePasswordBuilder;
/**
* Generated
*/
@SuppressWarnings("unchecked")
public class KeyStoreFluent> extends BaseFluent{
public KeyStoreFluent() {
}
public KeyStoreFluent(KeyStore instance) {
this.copyInstance(instance);
}
private String storeFile;
private VisitableBuilder extends PasswordProvider,?> storePasswordProvider;
private VisitableBuilder extends PasswordProvider,?> keyPasswordProvider;
private String storeType;
protected void copyInstance(KeyStore instance) {
if (instance != null) {
this.withStoreFile(instance.storeFile());
this.withStorePasswordProvider(instance.storePasswordProvider());
this.withKeyPasswordProvider(instance.keyPasswordProvider());
this.withStoreType(instance.storeType());
}
}
public String getStoreFile() {
return this.storeFile;
}
public A withStoreFile(String storeFile) {
this.storeFile = storeFile;
return (A) this;
}
public boolean hasStoreFile() {
return this.storeFile != null;
}
public PasswordProvider buildStorePasswordProvider() {
return this.storePasswordProvider != null ? this.storePasswordProvider.build() : null;
}
public A withStorePasswordProvider(PasswordProvider storePasswordProvider) {
if (storePasswordProvider == null) {
this.storePasswordProvider = null;
this._visitables.remove("storePasswordProvider");
return (A) this;
} else {
VisitableBuilder extends PasswordProvider,?> builder = builder(storePasswordProvider);;
this._visitables.get("storePasswordProvider").clear();
this._visitables.get("storePasswordProvider").add(builder);
this.storePasswordProvider = builder;
return (A) this;
}
}
public boolean hasStorePasswordProvider() {
return this.storePasswordProvider != null;
}
public InlinePasswordStoreProviderNested withNewInlinePasswordStoreProvider() {
return new InlinePasswordStoreProviderNested(null);
}
public InlinePasswordStoreProviderNested withNewInlinePasswordStoreProviderLike(InlinePassword item) {
return new InlinePasswordStoreProviderNested(item);
}
public A withNewInlinePasswordStoreProvider(String password) {
return (A)withStorePasswordProvider(new InlinePassword(password));
}
public FilePasswordStoreProviderNested withNewFilePasswordStoreProvider() {
return new FilePasswordStoreProviderNested(null);
}
public FilePasswordStoreProviderNested withNewFilePasswordStoreProviderLike(FilePassword item) {
return new FilePasswordStoreProviderNested(item);
}
public A withNewFilePasswordStoreProvider(String passwordFile) {
return (A)withStorePasswordProvider(new FilePassword(passwordFile));
}
public PasswordProvider buildKeyPasswordProvider() {
return this.keyPasswordProvider != null ? this.keyPasswordProvider.build() : null;
}
public A withKeyPasswordProvider(PasswordProvider keyPasswordProvider) {
if (keyPasswordProvider == null) {
this.keyPasswordProvider = null;
this._visitables.remove("keyPasswordProvider");
return (A) this;
} else {
VisitableBuilder extends PasswordProvider,?> builder = builder(keyPasswordProvider);;
this._visitables.get("keyPasswordProvider").clear();
this._visitables.get("keyPasswordProvider").add(builder);
this.keyPasswordProvider = builder;
return (A) this;
}
}
public boolean hasKeyPasswordProvider() {
return this.keyPasswordProvider != null;
}
public InlinePasswordKeyProviderNested withNewInlinePasswordKeyProvider() {
return new InlinePasswordKeyProviderNested(null);
}
public InlinePasswordKeyProviderNested withNewInlinePasswordKeyProviderLike(InlinePassword item) {
return new InlinePasswordKeyProviderNested(item);
}
public A withNewInlinePasswordKeyProvider(String password) {
return (A)withKeyPasswordProvider(new InlinePassword(password));
}
public FilePasswordKeyProviderNested withNewFilePasswordKeyProvider() {
return new FilePasswordKeyProviderNested(null);
}
public FilePasswordKeyProviderNested withNewFilePasswordKeyProviderLike(FilePassword item) {
return new FilePasswordKeyProviderNested(item);
}
public A withNewFilePasswordKeyProvider(String passwordFile) {
return (A)withKeyPasswordProvider(new FilePassword(passwordFile));
}
public String getStoreType() {
return this.storeType;
}
public A withStoreType(String storeType) {
this.storeType = storeType;
return (A) this;
}
public boolean hasStoreType() {
return this.storeType != null;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
KeyStoreFluent that = (KeyStoreFluent) o;
if (!java.util.Objects.equals(storeFile, that.storeFile)) return false;
if (!java.util.Objects.equals(storePasswordProvider, that.storePasswordProvider)) return false;
if (!java.util.Objects.equals(keyPasswordProvider, that.keyPasswordProvider)) return false;
if (!java.util.Objects.equals(storeType, that.storeType)) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(storeFile, storePasswordProvider, keyPasswordProvider, storeType, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (storeFile != null) { sb.append("storeFile:"); sb.append(storeFile + ","); }
if (storePasswordProvider != null) { sb.append("storePasswordProvider:"); sb.append(storePasswordProvider + ","); }
if (keyPasswordProvider != null) { sb.append("keyPasswordProvider:"); sb.append(keyPasswordProvider + ","); }
if (storeType != null) { sb.append("storeType:"); sb.append(storeType); }
sb.append("}");
return sb.toString();
}
protected static VisitableBuilder builder(Object item) {
switch (item.getClass().getName()) {
case "io.kroxylicious.proxy.config.secret."+"InlinePassword": return (VisitableBuilder)new InlinePasswordBuilder((InlinePassword) item);
case "io.kroxylicious.proxy.config.secret."+"FilePassword": return (VisitableBuilder)new FilePasswordBuilder((FilePassword) item);
}
return (VisitableBuilder)builderOf(item);
}
public class InlinePasswordStoreProviderNested extends InlinePasswordFluent> implements Nested{
InlinePasswordStoreProviderNested(InlinePassword item) {
this.builder = new InlinePasswordBuilder(this, item);
}
InlinePasswordBuilder builder;
public N and() {
return (N) KeyStoreFluent.this.withStorePasswordProvider(builder.build());
}
public N endInlinePasswordStoreProvider() {
return and();
}
}
public class FilePasswordStoreProviderNested extends FilePasswordFluent> implements Nested{
FilePasswordStoreProviderNested(FilePassword item) {
this.builder = new FilePasswordBuilder(this, item);
}
FilePasswordBuilder builder;
public N and() {
return (N) KeyStoreFluent.this.withStorePasswordProvider(builder.build());
}
public N endFilePasswordStoreProvider() {
return and();
}
}
public class InlinePasswordKeyProviderNested extends InlinePasswordFluent> implements Nested{
InlinePasswordKeyProviderNested(InlinePassword item) {
this.builder = new InlinePasswordBuilder(this, item);
}
InlinePasswordBuilder builder;
public N and() {
return (N) KeyStoreFluent.this.withKeyPasswordProvider(builder.build());
}
public N endInlinePasswordKeyProvider() {
return and();
}
}
public class FilePasswordKeyProviderNested extends FilePasswordFluent> implements Nested{
FilePasswordKeyProviderNested(FilePassword item) {
this.builder = new FilePasswordBuilder(this, item);
}
FilePasswordBuilder builder;
public N and() {
return (N) KeyStoreFluent.this.withKeyPasswordProvider(builder.build());
}
public N endFilePasswordKeyProvider() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy