summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2024-10-25 18:58:30 +0200
committercyberta <cyberta@riseup.net>2024-12-11 00:09:34 +0000
commitfd23349bde57ba083b3a98c065bc944a0f500c49 (patch)
treea088e269bcedcdb68cb77e49f8111ddd48d2b411 /app/src/main
parentd39906d0111a44aca40da352f992d6e4519b9d68 (diff)
add build script to generate Java swagger client code. Also adding the generated code itself
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/io/swagger/client/JSON.java398
-rw-r--r--app/src/main/java/io/swagger/client/model/ModelsBridge.java405
-rw-r--r--app/src/main/java/io/swagger/client/model/ModelsEIPService.java197
-rw-r--r--app/src/main/java/io/swagger/client/model/ModelsGateway.java348
-rw-r--r--app/src/main/java/io/swagger/client/model/ModelsProvider.java584
-rw-r--r--app/src/main/java/io/swagger/client/model/ModelsProviderService.java65
6 files changed, 1997 insertions, 0 deletions
diff --git a/app/src/main/java/io/swagger/client/JSON.java b/app/src/main/java/io/swagger/client/JSON.java
new file mode 100644
index 00000000..9be3f542
--- /dev/null
+++ b/app/src/main/java/io/swagger/client/JSON.java
@@ -0,0 +1,398 @@
+/*
+ * Menshen API
+ * This is a LEAP VPN Service API
+ *
+ * OpenAPI spec version: 0.5.2
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package io.swagger.client;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonParseException;
+import com.google.gson.TypeAdapter;
+import com.google.gson.internal.bind.util.ISO8601Utils;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import com.google.gson.JsonElement;
+import io.gsonfire.GsonFireBuilder;
+import io.gsonfire.TypeSelector;
+import org.threeten.bp.LocalDate;
+import org.threeten.bp.OffsetDateTime;
+import org.threeten.bp.format.DateTimeFormatter;
+
+import io.swagger.client.model.*;
+import io.swagger.client.model.*;
+import io.swagger.client.model.*;
+import io.swagger.client.model.*;
+import io.swagger.client.model.*;
+import okio.ByteString;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.lang.reflect.Type;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.ParsePosition;
+import java.util.Date;
+import java.util.Map;
+import java.util.HashMap;
+
+public class JSON {
+ private Gson gson;
+ private boolean isLenientOnJson = false;
+ private DateTypeAdapter dateTypeAdapter = new DateTypeAdapter();
+ private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter();
+ private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
+ private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
+ private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter();
+
+ public static GsonBuilder createGson() {
+ GsonFireBuilder fireBuilder = new GsonFireBuilder()
+ ;
+ GsonBuilder builder = fireBuilder.createGsonBuilder();
+ return builder;
+ }
+
+ private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
+ JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
+ if(null == element) {
+ throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">");
+ }
+ return element.getAsString();
+ }
+
+ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
+ Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase());
+ if(null == clazz) {
+ throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">");
+ }
+ return clazz;
+ }
+
+ public JSON() {
+ gson = createGson()
+ .registerTypeAdapter(Date.class, dateTypeAdapter)
+ .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
+ .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
+ .registerTypeAdapter(LocalDate.class, localDateTypeAdapter)
+ .registerTypeAdapter(byte[].class, byteArrayAdapter)
+ .create();
+ }
+
+ /**
+ * Get Gson.
+ *
+ * @return Gson
+ */
+ public Gson getGson() {
+ return gson;
+ }
+
+ /**
+ * Set Gson.
+ *
+ * @param gson Gson
+ * @return JSON
+ */
+ public JSON setGson(Gson gson) {
+ this.gson = gson;
+ return this;
+ }
+
+ public JSON setLenientOnJson(boolean lenientOnJson) {
+ isLenientOnJson = lenientOnJson;
+ return this;
+ }
+
+ /**
+ * Serialize the given Java object into JSON string.
+ *
+ * @param obj Object
+ * @return String representation of the JSON
+ */
+ public String serialize(Object obj) {
+ return gson.toJson(obj);
+ }
+
+ /**
+ * Deserialize the given JSON string to Java object.
+ *
+ * @param <T> Type
+ * @param body The JSON string
+ * @param returnType The type to deserialize into
+ * @return The deserialized Java object
+ */
+ @SuppressWarnings("unchecked")
+ public <T> T deserialize(String body, Type returnType) {
+ try {
+ if (isLenientOnJson) {
+ JsonReader jsonReader = new JsonReader(new StringReader(body));
+ // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean)
+ jsonReader.setLenient(true);
+ return gson.fromJson(jsonReader, returnType);
+ } else {
+ return gson.fromJson(body, returnType);
+ }
+ } catch (JsonParseException e) {
+ // Fallback processing when failed to parse JSON form response body:
+ // return the response body string directly for the String return type;
+ if (returnType.equals(String.class))
+ return (T) body;
+ else throw (e);
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for Byte Array type
+ */
+ public class ByteArrayAdapter extends TypeAdapter<byte[]> {
+
+ @Override
+ public void write(JsonWriter out, byte[] value) throws IOException {
+ if (value == null) {
+ out.nullValue();
+ } else {
+ out.value(ByteString.of(value).base64());
+ }
+ }
+
+ @Override
+ public byte[] read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String bytesAsBase64 = in.nextString();
+ ByteString byteString = ByteString.decodeBase64(bytesAsBase64);
+ return byteString.toByteArray();
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for JSR310 OffsetDateTime type
+ */
+ public static class OffsetDateTimeTypeAdapter extends TypeAdapter<OffsetDateTime> {
+
+ private DateTimeFormatter formatter;
+
+ public OffsetDateTimeTypeAdapter() {
+ this(DateTimeFormatter.ISO_OFFSET_DATE_TIME);
+ }
+
+ public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) {
+ this.formatter = formatter;
+ }
+
+ public void setFormat(DateTimeFormatter dateFormat) {
+ this.formatter = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, OffsetDateTime date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ out.value(formatter.format(date));
+ }
+ }
+
+ @Override
+ public OffsetDateTime read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ if (date.endsWith("+0000")) {
+ date = date.substring(0, date.length()-5) + "Z";
+ }
+ return OffsetDateTime.parse(date, formatter);
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for JSR310 LocalDate type
+ */
+ public class LocalDateTypeAdapter extends TypeAdapter<LocalDate> {
+
+ private DateTimeFormatter formatter;
+
+ public LocalDateTypeAdapter() {
+ this(DateTimeFormatter.ISO_LOCAL_DATE);
+ }
+
+ public LocalDateTypeAdapter(DateTimeFormatter formatter) {
+ this.formatter = formatter;
+ }
+
+ public void setFormat(DateTimeFormatter dateFormat) {
+ this.formatter = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, LocalDate date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ out.value(formatter.format(date));
+ }
+ }
+
+ @Override
+ public LocalDate read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ return LocalDate.parse(date, formatter);
+ }
+ }
+ }
+
+ public JSON setOffsetDateTimeFormat(DateTimeFormatter dateFormat) {
+ offsetDateTimeTypeAdapter.setFormat(dateFormat);
+ return this;
+ }
+
+ public JSON setLocalDateFormat(DateTimeFormatter dateFormat) {
+ localDateTypeAdapter.setFormat(dateFormat);
+ return this;
+ }
+
+ /**
+ * Gson TypeAdapter for java.sql.Date type
+ * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used
+ * (more efficient than SimpleDateFormat).
+ */
+ public static class SqlDateTypeAdapter extends TypeAdapter<java.sql.Date> {
+
+ private DateFormat dateFormat;
+
+ public SqlDateTypeAdapter() {
+ }
+
+ public SqlDateTypeAdapter(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ public void setFormat(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, java.sql.Date date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ String value;
+ if (dateFormat != null) {
+ value = dateFormat.format(date);
+ } else {
+ value = date.toString();
+ }
+ out.value(value);
+ }
+ }
+
+ @Override
+ public java.sql.Date read(JsonReader in) throws IOException {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return new java.sql.Date(dateFormat.parse(date).getTime());
+ }
+ return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime());
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ }
+ }
+
+ /**
+ * Gson TypeAdapter for java.util.Date type
+ * If the dateFormat is null, ISO8601Utils will be used.
+ */
+ public static class DateTypeAdapter extends TypeAdapter<Date> {
+
+ private DateFormat dateFormat;
+
+ public DateTypeAdapter() {
+ }
+
+ public DateTypeAdapter(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ public void setFormat(DateFormat dateFormat) {
+ this.dateFormat = dateFormat;
+ }
+
+ @Override
+ public void write(JsonWriter out, Date date) throws IOException {
+ if (date == null) {
+ out.nullValue();
+ } else {
+ String value;
+ if (dateFormat != null) {
+ value = dateFormat.format(date);
+ } else {
+ value = ISO8601Utils.format(date, true);
+ }
+ out.value(value);
+ }
+ }
+
+ @Override
+ public Date read(JsonReader in) throws IOException {
+ try {
+ switch (in.peek()) {
+ case NULL:
+ in.nextNull();
+ return null;
+ default:
+ String date = in.nextString();
+ try {
+ if (dateFormat != null) {
+ return dateFormat.parse(date);
+ }
+ return ISO8601Utils.parse(date, new ParsePosition(0));
+ } catch (ParseException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ } catch (IllegalArgumentException e) {
+ throw new JsonParseException(e);
+ }
+ }
+ }
+
+ public JSON setDateFormat(DateFormat dateFormat) {
+ dateTypeAdapter.setFormat(dateFormat);
+ return this;
+ }
+
+ public JSON setSqlDateFormat(DateFormat dateFormat) {
+ sqlDateTypeAdapter.setFormat(dateFormat);
+ return this;
+ }
+
+}
diff --git a/app/src/main/java/io/swagger/client/model/ModelsBridge.java b/app/src/main/java/io/swagger/client/model/ModelsBridge.java
new file mode 100644
index 00000000..3110bf30
--- /dev/null
+++ b/app/src/main/java/io/swagger/client/model/ModelsBridge.java
@@ -0,0 +1,405 @@
+/*
+ * Menshen API
+ * This is a LEAP VPN Service API
+ *
+ * OpenAPI spec version: 0.5.2
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ModelsBridge
+ */
+
+public class ModelsBridge {
+ @SerializedName("auth")
+ private String auth = null;
+
+ @SerializedName("bucket")
+ private String bucket = null;
+
+ @SerializedName("experimental")
+ private Boolean experimental = null;
+
+ @SerializedName("healthy")
+ private Boolean healthy = null;
+
+ @SerializedName("host")
+ private String host = null;
+
+ @SerializedName("ip_addr")
+ private String ipAddr = null;
+
+ @SerializedName("ip6_addr")
+ private String ip6Addr = null;
+
+ @SerializedName("load")
+ private BigDecimal load = null;
+
+ @SerializedName("location")
+ private String location = null;
+
+ @SerializedName("options")
+ private Map<String, Object> options = null;
+
+ @SerializedName("overloaded")
+ private Boolean overloaded = null;
+
+ @SerializedName("port")
+ private Integer port = null;
+
+ @SerializedName("transport")
+ private String transport = null;
+
+ @SerializedName("type")
+ private String type = null;
+
+ public ModelsBridge auth(String auth) {
+ this.auth = auth;
+ return this;
+ }
+
+ /**
+ * Any authentication method needed for connect to the bridge, &#x60;none&#x60; otherwise.
+ * @return auth
+ **/
+ @ApiModelProperty(value = "Any authentication method needed for connect to the bridge, `none` otherwise.")
+ public String getAuth() {
+ return auth;
+ }
+
+ public void setAuth(String auth) {
+ this.auth = auth;
+ }
+
+ public ModelsBridge bucket(String bucket) {
+ this.bucket = bucket;
+ return this;
+ }
+
+ /**
+ * Bucket is a \&quot;bucket\&quot; tag that connotes a resource group that a user may or may not have access to. An empty bucket string implies that it is open access
+ * @return bucket
+ **/
+ @ApiModelProperty(value = "Bucket is a \"bucket\" tag that connotes a resource group that a user may or may not have access to. An empty bucket string implies that it is open access")
+ public String getBucket() {
+ return bucket;
+ }
+
+ public void setBucket(String bucket) {
+ this.bucket = bucket;
+ }
+
+ public ModelsBridge experimental(Boolean experimental) {
+ this.experimental = experimental;
+ return this;
+ }
+
+ /**
+ * An experimental bridge flags any bridge that, for whatever reason, is not deemed stable. The expectation is that clients have to opt-in to experimental bridges (and gateways too).
+ * @return experimental
+ **/
+ @ApiModelProperty(value = "An experimental bridge flags any bridge that, for whatever reason, is not deemed stable. The expectation is that clients have to opt-in to experimental bridges (and gateways too).")
+ public Boolean isExperimental() {
+ return experimental;
+ }
+
+ public void setExperimental(Boolean experimental) {
+ this.experimental = experimental;
+ }
+
+ public ModelsBridge healthy(Boolean healthy) {
+ this.healthy = healthy;
+ return this;
+ }
+
+ /**
+ * Healthy indicates whether this bridge can be used normally.
+ * @return healthy
+ **/
+ @ApiModelProperty(value = "Healthy indicates whether this bridge can be used normally.")
+ public Boolean isHealthy() {
+ return healthy;
+ }
+
+ public void setHealthy(Boolean healthy) {
+ this.healthy = healthy;
+ }
+
+ public ModelsBridge host(String host) {
+ this.host = host;
+ return this;
+ }
+
+ /**
+ * Host is a unique identifier for the bridge.
+ * @return host
+ **/
+ @ApiModelProperty(value = "Host is a unique identifier for the bridge.")
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public ModelsBridge ipAddr(String ipAddr) {
+ this.ipAddr = ipAddr;
+ return this;
+ }
+
+ /**
+ * IPAddr is the IPv4 address
+ * @return ipAddr
+ **/
+ @ApiModelProperty(value = "IPAddr is the IPv4 address")
+ public String getIpAddr() {
+ return ipAddr;
+ }
+
+ public void setIpAddr(String ipAddr) {
+ this.ipAddr = ipAddr;
+ }
+
+ public ModelsBridge ip6Addr(String ip6Addr) {
+ this.ip6Addr = ip6Addr;
+ return this;
+ }
+
+ /**
+ * IP6Addr is the IPv6 address
+ * @return ip6Addr
+ **/
+ @ApiModelProperty(value = "IP6Addr is the IPv6 address")
+ public String getIp6Addr() {
+ return ip6Addr;
+ }
+
+ public void setIp6Addr(String ip6Addr) {
+ this.ip6Addr = ip6Addr;
+ }
+
+ public ModelsBridge load(BigDecimal load) {
+ this.load = load;
+ return this;
+ }
+
+ /**
+ * Load is the fractional load - but for now menshen agent is not measuring load in the bridges.
+ * @return load
+ **/
+ @ApiModelProperty(value = "Load is the fractional load - but for now menshen agent is not measuring load in the bridges.")
+ public BigDecimal getLoad() {
+ return load;
+ }
+
+ public void setLoad(BigDecimal load) {
+ this.load = load;
+ }
+
+ public ModelsBridge location(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Location refers to the location to which this bridge points to
+ * @return location
+ **/
+ @ApiModelProperty(value = "Location refers to the location to which this bridge points to")
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ public ModelsBridge options(Map<String, Object> options) {
+ this.options = options;
+ return this;
+ }
+
+ public ModelsBridge putOptionsItem(String key, Object optionsItem) {
+ if (this.options == null) {
+ this.options = new HashMap<String, Object>();
+ }
+ this.options.put(key, optionsItem);
+ return this;
+ }
+
+ /**
+ * Options contain the map of options that will be passed to the client. It usually contains authentication credentials.
+ * @return options
+ **/
+ @ApiModelProperty(value = "Options contain the map of options that will be passed to the client. It usually contains authentication credentials.")
+ public Map<String, Object> getOptions() {
+ return options;
+ }
+
+ public void setOptions(Map<String, Object> options) {
+ this.options = options;
+ }
+
+ public ModelsBridge overloaded(Boolean overloaded) {
+ this.overloaded = overloaded;
+ return this;
+ }
+
+ /**
+ * Overloaded should be set to true if the fractional load is above threshold.
+ * @return overloaded
+ **/
+ @ApiModelProperty(value = "Overloaded should be set to true if the fractional load is above threshold.")
+ public Boolean isOverloaded() {
+ return overloaded;
+ }
+
+ public void setOverloaded(Boolean overloaded) {
+ this.overloaded = overloaded;
+ }
+
+ public ModelsBridge port(Integer port) {
+ this.port = port;
+ return this;
+ }
+
+ /**
+ * For some protocols (like hopping) port is undefined.
+ * @return port
+ **/
+ @ApiModelProperty(value = "For some protocols (like hopping) port is undefined.")
+ public Integer getPort() {
+ return port;
+ }
+
+ public void setPort(Integer port) {
+ this.port = port;
+ }
+
+ public ModelsBridge transport(String transport) {
+ this.transport = transport;
+ return this;
+ }
+
+ /**
+ * TCP, UDP or KCP. This was called \&quot;protocol\&quot; before.
+ * @return transport
+ **/
+ @ApiModelProperty(value = "TCP, UDP or KCP. This was called \"protocol\" before.")
+ public String getTransport() {
+ return transport;
+ }
+
+ public void setTransport(String transport) {
+ this.transport = transport;
+ }
+
+ public ModelsBridge type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Type of bridge.
+ * @return type
+ **/
+ @ApiModelProperty(value = "Type of bridge.")
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ModelsBridge modelsBridge = (ModelsBridge) o;
+ return Objects.equals(this.auth, modelsBridge.auth) &&
+ Objects.equals(this.bucket, modelsBridge.bucket) &&
+ Objects.equals(this.experimental, modelsBridge.experimental) &&
+ Objects.equals(this.healthy, modelsBridge.healthy) &&
+ Objects.equals(this.host, modelsBridge.host) &&
+ Objects.equals(this.ipAddr, modelsBridge.ipAddr) &&
+ Objects.equals(this.ip6Addr, modelsBridge.ip6Addr) &&
+ Objects.equals(this.load, modelsBridge.load) &&
+ Objects.equals(this.location, modelsBridge.location) &&
+ Objects.equals(this.options, modelsBridge.options) &&
+ Objects.equals(this.overloaded, modelsBridge.overloaded) &&
+ Objects.equals(this.port, modelsBridge.port) &&
+ Objects.equals(this.transport, modelsBridge.transport) &&
+ Objects.equals(this.type, modelsBridge.type);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(auth, bucket, experimental, healthy, host, ipAddr, ip6Addr, load, location, options, overloaded, port, transport, type);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ModelsBridge {\n");
+
+ sb.append(" auth: ").append(toIndentedString(auth)).append("\n");
+ sb.append(" bucket: ").append(toIndentedString(bucket)).append("\n");
+ sb.append(" experimental: ").append(toIndentedString(experimental)).append("\n");
+ sb.append(" healthy: ").append(toIndentedString(healthy)).append("\n");
+ sb.append(" host: ").append(toIndentedString(host)).append("\n");
+ sb.append(" ipAddr: ").append(toIndentedString(ipAddr)).append("\n");
+ sb.append(" ip6Addr: ").append(toIndentedString(ip6Addr)).append("\n");
+ sb.append(" load: ").append(toIndentedString(load)).append("\n");
+ sb.append(" location: ").append(toIndentedString(location)).append("\n");
+ sb.append(" options: ").append(toIndentedString(options)).append("\n");
+ sb.append(" overloaded: ").append(toIndentedString(overloaded)).append("\n");
+ sb.append(" port: ").append(toIndentedString(port)).append("\n");
+ sb.append(" transport: ").append(toIndentedString(transport)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/app/src/main/java/io/swagger/client/model/ModelsEIPService.java b/app/src/main/java/io/swagger/client/model/ModelsEIPService.java
new file mode 100644
index 00000000..f9796f71
--- /dev/null
+++ b/app/src/main/java/io/swagger/client/model/ModelsEIPService.java
@@ -0,0 +1,197 @@
+/*
+ * Menshen API
+ * This is a LEAP VPN Service API
+ *
+ * OpenAPI spec version: 0.5.2
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ModelsEIPService
+ */
+
+public class ModelsEIPService {
+ @SerializedName("auth")
+ private String auth = null;
+
+ @SerializedName("locations")
+ private Object locations = null;
+
+ @SerializedName("openvpn_configuration")
+ private Map<String, Object> openvpnConfiguration = null;
+
+ @SerializedName("serial")
+ private Integer serial = null;
+
+ @SerializedName("version")
+ private Integer version = null;
+
+ public ModelsEIPService auth(String auth) {
+ this.auth = auth;
+ return this;
+ }
+
+ /**
+ * Get auth
+ * @return auth
+ **/
+ @ApiModelProperty(value = "")
+ public String getAuth() {
+ return auth;
+ }
+
+ public void setAuth(String auth) {
+ this.auth = auth;
+ }
+
+ public ModelsEIPService locations(Object locations) {
+ this.locations = locations;
+ return this;
+ }
+
+ /**
+ * Get locations
+ * @return locations
+ **/
+ @ApiModelProperty(value = "")
+ public Object getLocations() {
+ return locations;
+ }
+
+ public void setLocations(Object locations) {
+ this.locations = locations;
+ }
+
+ public ModelsEIPService openvpnConfiguration(Map<String, Object> openvpnConfiguration) {
+ this.openvpnConfiguration = openvpnConfiguration;
+ return this;
+ }
+
+ public ModelsEIPService putOpenvpnConfigurationItem(String key, Object openvpnConfigurationItem) {
+ if (this.openvpnConfiguration == null) {
+ this.openvpnConfiguration = new HashMap<String, Object>();
+ }
+ this.openvpnConfiguration.put(key, openvpnConfigurationItem);
+ return this;
+ }
+
+ /**
+ * Get openvpnConfiguration
+ * @return openvpnConfiguration
+ **/
+ @ApiModelProperty(value = "")
+ public Map<String, Object> getOpenvpnConfiguration() {
+ return openvpnConfiguration;
+ }
+
+ public void setOpenvpnConfiguration(Map<String, Object> openvpnConfiguration) {
+ this.openvpnConfiguration = openvpnConfiguration;
+ }
+
+ public ModelsEIPService serial(Integer serial) {
+ this.serial = serial;
+ return this;
+ }
+
+ /**
+ * Get serial
+ * @return serial
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getSerial() {
+ return serial;
+ }
+
+ public void setSerial(Integer serial) {
+ this.serial = serial;
+ }
+
+ public ModelsEIPService version(Integer version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get version
+ * @return version
+ **/
+ @ApiModelProperty(value = "")
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ModelsEIPService modelsEIPService = (ModelsEIPService) o;
+ return Objects.equals(this.auth, modelsEIPService.auth) &&
+ Objects.equals(this.locations, modelsEIPService.locations) &&
+ Objects.equals(this.openvpnConfiguration, modelsEIPService.openvpnConfiguration) &&
+ Objects.equals(this.serial, modelsEIPService.serial) &&
+ Objects.equals(this.version, modelsEIPService.version);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(auth, locations, openvpnConfiguration, serial, version);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ModelsEIPService {\n");
+
+ sb.append(" auth: ").append(toIndentedString(auth)).append("\n");
+ sb.append(" locations: ").append(toIndentedString(locations)).append("\n");
+ sb.append(" openvpnConfiguration: ").append(toIndentedString(openvpnConfiguration)).append("\n");
+ sb.append(" serial: ").append(toIndentedString(serial)).append("\n");
+ sb.append(" version: ").append(toIndentedString(version)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/app/src/main/java/io/swagger/client/model/ModelsGateway.java b/app/src/main/java/io/swagger/client/model/ModelsGateway.java
new file mode 100644
index 00000000..75cd7b43
--- /dev/null
+++ b/app/src/main/java/io/swagger/client/model/ModelsGateway.java
@@ -0,0 +1,348 @@
+/*
+ * Menshen API
+ * This is a LEAP VPN Service API
+ *
+ * OpenAPI spec version: 0.5.2
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.IOException;
+import java.math.BigDecimal;
+
+/**
+ * ModelsGateway
+ */
+
+public class ModelsGateway {
+ @SerializedName("bucket")
+ private String bucket = null;
+
+ @SerializedName("experimental")
+ private Boolean experimental = null;
+
+ @SerializedName("healthy")
+ private Boolean healthy = null;
+
+ @SerializedName("host")
+ private String host = null;
+
+ @SerializedName("ip_addr")
+ private String ipAddr = null;
+
+ @SerializedName("ip6_addr")
+ private String ip6Addr = null;
+
+ @SerializedName("load")
+ private BigDecimal load = null;
+
+ @SerializedName("location")
+ private String location = null;
+
+ @SerializedName("overloaded")
+ private Boolean overloaded = null;
+
+ @SerializedName("port")
+ private Integer port = null;
+
+ @SerializedName("transport")
+ private String transport = null;
+
+ @SerializedName("type")
+ private String type = null;
+
+ public ModelsGateway bucket(String bucket) {
+ this.bucket = bucket;
+ return this;
+ }
+
+ /**
+ * Bucket is a \&quot;bucket\&quot; tag that connotes a resource group that a user may or may not have access to. An empty bucket string implies that it is open access
+ * @return bucket
+ **/
+ @ApiModelProperty(value = "Bucket is a \"bucket\" tag that connotes a resource group that a user may or may not have access to. An empty bucket string implies that it is open access")
+ public String getBucket() {
+ return bucket;
+ }
+
+ public void setBucket(String bucket) {
+ this.bucket = bucket;
+ }
+
+ public ModelsGateway experimental(Boolean experimental) {
+ this.experimental = experimental;
+ return this;
+ }
+
+ /**
+ * An experimental gateway flags any gateway that, for whatever reason, is not deemed stable. The expectation is that clients have to opt-in to experimental gateways (and bridges too).
+ * @return experimental
+ **/
+ @ApiModelProperty(value = "An experimental gateway flags any gateway that, for whatever reason, is not deemed stable. The expectation is that clients have to opt-in to experimental gateways (and bridges too).")
+ public Boolean isExperimental() {
+ return experimental;
+ }
+
+ public void setExperimental(Boolean experimental) {
+ this.experimental = experimental;
+ }
+
+ public ModelsGateway healthy(Boolean healthy) {
+ this.healthy = healthy;
+ return this;
+ }
+
+ /**
+ * Not used now - we could potentially flag gateways that are planned to undergo maintenance mode some time in advance. We can also automatically flag as not healthy gateways that appear not to be routing to the internet.
+ * @return healthy
+ **/
+ @ApiModelProperty(value = "Not used now - we could potentially flag gateways that are planned to undergo maintenance mode some time in advance. We can also automatically flag as not healthy gateways that appear not to be routing to the internet.")
+ public Boolean isHealthy() {
+ return healthy;
+ }
+
+ public void setHealthy(Boolean healthy) {
+ this.healthy = healthy;
+ }
+
+ public ModelsGateway host(String host) {
+ this.host = host;
+ return this;
+ }
+
+ /**
+ * Host is a unique identifier for the gateway host. It does not need to resolve, since we&#39;re not using DNS to resolve the gateways.
+ * @return host
+ **/
+ @ApiModelProperty(value = "Host is a unique identifier for the gateway host. It does not need to resolve, since we're not using DNS to resolve the gateways.")
+ public String getHost() {
+ return host;
+ }
+
+ public void setHost(String host) {
+ this.host = host;
+ }
+
+ public ModelsGateway ipAddr(String ipAddr) {
+ this.ipAddr = ipAddr;
+ return this;
+ }
+
+ /**
+ * IPAddr is the IPv4 address
+ * @return ipAddr
+ **/
+ @ApiModelProperty(value = "IPAddr is the IPv4 address")
+ public String getIpAddr() {
+ return ipAddr;
+ }
+
+ public void setIpAddr(String ipAddr) {
+ this.ipAddr = ipAddr;
+ }
+
+ public ModelsGateway ip6Addr(String ip6Addr) {
+ this.ip6Addr = ip6Addr;
+ return this;
+ }
+
+ /**
+ * IP6Addr is the IPv6 address
+ * @return ip6Addr
+ **/
+ @ApiModelProperty(value = "IP6Addr is the IPv6 address")
+ public String getIp6Addr() {
+ return ip6Addr;
+ }
+
+ public void setIp6Addr(String ip6Addr) {
+ this.ip6Addr = ip6Addr;
+ }
+
+ public ModelsGateway load(BigDecimal load) {
+ this.load = load;
+ return this;
+ }
+
+ /**
+ * Load is the fractional load received from the menshen agent. For the time being it is a synthethic metric that takes into account number of clients and network information for the node.
+ * @return load
+ **/
+ @ApiModelProperty(value = "Load is the fractional load received from the menshen agent. For the time being it is a synthethic metric that takes into account number of clients and network information for the node.")
+ public BigDecimal getLoad() {
+ return load;
+ }
+
+ public void setLoad(BigDecimal load) {
+ this.load = load;
+ }
+
+ public ModelsGateway location(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Location is the canonical label for the location of the gateway.
+ * @return location
+ **/
+ @ApiModelProperty(value = "Location is the canonical label for the location of the gateway.")
+ public String getLocation() {
+ return location;
+ }
+
+ public void setLocation(String location) {
+ this.location = location;
+ }
+
+ public ModelsGateway overloaded(Boolean overloaded) {
+ this.overloaded = overloaded;
+ return this;
+ }
+
+ /**
+ * Overloaded should be set to true if the fractional load is above threshold.
+ * @return overloaded
+ **/
+ @ApiModelProperty(value = "Overloaded should be set to true if the fractional load is above threshold.")
+ public Boolean isOverloaded() {
+ return overloaded;
+ }
+
+ public void setOverloaded(Boolean overloaded) {
+ this.overloaded = overloaded;
+ }
+
+ public ModelsGateway port(Integer port) {
+ this.port = port;
+ return this;
+ }
+
+ /**
+ * The (primary) port this gateway is listening on.
+ * @return port
+ **/
+ @ApiModelProperty(value = "The (primary) port this gateway is listening on.")
+ public Integer getPort() {
+ return port;
+ }
+
+ public void setPort(Integer port) {
+ this.port = port;
+ }
+
+ public ModelsGateway transport(String transport) {
+ this.transport = transport;
+ return this;
+ }
+
+ /**
+ * TCP, UDP or KCP. This was called \&quot;protocol\&quot; in previous versions of the API.
+ * @return transport
+ **/
+ @ApiModelProperty(value = "TCP, UDP or KCP. This was called \"protocol\" in previous versions of the API.")
+ public String getTransport() {
+ return transport;
+ }
+
+ public void setTransport(String transport) {
+ this.transport = transport;
+ }
+
+ public ModelsGateway type(String type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Type is the type of gateway. The only valid type as of 2023 is openvpn.
+ * @return type
+ **/
+ @ApiModelProperty(value = "Type is the type of gateway. The only valid type as of 2023 is openvpn.")
+ public String getType() {
+ return type;
+ }
+
+ public void setType(String type) {
+ this.type = type;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ModelsGateway modelsGateway = (ModelsGateway) o;
+ return Objects.equals(this.bucket, modelsGateway.bucket) &&
+ Objects.equals(this.experimental, modelsGateway.experimental) &&
+ Objects.equals(this.healthy, modelsGateway.healthy) &&
+ Objects.equals(this.host, modelsGateway.host) &&
+ Objects.equals(this.ipAddr, modelsGateway.ipAddr) &&
+ Objects.equals(this.ip6Addr, modelsGateway.ip6Addr) &&
+ Objects.equals(this.load, modelsGateway.load) &&
+ Objects.equals(this.location, modelsGateway.location) &&
+ Objects.equals(this.overloaded, modelsGateway.overloaded) &&
+ Objects.equals(this.port, modelsGateway.port) &&
+ Objects.equals(this.transport, modelsGateway.transport) &&
+ Objects.equals(this.type, modelsGateway.type);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(bucket, experimental, healthy, host, ipAddr, ip6Addr, load, location, overloaded, port, transport, type);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ModelsGateway {\n");
+
+ sb.append(" bucket: ").append(toIndentedString(bucket)).append("\n");
+ sb.append(" experimental: ").append(toIndentedString(experimental)).append("\n");
+ sb.append(" healthy: ").append(toIndentedString(healthy)).append("\n");
+ sb.append(" host: ").append(toIndentedString(host)).append("\n");
+ sb.append(" ipAddr: ").append(toIndentedString(ipAddr)).append("\n");
+ sb.append(" ip6Addr: ").append(toIndentedString(ip6Addr)).append("\n");
+ sb.append(" load: ").append(toIndentedString(load)).append("\n");
+ sb.append(" location: ").append(toIndentedString(location)).append("\n");
+ sb.append(" overloaded: ").append(toIndentedString(overloaded)).append("\n");
+ sb.append(" port: ").append(toIndentedString(port)).append("\n");
+ sb.append(" transport: ").append(toIndentedString(transport)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/app/src/main/java/io/swagger/client/model/ModelsProvider.java b/app/src/main/java/io/swagger/client/model/ModelsProvider.java
new file mode 100644
index 00000000..34b54510
--- /dev/null
+++ b/app/src/main/java/io/swagger/client/model/ModelsProvider.java
@@ -0,0 +1,584 @@
+/*
+ * Menshen API
+ * This is a LEAP VPN Service API
+ *
+ * OpenAPI spec version: 0.5.2
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import com.google.gson.TypeAdapter;
+import com.google.gson.annotations.JsonAdapter;
+import com.google.gson.annotations.SerializedName;
+import com.google.gson.stream.JsonReader;
+import com.google.gson.stream.JsonWriter;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import io.swagger.client.model.ModelsProviderService;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * ModelsProvider
+ */
+
+public class ModelsProvider {
+ @SerializedName("api_uri")
+ private String apiUri = null;
+
+ @SerializedName("api_version")
+ private String apiVersion = null;
+
+ @SerializedName("api_versions")
+ private List<String> apiVersions = null;
+
+ @SerializedName("ask_for_donations")
+ private Boolean askForDonations = null;
+
+ @SerializedName("ca_cert_fingerprint")
+ private String caCertFingerprint = null;
+
+ @SerializedName("ca_cert_uri")
+ private String caCertUri = null;
+
+ @SerializedName("country_code_lookup_url")
+ private String countryCodeLookupUrl = null;
+
+ @SerializedName("default_language")
+ private String defaultLanguage = null;
+
+ @SerializedName("description")
+ private Map<String, String> description = null;
+
+ @SerializedName("domain")
+ private String domain = null;
+
+ @SerializedName("donate_period")
+ private String donatePeriod = null;
+
+ @SerializedName("donate_url")
+ private String donateUrl = null;
+
+ @SerializedName("info_url")
+ private String infoUrl = null;
+
+ @SerializedName("languages")
+ private List<String> languages = null;
+
+ @SerializedName("motd_url")
+ private String motdUrl = null;
+
+ @SerializedName("name")
+ private Map<String, String> name = null;
+
+ @SerializedName("service")
+ private ModelsProviderService service = null;
+
+ @SerializedName("services")
+ private List<String> services = null;
+
+ @SerializedName("stun_servers")
+ private List<String> stunServers = null;
+
+ @SerializedName("tos_url")
+ private String tosUrl = null;
+
+ public ModelsProvider apiUri(String apiUri) {
+ this.apiUri = apiUri;
+ return this;
+ }
+
+ /**
+ * URL of the API endpoints
+ * @return apiUri
+ **/
+ @ApiModelProperty(value = "URL of the API endpoints")
+ public String getApiUri() {
+ return apiUri;
+ }
+
+ public void setApiUri(String apiUri) {
+ this.apiUri = apiUri;
+ }
+
+ public ModelsProvider apiVersion(String apiVersion) {
+ this.apiVersion = apiVersion;
+ return this;
+ }
+
+ /**
+ * oldest supported api version deprecated: kept for backwards compatibility. Replaced by api_versions.
+ * @return apiVersion
+ **/
+ @ApiModelProperty(value = "oldest supported api version deprecated: kept for backwards compatibility. Replaced by api_versions.")
+ public String getApiVersion() {
+ return apiVersion;
+ }
+
+ public void setApiVersion(String apiVersion) {
+ this.apiVersion = apiVersion;
+ }
+
+ public ModelsProvider apiVersions(List<String> apiVersions) {
+ this.apiVersions = apiVersions;
+ return this;
+ }
+
+ public ModelsProvider addApiVersionsItem(String apiVersionsItem) {
+ if (this.apiVersions == null) {
+ this.apiVersions = new ArrayList<String>();
+ }
+ this.apiVersions.add(apiVersionsItem);
+ return this;
+ }
+
+ /**
+ * all API versions the provider supports
+ * @return apiVersions
+ **/
+ @ApiModelProperty(value = "all API versions the provider supports")
+ public List<String> getApiVersions() {
+ return apiVersions;
+ }
+
+ public void setApiVersions(List<String> apiVersions) {
+ this.apiVersions = apiVersions;
+ }
+
+ public ModelsProvider askForDonations(Boolean askForDonations) {
+ this.askForDonations = askForDonations;
+ return this;
+ }
+
+ /**
+ * Flag indicating whether to show regularly a donation reminder
+ * @return askForDonations
+ **/
+ @ApiModelProperty(value = "Flag indicating whether to show regularly a donation reminder")
+ public Boolean isAskForDonations() {
+ return askForDonations;
+ }
+
+ public void setAskForDonations(Boolean askForDonations) {
+ this.askForDonations = askForDonations;
+ }
+
+ public ModelsProvider caCertFingerprint(String caCertFingerprint) {
+ this.caCertFingerprint = caCertFingerprint;
+ return this;
+ }
+
+ /**
+ * fingerprint of CA cert used to setup TLS sessions during VPN setup (and up to API version 3 for API communication) deprecated: kept for backwards compatibility
+ * @return caCertFingerprint
+ **/
+ @ApiModelProperty(value = "fingerprint of CA cert used to setup TLS sessions during VPN setup (and up to API version 3 for API communication) deprecated: kept for backwards compatibility")
+ public String getCaCertFingerprint() {
+ return caCertFingerprint;
+ }
+
+ public void setCaCertFingerprint(String caCertFingerprint) {
+ this.caCertFingerprint = caCertFingerprint;
+ }
+
+ public ModelsProvider caCertUri(String caCertUri) {
+ this.caCertUri = caCertUri;
+ return this;
+ }
+
+ /**
+ * URL to fetch the CA cert used to setup TLS sessions during VPN setup (and up to API version 3 for API communication) deprecated: kept for backwards compatibility
+ * @return caCertUri
+ **/
+ @ApiModelProperty(value = "URL to fetch the CA cert used to setup TLS sessions during VPN setup (and up to API version 3 for API communication) deprecated: kept for backwards compatibility")
+ public String getCaCertUri() {
+ return caCertUri;
+ }
+
+ public void setCaCertUri(String caCertUri) {
+ this.caCertUri = caCertUri;
+ }
+
+ public ModelsProvider countryCodeLookupUrl(String countryCodeLookupUrl) {
+ this.countryCodeLookupUrl = countryCodeLookupUrl;
+ return this;
+ }
+
+ /**
+ * URL of a service that returns a country code for an ip address. If empty, OONI backend is used
+ * @return countryCodeLookupUrl
+ **/
+ @ApiModelProperty(value = "URL of a service that returns a country code for an ip address. If empty, OONI backend is used")
+ public String getCountryCodeLookupUrl() {
+ return countryCodeLookupUrl;
+ }
+
+ public void setCountryCodeLookupUrl(String countryCodeLookupUrl) {
+ this.countryCodeLookupUrl = countryCodeLookupUrl;
+ }
+
+ public ModelsProvider defaultLanguage(String defaultLanguage) {
+ this.defaultLanguage = defaultLanguage;
+ return this;
+ }
+
+ /**
+ * Default language this provider uses to show infos and provider messages
+ * @return defaultLanguage
+ **/
+ @ApiModelProperty(value = "Default language this provider uses to show infos and provider messages")
+ public String getDefaultLanguage() {
+ return defaultLanguage;
+ }
+
+ public void setDefaultLanguage(String defaultLanguage) {
+ this.defaultLanguage = defaultLanguage;
+ }
+
+ public ModelsProvider description(Map<String, String> description) {
+ this.description = description;
+ return this;
+ }
+
+ public ModelsProvider putDescriptionItem(String key, String descriptionItem) {
+ if (this.description == null) {
+ this.description = new HashMap<String, String>();
+ }
+ this.description.put(key, descriptionItem);
+ return this;
+ }
+
+ /**
+ * Short description about the provider
+ * @return description
+ **/
+ @ApiModelProperty(value = "Short description about the provider")
+ public Map<String, String> getDescription() {
+ return description;
+ }
+
+ public void setDescription(Map<String, String> description) {
+ this.description = description;
+ }
+
+ public ModelsProvider domain(String domain) {
+ this.domain = domain;
+ return this;
+ }
+
+ /**
+ * Domain of the provider
+ * @return domain
+ **/
+ @ApiModelProperty(value = "Domain of the provider")
+ public String getDomain() {
+ return domain;
+ }
+
+ public void setDomain(String domain) {
+ this.domain = domain;
+ }
+
+ public ModelsProvider donatePeriod(String donatePeriod) {
+ this.donatePeriod = donatePeriod;
+ return this;
+ }
+
+ /**
+ * Number of days until a donation reminder reappears
+ * @return donatePeriod
+ **/
+ @ApiModelProperty(value = "Number of days until a donation reminder reappears")
+ public String getDonatePeriod() {
+ return donatePeriod;
+ }
+
+ public void setDonatePeriod(String donatePeriod) {
+ this.donatePeriod = donatePeriod;
+ }
+
+ public ModelsProvider donateUrl(String donateUrl) {
+ this.donateUrl = donateUrl;
+ return this;
+ }
+
+ /**
+ * URL to the donation website
+ * @return donateUrl
+ **/
+ @ApiModelProperty(value = "URL to the donation website")
+ public String getDonateUrl() {
+ return donateUrl;
+ }
+
+ public void setDonateUrl(String donateUrl) {
+ this.donateUrl = donateUrl;
+ }
+
+ public ModelsProvider infoUrl(String infoUrl) {
+ this.infoUrl = infoUrl;
+ return this;
+ }
+
+ /**
+ * URL to general provider website
+ * @return infoUrl
+ **/
+ @ApiModelProperty(value = "URL to general provider website")
+ public String getInfoUrl() {
+ return infoUrl;
+ }
+
+ public void setInfoUrl(String infoUrl) {
+ this.infoUrl = infoUrl;
+ }
+
+ public ModelsProvider languages(List<String> languages) {
+ this.languages = languages;
+ return this;
+ }
+
+ public ModelsProvider addLanguagesItem(String languagesItem) {
+ if (this.languages == null) {
+ this.languages = new ArrayList<String>();
+ }
+ this.languages.add(languagesItem);
+ return this;
+ }
+
+ /**
+ * Languages the provider supports to show infos and provider messages
+ * @return languages
+ **/
+ @ApiModelProperty(value = "Languages the provider supports to show infos and provider messages")
+ public List<String> getLanguages() {
+ return languages;
+ }
+
+ public void setLanguages(List<String> languages) {
+ this.languages = languages;
+ }
+
+ public ModelsProvider motdUrl(String motdUrl) {
+ this.motdUrl = motdUrl;
+ return this;
+ }
+
+ /**
+ * URL to the message of the day service
+ * @return motdUrl
+ **/
+ @ApiModelProperty(value = "URL to the message of the day service")
+ public String getMotdUrl() {
+ return motdUrl;
+ }
+
+ public void setMotdUrl(String motdUrl) {
+ this.motdUrl = motdUrl;
+ }
+
+ public ModelsProvider name(Map<String, String> name) {
+ this.name = name;
+ return this;
+ }
+
+ public ModelsProvider putNameItem(String key, String nameItem) {
+ if (this.name == null) {
+ this.name = new HashMap<String, String>();
+ }
+ this.name.put(key, nameItem);
+ return this;
+ }
+
+ /**
+ * Provider name
+ * @return name
+ **/
+ @ApiModelProperty(value = "Provider name")
+ public Map<String, String> getName() {
+ return name;
+ }
+
+ public void setName(Map<String, String> name) {
+ this.name = name;
+ }
+
+ public ModelsProvider service(ModelsProviderService service) {
+ this.service = service;
+ return this;
+ }
+
+ /**
+ * Get service
+ * @return service
+ **/
+ @ApiModelProperty(value = "")
+ public ModelsProviderService getService() {
+ return service;
+ }
+
+ public void setService(ModelsProviderService service) {
+ this.service = service;
+ }
+
+ public ModelsProvider services(List<String> services) {
+ this.services = services;
+ return this;
+ }
+
+ public ModelsProvider addServicesItem(String servicesItem) {
+ if (this.services == null) {
+ this.services = new ArrayList<String>();
+ }
+ this.services.add(servicesItem);
+ return this;
+ }
+
+ /**
+ * List of services the provider offers, currently only openvpn
+ * @return services
+ **/
+ @ApiModelProperty(value = "List of services the provider offers, currently only openvpn")
+ public List<String> getServices() {
+ return services;
+ }
+
+ public void setServices(List<String> services) {
+ this.services = services;
+ }
+
+ public ModelsProvider stunServers(List<String> stunServers) {
+ this.stunServers = stunServers;
+ return this;
+ }
+
+ public ModelsProvider addStunServersItem(String stunServersItem) {
+ if (this.stunServers == null) {
+ this.stunServers = new ArrayList<String>();
+ }
+ this.stunServers.add(stunServersItem);
+ return this;
+ }
+
+ /**
+ * list of STUN servers (format: ip/hostname:port) servers to get current ip address can consist of self hosted STUN servers, public ones or a combination of both. GeolocationLookup is only done when the list of STUNServers is not empty
+ * @return stunServers
+ **/
+ @ApiModelProperty(value = "list of STUN servers (format: ip/hostname:port) servers to get current ip address can consist of self hosted STUN servers, public ones or a combination of both. GeolocationLookup is only done when the list of STUNServers is not empty")
+ public List<String> getStunServers() {
+ return stunServers;
+ }
+
+ public void setStunServers(List<String> stunServers) {
+ this.stunServers = stunServers;
+ }
+
+ public ModelsProvider tosUrl(String tosUrl) {
+ this.tosUrl = tosUrl;
+ return this;
+ }
+
+ /**
+ * URL to Terms of Service website
+ * @return tosUrl
+ **/
+ @ApiModelProperty(value = "URL to Terms of Service website")
+ public String getTosUrl() {
+ return tosUrl;
+ }
+
+ public void setTosUrl(String tosUrl) {
+ this.tosUrl = tosUrl;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ModelsProvider modelsProvider = (ModelsProvider) o;
+ return Objects.equals(this.apiUri, modelsProvider.apiUri) &&
+ Objects.equals(this.apiVersion, modelsProvider.apiVersion) &&
+ Objects.equals(this.apiVersions, modelsProvider.apiVersions) &&
+ Objects.equals(this.askForDonations, modelsProvider.askForDonations) &&
+ Objects.equals(this.caCertFingerprint, modelsProvider.caCertFingerprint) &&
+ Objects.equals(this.caCertUri, modelsProvider.caCertUri) &&
+ Objects.equals(this.countryCodeLookupUrl, modelsProvider.countryCodeLookupUrl) &&
+ Objects.equals(this.defaultLanguage, modelsProvider.defaultLanguage) &&
+ Objects.equals(this.description, modelsProvider.description) &&
+ Objects.equals(this.domain, modelsProvider.domain) &&
+ Objects.equals(this.donatePeriod, modelsProvider.donatePeriod) &&
+ Objects.equals(this.donateUrl, modelsProvider.donateUrl) &&
+ Objects.equals(this.infoUrl, modelsProvider.infoUrl) &&
+ Objects.equals(this.languages, modelsProvider.languages) &&
+ Objects.equals(this.motdUrl, modelsProvider.motdUrl) &&
+ Objects.equals(this.name, modelsProvider.name) &&
+ Objects.equals(this.service, modelsProvider.service) &&
+ Objects.equals(this.services, modelsProvider.services) &&
+ Objects.equals(this.stunServers, modelsProvider.stunServers) &&
+ Objects.equals(this.tosUrl, modelsProvider.tosUrl);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(apiUri, apiVersion, apiVersions, askForDonations, caCertFingerprint, caCertUri, countryCodeLookupUrl, defaultLanguage, description, domain, donatePeriod, donateUrl, infoUrl, languages, motdUrl, name, service, services, stunServers, tosUrl);
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ModelsProvider {\n");
+
+ sb.append(" apiUri: ").append(toIndentedString(apiUri)).append("\n");
+ sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n");
+ sb.append(" apiVersions: ").append(toIndentedString(apiVersions)).append("\n");
+ sb.append(" askForDonations: ").append(toIndentedString(askForDonations)).append("\n");
+ sb.append(" caCertFingerprint: ").append(toIndentedString(caCertFingerprint)).append("\n");
+ sb.append(" caCertUri: ").append(toIndentedString(caCertUri)).append("\n");
+ sb.append(" countryCodeLookupUrl: ").append(toIndentedString(countryCodeLookupUrl)).append("\n");
+ sb.append(" defaultLanguage: ").append(toIndentedString(defaultLanguage)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" domain: ").append(toIndentedString(domain)).append("\n");
+ sb.append(" donatePeriod: ").append(toIndentedString(donatePeriod)).append("\n");
+ sb.append(" donateUrl: ").append(toIndentedString(donateUrl)).append("\n");
+ sb.append(" infoUrl: ").append(toIndentedString(infoUrl)).append("\n");
+ sb.append(" languages: ").append(toIndentedString(languages)).append("\n");
+ sb.append(" motdUrl: ").append(toIndentedString(motdUrl)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" service: ").append(toIndentedString(service)).append("\n");
+ sb.append(" services: ").append(toIndentedString(services)).append("\n");
+ sb.append(" stunServers: ").append(toIndentedString(stunServers)).append("\n");
+ sb.append(" tosUrl: ").append(toIndentedString(tosUrl)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+
diff --git a/app/src/main/java/io/swagger/client/model/ModelsProviderService.java b/app/src/main/java/io/swagger/client/model/ModelsProviderService.java
new file mode 100644
index 00000000..7edf78c3
--- /dev/null
+++ b/app/src/main/java/io/swagger/client/model/ModelsProviderService.java
@@ -0,0 +1,65 @@
+/*
+ * Menshen API
+ * This is a LEAP VPN Service API
+ *
+ * OpenAPI spec version: 0.5.2
+ *
+ *
+ * NOTE: This class is auto generated by the swagger code generator program.
+ * https://github.com/swagger-api/swagger-codegen.git
+ * Do not edit the class manually.
+ */
+
+
+package io.swagger.client.model;
+
+import java.util.Objects;
+import java.util.Arrays;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * Operational properties which describe how the provider offers the service
+ */
+@ApiModel(description = "Operational properties which describe how the provider offers the service")
+
+public class ModelsProviderService {
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash();
+ }
+
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ModelsProviderService {\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+
+}
+