com.blackducksoftware.integration.hub.model.CodeLocationView Maven / Gradle / Ivy
/**
* hub-model-common
*
* Copyright (C) 2017 Black Duck Software, Inc.
* http://www.blackducksoftware.com/
*
* 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.
*/
/*
*
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
*
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.blackducksoftware.integration.hub.model;
import java.util.Objects;
import com.blackducksoftware.integration.hub.model.HubView;
import com.blackducksoftware.integration.hub.model.MetadataView;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime;
/**
* CodeLocationView
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-02-02T14:22:10.992-05:00")
public class CodeLocationView extends HubView {
@SerializedName("createdAt")
private DateTime createdAt = null;
@SerializedName("mappedProjectVersion")
private String mappedProjectVersion = null;
/**
* Location classification relating to where the source comes from
*/
public enum TypeEnum {
@SerializedName("SCM")
SCM("SCM"),
@SerializedName("FS")
FS("FS"),
@SerializedName("BOM_IMPORT")
BOM_IMPORT("BOM_IMPORT");
private String value;
TypeEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return String.valueOf(value);
}
}
@SerializedName("type")
private TypeEnum type = null;
@SerializedName("updatedAt")
private DateTime updatedAt = null;
@SerializedName("url")
private String url = null;
public CodeLocationView createdAt(DateTime createdAt) {
this.createdAt = createdAt;
return this;
}
/**
* The date/time the code location was created
* @return createdAt
**/
@ApiModelProperty(example = "null", value = "The date/time the code location was created")
public DateTime getCreatedAt() {
return createdAt;
}
public void setCreatedAt(DateTime createdAt) {
this.createdAt = createdAt;
}
public CodeLocationView mappedProjectVersion(String mappedProjectVersion) {
this.mappedProjectVersion = mappedProjectVersion;
return this;
}
/**
* URL specifying the version linked to the code location
* @return mappedProjectVersion
**/
@ApiModelProperty(example = "null", value = "URL specifying the version linked to the code location")
public String getMappedProjectVersion() {
return mappedProjectVersion;
}
public void setMappedProjectVersion(String mappedProjectVersion) {
this.mappedProjectVersion = mappedProjectVersion;
}
public CodeLocationView type(TypeEnum type) {
this.type = type;
return this;
}
/**
* Location classification relating to where the source comes from
* @return type
**/
@ApiModelProperty(example = "null", value = "Location classification relating to where the source comes from")
public TypeEnum getType() {
return type;
}
public void setType(TypeEnum type) {
this.type = type;
}
public CodeLocationView updatedAt(DateTime updatedAt) {
this.updatedAt = updatedAt;
return this;
}
/**
* The date/time the code location was last updated
* @return updatedAt
**/
@ApiModelProperty(example = "null", value = "The date/time the code location was last updated")
public DateTime getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(DateTime updatedAt) {
this.updatedAt = updatedAt;
}
public CodeLocationView url(String url) {
this.url = url;
return this;
}
/**
* URL describing the location of the source
* @return url
**/
@ApiModelProperty(example = "null", value = "URL describing the location of the source")
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CodeLocationView codeLocationView = (CodeLocationView) o;
return Objects.equals(this.createdAt, codeLocationView.createdAt) &&
Objects.equals(this.mappedProjectVersion, codeLocationView.mappedProjectVersion) &&
Objects.equals(this.type, codeLocationView.type) &&
Objects.equals(this.updatedAt, codeLocationView.updatedAt) &&
Objects.equals(this.url, codeLocationView.url) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(createdAt, mappedProjectVersion, type, updatedAt, url, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CodeLocationView {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" mappedProjectVersion: ").append(toIndentedString(mappedProjectVersion)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n");
sb.append(" url: ").append(toIndentedString(url)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}