/*
 * ThingPark things management Devices API
 * REST interface for Devices management. 
 *
 * The version of the OpenAPI document: 7.3
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package lora.ns.actility.api.model.appserver;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

/**
 * AppServerKafka
 */
@JsonPropertyOrder({ AppServerKafka.JSON_PROPERTY_DESTINATIONS, AppServerKafka.JSON_PROPERTY_FLOW_MATCHER_TAGS,
    AppServerKafka.JSON_PROPERTY_NOTIFICATION, AppServerKafka.JSON_PROPERTY_TPX_IOT_FLOW })
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-05-29T11:38:36.048437806+02:00[Europe/Paris]", comments = "Generator version: 7.6.0")
public class AppServerKafka {
  public static final String JSON_PROPERTY_DESTINATIONS = "destinations";
  private List<AppServerKafkaDestination> destinations = new ArrayList<>();

  public static final String JSON_PROPERTY_FLOW_MATCHER_TAGS = "flowMatcherTags";
  private List<String> flowMatcherTags = new ArrayList<>();

  public static final String JSON_PROPERTY_NOTIFICATION = "notification";
  private AppServerKafkaNotification notification;

  public static final String JSON_PROPERTY_TPX_IOT_FLOW = "tpxIotFlow";
  private TpxIotFlow tpxIotFlow;

  public AppServerKafka() {
  }

  public AppServerKafka destinations(List<AppServerKafkaDestination> destinations) {

    this.destinations = destinations;
    return this;
  }

  public AppServerKafka addDestinationsItem(AppServerKafkaDestination destinationsItem) {
    if (this.destinations == null) {
      this.destinations = new ArrayList<>();
    }
    this.destinations.add(destinationsItem);
    return this;
  }

  /**
   * Application Server destination
   * 
   * @return destinations
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_DESTINATIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<AppServerKafkaDestination> getDestinations() {
    return destinations;
  }

  @JsonProperty(JSON_PROPERTY_DESTINATIONS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setDestinations(List<AppServerKafkaDestination> destinations) {
    this.destinations = destinations;
  }

  public AppServerKafka flowMatcherTags(List<String> flowMatcherTags) {

    this.flowMatcherTags = flowMatcherTags;
    return this;
  }

  public AppServerKafka addFlowMatcherTagsItem(String flowMatcherTagsItem) {
    if (this.flowMatcherTags == null) {
      this.flowMatcherTags = new ArrayList<>();
    }
    this.flowMatcherTags.add(flowMatcherTagsItem);
    return this;
  }

  /**
   * IoT Flow matcher tags defined at Application Server level. When defined at
   * both Device level and Application Server level, the Device level information
   * has precedence over Application Server level information.
   * 
   * @return flowMatcherTags
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_FLOW_MATCHER_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getFlowMatcherTags() {
    return flowMatcherTags;
  }

  @JsonProperty(JSON_PROPERTY_FLOW_MATCHER_TAGS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setFlowMatcherTags(List<String> flowMatcherTags) {
    this.flowMatcherTags = flowMatcherTags;
  }

  public AppServerKafka notification(AppServerKafkaNotification notification) {

    this.notification = notification;
    return this;
  }

  /**
   * Get notification
   * 
   * @return notification
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_NOTIFICATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public AppServerKafkaNotification getNotification() {
    return notification;
  }

  @JsonProperty(JSON_PROPERTY_NOTIFICATION)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setNotification(AppServerKafkaNotification notification) {
    this.notification = notification;
  }

  public AppServerKafka tpxIotFlow(TpxIotFlow tpxIotFlow) {

    this.tpxIotFlow = tpxIotFlow;
    return this;
  }

  /**
   * Get tpxIotFlow
   * 
   * @return tpxIotFlow
   **/
  @javax.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_TPX_IOT_FLOW)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public TpxIotFlow getTpxIotFlow() {
    return tpxIotFlow;
  }

  @JsonProperty(JSON_PROPERTY_TPX_IOT_FLOW)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setTpxIotFlow(TpxIotFlow tpxIotFlow) {
    this.tpxIotFlow = tpxIotFlow;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    AppServerKafka appServerKafka = (AppServerKafka) o;
    return Objects.equals(this.destinations, appServerKafka.destinations)
            && Objects.equals(this.flowMatcherTags, appServerKafka.flowMatcherTags)
            && Objects.equals(this.notification, appServerKafka.notification)
            && Objects.equals(this.tpxIotFlow, appServerKafka.tpxIotFlow);
  }

  @Override
  public int hashCode() {
    return Objects.hash(destinations, flowMatcherTags, notification, tpxIotFlow);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class AppServerKafka {\n");
    sb.append("    destinations: ").append(toIndentedString(destinations)).append("\n");
    sb.append("    flowMatcherTags: ").append(toIndentedString(flowMatcherTags)).append("\n");
    sb.append("    notification: ").append(toIndentedString(notification)).append("\n");
    sb.append("    tpxIotFlow: ").append(toIndentedString(tpxIotFlow)).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    ");
  }

}
