Record Class NewMessageContractDto

java.lang.Object
java.lang.Record
ch.admin.bit.jeap.messagecontract.web.api.dto.NewMessageContractDto

public record NewMessageContractDto(@NotBlank String messageType, @NotBlank String messageTypeVersion, @NotBlank String topic, @NotNull MessageContractRole role, @NotNull String registryUrl, String commitHash, String branch, @NotNull CompatibilityMode compatibilityMode, String encryptionKeyId) extends Record
  • Constructor Details

    • NewMessageContractDto

      public NewMessageContractDto(@NotBlank @NotBlank String messageType, @NotBlank @NotBlank String messageTypeVersion, @NotBlank @NotBlank String topic, @NotNull @NotNull MessageContractRole role, @NotNull @NotNull String registryUrl, String commitHash, String branch, @NotNull @NotNull CompatibilityMode compatibilityMode, String encryptionKeyId)
      Creates an instance of a NewMessageContractDto record class.
      Parameters:
      messageType - the value for the messageType record component
      messageTypeVersion - the value for the messageTypeVersion record component
      topic - the value for the topic record component
      role - the value for the role record component
      registryUrl - the value for the registryUrl record component
      commitHash - the value for the commitHash record component
      branch - the value for the branch record component
      compatibilityMode - the value for the compatibilityMode record component
      encryptionKeyId - the value for the encryptionKeyId record component
  • Method Details

    • toNewDomainObject

      public ch.admin.bit.jeap.messagecontract.persistence.model.MessageContract toNewDomainObject(String appName, String appVersion, String transactionId)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • messageType

      @NotBlank public @NotBlank String messageType()
      Returns the value of the messageType record component.
      Returns:
      the value of the messageType record component
    • messageTypeVersion

      @NotBlank public @NotBlank String messageTypeVersion()
      Returns the value of the messageTypeVersion record component.
      Returns:
      the value of the messageTypeVersion record component
    • topic

      @NotBlank public @NotBlank String topic()
      Returns the value of the topic record component.
      Returns:
      the value of the topic record component
    • role

      @NotNull public @NotNull MessageContractRole role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • registryUrl

      @NotNull public @NotNull String registryUrl()
      Returns the value of the registryUrl record component.
      Returns:
      the value of the registryUrl record component
    • commitHash

      public String commitHash()
      Returns the value of the commitHash record component.
      Returns:
      the value of the commitHash record component
    • branch

      public String branch()
      Returns the value of the branch record component.
      Returns:
      the value of the branch record component
    • compatibilityMode

      @NotNull public @NotNull CompatibilityMode compatibilityMode()
      Returns the value of the compatibilityMode record component.
      Returns:
      the value of the compatibilityMode record component
    • encryptionKeyId

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