com.sportradar.unifiedodds.sdk.entities.status.CompetitionStatus Maven / Gradle / Ivy
/*
* Copyright (C) Sportradar AG. See LICENSE for full license governing this code
*/
package com.sportradar.unifiedodds.sdk.entities.status;
import com.sportradar.unifiedodds.sdk.entities.EventResult;
import com.sportradar.unifiedodds.sdk.entities.EventStatus;
import com.sportradar.unifiedodds.sdk.entities.ReportingStatus;
import com.sportradar.utils.URN;
import java.util.List;
import java.util.Map;
/**
* Defines methods used to access general competition status attributes
*/
public interface CompetitionStatus {
/**
* Returns the sport event winner identifier
*
* @return the sport event winner identifier, if available; otherwise null
*/
URN getWinnerId();
/**
* Returns an {@link EventStatus} describing the high-level status of the associated sport event
*
* @return an {@link EventStatus} describing the high-level status of the associated sport event
* @deprecated use getEventStatus available on the {@link com.sportradar.unifiedodds.sdk.entities.Competition} sport event
*/
EventStatus getStatus();
/**
* Returns a {@link ReportingStatus} describing the reporting status of the associated sport event
*
* @return a {@link ReportingStatus} describing the reporting status of the associated sport event
*/
ReportingStatus getReportingStatus();
/**
* Returns a {@link List} of event results
*
* @return - a {@link List} of event results
*/
List getEventResults();
/**
* Returns the value of the property specified by it's name
* (for a list of all available properties look at {@link #getProperties()})
*
* @param property the name of the property to retrieve
* @return the value of the requested property if available; otherwise null
*/
Object getPropertyValue(String property);
/**
* Tries to return the requested property value in the required type
* (for a list of all available properties look at {@link #getProperties()})
*
* @param property the name of the property to retrieve
* @param requestedType the type to which the property should be checked against
* @param the generic type value which should be returned
* @return the value of the requested property if available and the types are compatible; otherwise null
*/
T tryGetPropertyValue(String property, Class requestedType);
/**
* Returns an unmodifiable {@link Map} of additional sport event status properties
*
*
* List of possible properties:
*
* - AggregateAwayScore
* - AggregateHomeScore
* - AggregateWinnerId
* - DecidedByFed
* - Period
* - WinningReason
* - Throw
* - Try
* - AwayBatter
* - AwayDismissals
* - AwayGameScore
* - AwayLegScore
* - AwayPenaltyRuns
* - AwayRemainingBowls
* - AwaySuspend
* - Balls
* - Bases
* - CurrentCtTeam
* - CurrentEnd
* - CurrentServer
* - Delivery
* - ExpeditedMode
* - HomeBatter
* - HomeDismissals
* - HomeGameScore
* - HomeLegScore
* - HomePenaltyRuns
* - HomeRemainingBowls
* - HomeSuspend
* - Innings
* - Outs
* - Over
* - Position
* - Possession
* - RemainingReds
* - Strikes
* - Tiebreak
* - Visit
* - Yards
*
*
* @return an unmodifiable {@link Map} of additional sport event status properties
*/
Map getProperties();
/**
* Returns a {@link Map} containing data of the sport event status ordered in key/value pairs
*
* @return a {@link Map} containing data of the sport event status ordered in key/value pairs
*/
Map toKeyValueStore();
}