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

net.leanix.webhooks.api.models.PullResult Maven / Gradle / Ivy

/*
 * LeanIX Webhooks REST API
 * Sends notifications on trigger events to subscribed observers
 *
 * OpenAPI spec version: 2.0.35-SNAPSHOT
 * 
 *
 * 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 net.leanix.webhooks.api.models;

import java.util.Objects;
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 net.leanix.webhooks.api.models.Cursor;
import net.leanix.webhooks.api.models.PullEvent;

/**
 * PullResult
 */

public class PullResult {
  @JsonProperty("events")
  private List events = null;

  @JsonProperty("nextCursor")
  private Cursor nextCursor = null;

  public PullResult events(List events) {
    this.events = events;
    return this;
  }

  public PullResult addEventsItem(PullEvent eventsItem) {
    if (this.events == null) {
      this.events = new ArrayList();
    }
    this.events.add(eventsItem);
    return this;
  }

   /**
   * Get events
   * @return events
  **/
  @ApiModelProperty(value = "")
  public List getEvents() {
    return events;
  }

  public void setEvents(List events) {
    this.events = events;
  }

  public PullResult nextCursor(Cursor nextCursor) {
    this.nextCursor = nextCursor;
    return this;
  }

   /**
   * Get nextCursor
   * @return nextCursor
  **/
  @ApiModelProperty(value = "")
  public Cursor getNextCursor() {
    return nextCursor;
  }

  public void setNextCursor(Cursor nextCursor) {
    this.nextCursor = nextCursor;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    PullResult pullResult = (PullResult) o;
    return Objects.equals(this.events, pullResult.events) &&
        Objects.equals(this.nextCursor, pullResult.nextCursor);
  }

  @Override
  public int hashCode() {
    return Objects.hash(events, nextCursor);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class PullResult {\n");
    
    sb.append("    events: ").append(toIndentedString(events)).append("\n");
    sb.append("    nextCursor: ").append(toIndentedString(nextCursor)).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 - 2025 Weber Informatics LLC | Privacy Policy