/*
 * appNG REST API
 * The REST API for appNG
 *
 * The version of the OpenAPI document: 1.0.0
 * Contact: matthias.mueller@appng.org
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.appng.openapi.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.appng.openapi.model.Action;
import org.appng.openapi.model.Datasource;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
 * SectionElement
 */
@JsonPropertyOrder({
  SectionElement.JSON_PROPERTY_TITLE,
  SectionElement.JSON_PROPERTY_COLLAPSED,
  SectionElement.JSON_PROPERTY_DATASOURCE,
  SectionElement.JSON_PROPERTY_ACTION
})
@JsonTypeName("SectionElement")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-09-06T11:11:26.226947+02:00[Europe/Berlin]")
public class SectionElement {
  public static final String JSON_PROPERTY_TITLE = "title";
  private String title;

  public static final String JSON_PROPERTY_COLLAPSED = "collapsed";
  private Boolean collapsed;

  public static final String JSON_PROPERTY_DATASOURCE = "datasource";
  private Datasource datasource;

  public static final String JSON_PROPERTY_ACTION = "action";
  private Action action;


  public SectionElement title(String title) {
    
    this.title = title;
    return this;
  }

   /**
   * Get title
   * @return title
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_TITLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getTitle() {
    return title;
  }


  @JsonProperty(JSON_PROPERTY_TITLE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTitle(String title) {
    this.title = title;
  }


  public SectionElement collapsed(Boolean collapsed) {
    
    this.collapsed = collapsed;
    return this;
  }

   /**
   * Whether the element is collapsed
   * @return collapsed
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Whether the element is collapsed")
  @JsonProperty(JSON_PROPERTY_COLLAPSED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Boolean getCollapsed() {
    return collapsed;
  }


  @JsonProperty(JSON_PROPERTY_COLLAPSED)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setCollapsed(Boolean collapsed) {
    this.collapsed = collapsed;
  }


  public SectionElement datasource(Datasource datasource) {
    
    this.datasource = datasource;
    return this;
  }

   /**
   * Get datasource
   * @return datasource
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_DATASOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Datasource getDatasource() {
    return datasource;
  }


  @JsonProperty(JSON_PROPERTY_DATASOURCE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDatasource(Datasource datasource) {
    this.datasource = datasource;
  }


  public SectionElement action(Action action) {
    
    this.action = action;
    return this;
  }

   /**
   * Get action
   * @return action
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")
  @JsonProperty(JSON_PROPERTY_ACTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public Action getAction() {
    return action;
  }


  @JsonProperty(JSON_PROPERTY_ACTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAction(Action action) {
    this.action = action;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    SectionElement sectionElement = (SectionElement) o;
    return Objects.equals(this.title, sectionElement.title) &&
        Objects.equals(this.collapsed, sectionElement.collapsed) &&
        Objects.equals(this.datasource, sectionElement.datasource) &&
        Objects.equals(this.action, sectionElement.action);
  }

  @Override
  public int hashCode() {
    return Objects.hash(title, collapsed, datasource, action);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class SectionElement {\n");
    sb.append("    title: ").append(toIndentedString(title)).append("\n");
    sb.append("    collapsed: ").append(toIndentedString(collapsed)).append("\n");
    sb.append("    datasource: ").append(toIndentedString(datasource)).append("\n");
    sb.append("    action: ").append(toIndentedString(action)).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(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

