All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.appng.api.rest.model.Element Maven / Gradle / Ivy

There is a newer version: 1.24.5
Show newest version
/*
 * appNG REST API
 * The REST API for appNG
 *
 * OpenAPI spec version: 1.0.0
 * Contact: [email protected]
 *
 * 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 org.appng.api.rest.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.appng.api.rest.model.FieldValue;
import org.appng.api.rest.model.Link;
import java.io.Serializable;

/**
 * A single element of a page.
 */
@ApiModel(description = "A single element of a page.")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-02-07T17:18:57.636+01:00")
public class Element implements Serializable {
  private static final long serialVersionUID = 1L;

  @JsonProperty("fields")
  private List fields = null;

  @JsonProperty("selected")
  private Boolean selected = null;

  @JsonProperty("links")
  private List links = null;

  public Element fields(List fields) {
    this.fields = fields;
    return this;
  }

  public Element addFieldsItem(FieldValue fieldsItem) {
    if (this.fields == null) {
      this.fields = new ArrayList();
    }
    this.fields.add(fieldsItem);
    return this;
  }

   /**
   * The list of field-values of the element.
   * @return fields
  **/
  @ApiModelProperty(value = "The list of field-values of the element.")
  public List getFields() {
    return fields;
  }

  public void setFields(List fields) {
    this.fields = fields;
  }

  public Element selected(Boolean selected) {
    this.selected = selected;
    return this;
  }

   /**
   * Whether this element is selected/active.
   * @return selected
  **/
  @ApiModelProperty(value = "Whether this element is selected/active.")
  public Boolean isSelected() {
    return selected;
  }

  public void setSelected(Boolean selected) {
    this.selected = selected;
  }

  public Element links(List links) {
    this.links = links;
    return this;
  }

  public Element addLinksItem(Link linksItem) {
    if (this.links == null) {
      this.links = new ArrayList();
    }
    this.links.add(linksItem);
    return this;
  }

   /**
   * A list of links.
   * @return links
  **/
  @ApiModelProperty(value = "A list of links.")
  public List getLinks() {
    return links;
  }

  public void setLinks(List links) {
    this.links = links;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Element element = (Element) o;
    return Objects.equals(this.fields, element.fields) &&
        Objects.equals(this.selected, element.selected) &&
        Objects.equals(this.links, element.links);
  }

  @Override
  public int hashCode() {
    return Objects.hash(fields, selected, links);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Element {\n");
    
    sb.append("    fields: ").append(toIndentedString(fields)).append("\n");
    sb.append("    selected: ").append(toIndentedString(selected)).append("\n");
    sb.append("    links: ").append(toIndentedString(links)).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    ");
  }

}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy