io.federecio.dropwizard.swagger.SwaggerBundleConfiguration Maven / Gradle / Ivy
/**
* Copyright (C) 2014 Federico Recio
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.federecio.dropwizard.swagger;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author Tristan Burch
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class SwaggerBundleConfiguration {
@JsonProperty
private String host;
@JsonProperty
private Integer port = null;
public SwaggerBundleConfiguration(String host, Integer port) {
this.host = host;
this.port = port;
}
public SwaggerBundleConfiguration(String host) {
this.host = host;
}
public SwaggerBundleConfiguration(Integer port) {
this.port = port;
}
public SwaggerBundleConfiguration() {
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public Integer getPort() {
return port;
}
public void setPort(Integer port) {
this.port = port;
}
@Override
public String toString() {
return "SwaggerBundleConfiguration{" +
"host='" + host + '\'' +
", port=" + port +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SwaggerBundleConfiguration that = (SwaggerBundleConfiguration) o;
if (host != null ? !host.equals(that.host) : that.host != null) return false;
if (port != null ? !port.equals(that.port) : that.port != null) return false;
return true;
}
@Override
public int hashCode() {
int result = host != null ? host.hashCode() : 0;
result = 31 * result + (port != null ? port.hashCode() : 0);
return result;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy