Record Class InputMediaLocation
java.lang.Object
java.lang.Record
org.teleight.teleightbots.api.objects.InputMediaLocation
- All Implemented Interfaces:
Serializable, ApiResult, InputPollMedia, InputPollOptionMedia
public record InputMediaLocation(float latitude, float longitude, @IntRange(from=0L,to=1500L) float horizontal_accuracy)
extends Record
implements InputPollMedia, InputPollOptionMedia
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from interface InputPollMedia
TYPE_NAMEFields inherited from interface InputPollOptionMedia
TYPE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionInputMediaLocation(float latitude, float longitude, @IntRange(from=0L,to=1500L) float horizontal_accuracy) Creates an instance of aInputMediaLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@IntRange(from=0L,to=1500L) floatReturns the value of thehorizontal_accuracyrecord component.floatlatitude()Returns the value of thelatituderecord component.floatReturns the value of thelongituderecord component.static @NotNull InputMediaLocation.BuilderofBuilder(float latitude, float longitude) final StringtoString()Returns a string representation of this record class.type()
-
Constructor Details
-
InputMediaLocation
public InputMediaLocation(float latitude, float longitude, @IntRange(from=0L,to=1500L) float horizontal_accuracy) Creates an instance of aInputMediaLocationrecord class.- Parameters:
latitude- the value for thelatituderecord componentlongitude- the value for thelongituderecord componenthorizontal_accuracy- the value for thehorizontal_accuracyrecord component
-
-
Method Details
-
ofBuilder
@NotNull public static @NotNull InputMediaLocation.Builder ofBuilder(float latitude, float longitude) -
type
- Specified by:
typein interfaceInputPollMedia- Specified by:
typein interfaceInputPollOptionMedia
-
toBuilder
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
latitude
public float latitude()Returns the value of thelatituderecord component.- Returns:
- the value of the
latituderecord component
-
longitude
public float longitude()Returns the value of thelongituderecord component.- Returns:
- the value of the
longituderecord component
-
horizontal_accuracy
public @IntRange(from=0L,to=1500L) float horizontal_accuracy()Returns the value of thehorizontal_accuracyrecord component.- Returns:
- the value of the
horizontal_accuracyrecord component
-