io.github.algomaster99.terminator.commons.cyclonedx.Source Maven / Gradle / Ivy
package io.github.algomaster99.terminator.commons.cyclonedx;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
/**
* Source
*
* The source of the issue where it is documented
*
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"name",
"url"
})
@Generated("jsonschema2pojo")
public class Source {
/**
* Name
*
* The name of the source. For example 'National Vulnerability Database', 'NVD', and 'Apache'
*
*/
@JsonProperty("name")
@JsonPropertyDescription("The name of the source. For example 'National Vulnerability Database', 'NVD', and 'Apache'")
private String name;
/**
* URL
*
* The url of the issue documentation as provided by the source
*
*/
@JsonProperty("url")
@JsonPropertyDescription("The url of the issue documentation as provided by the source")
private String url;
/**
* Name
*
* The name of the source. For example 'National Vulnerability Database', 'NVD', and 'Apache'
*
*/
@JsonProperty("name")
public String getName() {
return name;
}
/**
* Name
*
* The name of the source. For example 'National Vulnerability Database', 'NVD', and 'Apache'
*
*/
@JsonProperty("name")
public void setName(String name) {
this.name = name;
}
/**
* URL
*
* The url of the issue documentation as provided by the source
*
*/
@JsonProperty("url")
public String getUrl() {
return url;
}
/**
* URL
*
* The url of the issue documentation as provided by the source
*
*/
@JsonProperty("url")
public void setUrl(String url) {
this.url = url;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(Source.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("name");
sb.append('=');
sb.append(((this.name == null)?"":this.name));
sb.append(',');
sb.append("url");
sb.append('=');
sb.append(((this.url == null)?"":this.url));
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.name == null)? 0 :this.name.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 Source) == false) {
return false;
}
Source rhs = ((Source) other);
return (((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.url == rhs.url)||((this.url!= null)&&this.url.equals(rhs.url))));
}
}