Skip to main content

SyncExternalsystemsJobConfigsResource

Struct SyncExternalsystemsJobConfigsResource 

Source
pub struct SyncExternalsystemsJobConfigsResource<'a> { /* private fields */ }
Expand description

client.sync().externalsystems().job_configs()

Implementations§

Source§

impl<'a> SyncExternalsystemsJobConfigsResource<'a>

Source

pub fn executions(&self) -> SyncExternalsystemsJobConfigsExecutionsResource<'a>

Source

pub fn create( &self, external_system_id: impl Display, body: &SyncJobConfigurationCreate, ) -> Result<JobConfigurationReturn>

Create a sync job configuration

POST /sync/externalsystems/{externalSystemId}/jobconfigs

Selected fields and record filters are managed through the properties and filter endpoints.

§Example
let body = models::SyncJobConfigurationCreate {
    auto_schedule_enabled: false,
    domain_type: "person".into(),
    name: "Synchronize people".into(),
    ..Default::default()
};
let result = client.sync().externalsystems().job_configs().create(1, &body)?;
println!("{}", result.name);
Source

pub fn delete( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<()>

Delete a sync job configuration

DELETE /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}

Deletes the configuration together with selected properties, filters, logs and associated background executions. Missing jobs also return 204.

§Example
client.sync().externalsystems().job_configs().delete(1, 1)?;
Source

pub fn delete_filter( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<()>

Clear sync job record filters

DELETE /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/filter

Deletes all record filters; the job configuration remains.

§Example
client.sync().externalsystems().job_configs().delete_filter(1, 1)?;
Source

pub fn delete_properties( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<()>

Clear sync job selected fields

DELETE /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/properties

Deletes all selected fields; the job configuration remains.

§Example
client.sync().externalsystems().job_configs().delete_properties(1, 1)?;
Source

pub fn get( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<Vec<JobConfigurationReturn>>

Find a sync job configuration

GET /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}

Returns configurations matching the job and external connection IDs.

§Example
for job_config in client.sync().externalsystems().job_configs().get(1, 1)? {
    println!("{}", job_config.name);
}
Source

pub fn get_filter( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<SyncJobFilters>

Get sync job record filters

GET /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/filter

Returns record filters grouped by direction.

§Example
let filter = client.sync().externalsystems().job_configs().get_filter(1, 1)?;
println!("{:?}", filter);
Source

pub fn get_properties( &self, external_system_id: impl Display, job_id: impl Display, ) -> Result<SyncJobProperties>

Get sync job selected fields

GET /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/properties

Returns selected fields grouped by direction.

§Example
let property = client.sync().externalsystems().job_configs().get_properties(1, 1)?;
println!("{}", property.domain_type);
Source

pub fn list( &self, external_system_id: impl Display, ) -> Result<Vec<JobConfigurationReturn>>

List jobs for an external connection

GET /sync/externalsystems/{externalSystemId}/jobconfigs

Lists job configurations belonging to the external connection.

§Example
for job_config in client.sync().externalsystems().job_configs().list(1)? {
    println!("{}", job_config.name);
}
Source

pub fn start( &self, external_system_id: impl Display, job_id: impl Display, body: &SyncExecutionCreate, ) -> Result<()>

Schedule a sync execution

POST /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/start

Schedules the configuration as a background job. A 204 response confirms scheduling, not successful synchronization. Inspect /sync/executions and /sync/logs for progress. Requires an enabled license or active trial.

§Example
let body = models::SyncExecutionCreate {
    is_dry_run: Some(true),
    ..Default::default()
};
client.sync().externalsystems().job_configs().start(1, 1, &body)?;
Source

pub fn update( &self, external_system_id: impl Display, job_id: impl Display, body: &SyncJobConfigurationUpdate, ) -> Result<JobConfigurationReturn>

Update a sync job configuration

PUT /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}

Updates the job configuration for the external connection.

§Example
let body = models::SyncJobConfigurationUpdate {
    auto_schedule_enabled: false,
    domain_type: "person".into(),
    name: "Synchronize people".into(),
    id: 1,
    ..Default::default()
};
let result = client.sync().externalsystems().job_configs().update(1, 1, &body)?;
println!("{}", result.name);
Source

pub fn update_filter( &self, external_system_id: impl Display, job_id: impl Display, body: &SyncJobFiltersUpdate, ) -> Result<SyncJobFilters>

Replace sync job record filters

PUT /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/filter

Filter operators and values are interpreted by the adapter.

§Example
let body = models::SyncJobFiltersUpdate {
    es: vec![models::SyncJobFilterCreate {
        field: "statusId".into(),
        system: "master".into(),
        values: serde_json::json!({}),
        ..Default::default()
    }],
    master: vec![models::SyncJobFilterCreate {
        field: "statusId".into(),
        system: "master".into(),
        values: serde_json::json!({}),
        ..Default::default()
    }],
    ..Default::default()
};
let result = client.sync().externalsystems().job_configs().update_filter(1, 1, &body)?;
println!("{:?}", result);
Source

pub fn update_properties( &self, external_system_id: impl Display, job_id: impl Display, body: &SyncJobPropertiesUpdate, ) -> Result<SyncJobProperties>

Replace sync job selected fields

PUT /sync/externalsystems/{externalSystemId}/jobconfigs/{jobId}/properties

Value mappings and adapter options are inherited from the referenced mapping.

§Example
let body = models::SyncJobPropertiesUpdate {
    property_mappings_es_to_master: vec![models::SyncJobPropertyCreate {
        field_mapping_id: 1,
        from: "firstName".into(),
        from_filter: "".into(),
        system: "master".into(),
        to: "firstName".into(),
        to_filter: "".into(),
        ..Default::default()
    }],
    property_mappings_master_to_es: vec![models::SyncJobPropertyCreate {
        field_mapping_id: 1,
        from: "firstName".into(),
        from_filter: "".into(),
        system: "master".into(),
        to: "firstName".into(),
        to_filter: "".into(),
        ..Default::default()
    }],
    ..Default::default()
};
let result = client.sync().externalsystems().job_configs().update_properties(1, 1, &body)?;
println!("{}", result.domain_type);

Trait Implementations§

Source§

impl<'a> Clone for SyncExternalsystemsJobConfigsResource<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for SyncExternalsystemsJobConfigsResource<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more