Skip to main content

VerificationArgsBuilder

Struct VerificationArgsBuilder 

Source
pub struct VerificationArgsBuilder<S: State = Empty> { /* private fields */ }
Expand description

Use builder syntax to set the inputs and finish with build().

Implementations§

Source§

impl<S: State> VerificationArgsBuilder<S>

Source

pub fn build(self) -> VerificationArgs
where S: IsComplete,

Finish building and return the requested object

Source

pub fn error(self, value: String) -> VerificationArgsBuilder<SetError<S>>
where S::Error: IsUnset,

Optional (Some / Option setters). Human-readable error detail, when the restore failed.

Source

pub fn maybe_error( self, value: Option<String>, ) -> VerificationArgsBuilder<SetError<S>>
where S::Error: IsUnset,

Optional (Some / Option setters). Human-readable error detail, when the restore failed.

Source

pub fn group(self, value: Uuid) -> VerificationArgsBuilder<SetGroup<S>>
where S::Group: IsUnset,

Required.

The server group whose backup was restored.

Source

pub fn health_details( self, value: Value, ) -> VerificationArgsBuilder<SetHealthDetails<S>>
where S::HealthDetails: IsUnset,

Optional (Some / Option setters). Arbitrary structured health data to record alongside the report (database statistics, whether indexes needed rebuilding, and so on). Stored and displayed as-is.

Source

pub fn maybe_health_details( self, value: Option<Value>, ) -> VerificationArgsBuilder<SetHealthDetails<S>>
where S::HealthDetails: IsUnset,

Optional (Some / Option setters). Arbitrary structured health data to record alongside the report (database statistics, whether indexes needed rebuilding, and so on). Stored and displayed as-is.

Source

pub fn intent(self, value: String) -> VerificationArgsBuilder<SetIntent<S>>
where S::Intent: IsUnset,

Required.

The restore intent this attempt was performed under.

Source

pub fn machine_id(self, value: Uuid) -> VerificationArgsBuilder<SetMachineId<S>>
where S::MachineId: IsUnset,

Optional (Some / Option setters). The machine whose backup was restored, from the worklist entry’s machine_id.

Optional only so a reporter built against the earlier shape, which knew this as server_id, is still accepted; one of the two must be present.

Source

pub fn maybe_machine_id( self, value: Option<Uuid>, ) -> VerificationArgsBuilder<SetMachineId<S>>
where S::MachineId: IsUnset,

Optional (Some / Option setters). The machine whose backup was restored, from the worklist entry’s machine_id.

Optional only so a reporter built against the earlier shape, which knew this as server_id, is still accepted; one of the two must be present.

Source

pub fn migration( self, value: MigrationArgs, ) -> VerificationArgsBuilder<SetMigration<S>>
where S::Migration: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_migration( self, value: Option<MigrationArgs>, ) -> VerificationArgsBuilder<SetMigration<S>>
where S::Migration: IsUnset,

Optional (Some / Option setters).

Source

pub fn observed_at( self, value: String, ) -> VerificationArgsBuilder<SetObservedAt<S>>
where S::ObservedAt: IsUnset,

Required.

When the restore result was observed, as an RFC 3339 timestamp.

Source

pub fn outcome(self, value: String) -> VerificationArgsBuilder<SetOutcome<S>>
where S::Outcome: IsUnset,

Required.

Whether the restore succeeded (success) or failed (failure).

Source

pub fn postgres_version( self, value: String, ) -> VerificationArgsBuilder<SetPostgresVersion<S>>
where S::PostgresVersion: IsUnset,

Optional (Some / Option setters). Version of the PostgreSQL server the data was restored into, if applicable.

Source

pub fn maybe_postgres_version( self, value: Option<String>, ) -> VerificationArgsBuilder<SetPostgresVersion<S>>
where S::PostgresVersion: IsUnset,

Optional (Some / Option setters). Version of the PostgreSQL server the data was restored into, if applicable.

Source

pub fn redaction( self, value: RedactionArgs, ) -> VerificationArgsBuilder<SetRedaction<S>>
where S::Redaction: IsUnset,

Optional (Some / Option setters).

Source

pub fn maybe_redaction( self, value: Option<RedactionArgs>, ) -> VerificationArgsBuilder<SetRedaction<S>>
where S::Redaction: IsUnset,

Optional (Some / Option setters).

Source

pub fn replica_healthy( self, value: bool, ) -> VerificationArgsBuilder<SetReplicaHealthy<S>>
where S::ReplicaHealthy: IsUnset,

Required.

Whether the restored database came up healthy and passed readiness checks. A replica only counts as verified when the outcome is success and this is true.

Source

pub fn replica_id(self, value: Uuid) -> VerificationArgsBuilder<SetReplicaId<S>>
where S::ReplicaId: IsUnset,

Required.

The declaration this report concerns, taken from the worklist entry’s replica_id. Required: several replicas can share one group, machine, type, and intent, so a report that named no declaration could not be attributed to one of them.

Source

pub fn run_id(self, value: Uuid) -> VerificationArgsBuilder<SetRunId<S>>
where S::RunId: IsUnset,

Optional (Some / Option setters). This must be the run-uuid the client minted for this run. The field is optional only so older clients don’t break; it WILL be made mandatory in future.

Source

pub fn maybe_run_id( self, value: Option<Uuid>, ) -> VerificationArgsBuilder<SetRunId<S>>
where S::RunId: IsUnset,

Optional (Some / Option setters). This must be the run-uuid the client minted for this run. The field is optional only so older clients don’t break; it WILL be made mandatory in future.

Source

pub fn s3_received_payload_bytes( self, value: i64, ) -> VerificationArgsBuilder<SetS3ReceivedPayloadBytes<S>>
where S::S3ReceivedPayloadBytes: IsUnset,

Optional (Some / Option setters). Bytes of decoded object payload received from S3 during the restore.

Source

pub fn maybe_s3_received_payload_bytes( self, value: Option<i64>, ) -> VerificationArgsBuilder<SetS3ReceivedPayloadBytes<S>>
where S::S3ReceivedPayloadBytes: IsUnset,

Optional (Some / Option setters). Bytes of decoded object payload received from S3 during the restore.

Source

pub fn s3_received_raw_bytes( self, value: i64, ) -> VerificationArgsBuilder<SetS3ReceivedRawBytes<S>>
where S::S3ReceivedRawBytes: IsUnset,

Optional (Some / Option setters). Bytes of raw HTTP traffic received from S3 during the restore, including protocol overhead.

Source

pub fn maybe_s3_received_raw_bytes( self, value: Option<i64>, ) -> VerificationArgsBuilder<SetS3ReceivedRawBytes<S>>
where S::S3ReceivedRawBytes: IsUnset,

Optional (Some / Option setters). Bytes of raw HTTP traffic received from S3 during the restore, including protocol overhead.

Source

pub fn s3_sent_payload_bytes( self, value: i64, ) -> VerificationArgsBuilder<SetS3SentPayloadBytes<S>>
where S::S3SentPayloadBytes: IsUnset,

Optional (Some / Option setters). Bytes of decoded object payload sent to S3 during the restore.

Source

pub fn maybe_s3_sent_payload_bytes( self, value: Option<i64>, ) -> VerificationArgsBuilder<SetS3SentPayloadBytes<S>>
where S::S3SentPayloadBytes: IsUnset,

Optional (Some / Option setters). Bytes of decoded object payload sent to S3 during the restore.

Source

pub fn s3_sent_raw_bytes( self, value: i64, ) -> VerificationArgsBuilder<SetS3SentRawBytes<S>>
where S::S3SentRawBytes: IsUnset,

Optional (Some / Option setters). Bytes of raw HTTP traffic sent to S3 during the restore, including protocol and signing overhead. Omit when traffic was not measured.

Source

pub fn maybe_s3_sent_raw_bytes( self, value: Option<i64>, ) -> VerificationArgsBuilder<SetS3SentRawBytes<S>>
where S::S3SentRawBytes: IsUnset,

Optional (Some / Option setters). Bytes of raw HTTP traffic sent to S3 during the restore, including protocol and signing overhead. Omit when traffic was not measured.

Source

pub fn server_id(self, value: Uuid) -> VerificationArgsBuilder<SetServerId<S>>
where S::ServerId: IsUnset,

Optional (Some / Option setters). The same machine under the name this field carried when a server was a box and the software on it at once.

Deprecated in favour of machine_id. A report naming only this is accepted and read as the machine, since a machine that predates the split took its application’s id. Naming both is an error rather than a silent preference, because a reporter that disagrees with itself about what it restored has not been understood.

Source

pub fn maybe_server_id( self, value: Option<Uuid>, ) -> VerificationArgsBuilder<SetServerId<S>>
where S::ServerId: IsUnset,

Optional (Some / Option setters). The same machine under the name this field carried when a server was a box and the software on it at once.

Deprecated in favour of machine_id. A report naming only this is accepted and read as the machine, since a machine that predates the split took its application’s id. Naming both is an error rather than a silent preference, because a reporter that disagrees with itself about what it restored has not been understood.

Source

pub fn snapshot_id( self, value: String, ) -> VerificationArgsBuilder<SetSnapshotId<S>>
where S::SnapshotId: IsUnset,

Optional (Some / Option setters). Identifier of the snapshot that was restored. Omit on a failure that never got as far as selecting a snapshot.

Source

pub fn maybe_snapshot_id( self, value: Option<String>, ) -> VerificationArgsBuilder<SetSnapshotId<S>>
where S::SnapshotId: IsUnset,

Optional (Some / Option setters). Identifier of the snapshot that was restored. Omit on a failure that never got as far as selecting a snapshot.

Source

pub fn type_(self, value: String) -> VerificationArgsBuilder<SetType<S>>
where S::Type: IsUnset,

Required.

The backup type that was restored (e.g. tamanu-postgres).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.