ThingsApi

Trait ThingsApi 

Source
pub trait ThingsApi: Send + Sync {
    // Required methods
    fn create_thing_in_registry<'thing_dto, 'accept_language, 'life0, 'async_trait>(
        &'life0 self,
        thing_dto: ThingDto,
        accept_language: Option<&'accept_language str>,
    ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<CreateThingInRegistryError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_dto: 'async_trait,
             'accept_language: 'async_trait,
             'life0: 'async_trait;
    fn enable_thing<'thing_uid, 'accept_language, 'body, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        accept_language: Option<&'accept_language str>,
        body: Option<&'body str>,
    ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<EnableThingError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'accept_language: 'async_trait,
             'body: 'async_trait,
             'life0: 'async_trait;
    fn get_available_firmwares_for_thing<'thing_uid, 'accept_language, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        accept_language: Option<&'accept_language str>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<FirmwareDto>, Error<GetAvailableFirmwaresForThingError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'accept_language: 'async_trait,
             'life0: 'async_trait;
    fn get_thing_by_id<'thing_uid, 'accept_language, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        accept_language: Option<&'accept_language str>,
    ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<GetThingByIdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'accept_language: 'async_trait,
             'life0: 'async_trait;
    fn get_thing_config_status<'thing_uid, 'accept_language, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        accept_language: Option<&'accept_language str>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ConfigStatusMessage>, Error<GetThingConfigStatusError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'accept_language: 'async_trait,
             'life0: 'async_trait;
    fn get_thing_firmware_status<'thing_uid, 'accept_language, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        accept_language: Option<&'accept_language str>,
    ) -> Pin<Box<dyn Future<Output = Result<FirmwareStatusDto, Error<GetThingFirmwareStatusError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'accept_language: 'async_trait,
             'life0: 'async_trait;
    fn get_thing_status<'thing_uid, 'accept_language, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        accept_language: Option<&'accept_language str>,
    ) -> Pin<Box<dyn Future<Output = Result<ThingStatusInfo, Error<GetThingStatusError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'accept_language: 'async_trait,
             'life0: 'async_trait;
    fn get_things<'accept_language, 'summary, 'static_data_only, 'life0, 'async_trait>(
        &'life0 self,
        accept_language: Option<&'accept_language str>,
        summary: Option<bool>,
        static_data_only: Option<bool>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<EnrichedThingDto>, Error<GetThingsError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'accept_language: 'async_trait,
             'summary: 'async_trait,
             'static_data_only: 'async_trait,
             'life0: 'async_trait;
    fn remove_thing_by_id<'thing_uid, 'accept_language, 'force, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        accept_language: Option<&'accept_language str>,
        force: Option<bool>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<RemoveThingByIdError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'accept_language: 'async_trait,
             'force: 'async_trait,
             'life0: 'async_trait;
    fn update_thing<'thing_uid, 'thing_dto, 'accept_language, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        thing_dto: ThingDto,
        accept_language: Option<&'accept_language str>,
    ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<UpdateThingError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'thing_dto: 'async_trait,
             'accept_language: 'async_trait,
             'life0: 'async_trait;
    fn update_thing_config<'thing_uid, 'accept_language, 'request_body, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        accept_language: Option<&'accept_language str>,
        request_body: Option<HashMap<String, Value>>,
    ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<UpdateThingConfigError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'accept_language: 'async_trait,
             'request_body: 'async_trait,
             'life0: 'async_trait;
    fn update_thing_firmware<'thing_uid, 'firmware_version, 'accept_language, 'life0, 'async_trait>(
        &'life0 self,
        thing_uid: &'thing_uid str,
        firmware_version: &'firmware_version str,
        accept_language: Option<&'accept_language str>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error<UpdateThingFirmwareError>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'thing_uid: 'async_trait,
             'firmware_version: 'async_trait,
             'accept_language: 'async_trait,
             'life0: 'async_trait;
}
Available on crate feature things_api only.

Required Methods§

Source

fn create_thing_in_registry<'thing_dto, 'accept_language, 'life0, 'async_trait>( &'life0 self, thing_dto: ThingDto, accept_language: Option<&'accept_language str>, ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<CreateThingInRegistryError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_dto: 'async_trait, 'accept_language: 'async_trait, 'life0: 'async_trait,

POST /things

Source

fn enable_thing<'thing_uid, 'accept_language, 'body, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, accept_language: Option<&'accept_language str>, body: Option<&'body str>, ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<EnableThingError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'accept_language: 'async_trait, 'body: 'async_trait, 'life0: 'async_trait,

PUT /things/{thingUID}/enable

Source

fn get_available_firmwares_for_thing<'thing_uid, 'accept_language, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, accept_language: Option<&'accept_language str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<FirmwareDto>, Error<GetAvailableFirmwaresForThingError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'accept_language: 'async_trait, 'life0: 'async_trait,

GET /things/{thingUID}/firmwares

Source

fn get_thing_by_id<'thing_uid, 'accept_language, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, accept_language: Option<&'accept_language str>, ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<GetThingByIdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'accept_language: 'async_trait, 'life0: 'async_trait,

GET /things/{thingUID}

Source

fn get_thing_config_status<'thing_uid, 'accept_language, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, accept_language: Option<&'accept_language str>, ) -> Pin<Box<dyn Future<Output = Result<Vec<ConfigStatusMessage>, Error<GetThingConfigStatusError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'accept_language: 'async_trait, 'life0: 'async_trait,

GET /things/{thingUID}/config/status

Source

fn get_thing_firmware_status<'thing_uid, 'accept_language, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, accept_language: Option<&'accept_language str>, ) -> Pin<Box<dyn Future<Output = Result<FirmwareStatusDto, Error<GetThingFirmwareStatusError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'accept_language: 'async_trait, 'life0: 'async_trait,

GET /things/{thingUID}/firmware/status

Source

fn get_thing_status<'thing_uid, 'accept_language, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, accept_language: Option<&'accept_language str>, ) -> Pin<Box<dyn Future<Output = Result<ThingStatusInfo, Error<GetThingStatusError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'accept_language: 'async_trait, 'life0: 'async_trait,

GET /things/{thingUID}/status

Source

fn get_things<'accept_language, 'summary, 'static_data_only, 'life0, 'async_trait>( &'life0 self, accept_language: Option<&'accept_language str>, summary: Option<bool>, static_data_only: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<Vec<EnrichedThingDto>, Error<GetThingsError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'accept_language: 'async_trait, 'summary: 'async_trait, 'static_data_only: 'async_trait, 'life0: 'async_trait,

GET /things

Source

fn remove_thing_by_id<'thing_uid, 'accept_language, 'force, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, accept_language: Option<&'accept_language str>, force: Option<bool>, ) -> Pin<Box<dyn Future<Output = Result<(), Error<RemoveThingByIdError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'accept_language: 'async_trait, 'force: 'async_trait, 'life0: 'async_trait,

DELETE /things/{thingUID}

Source

fn update_thing<'thing_uid, 'thing_dto, 'accept_language, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, thing_dto: ThingDto, accept_language: Option<&'accept_language str>, ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<UpdateThingError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'thing_dto: 'async_trait, 'accept_language: 'async_trait, 'life0: 'async_trait,

PUT /things/{thingUID}

Source

fn update_thing_config<'thing_uid, 'accept_language, 'request_body, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, accept_language: Option<&'accept_language str>, request_body: Option<HashMap<String, Value>>, ) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<UpdateThingConfigError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'accept_language: 'async_trait, 'request_body: 'async_trait, 'life0: 'async_trait,

PUT /things/{thingUID}/config

Source

fn update_thing_firmware<'thing_uid, 'firmware_version, 'accept_language, 'life0, 'async_trait>( &'life0 self, thing_uid: &'thing_uid str, firmware_version: &'firmware_version str, accept_language: Option<&'accept_language str>, ) -> Pin<Box<dyn Future<Output = Result<(), Error<UpdateThingFirmwareError>>> + Send + 'async_trait>>
where Self: 'async_trait, 'thing_uid: 'async_trait, 'firmware_version: 'async_trait, 'accept_language: 'async_trait, 'life0: 'async_trait,

PUT /things/{thingUID}/firmware/{firmwareVersion}

Implementors§