Record Class WeatherSourceIdentity

java.lang.Object
java.lang.Record
ecmwf.ecpds.master.weather.WeatherSourceIdentity
All Implemented Interfaces:
Serializable

public record WeatherSourceIdentity(int schemaVersion, String sourceId, UUID sourceEpoch, UUID challenge, long issuedAt, String publicKey, String signature, int collectionVersion) extends Record implements Serializable
Challenge-bound public identity obtained only through a subscribe-authenticated Mover callback.
See Also:
  • Constructor Details

    • WeatherSourceIdentity

      public WeatherSourceIdentity(int schemaVersion, String sourceId, UUID sourceEpoch, UUID challenge, long issuedAt, String publicKey, String signature)
    • WeatherSourceIdentity

      public WeatherSourceIdentity(int schemaVersion, String sourceId, UUID sourceEpoch, UUID challenge, long issuedAt, String publicKey, String signature, int collectionVersion)
      Creates an instance of a WeatherSourceIdentity record class.
      Parameters:
      schemaVersion - the value for the schemaVersion record component
      sourceId - the value for the sourceId record component
      sourceEpoch - the value for the sourceEpoch record component
      challenge - the value for the challenge record component
      issuedAt - the value for the issuedAt record component
      publicKey - the value for the publicKey record component
      signature - the value for the signature record component
      collectionVersion - the value for the collectionVersion record component
  • Method Details

    • verify

      public PublicKey verify(String expectedSource, UUID expectedChallenge) throws GeneralSecurityException
      Throws:
      GeneralSecurityException
    • 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.
    • schemaVersion

      public int schemaVersion()
      Returns the value of the schemaVersion record component.
      Returns:
      the value of the schemaVersion record component
    • sourceId

      public String sourceId()
      Returns the value of the sourceId record component.
      Returns:
      the value of the sourceId record component
    • sourceEpoch

      public UUID sourceEpoch()
      Returns the value of the sourceEpoch record component.
      Returns:
      the value of the sourceEpoch record component
    • challenge

      public UUID challenge()
      Returns the value of the challenge record component.
      Returns:
      the value of the challenge record component
    • issuedAt

      public long issuedAt()
      Returns the value of the issuedAt record component.
      Returns:
      the value of the issuedAt record component
    • publicKey

      public String publicKey()
      Returns the value of the publicKey record component.
      Returns:
      the value of the publicKey record component
    • signature

      public String signature()
      Returns the value of the signature record component.
      Returns:
      the value of the signature record component
    • collectionVersion

      public int collectionVersion()
      Returns the value of the collectionVersion record component.
      Returns:
      the value of the collectionVersion record component