use fundamentum_edge_proto::com::fundamentum::edge::v1::{ provisioning_client::ProvisioningClient, ProvisionRequest, ProvisionResponse, }; use tonic::Request; async fn provision_device() -> Result> { let mut client = ProvisioningClient::connect("http://127.0.0.1:8080").await?; let request = ProvisionRequest { api_base_url: "Fundamentum base url".to_owned(), project_id: 1, region_id: 1, registry_id: 1, serial_number: "My serial number".to_owned(), asset_type_id: 1, access_token: "Fundamentum access token".to_owned(), replace_existing: false, }; let response = client.provision(Request::new(request)).await?; Ok(response.into_inner()) } #[tokio::main] async fn main() -> Result<(), Box> { let provision_response = provision_device().await?; println!("Provision Response = {provision_response:?}"); Ok(()) }