package com.inspect.ivs.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class XinTongConfig {
    @Value("${xintong.url:http://172.21.101.146:5280}")
    private String url;

    public String getHost() {
        return this.url.split("//")[1];
    }

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof XinTongConfig)) {
            return false;
        } else {
            XinTongConfig other = (XinTongConfig) o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$url = this.getUrl();
                Object other$url = other.getUrl();
                if (this$url == null) {
                    if (other$url != null) {
                        return false;
                    }
                } else if (!this$url.equals(other$url)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof XinTongConfig;
    }

    public int hashCode() {
        int PRIME = 1;
        int result = 1;
        Object $url = this.getUrl();
        result = result * 59 + ($url == null ? 43 : $url.hashCode());
        return result;
    }

    public String toString() {
        return "XinTongConfig(url=" + this.getUrl() + ")";
    }
}
