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 it
uploadUrl - the platform URL the file is posted to
curlCommand - the ready command that sends the file, with a <path-to-file> placeholder and the one-time token in its Authorization header
size - the size declared for the file, in bytes: a larger file is refused
expiresInSeconds - how long the link stays usable
nextStep - what the caller does with the command and the upload id
fallback - what remains when the command cannot run or cannot reach the platform

public record UploadLinkModel(String uploadId, String uploadUrl, String curlCommand, long size, long expiresInSeconds, String nextStep, String fallback) extends Record
The upload link start_upload opens: the id of the upload to come, where and how to send the file, and what to do next.
  • Constructor Details

    • UploadLinkModel

      public UploadLinkModel(String uploadId, String uploadUrl, String curlCommand, long size, long expiresInSeconds, String nextStep, String fallback)
      Creates an instance of a UploadLinkModel record class.
      Parameters:
      uploadId - the value for the uploadId record component
      uploadUrl - the value for the uploadUrl record component
      curlCommand - the value for the curlCommand record component
      size - the value for the size record component
      expiresInSeconds - the value for the expiresInSeconds record component
      nextStep - the value for the nextStep record component
      fallback - the value for the fallback record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • uploadId

      public String uploadId()
      Returns the value of the uploadId record component.
      Returns:
      the value of the uploadId record component
    • uploadUrl

      public String uploadUrl()
      Returns the value of the uploadUrl record component.
      Returns:
      the value of the uploadUrl record component
    • curlCommand

      public String curlCommand()
      Returns the value of the curlCommand record component.
      Returns:
      the value of the curlCommand record component
    • size

      public long size()
      Returns the value of the size record component.
      Returns:
      the value of the size record component
    • expiresInSeconds

      public long expiresInSeconds()
      Returns the value of the expiresInSeconds record component.
      Returns:
      the value of the expiresInSeconds record component
    • nextStep

      public String nextStep()
      Returns the value of the nextStep record component.
      Returns:
      the value of the nextStep record component
    • fallback

      public String fallback()
      Returns the value of the fallback record component.
      Returns:
      the value of the fallback record component