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

com.anaptecs.jeaf.openapi.Leg Maven / Gradle / Ivy

There is a newer version: 1.23.1
Show newest version
/*
 * Product Base Definitions
 * This component represents the Open API interface of the accounting service. 
 *
 * OpenAPI spec version: 0.0.1
 * 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 com.anaptecs.jeaf.openapi;

import java.util.Objects;
import java.util.Arrays;
import com.anaptecs.jeaf.openapi.PlaceRef;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
/**
 * Leg
 */


public class Leg {
  @JsonProperty("start")
  private PlaceRef start = null;

  @JsonProperty("stop")
  private PlaceRef stop = null;

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

  public Leg start(PlaceRef start) {
    this.start = start;
    return this;
  }

   /**
   * Get start
   * @return start
  **/
  @Schema(required = true, description = "")
  public PlaceRef getStart() {
    return start;
  }

  public void setStart(PlaceRef start) {
    this.start = start;
  }

  public Leg stop(PlaceRef stop) {
    this.stop = stop;
    return this;
  }

   /**
   * Get stop
   * @return stop
  **/
  @Schema(required = true, description = "")
  public PlaceRef getStop() {
    return stop;
  }

  public void setStop(PlaceRef stop) {
    this.stop = stop;
  }

  public Leg stopovers(List stopovers) {
    this.stopovers = stopovers;
    return this;
  }

  public Leg addStopoversItem(PlaceRef stopoversItem) {
    if (this.stopovers == null) {
      this.stopovers = new ArrayList<>();
    }
    this.stopovers.add(stopoversItem);
    return this;
  }

   /**
   * Get stopovers
   * @return stopovers
  **/
  @Schema(description = "")
  public List getStopovers() {
    return stopovers;
  }

  public void setStopovers(List stopovers) {
    this.stopovers = stopovers;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    Leg leg = (Leg) o;
    return Objects.equals(this.start, leg.start) &&
        Objects.equals(this.stop, leg.stop) &&
        Objects.equals(this.stopovers, leg.stopovers);
  }

  @Override
  public int hashCode() {
    return Objects.hash(start, stop, stopovers);
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class Leg {\n");
    
    sb.append("    start: ").append(toIndentedString(start)).append("\n");
    sb.append("    stop: ").append(toIndentedString(stop)).append("\n");
    sb.append("    stopovers: ").append(toIndentedString(stopovers)).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