Class ContestDTO

java.lang.Object
org.openapitools.client.model.ContestDTO

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-12-04T04:53:25.428492722Z[Etc/UTC]", comments="Generator version: 7.8.0") public class ContestDTO extends Object
The new contest to be added.
  • Field Details

    • SERIALIZED_NAME_ID

      public static final String SERIALIZED_NAME_ID
      See Also:
    • id

      @SerializedName("id") private Integer id
    • SERIALIZED_NAME_SCHEDULED_START

      public static final String SERIALIZED_NAME_SCHEDULED_START
      See Also:
    • scheduledStart

      @SerializedName("scheduledStart") private OffsetDateTime scheduledStart
    • SERIALIZED_NAME_DURATION

      public static final String SERIALIZED_NAME_DURATION
      See Also:
    • duration

      @SerializedName("duration") private String duration
    • SERIALIZED_NAME_COMPLETED

      public static final String SERIALIZED_NAME_COMPLETED
      See Also:
    • completed

      @SerializedName("completed") private Boolean completed
    • SERIALIZED_NAME_HOME_TEAM

      public static final String SERIALIZED_NAME_HOME_TEAM
      See Also:
    • homeTeam

      @SerializedName("homeTeam") private String homeTeam
    • SERIALIZED_NAME_AWAY_TEAM

      public static final String SERIALIZED_NAME_AWAY_TEAM
      See Also:
    • awayTeam

      @SerializedName("awayTeam") private String awayTeam
    • SERIALIZED_NAME_HOME_SCORE

      public static final String SERIALIZED_NAME_HOME_SCORE
      See Also:
    • homeScore

      @SerializedName("homeScore") private Integer homeScore
    • SERIALIZED_NAME_AWAY_SCORE

      public static final String SERIALIZED_NAME_AWAY_SCORE
      See Also:
    • awayScore

      @SerializedName("awayScore") private Integer awayScore
    • openapiFields

      public static HashSet<String> openapiFields
    • openapiRequiredFields

      public static HashSet<String> openapiRequiredFields
  • Constructor Details

    • ContestDTO

      public ContestDTO()
    • ContestDTO

      public ContestDTO(Integer id)
  • Method Details

    • getId

      @Nullable public Integer getId()
      A read-only ID assigned by the service during create.
      Returns:
      id
    • scheduledStart

      public ContestDTO scheduledStart(OffsetDateTime scheduledStart)
    • getScheduledStart

      @Nullable public OffsetDateTime getScheduledStart()
      Scheduled or completed contests should have a scheduled started time expressed in LocalDateTime with offset from UTC.
      Returns:
      scheduledStart
    • setScheduledStart

      public void setScheduledStart(OffsetDateTime scheduledStart)
    • duration

      public ContestDTO duration(String duration)
    • getDuration

      @Nullable public String getDuration()
      Get duration
      Returns:
      duration
    • setDuration

      public void setDuration(String duration)
    • completed

      public ContestDTO completed(Boolean completed)
    • getCompleted

      @Nonnull public Boolean getCompleted()
      This value will be true when the contest is completed and the scores reported can be considered final.
      Returns:
      completed
    • setCompleted

      public void setCompleted(Boolean completed)
    • homeTeam

      public ContestDTO homeTeam(String homeTeam)
    • getHomeTeam

      @Nonnull public String getHomeTeam()
      Name of the home team in the contest.
      Returns:
      homeTeam
    • setHomeTeam

      public void setHomeTeam(String homeTeam)
    • awayTeam

      public ContestDTO awayTeam(String awayTeam)
    • getAwayTeam

      @Nonnull public String getAwayTeam()
      Name of the away team in the contest.
      Returns:
      awayTeam
    • setAwayTeam

      public void setAwayTeam(String awayTeam)
    • homeScore

      public ContestDTO homeScore(Integer homeScore)
    • getHomeScore

      @Nullable public Integer getHomeScore()
      Home team score. This will not be valid and may not be supplied prior to the scheduled start time and not complete until the completed field is set to true.
      Returns:
      homeScore
    • setHomeScore

      public void setHomeScore(Integer homeScore)
    • awayScore

      public ContestDTO awayScore(Integer awayScore)
    • getAwayScore

      @Nullable public Integer getAwayScore()
      Away team score. This will not be valid and may not be supplied prior to the scheduled start time and not complete until the completed field is set to true.
      Returns:
      awayScore
    • setAwayScore

      public void setAwayScore(Integer awayScore)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toIndentedString

      private String toIndentedString(Object o)
      Convert the given object to string with each line indented by 4 spaces (except the first line).
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to ContestDTO
    • fromJson

      public static ContestDTO fromJson(String jsonString) throws IOException
      Create an instance of ContestDTO given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of ContestDTO
      Throws:
      IOException - if the JSON string is invalid with respect to ContestDTO
    • toJson

      public String toJson()
      Convert an instance of ContestDTO to an JSON string
      Returns:
      JSON string