All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mobilitydata.gbfs.v3_0.manifest.GBFSVersion Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version

package org.mobilitydata.gbfs.v3_0.manifest;

import java.io.Serializable;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonValue;

@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
    "version",
    "url"
})
@Generated("jsonschema2pojo")
public class GBFSVersion implements Serializable
{

    /**
     * The semantic version of the feed in the form X.Y
     * (Required)
     * 
     */
    @JsonProperty("version")
    @JsonPropertyDescription("The semantic version of the feed in the form X.Y")
    private GBFSVersion.Version version;
    /**
     * URL of the corresponding gbfs.json endpoint
     * (Required)
     * 
     */
    @JsonProperty("url")
    @JsonPropertyDescription("URL of the corresponding gbfs.json endpoint")
    private String url;
    @JsonIgnore
    private Map additionalProperties = new LinkedHashMap();
    private final static long serialVersionUID = -5686274689609494474L;

    /**
     * The semantic version of the feed in the form X.Y
     * (Required)
     * 
     */
    @JsonProperty("version")
    public GBFSVersion.Version getVersion() {
        return version;
    }

    /**
     * The semantic version of the feed in the form X.Y
     * (Required)
     * 
     */
    @JsonProperty("version")
    public void setVersion(GBFSVersion.Version version) {
        this.version = version;
    }

    public GBFSVersion withVersion(GBFSVersion.Version version) {
        this.version = version;
        return this;
    }

    /**
     * URL of the corresponding gbfs.json endpoint
     * (Required)
     * 
     */
    @JsonProperty("url")
    public String getUrl() {
        return url;
    }

    /**
     * URL of the corresponding gbfs.json endpoint
     * (Required)
     * 
     */
    @JsonProperty("url")
    public void setUrl(String url) {
        this.url = url;
    }

    public GBFSVersion withUrl(String url) {
        this.url = url;
        return this;
    }

    @JsonAnyGetter
    public Map getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    public GBFSVersion withAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
        return this;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(GBFSVersion.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
        sb.append("version");
        sb.append('=');
        sb.append(((this.version == null)?"":this.version));
        sb.append(',');
        sb.append("url");
        sb.append('=');
        sb.append(((this.url == null)?"":this.url));
        sb.append(',');
        sb.append("additionalProperties");
        sb.append('=');
        sb.append(((this.additionalProperties == null)?"":this.additionalProperties));
        sb.append(',');
        if (sb.charAt((sb.length()- 1)) == ',') {
            sb.setCharAt((sb.length()- 1), ']');
        } else {
            sb.append(']');
        }
        return sb.toString();
    }

    @Override
    public int hashCode() {
        int result = 1;
        result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
        result = ((result* 31)+((this.version == null)? 0 :this.version.hashCode()));
        result = ((result* 31)+((this.url == null)? 0 :this.url.hashCode()));
        return result;
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof GBFSVersion) == false) {
            return false;
        }
        GBFSVersion rhs = ((GBFSVersion) other);
        return ((((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))&&((this.version == rhs.version)||((this.version!= null)&&this.version.equals(rhs.version))))&&((this.url == rhs.url)||((this.url!= null)&&this.url.equals(rhs.url))));
    }


    /**
     * The semantic version of the feed in the form X.Y
     * 
     */
    @Generated("jsonschema2pojo")
    public enum Version {

        _1_0("1.0"),
        _1_1("1.1"),
        _2_0("2.0"),
        _2_1("2.1"),
        _2_2("2.2"),
        _2_3("2.3"),
        _3_0("3.0");
        private final String value;
        private final static Map CONSTANTS = new HashMap();

        static {
            for (GBFSVersion.Version c: values()) {
                CONSTANTS.put(c.value, c);
            }
        }

        Version(String value) {
            this.value = value;
        }

        @Override
        public String toString() {
            return this.value;
        }

        @JsonValue
        public String value() {
            return this.value;
        }

        @JsonCreator
        public static GBFSVersion.Version fromValue(String value) {
            GBFSVersion.Version constant = CONSTANTS.get(value);
            if (constant == null) {
                throw new IllegalArgumentException(value);
            } else {
                return constant;
            }
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy