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

com.clinia.model.common.V1Period Maven / Gradle / Ivy

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/clinia/api-clients-generation. DO NOT EDIT.

package com.clinia.model.common;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.Objects;

/** A time period defined by a start and end date and optionally time. */
public class V1Period {

  @JsonProperty("id")
  private String id;

  @JsonProperty("start")
  private String start;

  @JsonProperty("end")
  private String end;

  public V1Period setId(String id) {
    this.id = id;
    return this;
  }

  /** A sequence of Unicode characters. */
  @javax.annotation.Nullable
  public String getId() {
    return id;
  }

  public V1Period setStart(String start) {
    this.start = start;
    return this;
  }

  /**
   * A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are
   * specified, a time zone SHALL be populated. The format is a union of the schema types gYear,
   * gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may
   * be zero-filled and may be ignored. Dates SHALL be valid dates.
   */
  @javax.annotation.Nullable
  public String getStart() {
    return start;
  }

  public V1Period setEnd(String end) {
    this.end = end;
    return this;
  }

  /**
   * A date, date-time or partial date (e.g. just year or year + month). If hours and minutes are
   * specified, a time zone SHALL be populated. The format is a union of the schema types gYear,
   * gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may
   * be zero-filled and may be ignored. Dates SHALL be valid dates.
   */
  @javax.annotation.Nullable
  public String getEnd() {
    return end;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1Period v1Period = (V1Period) o;
    return Objects.equals(this.id, v1Period.id) && Objects.equals(this.start, v1Period.start) && Objects.equals(this.end, v1Period.end);
  }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy