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

org.appng.api.rest.model.Datasource 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.Element;
import org.appng.api.rest.model.Field;
import org.appng.api.rest.model.Filter;
import org.appng.api.rest.model.Link;
import org.appng.api.rest.model.Message;
import org.appng.api.rest.model.Page;
import org.appng.api.rest.model.Parameter;
import org.appng.api.rest.model.Permission;
import org.appng.api.rest.model.User;
import java.io.Serializable;

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

  @JsonProperty("id")
  private String id = null;

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

  @JsonProperty("user")
  private User user = null;

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

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

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

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

  @JsonProperty("page")
  private Page page = null;

  @JsonProperty("element")
  private Element element = null;

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

  public Datasource id(String id) {
    this.id = id;
    return this;
  }

   /**
   * The unique ID of the datasource.
   * @return id
  **/
  @ApiModelProperty(required = true, value = "The unique ID of the datasource.")
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }

  public Datasource parameters(List parameters) {
    this.parameters = parameters;
    return this;
  }

  public Datasource addParametersItem(Parameter parametersItem) {
    if (this.parameters == null) {
      this.parameters = new ArrayList();
    }
    this.parameters.add(parametersItem);
    return this;
  }

   /**
   * The parameters for the datasource.
   * @return parameters
  **/
  @ApiModelProperty(value = "The parameters for the datasource.")
  public List getParameters() {
    return parameters;
  }

  public void setParameters(List parameters) {
    this.parameters = parameters;
  }

  public Datasource user(User user) {
    this.user = user;
    return this;
  }

   /**
   * The current user.
   * @return user
  **/
  @ApiModelProperty(value = "The current user.")
  public User getUser() {
    return user;
  }

  public void setUser(User user) {
    this.user = user;
  }

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

  public Datasource 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;
  }

  public Datasource messages(List messages) {
    this.messages = messages;
    return this;
  }

  public Datasource addMessagesItem(Message messagesItem) {
    if (this.messages == null) {
      this.messages = new ArrayList();
    }
    this.messages.add(messagesItem);
    return this;
  }

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

  public void setMessages(List messages) {
    this.messages = messages;
  }

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

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

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

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

  public Datasource filters(List filters) {
    this.filters = filters;
    return this;
  }

  public Datasource addFiltersItem(Filter filtersItem) {
    if (this.filters == null) {
      this.filters = new ArrayList();
    }
    this.filters.add(filtersItem);
    return this;
  }

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

  public void setFilters(List filters) {
    this.filters = filters;
  }

  public Datasource page(Page page) {
    this.page = page;
    return this;
  }

   /**
   * A page of elements.
   * @return page
  **/
  @ApiModelProperty(value = "A page of elements.")
  public Page getPage() {
    return page;
  }

  public void setPage(Page page) {
    this.page = page;
  }

  public Datasource element(Element element) {
    this.element = element;
    return this;
  }

   /**
   * A single element.
   * @return element
  **/
  @ApiModelProperty(value = "A single element.")
  public Element getElement() {
    return element;
  }

  public void setElement(Element element) {
    this.element = element;
  }

  public Datasource permissions(List permissions) {
    this.permissions = permissions;
    return this;
  }

  public Datasource addPermissionsItem(Permission permissionsItem) {
    if (this.permissions == null) {
      this.permissions = new ArrayList();
    }
    this.permissions.add(permissionsItem);
    return this;
  }

   /**
   * The permissions for this datasource.
   * @return permissions
  **/
  @ApiModelProperty(value = "The permissions for this datasource.")
  public List getPermissions() {
    return permissions;
  }

  public void setPermissions(List permissions) {
    this.permissions = permissions;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Datasource datasource = (Datasource) o;
    return Objects.equals(this.id, datasource.id) &&
        Objects.equals(this.parameters, datasource.parameters) &&
        Objects.equals(this.user, datasource.user) &&
        Objects.equals(this.links, datasource.links) &&
        Objects.equals(this.messages, datasource.messages) &&
        Objects.equals(this.fields, datasource.fields) &&
        Objects.equals(this.filters, datasource.filters) &&
        Objects.equals(this.page, datasource.page) &&
        Objects.equals(this.element, datasource.element) &&
        Objects.equals(this.permissions, datasource.permissions);
  }

  @Override
  public int hashCode() {
    return Objects.hash(id, parameters, user, links, messages, fields, filters, page, element, permissions);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Datasource {\n");
    
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    parameters: ").append(toIndentedString(parameters)).append("\n");
    sb.append("    user: ").append(toIndentedString(user)).append("\n");
    sb.append("    links: ").append(toIndentedString(links)).append("\n");
    sb.append("    messages: ").append(toIndentedString(messages)).append("\n");
    sb.append("    fields: ").append(toIndentedString(fields)).append("\n");
    sb.append("    filters: ").append(toIndentedString(filters)).append("\n");
    sb.append("    page: ").append(toIndentedString(page)).append("\n");
    sb.append("    element: ").append(toIndentedString(element)).append("\n");
    sb.append("    permissions: ").append(toIndentedString(permissions)).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