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

io.github.jfermat.strava.model.DetailedActivity Maven / Gradle / Ivy

/*
 * Strava API v3
 * The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with different endpoints depending on the authorization scope you receive from your athletes. To use the Playground, go to https://www.strava.com/settings/api and change your “Authorization Callback Domain” to developers.strava.com. Please note, we only support Swagger 2.0. There is a known issue where you can only select one scope at a time. For more information, please check the section “client code” at https://developers.strava.com/docs.
 *
 * OpenAPI spec version: 3.0.0
 * 
 *
 * 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 io.github.jfermat.strava.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.github.jfermat.strava.model.ActivityType;
import io.github.jfermat.strava.model.DetailedSegmentEffort;
import io.github.jfermat.strava.model.Lap;
import io.github.jfermat.strava.model.LatLng;
import io.github.jfermat.strava.model.MetaAthlete;
import io.github.jfermat.strava.model.PhotosSummary;
import io.github.jfermat.strava.model.PolylineMap;
import io.github.jfermat.strava.model.Split;
import io.github.jfermat.strava.model.SummaryActivity;
import io.github.jfermat.strava.model.SummaryGear;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
import org.threeten.bp.OffsetDateTime;
/**
 * DetailedActivity
 */


public class DetailedActivity extends SummaryActivity {
  @JsonProperty("description")
  private String description = null;

  @JsonProperty("photos")
  private PhotosSummary photos = null;

  @JsonProperty("gear")
  private SummaryGear gear = null;

  @JsonProperty("calories")
  private Float calories = null;

  @JsonProperty("segment_efforts")
  private List segmentEfforts = null;

  @JsonProperty("device_name")
  private String deviceName = null;

  @JsonProperty("embed_token")
  private String embedToken = null;

  @JsonProperty("splits_metric")
  private List splitsMetric = null;

  @JsonProperty("splits_standard")
  private List splitsStandard = null;

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

  @JsonProperty("best_efforts")
  private List bestEfforts = null;

  public DetailedActivity description(String description) {
    this.description = description;
    return this;
  }

   /**
   * The description of the activity
   * @return description
  **/
  @Schema(description = "The description of the activity")
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public DetailedActivity photos(PhotosSummary photos) {
    this.photos = photos;
    return this;
  }

   /**
   * Get photos
   * @return photos
  **/
  @Schema(description = "")
  public PhotosSummary getPhotos() {
    return photos;
  }

  public void setPhotos(PhotosSummary photos) {
    this.photos = photos;
  }

  public DetailedActivity gear(SummaryGear gear) {
    this.gear = gear;
    return this;
  }

   /**
   * Get gear
   * @return gear
  **/
  @Schema(description = "")
  public SummaryGear getGear() {
    return gear;
  }

  public void setGear(SummaryGear gear) {
    this.gear = gear;
  }

  public DetailedActivity calories(Float calories) {
    this.calories = calories;
    return this;
  }

   /**
   * The number of kilocalories consumed during this activity
   * @return calories
  **/
  @Schema(description = "The number of kilocalories consumed during this activity")
  public Float getCalories() {
    return calories;
  }

  public void setCalories(Float calories) {
    this.calories = calories;
  }

  public DetailedActivity segmentEfforts(List segmentEfforts) {
    this.segmentEfforts = segmentEfforts;
    return this;
  }

  public DetailedActivity addSegmentEffortsItem(DetailedSegmentEffort segmentEffortsItem) {
    if (this.segmentEfforts == null) {
      this.segmentEfforts = new ArrayList();
    }
    this.segmentEfforts.add(segmentEffortsItem);
    return this;
  }

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

  public void setSegmentEfforts(List segmentEfforts) {
    this.segmentEfforts = segmentEfforts;
  }

  public DetailedActivity deviceName(String deviceName) {
    this.deviceName = deviceName;
    return this;
  }

   /**
   * The name of the device used to record the activity
   * @return deviceName
  **/
  @Schema(description = "The name of the device used to record the activity")
  public String getDeviceName() {
    return deviceName;
  }

  public void setDeviceName(String deviceName) {
    this.deviceName = deviceName;
  }

  public DetailedActivity embedToken(String embedToken) {
    this.embedToken = embedToken;
    return this;
  }

   /**
   * The token used to embed a Strava activity
   * @return embedToken
  **/
  @Schema(description = "The token used to embed a Strava activity")
  public String getEmbedToken() {
    return embedToken;
  }

  public void setEmbedToken(String embedToken) {
    this.embedToken = embedToken;
  }

