Class SmtpRelay

java.lang.Object
com.mxraven.admin.Entity<SmtpRelayData>
com.mxraven.admin.model.SmtpRelay

public final class SmtpRelay extends Entity<SmtpRelayData>
Hydrated SmtpRelay entity. Reads return a snapshot; call reload() for fresh state.
  • Constructor Details

    • SmtpRelay

      public SmtpRelay(AdminClient client, String path, SmtpRelayData data)
      Creates a relay bound to the given client, path, and data.
      Parameters:
      client - the admin client
      path - the resource path
      data - the backing data
  • Method Details

    • id

      public String id()
      Returns the entity identifier.
      Returns:
      the entity identifier
    • tenantId

      public String tenantId()
      Returns the identifier of the owning tenant.
      Returns:
      the owning tenant identifier
    • relayRef

      public String relayRef()
      Returns the stable reference for the relay.
      Returns:
      the relay reference
    • displayName

      public String displayName()
      Returns the human-readable relay name.
      Returns:
      the relay name
    • isActive

      public boolean isActive()
      Returns whether the relay is active.
      Returns:
      true if the relay is active
    • credentialsPresent

      public boolean credentialsPresent()
      Returns whether relay credentials are stored.
      Returns:
      true if credentials are stored
    • reload

      public SmtpRelay reload() throws IOException
      Re-fetches this relay and returns a fresh snapshot.
      Returns:
      a fresh relay snapshot
      Throws:
      IOException - if the request fails
    • update

      public SmtpRelay update(Consumer<UpdateSmtpRelayRequest.Builder> configure) throws IOException
      Replaces this relay's configuration using a builder.
      Parameters:
      configure - callback that configures the update request
      Returns:
      the updated relay
      Throws:
      IOException - if the request fails
    • update

      public SmtpRelay update(UpdateSmtpRelayRequest request) throws IOException
      Replaces this relay's configuration.
      Parameters:
      request - replacement request
      Returns:
      the updated relay
      Throws:
      IOException - if the request fails
    • setActive

      public SmtpRelay setActive(boolean isActive) throws IOException
      Enables or disables the relay.
      Parameters:
      isActive - whether the relay is active
      Returns:
      the updated relay
      Throws:
      IOException - if the request fails
    • setActive

      public SmtpRelay setActive(Consumer<SetIntegrationActiveRequest.Builder> configure) throws IOException
      Enables or disables the relay using a builder.
      Parameters:
      configure - callback that configures the active-state request
      Returns:
      the updated relay
      Throws:
      IOException - if the request fails
    • setActive

      public SmtpRelay setActive(SetIntegrationActiveRequest request) throws IOException
      Sets the relay active state.
      Parameters:
      request - active-state request
      Returns:
      the updated relay
      Throws:
      IOException - if the request fails