Package com.mxraven.admin.model
Class SmtpRelay
Hydrated SmtpRelay entity. Reads return a snapshot; call
reload() for fresh state.-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSmtpRelay(AdminClient client, String path, SmtpRelayData data) Creates a relay bound to the given client, path, and data. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether relay credentials are stored.Returns the human-readable relay name.id()Returns the entity identifier.booleanisActive()Returns whether the relay is active.relayRef()Returns the stable reference for the relay.reload()Re-fetches this relay and returns a fresh snapshot.setActive(boolean isActive) Enables or disables the relay.setActive(SetIntegrationActiveRequest request) Sets the relay active state.setActive(Consumer<SetIntegrationActiveRequest.Builder> configure) Enables or disables the relay using a builder.tenantId()Returns the identifier of the owning tenant.update(UpdateSmtpRelayRequest request) Replaces this relay's configuration.update(Consumer<UpdateSmtpRelayRequest.Builder> configure) Replaces this relay's configuration using a builder.
-
Constructor Details
-
SmtpRelay
Creates a relay bound to the given client, path, and data.- Parameters:
client- the admin clientpath- the resource pathdata- the backing data
-
-
Method Details
-
id
Returns the entity identifier.- Returns:
- the entity identifier
-
tenantId
Returns the identifier of the owning tenant.- Returns:
- the owning tenant identifier
-
relayRef
Returns the stable reference for the relay.- Returns:
- the relay reference
-
displayName
Returns the human-readable relay name.- Returns:
- the relay name
-
isActive
public boolean isActive()Returns whether the relay is active.- Returns:
trueif the relay is active
-
credentialsPresent
public boolean credentialsPresent()Returns whether relay credentials are stored.- Returns:
trueif credentials are stored
-
reload
Re-fetches this relay and returns a fresh snapshot.- Returns:
- a fresh relay snapshot
- Throws:
IOException- if the request fails
-
update
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
Replaces this relay's configuration.- Parameters:
request- replacement request- Returns:
- the updated relay
- Throws:
IOException- if the request fails
-
setActive
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
Sets the relay active state.- Parameters:
request- active-state request- Returns:
- the updated relay
- Throws:
IOException- if the request fails
-