com.blackducksoftware.integration.hub.model.ModelAndView 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.View;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* ModelAndView
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-02-02T14:22:10.992-05:00")
public class ModelAndView {
@SerializedName("empty")
private Boolean empty = null;
@SerializedName("model")
private Object model = null;
@SerializedName("modelMap")
private Map modelMap = new HashMap();
@SerializedName("reference")
private Boolean reference = null;
@SerializedName("view")
private View view = null;
@SerializedName("viewName")
private String viewName = null;
public ModelAndView empty(Boolean empty) {
this.empty = empty;
return this;
}
/**
* Get empty
* @return empty
**/
@ApiModelProperty(example = "null", value = "")
public Boolean getEmpty() {
return empty;
}
public void setEmpty(Boolean empty) {
this.empty = empty;
}
public ModelAndView model(Object model) {
this.model = model;
return this;
}
/**
* Get model
* @return model
**/
@ApiModelProperty(example = "null", value = "")
public Object getModel() {
return model;
}
public void setModel(Object model) {
this.model = model;
}
public ModelAndView modelMap(Map modelMap) {
this.modelMap = modelMap;
return this;
}
public ModelAndView putModelMapItem(String key, Object modelMapItem) {
this.modelMap.put(key, modelMapItem);
return this;
}
/**
* Get modelMap
* @return modelMap
**/
@ApiModelProperty(example = "null", value = "")
public Map getModelMap() {
return modelMap;
}
public void setModelMap(Map modelMap) {
this.modelMap = modelMap;
}
public ModelAndView reference(Boolean reference) {
this.reference = reference;
return this;
}
/**
* Get reference
* @return reference
**/
@ApiModelProperty(example = "null", value = "")
public Boolean getReference() {
return reference;
}
public void setReference(Boolean reference) {
this.reference = reference;
}
public ModelAndView view(View view) {
this.view = view;
return this;
}
/**
* Get view
* @return view
**/
@ApiModelProperty(example = "null", value = "")
public View getView() {
return view;
}
public void setView(View view) {
this.view = view;
}
public ModelAndView viewName(String viewName) {
this.viewName = viewName;
return this;
}
/**
* Get viewName
* @return viewName
**/
@ApiModelProperty(example = "null", value = "")
public String getViewName() {
return viewName;
}
public void setViewName(String viewName) {
this.viewName = viewName;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelAndView modelAndView = (ModelAndView) o;
return Objects.equals(this.empty, modelAndView.empty) &&
Objects.equals(this.model, modelAndView.model) &&
Objects.equals(this.modelMap, modelAndView.modelMap) &&
Objects.equals(this.reference, modelAndView.reference) &&
Objects.equals(this.view, modelAndView.view) &&
Objects.equals(this.viewName, modelAndView.viewName);
}
@Override
public int hashCode() {
return Objects.hash(empty, model, modelMap, reference, view, viewName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelAndView {\n");
sb.append(" empty: ").append(toIndentedString(empty)).append("\n");
sb.append(" model: ").append(toIndentedString(model)).append("\n");
sb.append(" modelMap: ").append(toIndentedString(modelMap)).append("\n");
sb.append(" reference: ").append(toIndentedString(reference)).append("\n");
sb.append(" view: ").append(toIndentedString(view)).append("\n");
sb.append(" viewName: ").append(toIndentedString(viewName)).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 ");
}
}