forked from TrueCloudLab/frostfs-sdk-java
61 lines
1.8 KiB
Java
61 lines
1.8 KiB
Java
package info.frostfs.sdk.jdo;
|
|
|
|
import info.frostfs.sdk.annotations.AtLeastOneIsFilled;
|
|
import info.frostfs.sdk.annotations.ComplexAtLeastOneIsFilled;
|
|
import io.grpc.ChannelCredentials;
|
|
import io.grpc.ManagedChannel;
|
|
import lombok.Getter;
|
|
import lombok.experimental.FieldNameConstants;
|
|
|
|
import java.io.File;
|
|
|
|
@Getter
|
|
@FieldNameConstants
|
|
@ComplexAtLeastOneIsFilled(value = {
|
|
@AtLeastOneIsFilled(fields = {ClientSettings.Fields.host, ClientSettings.Fields.channel}),
|
|
@AtLeastOneIsFilled(fields = {ClientSettings.Fields.wif, ClientSettings.Fields.wallet}),
|
|
})
|
|
public class ClientSettings {
|
|
|
|
private String wif;
|
|
private File wallet;
|
|
private String password;
|
|
private String host;
|
|
private ChannelCredentials credentials;
|
|
private ManagedChannel channel;
|
|
|
|
public ClientSettings(String wif, String host) {
|
|
this.wif = wif;
|
|
this.host = host;
|
|
}
|
|
|
|
public ClientSettings(String wif, String host, ChannelCredentials credentials) {
|
|
this.wif = wif;
|
|
this.host = host;
|
|
this.credentials = credentials;
|
|
}
|
|
|
|
public ClientSettings(String wif, ManagedChannel channel) {
|
|
this.wif = wif;
|
|
this.channel = channel;
|
|
}
|
|
|
|
public ClientSettings(File wallet, String password, String host) {
|
|
this.wallet = wallet;
|
|
this.password = password;
|
|
this.host = host;
|
|
}
|
|
|
|
public ClientSettings(File wallet, String password, String host, ChannelCredentials credentials) {
|
|
this.wallet = wallet;
|
|
this.password = password;
|
|
this.host = host;
|
|
this.credentials = credentials;
|
|
}
|
|
|
|
public ClientSettings(File wallet, String password, ManagedChannel channel) {
|
|
this.wallet = wallet;
|
|
this.password = password;
|
|
this.channel = channel;
|
|
}
|
|
}
|