Class SmtpRelaysClient

java.lang.Object
com.mxraven.admin.client.SmtpRelaysClient

public final class SmtpRelaysClient extends Object
Tenant SMTP relay collection. Reads and creation return hydrated SmtpRelay entities.
  • Constructor Details

    • SmtpRelaysClient

      public SmtpRelaysClient(AdminClient client, String tenantSlug)
      Creates a client bound to the given tenant.
      Parameters:
      client - underlying admin client
      tenantSlug - tenant slug
  • Method Details

    • list

      public Paged<SmtpRelay> list() throws IOException
      Lists SMTP relays for the tenant.
      Returns:
      a lazily paginated collection of SMTP relays
      Throws:
      IOException - if the request fails or is interrupted
    • create

      public SmtpRelay create(Consumer<CreateSmtpRelayRequest.Builder> configure) throws IOException
      Creates an SMTP relay configured through the given builder consumer.
      Parameters:
      configure - consumer that populates the creation request builder
      Returns:
      the created SMTP relay
      Throws:
      IOException - if the request fails or is interrupted
    • create

      public SmtpRelay create(CreateSmtpRelayRequest request) throws IOException
      Creates an SMTP relay described by the given request.
      Parameters:
      request - SMTP relay creation request
      Returns:
      the created SMTP relay
      Throws:
      IOException - if the request fails or is interrupted
    • get

      public SmtpRelay get(String relayId) throws IOException
      Gets an SMTP relay by its identifier.
      Parameters:
      relayId - SMTP relay identifier
      Returns:
      the SMTP relay
      Throws:
      IOException - if the request fails or is interrupted
    • getByRef

      public SmtpRelay getByRef(String relayRef) throws IOException
      Gets an SMTP relay by its immutable relay_ref.
      Parameters:
      relayRef - immutable SMTP relay reference
      Returns:
      the SMTP relay
      Throws:
      IOException - if the request fails or is interrupted