pub struct SyncResource<'a> { /* private fields */ }Expand description
client.sync()
Implementations§
Source§impl<'a> SyncResource<'a>
impl<'a> SyncResource<'a>
pub fn adapters(&self) -> SyncAdaptersResource<'a>
pub fn conflicts(&self) -> SyncConflictsResource<'a>
pub fn entity_mappings(&self) -> SyncEntityMappingsResource<'a>
pub fn externalsystems(&self) -> SyncExternalsystemsResource<'a>
Sourcepub fn create_logs(&self, body: &SyncLogsCreate) -> Result<SyncLogsPersisted>
pub fn create_logs(&self, body: &SyncLogsCreate) -> Result<SyncLogsPersisted>
Store sync log entries
POST /sync/logs
Stores log entries. messageKey, translation arguments and changes are rendered into a stored message.
§Example
let body = models::SyncLogsCreate {
logs: vec![models::SyncLogCreate {
date: "2022-10-19T12:00:00Z".parse()?,
execution_id: "abc123".into(),
job_id: 42,
level: "debug".into(),
message_key: "Hallo zusammen".into(),
r#type: "create".into(),
..Default::default()
}],
..Default::default()
};
let result = client.sync().create_logs(&body)?;
println!("{}", result.persisted);Sourcepub fn list_executions(&self) -> Result<Vec<SyncExecutionSummary>>
pub fn list_executions(&self) -> Result<Vec<SyncExecutionSummary>>
List sync execution summaries
GET /sync/executions
Returns background executions ordered by creation date descending and job ID ascending. Counts are derived from operation logs.
Use Self::list_executions_with to pass query parameters.
§Example
for execution in client.sync().list_executions()? {
println!("{:?}", execution.created_date);
}Sourcepub fn list_executions_with(
&self,
query: &GetSyncExecutionsQuery,
) -> Result<Vec<SyncExecutionSummary>>
pub fn list_executions_with( &self, query: &GetSyncExecutionsQuery, ) -> Result<Vec<SyncExecutionSummary>>
List sync execution summaries
Like Self::list_executions, with query parameters.
GET /sync/executions
Returns background executions ordered by creation date descending and job ID ascending. Counts are derived from operation logs.
Sourcepub fn list_executions_iter(
&self,
query: &GetSyncExecutionsQuery,
) -> Items<SyncExecutionSummary> ⓘ
pub fn list_executions_iter( &self, query: &GetSyncExecutionsQuery, ) -> Items<SyncExecutionSummary> ⓘ
List sync execution summaries
Like Self::list_executions_with, but lazy: each page is fetched only when the iteration reaches it.
Breaking off early saves the remaining requests.
Sourcepub fn list_job_configs(&self) -> Result<Vec<JobConfigurationReturn>>
pub fn list_job_configs(&self) -> Result<Vec<JobConfigurationReturn>>
List sync job configurations
GET /sync/jobconfigs
Lists job configurations ordered by name.
Use Self::list_job_configs_with to pass query parameters.
§Example
for job_config in client.sync().list_job_configs()? {
println!("{}", job_config.name);
}Sourcepub fn list_job_configs_with(
&self,
query: &GetSyncJobconfigsQuery,
) -> Result<Vec<JobConfigurationReturn>>
pub fn list_job_configs_with( &self, query: &GetSyncJobconfigsQuery, ) -> Result<Vec<JobConfigurationReturn>>
List sync job configurations
Like Self::list_job_configs, with query parameters.
GET /sync/jobconfigs
Lists job configurations ordered by name.
Sourcepub fn list_logs(&self) -> Result<Vec<SyncLog>>
pub fn list_logs(&self) -> Result<Vec<SyncLog>>
List sync log entries
GET /sync/logs
Returns rendered log messages ordered by log ID descending.
Use Self::list_logs_with to pass query parameters.
§Example
for log in client.sync().list_logs()? {
println!("{}", log.id);
}Sourcepub fn list_logs_with(&self, query: &GetSyncLogsQuery) -> Result<Vec<SyncLog>>
pub fn list_logs_with(&self, query: &GetSyncLogsQuery) -> Result<Vec<SyncLog>>
List sync log entries
Like Self::list_logs, with query parameters.
GET /sync/logs
Returns rendered log messages ordered by log ID descending.
Sourcepub fn list_logs_iter(&self, query: &GetSyncLogsQuery) -> Items<SyncLog> ⓘ
pub fn list_logs_iter(&self, query: &GetSyncLogsQuery) -> Items<SyncLog> ⓘ
List sync log entries
Like Self::list_logs_with, but lazy: each page is fetched only when the iteration reaches it.
Breaking off early saves the remaining requests.