  public DetailedActivity splitsMetric(List splitsMetric) {
    this.splitsMetric = splitsMetric;
    return this;
  }

  public DetailedActivity addSplitsMetricItem(Split splitsMetricItem) {
    if (this.splitsMetric == null) {
      this.splitsMetric = new ArrayList();
    }
    this.splitsMetric.add(splitsMetricItem);
    return this;
  }

   /**
   * The splits of this activity in metric units (for runs)
   * @return splitsMetric
  **/
  @Schema(description = "The splits of this activity in metric units (for runs)")
  public List getSplitsMetric() {
    return splitsMetric;
  }

  public void setSplitsMetric(List splitsMetric) {
    this.splitsMetric = splitsMetric;
  }

  public DetailedActivity splitsStandard(List splitsStandard) {
    this.splitsStandard = splitsStandard;
    return this;
  }

  public DetailedActivity addSplitsStandardItem(Split splitsStandardItem) {
    if (this.splitsStandard == null) {
      this.splitsStandard = new ArrayList();
    }
    this.splitsStandard.add(splitsStandardItem);
    return this;
  }

   /**
   * The splits of this activity in imperial units (for runs)
   * @return splitsStandard
  **/
  @Schema(description = "The splits of this activity in imperial units (for runs)")
  public List getSplitsStandard() {
    return splitsStandard;
  }

  public void setSplitsStandard(List splitsStandard) {
    this.splitsStandard = splitsStandard;
  }

  public DetailedActivity laps(List laps) {
    this.laps = laps;
    return this;
  }

  public DetailedActivity addLapsItem(Lap lapsItem) {
    if (this.laps == null) {
      this.laps = new ArrayList();
    }
    this.laps.add(lapsItem);
    return this;
  }

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

  public void setLaps(List laps) {
    this.laps = laps;
  }

  public DetailedActivity bestEfforts(List bestEfforts) {
    this.bestEfforts = bestEfforts;
    return this;
  }

  public DetailedActivity addBestEffortsItem(DetailedSegmentEffort bestEffortsItem) {
    if (this.bestEfforts == null) {
      this.bestEfforts = new ArrayList();
    }
    this.bestEfforts.add(bestEffortsItem);
    return this;
  }

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

  public void setBestEfforts(List bestEfforts) {
    this.bestEfforts = bestEfforts;
  }


  @Override
  public boolean equals(java.lang.Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    DetailedActivity detailedActivity = (DetailedActivity) o;
    return Objects.equals(this.description, detailedActivity.description) &&
        Objects.equals(this.photos, detailedActivity.photos) &&
        Objects.equals(this.gear, detailedActivity.gear) &&
        Objects.equals(this.calories, detailedActivity.calories) &&
        Objects.equals(this.segmentEfforts, detailedActivity.segmentEfforts) &&
        Objects.equals(this.deviceName, detailedActivity.deviceName) &&
        Objects.equals(this.embedToken, detailedActivity.embedToken) &&
        Objects.equals(this.splitsMetric, detailedActivity.splitsMetric) &&
        Objects.equals(this.splitsStandard, detailedActivity.splitsStandard) &&
        Objects.equals(this.laps, detailedActivity.laps) &&
        Objects.equals(this.bestEfforts, detailedActivity.bestEfforts) &&
        super.equals(o);
  }

  @Override
  public int hashCode() {
    return Objects.hash(description, photos, gear, calories, segmentEfforts, deviceName, embedToken, splitsMetric, splitsStandard, laps, bestEfforts, super.hashCode());
  }


  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class DetailedActivity {\n");
    sb.append("    ").append(toIndentedString(super.toString())).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    photos: ").append(toIndentedString(photos)).append("\n");
    sb.append("    gear: ").append(toIndentedString(gear)).append("\n");
    sb.append("    calories: ").append(toIndentedString(calories)).append("\n");
    sb.append("    segmentEfforts: ").append(toIndentedString(segmentEfforts)).append("\n");
    sb.append("    deviceName: ").append(toIndentedString(deviceName)).append("\n");
    sb.append("    embedToken: ").append(toIndentedString(embedToken)).append("\n");
    sb.append("    splitsMetric: ").append(toIndentedString(splitsMetric)).append("\n");
    sb.append("    splitsStandard: ").append(toIndentedString(splitsStandard)).append("\n");
    sb.append("    laps: ").append(toIndentedString(laps)).append("\n");
    sb.append("    bestEfforts: ").append(toIndentedString(bestEfforts)).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