blob: 2eb792ba58b4c7d8bc06ac6abdc9933ab961f14e [file] [log] [blame]
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 org.apache.nifi.registry.extension.bundle;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotBlank;
import java.util.Objects;
@ApiModel
public class BundleVersionDependency {
@NotBlank
private String groupId;
@NotBlank
private String artifactId;
@NotBlank
private String version;
@ApiModelProperty(value = "The group id of the bundle dependency")
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
@ApiModelProperty(value = "The artifact id of the bundle dependency")
public String getArtifactId() {
return artifactId;
}
public void setArtifactId(String artifactId) {
this.artifactId = artifactId;
}
@ApiModelProperty(value = "The version of the bundle dependency")
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
@Override
public int hashCode() {
return Objects.hash(groupId, artifactId, version);
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final BundleVersionDependency other = (BundleVersionDependency) obj;
return Objects.equals(groupId, other.groupId)
&& Objects.equals(artifactId, other.artifactId)
&& Objects.equals(version, other.version);
}
}