Record Class UploadLinkModel
java.lang.Object
java.lang.Record
io.meeds.mcp.server.tool.model.UploadLinkModel
- Record Components:
uploadId- the id the file is registered under once sent, to pass to the tool that consumes ituploadUrl- the platform URL the file is posted tocurlCommand- the ready command that sends the file, with a<path-to-file>placeholder and the one-time token in itsAuthorizationheadersize- the size declared for the file, in bytes: a larger file is refusedexpiresInSeconds- how long the link stays usablenextStep- what the caller does with the command and the upload idfallback- what remains when the command cannot run or cannot reach the platform
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurlCommandrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpiresInSecondsrecord component.fallback()Returns the value of thefallbackrecord component.final inthashCode()Returns a hash code value for this object.nextStep()Returns the value of thenextSteprecord component.longsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.uploadId()Returns the value of theuploadIdrecord component.Returns the value of theuploadUrlrecord component.
-
Constructor Details
-
UploadLinkModel
public UploadLinkModel(String uploadId, String uploadUrl, String curlCommand, long size, long expiresInSeconds, String nextStep, String fallback) Creates an instance of aUploadLinkModelrecord class.- Parameters:
uploadId- the value for theuploadIdrecord componentuploadUrl- the value for theuploadUrlrecord componentcurlCommand- the value for thecurlCommandrecord componentsize- the value for thesizerecord componentexpiresInSeconds- the value for theexpiresInSecondsrecord componentnextStep- the value for thenextSteprecord componentfallback- the value for thefallbackrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
uploadId
-
uploadUrl
-
curlCommand
Returns the value of thecurlCommandrecord component.- Returns:
- the value of the
curlCommandrecord component
-
size
-
expiresInSeconds
public long expiresInSeconds()Returns the value of theexpiresInSecondsrecord component.- Returns:
- the value of the
expiresInSecondsrecord component
-
nextStep
-
fallback
-