/*
 * 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 java.util.ArrayList;
import java.util.List;
import org.appng.openapi.model.Action;
import org.appng.openapi.model.NavigationItem;
import org.appng.openapi.model.User;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
 * Navigation
 */
@JsonPropertyOrder({
  Navigation.JSON_PROPERTY_USER,
  Navigation.JSON_PROPERTY_ITEMS,
  Navigation.JSON_PROPERTY_LOGIN_ACTION,
  Navigation.JSON_PROPERTY_APP_N_G_VERSION
})
@JsonTypeName("Navigation")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-03-20T12:57:48.851+01:00[Europe/Berlin]")
public class Navigation {
  public static final String JSON_PROPERTY_USER = "user";
  private User user;

  public static final String JSON_PROPERTY_ITEMS = "items";
  private List<NavigationItem> items = null;

  public static final String JSON_PROPERTY_LOGIN_ACTION = "loginAction";
  private Action loginAction;

  public static final String JSON_PROPERTY_APP_N_G_VERSION = "appNGVersion";
  private String appNGVersion = null;


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

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

  public User getUser() {
    return user;
  }


  @JsonProperty(JSON_PROPERTY_USER)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setUser(User user) {
    this.user = user;
  }


  public Navigation items(List<NavigationItem> items) {
    
    this.items = items;
    return this;
  }

  public Navigation addItemsItem(NavigationItem itemsItem) {
    if (this.items == null) {
      this.items = new ArrayList<>();
    }
    this.items.add(itemsItem);
    return this;
  }

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

  public List<NavigationItem> getItems() {
    return items;
  }


  @JsonProperty(JSON_PROPERTY_ITEMS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setItems(List<NavigationItem> items) {
    this.items = items;
  }


  public Navigation loginAction(Action loginAction) {
    
    this.loginAction = loginAction;
    return this;
  }

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

  public Action getLoginAction() {
    return loginAction;
  }


  @JsonProperty(JSON_PROPERTY_LOGIN_ACTION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setLoginAction(Action loginAction) {
    this.loginAction = loginAction;
  }


  public Navigation appNGVersion(String appNGVersion) {
    
    this.appNGVersion = appNGVersion;
    return this;
  }

   /**
   * The version of appNG
   * @return appNGVersion
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The version of appNG")
  @JsonProperty(JSON_PROPERTY_APP_N_G_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public String getAppNGVersion() {
    return appNGVersion;
  }


  @JsonProperty(JSON_PROPERTY_APP_N_G_VERSION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAppNGVersion(String appNGVersion) {
    this.appNGVersion = appNGVersion;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Navigation navigation = (Navigation) o;
    return Objects.equals(this.user, navigation.user) &&
        Objects.equals(this.items, navigation.items) &&
        Objects.equals(this.loginAction, navigation.loginAction) &&
        Objects.equals(this.appNGVersion, navigation.appNGVersion);
  }

  @Override
  public int hashCode() {
    return Objects.hash(user, items, loginAction, appNGVersion);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Navigation {\n");
    sb.append("    user: ").append(toIndentedString(user)).append("\n");
    sb.append("    items: ").append(toIndentedString(items)).append("\n");
    sb.append("    loginAction: ").append(toIndentedString(loginAction)).append("\n");
    sb.append("    appNGVersion: ").append(toIndentedString(appNGVersion)).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    ");
  }

}

